From 03ec3f84abf88f2df591adee9011006cc132c281 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Fri, 29 May 2026 09:24:44 +0000 Subject: [PATCH 1/3] Configurations: 'specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'd3e4f7da9ee4a085a8ebfee6d377f44143f9411e' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6370008 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .github/CODEOWNERS | 2 +- pnpm-lock.yaml | 31 +- .../arm-apimanagement/CHANGELOG.md | 520 + sdk/apimanagement/arm-apimanagement/README.md | 22 +- .../arm-apimanagement/_meta.json | 8 - .../arm-apimanagement/api-extractor.json | 4 +- .../config/tsconfig.lint.json | 7 - .../config/tsconfig.samples.json | 4 +- .../config/tsconfig.src.browser.json | 4 +- .../config/tsconfig.src.cjs.json | 4 +- .../config/tsconfig.src.esm.json | 4 +- .../config/tsconfig.test.browser.json | 10 + .../config/tsconfig.test.node.json | 9 +- .../arm-apimanagement/eslint.config.mjs | 29 +- .../arm-apimanagement/metadata.json | 1236 + .../arm-apimanagement/package.json | 2164 +- .../arm-apimanagement-browser.api.diff.md | 68 +- .../review/arm-apimanagement-node.api.md | 13322 ++++----- .../allPoliciesListByServiceSample.ts | 27 +- .../samples-dev/apiCreateOrUpdateSample.ts | 556 +- .../samples-dev/apiDeleteSample.ts | 31 +- .../apiDiagnosticCreateOrUpdateSample.ts | 61 +- .../samples-dev/apiDiagnosticDeleteSample.ts | 37 +- .../apiDiagnosticGetEntityTagSample.ts | 34 +- .../samples-dev/apiDiagnosticGetSample.ts | 31 +- .../apiDiagnosticListByServiceSample.ts | 29 +- .../samples-dev/apiDiagnosticUpdateSample.ts | 64 +- .../samples-dev/apiExportGetSample.ts | 60 +- ...wayConfigConnectionCreateOrUpdateSample.ts | 45 +- .../apiGatewayConfigConnectionDeleteSample.ts | 31 +- .../apiGatewayConfigConnectionGetSample.ts | 28 +- ...ewayConfigConnectionListByGatewaySample.ts | 26 +- .../apiGatewayCreateOrUpdateSample.ts | 73 +- .../samples-dev/apiGatewayDeleteSample.ts | 26 +- .../samples-dev/apiGatewayGetSample.ts | 23 +- ...ewayHostnameBindingCreateOrUpdateSample.ts | 36 + .../apiGatewayHostnameBindingDeleteSample.ts | 24 + .../apiGatewayHostnameBindingGetSample.ts | 25 + ...tewayHostnameBindingListByGatewaySample.ts | 29 + ...tewayHostnameBindingRefreshSecretSample.ts | 24 + .../apiGatewayListByResourceGroupSample.ts | 25 +- .../samples-dev/apiGatewayListSample.ts | 19 +- .../samples-dev/apiGatewayUpdateSample.ts | 37 +- .../samples-dev/apiGetEntityTagSample.ts | 29 +- .../samples-dev/apiGetSample.ts | 40 +- .../apiIssueAttachmentCreateOrUpdateSample.ts | 44 +- .../apiIssueAttachmentDeleteSample.ts | 40 +- .../apiIssueAttachmentGetEntityTagSample.ts | 37 +- .../apiIssueAttachmentGetSample.ts | 34 +- .../apiIssueAttachmentListByServiceSample.ts | 32 +- .../apiIssueCommentCreateOrUpdateSample.ts | 50 +- .../apiIssueCommentDeleteSample.ts | 40 +- .../apiIssueCommentGetEntityTagSample.ts | 37 +- .../samples-dev/apiIssueCommentGetSample.ts | 34 +- .../apiIssueCommentListByServiceSample.ts | 32 +- .../apiIssueCreateOrUpdateSample.ts | 48 +- .../samples-dev/apiIssueDeleteSample.ts | 37 +- .../samples-dev/apiIssueGetEntityTagSample.ts | 34 +- .../samples-dev/apiIssueGetSample.ts | 31 +- .../apiIssueListByServiceSample.ts | 29 +- .../samples-dev/apiIssueUpdateSample.ts | 40 +- .../samples-dev/apiListByServiceSample.ts | 27 +- .../samples-dev/apiListByTagsSample.ts | 27 +- ...ementGatewaySkusListAvailableSkusSample.ts | 30 +- .../apiManagementOperationsListSample.ts | 15 +- ...eApplyNetworkConfigurationUpdatesSample.ts | 41 +- .../apiManagementServiceBackupSample.ts | 89 +- ...ementServiceCheckNameAvailabilitySample.ts | 27 +- ...piManagementServiceCreateOrUpdateSample.ts | 405 +- .../apiManagementServiceDeleteSample.ts | 26 +- ...rviceGetDomainOwnershipIdentifierSample.ts | 21 +- .../apiManagementServiceGetSample.ts | 62 +- .../apiManagementServiceGetSsoTokenSample.ts | 26 +- ...agementServiceListByResourceGroupSample.ts | 25 +- .../apiManagementServiceListSample.ts | 19 +- ...apiManagementServiceMigrateToStv2Sample.ts | 37 +- ...ManagementServiceRefreshHostnamesSample.ts | 25 + ...rcesPerformConnectivityCheckAsyncSample.ts | 63 + .../apiManagementServiceRestoreSample.ts | 37 +- ...rviceSkusListAvailableServiceSkusSample.ts | 52 +- .../apiManagementServiceUpdateSample.ts | 93 +- .../apiManagementSkusListSample.ts | 23 +- .../apiManagementWorkspaceLinkGetSample.ts | 28 +- ...gementWorkspaceLinksListByServiceSample.ts | 27 +- .../apiOperationCreateOrUpdateSample.ts | 93 +- .../samples-dev/apiOperationDeleteSample.ts | 37 +- .../apiOperationGetEntityTagSample.ts | 34 +- .../samples-dev/apiOperationGetSample.ts | 54 +- .../apiOperationListByApiSample.ts | 29 +- .../apiOperationPolicyCreateOrUpdateSample.ts | 53 +- .../apiOperationPolicyDeleteSample.ts | 40 +- .../apiOperationPolicyGetEntityTagSample.ts | 37 +- .../apiOperationPolicyGetSample.ts | 34 +- ...apiOperationPolicyListByOperationSample.ts | 31 +- .../samples-dev/apiOperationUpdateSample.ts | 96 +- .../apiPolicyCreateOrUpdateSample.ts | 88 +- .../samples-dev/apiPolicyDeleteSample.ts | 33 +- .../apiPolicyGetEntityTagSample.ts | 31 +- .../samples-dev/apiPolicyGetSample.ts | 31 +- .../samples-dev/apiPolicyListByApiSample.ts | 28 +- .../samples-dev/apiProductListByApisSample.ts | 29 +- .../apiReleaseCreateOrUpdateSample.ts | 41 +- .../samples-dev/apiReleaseDeleteSample.ts | 33 +- .../apiReleaseGetEntityTagSample.ts | 31 +- .../samples-dev/apiReleaseGetSample.ts | 31 +- .../apiReleaseListByServiceSample.ts | 29 +- .../samples-dev/apiReleaseUpdateSample.ts | 43 +- .../apiRevisionListByServiceSample.ts | 29 +- .../apiSchemaCreateOrUpdateSample.ts | 46 +- .../samples-dev/apiSchemaDeleteSample.ts | 37 +- .../apiSchemaGetEntityTagSample.ts | 34 +- .../samples-dev/apiSchemaGetSample.ts | 31 +- .../samples-dev/apiSchemaListByApiSample.ts | 29 +- .../apiTagDescriptionCreateOrUpdateSample.ts | 47 +- .../apiTagDescriptionDeleteSample.ts | 37 +- .../apiTagDescriptionGetEntityTagSample.ts | 34 +- .../samples-dev/apiTagDescriptionGetSample.ts | 31 +- .../apiTagDescriptionListByServiceSample.ts | 29 +- .../apiToolCreateOrUpdateSample.ts | 36 + .../samples-dev/apiToolDeleteSample.ts | 29 + .../samples-dev/apiToolGetEntityTagSample.ts | 29 + .../samples-dev/apiToolGetSample.ts | 30 + .../samples-dev/apiToolListByApiSample.ts | 29 + .../samples-dev/apiToolUpdateSample.ts | 31 + .../samples-dev/apiUpdateSample.ts | 41 +- .../apiVersionSetCreateOrUpdateSample.ts | 39 +- .../samples-dev/apiVersionSetDeleteSample.ts | 31 +- .../apiVersionSetGetEntityTagSample.ts | 29 +- .../samples-dev/apiVersionSetGetSample.ts | 28 +- .../apiVersionSetListByServiceSample.ts | 27 +- .../samples-dev/apiVersionSetUpdateSample.ts | 41 +- .../apiWikiCreateOrUpdateSample.ts | 33 +- .../samples-dev/apiWikiDeleteSample.ts | 31 +- .../samples-dev/apiWikiGetEntityTagSample.ts | 29 +- .../samples-dev/apiWikiGetSample.ts | 28 +- .../samples-dev/apiWikiUpdateSample.ts | 39 +- .../samples-dev/apiWikisListSample.ts | 29 +- ...izationAccessPolicyCreateOrUpdateSample.ts | 48 +- .../authorizationAccessPolicyDeleteSample.ts | 40 +- .../authorizationAccessPolicyGetSample.ts | 34 +- ...onAccessPolicyListByAuthorizationSample.ts | 32 +- .../authorizationConfirmConsentCodeSample.ts | 42 +- .../authorizationCreateOrUpdateSample.ts | 85 +- .../samples-dev/authorizationDeleteSample.ts | 33 +- .../samples-dev/authorizationGetSample.ts | 30 +- ...zationListByAuthorizationProviderSample.ts | 50 +- .../authorizationLoginLinksPostSample.ts | 39 +- ...thorizationProviderCreateOrUpdateSample.ts | 263 +- .../authorizationProviderDeleteSample.ts | 31 +- .../authorizationProviderGetSample.ts | 28 +- ...uthorizationProviderListByServiceSample.ts | 27 +- ...uthorizationProviderRefreshSecretSample.ts | 29 + ...authorizationServerCreateOrUpdateSample.ts | 68 +- .../authorizationServerDeleteSample.ts | 31 +- .../authorizationServerGetEntityTagSample.ts | 29 +- .../authorizationServerGetSample.ts | 28 +- .../authorizationServerListByServiceSample.ts | 27 +- .../authorizationServerListSecretsSample.ts | 28 +- .../authorizationServerUpdateSample.ts | 47 +- .../backendCreateOrUpdateSample.ts | 274 +- .../samples-dev/backendDeleteSample.ts | 31 +- .../samples-dev/backendGetEntityTagSample.ts | 29 +- .../samples-dev/backendGetSample.ts | 28 +- .../samples-dev/backendListByServiceSample.ts | 27 +- .../samples-dev/backendReconnectSample.ts | 38 +- .../samples-dev/backendUpdateSample.ts | 41 +- .../samples-dev/cacheCreateOrUpdateSample.ts | 39 +- .../samples-dev/cacheDeleteSample.ts | 31 +- .../samples-dev/cacheGetEntityTagSample.ts | 29 +- .../samples-dev/cacheGetSample.ts | 28 +- .../samples-dev/cacheListByServiceSample.ts | 27 +- .../samples-dev/cacheUpdateSample.ts | 37 +- .../certificateCreateOrUpdateSample.ts | 67 +- .../samples-dev/certificateDeleteSample.ts | 31 +- .../certificateGetEntityTagSample.ts | 29 +- .../samples-dev/certificateGetSample.ts | 48 +- .../certificateListByServiceSample.ts | 27 +- .../certificateRefreshSecretSample.ts | 28 +- .../clientApplicationCreateOrUpdateSample.ts | 29 + .../clientApplicationDeleteSample.ts | 24 + .../clientApplicationGetEntityTagSample.ts | 24 + .../samples-dev/clientApplicationGetSample.ts | 25 + .../clientApplicationListByServiceSample.ts | 29 + .../clientApplicationListSecretsSample.ts | 25 + ...lientApplicationProductLinkCreateSample.ts | 34 + ...lientApplicationProductLinkDeleteSample.ts | 24 + .../clientApplicationProductLinkGetSample.ts | 30 + ...oductLinkListByClientApplicationsSample.ts | 33 + .../contentItemCreateOrUpdateSample.ts | 58 +- .../samples-dev/contentItemDeleteSample.ts | 37 +- .../contentItemGetEntityTagSample.ts | 34 +- .../samples-dev/contentItemGetSample.ts | 31 +- .../contentItemListByServiceSample.ts | 29 +- .../contentTypeCreateOrUpdateSample.ts | 48 +- .../samples-dev/contentTypeDeleteSample.ts | 31 +- .../samples-dev/contentTypeGetSample.ts | 28 +- .../contentTypeListByServiceSample.ts | 27 +- .../delegationSettingsCreateOrUpdateSample.ts | 46 +- .../delegationSettingsGetEntityTagSample.ts | 27 +- .../delegationSettingsGetSample.ts | 26 +- .../delegationSettingsListSecretsSample.ts | 26 +- .../delegationSettingsUpdateSample.ts | 40 +- .../deletedServicesGetByNameSample.ts | 22 +- ...deletedServicesListBySubscriptionSample.ts | 19 +- .../samples-dev/deletedServicesPurgeSample.ts | 25 +- .../diagnosticCreateOrUpdateSample.ts | 58 +- .../samples-dev/diagnosticDeleteSample.ts | 31 +- .../diagnosticGetEntityTagSample.ts | 29 +- .../samples-dev/diagnosticGetSample.ts | 28 +- .../diagnosticListByServiceSample.ts | 27 +- .../samples-dev/diagnosticUpdateSample.ts | 41 +- .../documentationCreateOrUpdateSample.ts | 37 +- .../samples-dev/documentationDeleteSample.ts | 30 +- .../documentationGetEntityTagSample.ts | 29 +- .../samples-dev/documentationGetSample.ts | 28 +- .../documentationListByServiceSample.ts | 27 +- .../samples-dev/documentationUpdateSample.ts | 37 +- .../emailTemplateCreateOrUpdateSample.ts | 36 +- .../samples-dev/emailTemplateDeleteSample.ts | 31 +- .../emailTemplateGetEntityTagSample.ts | 29 +- .../samples-dev/emailTemplateGetSample.ts | 28 +- .../emailTemplateListByServiceSample.ts | 27 +- .../samples-dev/emailTemplateUpdateSample.ts | 43 +- .../gatewayApiCreateOrUpdateSample.ts | 39 +- .../samples-dev/gatewayApiDeleteSample.ts | 31 +- .../gatewayApiGetEntityTagSample.ts | 31 +- .../gatewayApiListByServiceSample.ts | 29 +- ...ertificateAuthorityCreateOrUpdateSample.ts | 37 +- ...gatewayCertificateAuthorityDeleteSample.ts | 33 +- ...yCertificateAuthorityGetEntityTagSample.ts | 31 +- .../gatewayCertificateAuthorityGetSample.ts | 31 +- ...CertificateAuthorityListByServiceSample.ts | 29 +- .../gatewayCreateOrUpdateSample.ts | 36 +- .../samples-dev/gatewayDeleteSample.ts | 31 +- .../samples-dev/gatewayGenerateTokenSample.ts | 39 +- .../samples-dev/gatewayGetEntityTagSample.ts | 29 +- .../samples-dev/gatewayGetSample.ts | 28 +- ...stnameConfigurationCreateOrUpdateSample.ts | 53 +- ...atewayHostnameConfigurationDeleteSample.ts | 33 +- ...HostnameConfigurationGetEntityTagSample.ts | 31 +- .../gatewayHostnameConfigurationGetSample.ts | 31 +- ...ostnameConfigurationListByServiceSample.ts | 29 +- ...gatewayInvalidateDebugCredentialsSample.ts | 29 +- .../samples-dev/gatewayListByServiceSample.ts | 27 +- .../gatewayListDebugCredentialsSample.ts | 39 +- .../samples-dev/gatewayListKeysSample.ts | 28 +- .../samples-dev/gatewayListTraceSample.ts | 37 +- .../samples-dev/gatewayRegenerateKeySample.ts | 36 +- .../samples-dev/gatewayUpdateSample.ts | 38 +- .../globalSchemaCreateOrUpdateSample.ts | 70 +- .../samples-dev/globalSchemaDeleteSample.ts | 31 +- .../globalSchemaGetEntityTagSample.ts | 29 +- .../samples-dev/globalSchemaGetSample.ts | 48 +- .../globalSchemaListByServiceSample.ts | 27 +- .../graphQLApiResolverCreateOrUpdateSample.ts | 31 + .../graphQLApiResolverDeleteSample.ts | 30 + .../graphQLApiResolverGetEntityTagSample.ts | 29 + .../graphQLApiResolverGetSample.ts | 30 + .../graphQLApiResolverListByApiSample.ts | 33 + ...QLApiResolverPolicyCreateOrUpdateSample.ts | 37 + .../graphQLApiResolverPolicyDeleteSample.ts | 31 + ...phQLApiResolverPolicyGetEntityTagSample.ts | 30 + .../graphQLApiResolverPolicyGetSample.ts | 31 + ...QLApiResolverPolicyListByResolverSample.ts | 34 + .../graphQLApiResolverUpdateSample.ts | 36 + .../graphQlApiResolverCreateOrUpdateSample.ts | 48 - .../graphQlApiResolverDeleteSample.ts | 41 - .../graphQlApiResolverGetEntityTagSample.ts | 39 - .../graphQlApiResolverGetSample.ts | 39 - .../graphQlApiResolverListByApiSample.ts | 40 - ...QlApiResolverPolicyCreateOrUpdateSample.ts | 56 - .../graphQlApiResolverPolicyDeleteSample.ts | 43 - ...phQlApiResolverPolicyGetEntityTagSample.ts | 41 - .../graphQlApiResolverPolicyGetSample.ts | 41 - ...QlApiResolverPolicyListByResolverSample.ts | 42 - .../graphQlApiResolverUpdateSample.ts | 50 - .../samples-dev/groupCreateOrUpdateSample.ts | 66 +- .../samples-dev/groupDeleteSample.ts | 31 +- .../samples-dev/groupGetEntityTagSample.ts | 29 +- .../samples-dev/groupGetSample.ts | 28 +- .../samples-dev/groupListByServiceSample.ts | 27 +- .../samples-dev/groupUpdateSample.ts | 37 +- .../groupUserCheckEntityExistsSample.ts | 34 +- .../samples-dev/groupUserCreateSample.ts | 31 +- .../samples-dev/groupUserDeleteSample.ts | 31 +- .../samples-dev/groupUserListSample.ts | 29 +- .../identityProviderCreateOrUpdateSample.ts | 39 +- .../identityProviderDeleteSample.ts | 31 +- .../identityProviderGetEntityTagSample.ts | 29 +- .../samples-dev/identityProviderGetSample.ts | 28 +- .../identityProviderListByServiceSample.ts | 27 +- .../identityProviderListSecretsSample.ts | 28 +- .../identityProviderUpdateSample.ts | 41 +- .../samples-dev/issueGetSample.ts | 28 +- .../samples-dev/issueListByServiceSample.ts | 27 +- .../samples-dev/loggerCreateOrUpdateSample.ts | 72 +- .../samples-dev/loggerDeleteSample.ts | 31 +- .../samples-dev/loggerGetEntityTagSample.ts | 29 +- .../samples-dev/loggerGetSample.ts | 28 +- .../samples-dev/loggerListByServiceSample.ts | 27 +- .../samples-dev/loggerUpdateSample.ts | 41 +- .../namedValueCreateOrUpdateSample.ts | 67 +- .../samples-dev/namedValueDeleteSample.ts | 31 +- .../namedValueGetEntityTagSample.ts | 29 +- .../samples-dev/namedValueGetSample.ts | 48 +- .../namedValueListByServiceSample.ts | 27 +- .../samples-dev/namedValueListValueSample.ts | 28 +- .../namedValueRefreshSecretSample.ts | 28 +- .../samples-dev/namedValueUpdateSample.ts | 41 +- .../networkStatusListByLocationSample.ts | 28 +- .../networkStatusListByServiceSample.ts | 26 +- .../notificationCreateOrUpdateSample.ts | 28 +- .../samples-dev/notificationGetSample.ts | 28 +- .../notificationListByServiceSample.ts | 27 +- ...onRecipientEmailCheckEntityExistsSample.ts | 34 +- ...ationRecipientEmailCreateOrUpdateSample.ts | 31 +- .../notificationRecipientEmailDeleteSample.ts | 34 +- ...nRecipientEmailListByNotificationSample.ts | 28 +- ...ionRecipientUserCheckEntityExistsSample.ts | 34 +- ...cationRecipientUserCreateOrUpdateSample.ts | 31 +- .../notificationRecipientUserDeleteSample.ts | 34 +- ...onRecipientUserListByNotificationSample.ts | 28 +- ...enIdConnectProviderCreateOrUpdateSample.ts | 48 +- .../openIdConnectProviderDeleteSample.ts | 31 +- ...openIdConnectProviderGetEntityTagSample.ts | 29 +- .../openIdConnectProviderGetSample.ts | 28 +- ...penIdConnectProviderListByServiceSample.ts | 27 +- .../openIdConnectProviderListSecretsSample.ts | 28 +- .../openIdConnectProviderUpdateSample.ts | 41 +- .../samples-dev/operationListByTagsSample.ts | 29 +- .../samples-dev/operationStatusGetSample.ts | 25 +- .../samples-dev/operationsResultsGetSample.ts | 23 +- ...ependenciesEndpointsListByServiceSample.ts | 30 +- .../performConnectivityCheckAsyncSample.ts | 80 - .../samples-dev/policyCreateOrUpdateSample.ts | 36 +- .../samples-dev/policyDeleteSample.ts | 31 +- .../policyDescriptionListByServiceSample.ts | 34 +- .../policyFragmentCreateOrUpdateSample.ts | 45 +- .../samples-dev/policyFragmentDeleteSample.ts | 31 +- .../policyFragmentGetEntityTagSample.ts | 29 +- .../samples-dev/policyFragmentGetSample.ts | 56 +- .../policyFragmentListByServiceSample.ts | 27 +- .../policyFragmentListReferencesSample.ts | 28 +- .../samples-dev/policyGetEntityTagSample.ts | 29 +- .../samples-dev/policyGetSample.ts | 54 +- .../samples-dev/policyListByServiceSample.ts | 27 +- .../policyRestrictionCreateOrUpdateSample.ts | 42 +- .../policyRestrictionDeleteSample.ts | 37 +- .../policyRestrictionGetEntityTagSample.ts | 29 +- .../samples-dev/policyRestrictionGetSample.ts | 28 +- .../policyRestrictionListByServiceSample.ts | 27 +- .../policyRestrictionUpdateSample.ts | 39 +- ...cyRestrictionValidationsByServiceSample.ts | 27 +- .../portalConfigCreateOrUpdateSample.ts | 48 +- .../portalConfigGetEntityTagSample.ts | 29 +- .../samples-dev/portalConfigGetSample.ts | 28 +- .../portalConfigListByServiceSample.ts | 27 +- .../samples-dev/portalConfigUpdateSample.ts | 48 +- .../portalRevisionCreateOrUpdateSample.ts | 39 +- .../portalRevisionGetEntityTagSample.ts | 29 +- .../samples-dev/portalRevisionGetSample.ts | 28 +- .../portalRevisionListByServiceSample.ts | 27 +- .../samples-dev/portalRevisionUpdateSample.ts | 41 +- .../portalSettingsListByServiceSample.ts | 26 +- ...eEndpointConnectionCreateOrUpdateSample.ts | 55 +- .../privateEndpointConnectionDeleteSample.ts | 34 +- ...rivateEndpointConnectionGetByNameSample.ts | 30 +- ...tConnectionGetPrivateLinkResourceSample.ts | 33 +- ...teEndpointConnectionListByServiceSample.ts | 27 +- ...onnectionListPrivateLinkResourcesSample.ts | 30 +- .../productApiCheckEntityExistsSample.ts | 34 +- .../productApiCreateOrUpdateSample.ts | 31 +- .../samples-dev/productApiDeleteSample.ts | 31 +- .../productApiLinkCreateOrUpdateSample.ts | 43 +- .../samples-dev/productApiLinkDeleteSample.ts | 31 +- .../samples-dev/productApiLinkGetSample.ts | 30 +- .../productApiLinkListByProductSample.ts | 29 +- .../productApiListByProductSample.ts | 29 +- .../productCreateOrUpdateSample.ts | 34 +- .../samples-dev/productDeleteSample.ts | 39 +- .../samples-dev/productGetEntityTagSample.ts | 29 +- .../samples-dev/productGetSample.ts | 28 +- .../productGroupCheckEntityExistsSample.ts | 34 +- .../productGroupCreateOrUpdateSample.ts | 31 +- .../samples-dev/productGroupDeleteSample.ts | 31 +- .../productGroupLinkCreateOrUpdateSample.ts | 43 +- .../productGroupLinkDeleteSample.ts | 31 +- .../samples-dev/productGroupLinkGetSample.ts | 30 +- .../productGroupLinkListByProductSample.ts | 29 +- .../productGroupListByProductSample.ts | 29 +- .../samples-dev/productListByServiceSample.ts | 27 +- .../samples-dev/productListByTagsSample.ts | 27 +- .../productPolicyCreateOrUpdateSample.ts | 42 +- .../samples-dev/productPolicyDeleteSample.ts | 33 +- .../productPolicyGetEntityTagSample.ts | 31 +- .../samples-dev/productPolicyGetSample.ts | 31 +- .../productPolicyListByProductSample.ts | 29 +- .../productSubscriptionsListSample.ts | 29 +- .../samples-dev/productUpdateSample.ts | 39 +- .../productWikiCreateOrUpdateSample.ts | 33 +- .../samples-dev/productWikiDeleteSample.ts | 31 +- .../productWikiGetEntityTagSample.ts | 29 +- .../samples-dev/productWikiGetSample.ts | 28 +- .../samples-dev/productWikiUpdateSample.ts | 39 +- .../samples-dev/productWikisListSample.ts | 29 +- .../quotaByCounterKeysListByServiceSample.ts | 28 +- .../quotaByCounterKeysUpdateSample.ts | 39 +- .../samples-dev/quotaByPeriodKeysGetSample.ts | 31 +- .../quotaByPeriodKeysUpdateSample.ts | 40 +- .../samples-dev/regionListByServiceSample.ts | 27 +- .../samples-dev/reportsListByApiSample.ts | 30 +- .../samples-dev/reportsListByGeoSample.ts | 30 +- .../reportsListByOperationSample.ts | 30 +- .../samples-dev/reportsListByProductSample.ts | 30 +- .../samples-dev/reportsListByRequestSample.ts | 30 +- .../reportsListBySubscriptionSample.ts | 30 +- .../samples-dev/reportsListByTimeSample.ts | 33 +- .../samples-dev/reportsListByUserSample.ts | 30 +- .../signInSettingsCreateOrUpdateSample.ts | 36 +- .../signInSettingsGetEntityTagSample.ts | 27 +- .../samples-dev/signInSettingsGetSample.ts | 26 +- .../samples-dev/signInSettingsUpdateSample.ts | 34 +- .../signUpSettingsCreateOrUpdateSample.ts | 46 +- .../signUpSettingsGetEntityTagSample.ts | 27 +- .../samples-dev/signUpSettingsGetSample.ts | 26 +- .../samples-dev/signUpSettingsUpdateSample.ts | 44 +- .../subscriptionCreateOrUpdateSample.ts | 39 +- .../samples-dev/subscriptionDeleteSample.ts | 31 +- .../subscriptionGetEntityTagSample.ts | 29 +- .../samples-dev/subscriptionGetSample.ts | 28 +- .../samples-dev/subscriptionListSample.ts | 27 +- .../subscriptionListSecretsSample.ts | 28 +- .../subscriptionRegeneratePrimaryKeySample.ts | 29 +- ...ubscriptionRegenerateSecondaryKeySample.ts | 29 +- .../samples-dev/subscriptionUpdateSample.ts | 37 +- .../tagApiLinkCreateOrUpdateSample.ts | 41 +- .../samples-dev/tagApiLinkDeleteSample.ts | 31 +- .../samples-dev/tagApiLinkGetSample.ts | 30 +- .../tagApiLinkListByProductSample.ts | 29 +- .../samples-dev/tagAssignToApiSample.ts | 31 +- .../samples-dev/tagAssignToOperationSample.ts | 34 +- .../samples-dev/tagAssignToProductSample.ts | 31 +- .../samples-dev/tagCreateOrUpdateSample.ts | 35 +- .../samples-dev/tagDeleteSample.ts | 31 +- .../samples-dev/tagDetachFromApiSample.ts | 34 +- .../tagDetachFromOperationSample.ts | 37 +- .../samples-dev/tagDetachFromProductSample.ts | 34 +- .../samples-dev/tagGetByApiSample.ts | 31 +- .../samples-dev/tagGetByOperationSample.ts | 34 +- .../samples-dev/tagGetByProductSample.ts | 31 +- .../tagGetEntityStateByApiSample.ts | 34 +- .../tagGetEntityStateByOperationSample.ts | 37 +- .../tagGetEntityStateByProductSample.ts | 34 +- .../samples-dev/tagGetEntityStateSample.ts | 29 +- .../samples-dev/tagGetSample.ts | 24 +- .../samples-dev/tagListByApiSample.ts | 29 +- .../samples-dev/tagListByOperationSample.ts | 32 +- .../samples-dev/tagListByProductSample.ts | 29 +- .../samples-dev/tagListByServiceSample.ts | 27 +- .../tagOperationLinkCreateOrUpdateSample.ts | 43 +- .../tagOperationLinkDeleteSample.ts | 31 +- .../samples-dev/tagOperationLinkGetSample.ts | 30 +- .../tagOperationLinkListByProductSample.ts | 29 +- .../tagProductLinkCreateOrUpdateSample.ts | 43 +- .../samples-dev/tagProductLinkDeleteSample.ts | 31 +- .../samples-dev/tagProductLinkGetSample.ts | 30 +- .../tagProductLinkListByProductSample.ts | 29 +- .../tagResourceListByServiceSample.ts | 27 +- .../samples-dev/tagUpdateSample.ts | 37 +- .../samples-dev/tenantAccessCreateSample.ts | 37 +- .../tenantAccessGetEntityTagSample.ts | 29 +- .../samples-dev/tenantAccessGetSample.ts | 48 +- ...nantAccessGitRegeneratePrimaryKeySample.ts | 29 +- ...ntAccessGitRegenerateSecondaryKeySample.ts | 29 +- .../tenantAccessListByServiceSample.ts | 27 +- .../tenantAccessListSecretsSample.ts | 28 +- .../tenantAccessRegeneratePrimaryKeySample.ts | 29 +- ...enantAccessRegenerateSecondaryKeySample.ts | 29 +- .../samples-dev/tenantAccessUpdateSample.ts | 37 +- .../tenantConfigurationDeploySample.ts | 35 +- .../tenantConfigurationGetSyncStateSample.ts | 28 +- .../tenantConfigurationSaveSample.ts | 35 +- .../tenantConfigurationValidateSample.ts | 35 +- .../samples-dev/tenantSettingsGetSample.ts | 28 +- .../tenantSettingsListByServiceSample.ts | 27 +- .../userConfirmationPasswordSendSample.ts | 29 +- .../samples-dev/userCreateOrUpdateSample.ts | 39 +- .../samples-dev/userDeleteSample.ts | 31 +- .../samples-dev/userGenerateSsoUrlSample.ts | 28 +- .../samples-dev/userGetEntityTagSample.ts | 29 +- .../samples-dev/userGetSample.ts | 24 +- .../userGetSharedAccessTokenSample.ts | 39 +- .../samples-dev/userGroupListSample.ts | 29 +- .../samples-dev/userIdentitiesListSample.ts | 29 +- .../samples-dev/userListByServiceSample.ts | 27 +- .../samples-dev/userSubscriptionGetSample.ts | 31 +- .../samples-dev/userSubscriptionListSample.ts | 29 +- .../samples-dev/userUpdateSample.ts | 41 +- .../workspaceApiCreateOrUpdateSample.ts | 62 +- .../samples-dev/workspaceApiDeleteSample.ts | 33 +- ...kspaceApiDiagnosticCreateOrUpdateSample.ts | 64 +- .../workspaceApiDiagnosticDeleteSample.ts | 40 +- ...orkspaceApiDiagnosticGetEntityTagSample.ts | 37 +- .../workspaceApiDiagnosticGetSample.ts | 34 +- ...spaceApiDiagnosticListByWorkspaceSample.ts | 32 +- .../workspaceApiDiagnosticUpdateSample.ts | 67 +- .../workspaceApiExportGetSample.ts | 66 +- .../workspaceApiGetEntityTagSample.ts | 31 +- .../samples-dev/workspaceApiGetSample.ts | 53 +- .../workspaceApiListByServiceSample.ts | 29 +- ...rkspaceApiOperationCreateOrUpdateSample.ts | 96 +- .../workspaceApiOperationDeleteSample.ts | 40 +- ...workspaceApiOperationGetEntityTagSample.ts | 37 +- .../workspaceApiOperationGetSample.ts | 34 +- .../workspaceApiOperationListByApiSample.ts | 32 +- ...eApiOperationPolicyCreateOrUpdateSample.ts | 58 +- ...workspaceApiOperationPolicyDeleteSample.ts | 43 +- ...aceApiOperationPolicyGetEntityTagSample.ts | 40 +- .../workspaceApiOperationPolicyGetSample.ts | 37 +- ...ApiOperationPolicyListByOperationSample.ts | 35 +- .../workspaceApiOperationUpdateSample.ts | 99 +- .../workspaceApiPolicyCreateOrUpdateSample.ts | 53 +- .../workspaceApiPolicyDeleteSample.ts | 35 +- .../workspaceApiPolicyGetEntityTagSample.ts | 37 +- .../workspaceApiPolicyGetSample.ts | 34 +- .../workspaceApiPolicyListByApiSample.ts | 32 +- ...workspaceApiReleaseCreateOrUpdateSample.ts | 48 +- .../workspaceApiReleaseDeleteSample.ts | 40 +- .../workspaceApiReleaseGetEntityTagSample.ts | 37 +- .../workspaceApiReleaseGetSample.ts | 34 +- .../workspaceApiReleaseListByServiceSample.ts | 32 +- .../workspaceApiReleaseUpdateSample.ts | 51 +- ...workspaceApiRevisionListByServiceSample.ts | 32 +- .../workspaceApiSchemaCreateOrUpdateSample.ts | 49 +- .../workspaceApiSchemaDeleteSample.ts | 40 +- .../workspaceApiSchemaGetEntityTagSample.ts | 37 +- .../workspaceApiSchemaGetSample.ts | 34 +- .../workspaceApiSchemaListByApiSample.ts | 32 +- .../samples-dev/workspaceApiUpdateSample.ts | 43 +- ...kspaceApiVersionSetCreateOrUpdateSample.ts | 41 +- .../workspaceApiVersionSetDeleteSample.ts | 33 +- ...orkspaceApiVersionSetGetEntityTagSample.ts | 31 +- .../workspaceApiVersionSetGetSample.ts | 30 +- ...rkspaceApiVersionSetListByServiceSample.ts | 29 +- .../workspaceApiVersionSetUpdateSample.ts | 44 +- .../workspaceBackendCreateOrUpdateSample.ts | 122 +- .../workspaceBackendDeleteSample.ts | 33 +- .../workspaceBackendGetEntityTagSample.ts | 31 +- .../samples-dev/workspaceBackendGetSample.ts | 30 +- .../workspaceBackendListByWorkspaceSample.ts | 29 +- .../workspaceBackendUpdateSample.ts | 46 +- ...orkspaceCertificateCreateOrUpdateSample.ts | 81 +- .../workspaceCertificateDeleteSample.ts | 33 +- .../workspaceCertificateGetEntityTagSample.ts | 31 +- .../workspaceCertificateGetSample.ts | 54 +- ...rkspaceCertificateListByWorkspaceSample.ts | 29 +- ...workspaceCertificateRefreshSecretSample.ts | 31 +- .../workspaceCreateOrUpdateSample.ts | 39 +- .../samples-dev/workspaceDeleteSample.ts | 31 +- ...workspaceDiagnosticCreateOrUpdateSample.ts | 61 +- .../workspaceDiagnosticDeleteSample.ts | 37 +- .../workspaceDiagnosticGetEntityTagSample.ts | 34 +- .../workspaceDiagnosticGetSample.ts | 31 +- ...orkspaceDiagnosticListByWorkspaceSample.ts | 29 +- .../workspaceDiagnosticUpdateSample.ts | 64 +- .../workspaceGetEntityTagSample.ts | 29 +- .../samples-dev/workspaceGetSample.ts | 28 +- ...rkspaceGlobalSchemaCreateOrUpdateSample.ts | 49 +- .../workspaceGlobalSchemaDeleteSample.ts | 33 +- ...workspaceGlobalSchemaGetEntityTagSample.ts | 31 +- .../workspaceGlobalSchemaGetSample.ts | 30 +- ...orkspaceGlobalSchemaListByServiceSample.ts | 29 +- .../workspaceGroupCreateOrUpdateSample.ts | 74 +- .../samples-dev/workspaceGroupDeleteSample.ts | 33 +- .../workspaceGroupGetEntityTagSample.ts | 34 +- .../samples-dev/workspaceGroupGetSample.ts | 31 +- .../workspaceGroupListByServiceSample.ts | 29 +- .../samples-dev/workspaceGroupUpdateSample.ts | 40 +- ...rkspaceGroupUserCheckEntityExistsSample.ts | 37 +- .../workspaceGroupUserCreateSample.ts | 34 +- .../workspaceGroupUserDeleteSample.ts | 37 +- .../workspaceGroupUserListSample.ts | 32 +- .../workspaceListByServiceSample.ts | 27 +- .../workspaceLoggerCreateOrUpdateSample.ts | 80 +- .../workspaceLoggerDeleteSample.ts | 33 +- .../workspaceLoggerGetEntityTagSample.ts | 31 +- .../samples-dev/workspaceLoggerGetSample.ts | 30 +- .../workspaceLoggerListByWorkspaceSample.ts | 29 +- .../workspaceLoggerUpdateSample.ts | 43 +- ...workspaceNamedValueCreateOrUpdateSample.ts | 88 +- .../workspaceNamedValueDeleteSample.ts | 33 +- .../workspaceNamedValueGetEntityTagSample.ts | 34 +- .../workspaceNamedValueGetSample.ts | 53 +- .../workspaceNamedValueListByServiceSample.ts | 29 +- .../workspaceNamedValueListValueSample.ts | 31 +- .../workspaceNamedValueRefreshSecretSample.ts | 33 +- .../workspaceNamedValueUpdateSample.ts | 47 +- ...rkspaceNotificationCreateOrUpdateSample.ts | 31 +- .../workspaceNotificationGetSample.ts | 31 +- ...orkspaceNotificationListByServiceSample.ts | 29 +- ...onRecipientEmailCheckEntityExistsSample.ts | 40 +- ...ationRecipientEmailCreateOrUpdateSample.ts | 39 +- ...eNotificationRecipientEmailDeleteSample.ts | 37 +- ...nRecipientEmailListByNotificationSample.ts | 36 +- ...ionRecipientUserCheckEntityExistsSample.ts | 40 +- ...cationRecipientUserCreateOrUpdateSample.ts | 34 +- ...ceNotificationRecipientUserDeleteSample.ts | 37 +- ...onRecipientUserListByNotificationSample.ts | 36 +- .../workspacePolicyCreateOrUpdateSample.ts | 88 +- .../workspacePolicyDeleteSample.ts | 33 +- ...spacePolicyFragmentCreateOrUpdateSample.ts | 51 +- .../workspacePolicyFragmentDeleteSample.ts | 37 +- ...rkspacePolicyFragmentGetEntityTagSample.ts | 34 +- .../workspacePolicyFragmentGetSample.ts | 61 +- ...kspacePolicyFragmentListByServiceSample.ts | 29 +- ...spacePolicyFragmentListReferencesSample.ts | 31 +- .../workspacePolicyGetEntityTagSample.ts | 31 +- .../samples-dev/workspacePolicyGetSample.ts | 30 +- .../workspacePolicyListByApiSample.ts | 29 +- ...spaceProductApiLinkCreateOrUpdateSample.ts | 46 +- .../workspaceProductApiLinkDeleteSample.ts | 37 +- .../workspaceProductApiLinkGetSample.ts | 34 +- ...kspaceProductApiLinkListByProductSample.ts | 32 +- .../workspaceProductCreateOrUpdateSample.ts | 36 +- .../workspaceProductDeleteSample.ts | 41 +- .../workspaceProductGetEntityTagSample.ts | 31 +- .../samples-dev/workspaceProductGetSample.ts | 30 +- ...aceProductGroupLinkCreateOrUpdateSample.ts | 46 +- .../workspaceProductGroupLinkDeleteSample.ts | 37 +- .../workspaceProductGroupLinkGetSample.ts | 34 +- ...paceProductGroupLinkListByProductSample.ts | 32 +- .../workspaceProductListByServiceSample.ts | 29 +- ...kspaceProductPolicyCreateOrUpdateSample.ts | 45 +- .../workspaceProductPolicyDeleteSample.ts | 40 +- ...orkspaceProductPolicyGetEntityTagSample.ts | 37 +- .../workspaceProductPolicyGetSample.ts | 34 +- ...rkspaceProductPolicyListByProductSample.ts | 31 +- .../workspaceProductUpdateSample.ts | 42 +- ...rkspaceSubscriptionCreateOrUpdateSample.ts | 49 +- .../workspaceSubscriptionDeleteSample.ts | 33 +- ...workspaceSubscriptionGetEntityTagSample.ts | 34 +- .../workspaceSubscriptionGetSample.ts | 31 +- .../workspaceSubscriptionListSample.ts | 29 +- .../workspaceSubscriptionListSecretsSample.ts | 31 +- ...eSubscriptionRegeneratePrimaryKeySample.ts | 31 +- ...ubscriptionRegenerateSecondaryKeySample.ts | 34 +- .../workspaceSubscriptionUpdateSample.ts | 40 +- ...workspaceTagApiLinkCreateOrUpdateSample.ts | 46 +- .../workspaceTagApiLinkDeleteSample.ts | 33 +- .../workspaceTagApiLinkGetSample.ts | 34 +- .../workspaceTagApiLinkListByProductSample.ts | 32 +- .../workspaceTagCreateOrUpdateSample.ts | 37 +- .../samples-dev/workspaceTagDeleteSample.ts | 33 +- .../workspaceTagGetEntityStateSample.ts | 34 +- .../samples-dev/workspaceTagGetSample.ts | 31 +- .../workspaceTagListByServiceSample.ts | 29 +- ...aceTagOperationLinkCreateOrUpdateSample.ts | 46 +- .../workspaceTagOperationLinkDeleteSample.ts | 33 +- .../workspaceTagOperationLinkGetSample.ts | 34 +- ...paceTagOperationLinkListByProductSample.ts | 32 +- ...spaceTagProductLinkCreateOrUpdateSample.ts | 46 +- .../workspaceTagProductLinkDeleteSample.ts | 33 +- .../workspaceTagProductLinkGetSample.ts | 34 +- ...kspaceTagProductLinkListByProductSample.ts | 32 +- .../samples-dev/workspaceTagUpdateSample.ts | 39 +- .../samples-dev/workspaceUpdateSample.ts | 41 +- .../samples/v10/javascript/README.md | 1274 - .../allPoliciesListByServiceSample.js | 39 - .../v10/javascript/apiCreateOrUpdateSample.js | 641 - .../samples/v10/javascript/apiDeleteSample.js | 43 - .../apiDiagnosticCreateOrUpdateSample.js | 57 - .../javascript/apiDiagnosticDeleteSample.js | 45 - .../apiDiagnosticGetEntityTagSample.js | 43 - .../v10/javascript/apiDiagnosticGetSample.js | 43 - .../apiDiagnosticListByServiceSample.js | 44 - .../javascript/apiDiagnosticUpdateSample.js | 59 - .../v10/javascript/apiExportGetSample.js | 72 - ...wayConfigConnectionCreateOrUpdateSample.js | 46 - .../apiGatewayConfigConnectionDeleteSample.js | 43 - .../apiGatewayConfigConnectionGetSample.js | 41 - ...ewayConfigConnectionListByGatewaySample.js | 42 - .../apiGatewayCreateOrUpdateSample.js | 83 - .../v10/javascript/apiGatewayDeleteSample.js | 36 - .../v10/javascript/apiGatewayGetSample.js | 36 - .../apiGatewayListByResourceGroupSample.js | 38 - .../v10/javascript/apiGatewayListSample.js | 37 - .../v10/javascript/apiGatewayUpdateSample.js | 44 - .../v10/javascript/apiGetEntityTagSample.js | 37 - .../samples/v10/javascript/apiGetSample.js | 56 - .../apiIssueAttachmentCreateOrUpdateSample.js | 51 - .../apiIssueAttachmentDeleteSample.js | 47 - .../apiIssueAttachmentGetEntityTagSample.js | 45 - .../javascript/apiIssueAttachmentGetSample.js | 45 - .../apiIssueAttachmentListByServiceSample.js | 46 - .../apiIssueCommentCreateOrUpdateSample.js | 52 - .../javascript/apiIssueCommentDeleteSample.js | 47 - .../apiIssueCommentGetEntityTagSample.js | 45 - .../javascript/apiIssueCommentGetSample.js | 45 - .../apiIssueCommentListByServiceSample.js | 46 - .../apiIssueCreateOrUpdateSample.js | 52 - .../v10/javascript/apiIssueDeleteSample.js | 45 - .../javascript/apiIssueGetEntityTagSample.js | 38 - .../v10/javascript/apiIssueGetSample.js | 38 - .../javascript/apiIssueListByServiceSample.js | 40 - .../v10/javascript/apiIssueUpdateSample.js | 47 - .../v10/javascript/apiListByServiceSample.js | 39 - .../v10/javascript/apiListByTagsSample.js | 39 - ...ementGatewaySkusListAvailableSkusSample.js | 42 - .../apiManagementOperationsListSample.js | 35 - ...eApplyNetworkConfigurationUpdatesSample.js | 44 - .../apiManagementServiceBackupSample.js | 104 - ...ementServiceCheckNameAvailabilitySample.js | 37 - ...piManagementServiceCreateOrUpdateSample.js | 495 - .../apiManagementServiceDeleteSample.js | 39 - ...rviceGetDomainOwnershipIdentifierSample.js | 34 - .../apiManagementServiceGetSample.js | 72 - .../apiManagementServiceGetSsoTokenSample.js | 36 - ...agementServiceListByResourceGroupSample.js | 38 - .../apiManagementServiceListSample.js | 37 - ...apiManagementServiceMigrateToStv2Sample.js | 44 - .../apiManagementServiceRestoreSample.js | 47 - ...rviceSkusListAvailableServiceSkusSample.js | 66 - .../apiManagementServiceUpdateSample.js | 117 - .../javascript/apiManagementSkusListSample.js | 37 - .../apiManagementWorkspaceLinkGetSample.js | 41 - ...gementWorkspaceLinksListByServiceSample.js | 42 - .../apiOperationCreateOrUpdateSample.js | 71 - .../javascript/apiOperationDeleteSample.js | 45 - .../apiOperationGetEntityTagSample.js | 43 - .../v10/javascript/apiOperationGetSample.js | 58 - .../javascript/apiOperationListByApiSample.js | 40 - .../apiOperationPolicyCreateOrUpdateSample.js | 54 - .../apiOperationPolicyDeleteSample.js | 47 - .../apiOperationPolicyGetEntityTagSample.js | 45 - .../javascript/apiOperationPolicyGetSample.js | 45 - ...apiOperationPolicyListByOperationSample.js | 43 - .../javascript/apiOperationUpdateSample.js | 78 - .../apiPolicyCreateOrUpdateSample.js | 86 - .../v10/javascript/apiPolicyDeleteSample.js | 45 - .../javascript/apiPolicyGetEntityTagSample.js | 43 - .../v10/javascript/apiPolicyGetSample.js | 38 - .../javascript/apiPolicyListByApiSample.js | 37 - .../javascript/apiProductListByApisSample.js | 40 - .../apiReleaseCreateOrUpdateSample.js | 49 - .../v10/javascript/apiReleaseDeleteSample.js | 45 - .../apiReleaseGetEntityTagSample.js | 43 - .../v10/javascript/apiReleaseGetSample.js | 38 - .../apiReleaseListByServiceSample.js | 40 - .../v10/javascript/apiReleaseUpdateSample.js | 51 - .../apiRevisionListByServiceSample.js | 44 - .../apiSchemaCreateOrUpdateSample.js | 49 - .../v10/javascript/apiSchemaDeleteSample.js | 45 - .../javascript/apiSchemaGetEntityTagSample.js | 43 - .../v10/javascript/apiSchemaGetSample.js | 38 - .../javascript/apiSchemaListByApiSample.js | 40 - .../apiTagDescriptionCreateOrUpdateSample.js | 50 - .../apiTagDescriptionDeleteSample.js | 45 - .../apiTagDescriptionGetEntityTagSample.js | 43 - .../javascript/apiTagDescriptionGetSample.js | 43 - .../apiTagDescriptionListByServiceSample.js | 44 - .../samples/v10/javascript/apiUpdateSample.js | 49 - .../apiVersionSetCreateOrUpdateSample.js | 47 - .../javascript/apiVersionSetDeleteSample.js | 43 - .../apiVersionSetGetEntityTagSample.js | 41 - .../v10/javascript/apiVersionSetGetSample.js | 37 - .../apiVersionSetListByServiceSample.js | 39 - .../javascript/apiVersionSetUpdateSample.js | 49 - .../javascript/apiWikiCreateOrUpdateSample.js | 45 - .../v10/javascript/apiWikiDeleteSample.js | 38 - .../javascript/apiWikiGetEntityTagSample.js | 37 - .../v10/javascript/apiWikiGetSample.js | 37 - .../v10/javascript/apiWikiUpdateSample.js | 47 - .../v10/javascript/apiWikisListSample.js | 40 - ...izationAccessPolicyCreateOrUpdateSample.js | 51 - .../authorizationAccessPolicyDeleteSample.js | 47 - .../authorizationAccessPolicyGetSample.js | 45 - ...onAccessPolicyListByAuthorizationSample.js | 46 - .../authorizationConfirmConsentCodeSample.js | 47 - .../authorizationCreateOrUpdateSample.js | 82 - .../javascript/authorizationDeleteSample.js | 45 - .../v10/javascript/authorizationGetSample.js | 43 - ...zationListByAuthorizationProviderSample.js | 70 - .../authorizationLoginLinksPostSample.js | 47 - ...thorizationProviderCreateOrUpdateSample.js | 178 - .../authorizationProviderDeleteSample.js | 43 - .../authorizationProviderGetSample.js | 41 - ...uthorizationProviderListByServiceSample.js | 42 - ...authorizationServerCreateOrUpdateSample.js | 60 - .../authorizationServerDeleteSample.js | 43 - .../authorizationServerGetEntityTagSample.js | 41 - .../authorizationServerGetSample.js | 37 - .../authorizationServerListByServiceSample.js | 42 - .../authorizationServerListSecretsSample.js | 41 - .../authorizationServerUpdateSample.js | 50 - .../javascript/backendCreateOrUpdateSample.js | 101 - .../v10/javascript/backendDeleteSample.js | 38 - .../javascript/backendGetEntityTagSample.js | 37 - .../v10/javascript/backendGetSample.js | 37 - .../javascript/backendListByServiceSample.js | 39 - .../v10/javascript/backendReconnectSample.js | 39 - .../v10/javascript/backendUpdateSample.js | 48 - .../javascript/cacheCreateOrUpdateSample.js | 49 - .../v10/javascript/cacheDeleteSample.js | 38 - .../v10/javascript/cacheGetEntityTagSample.js | 37 - .../samples/v10/javascript/cacheGetSample.js | 37 - .../javascript/cacheListByServiceSample.js | 39 - .../v10/javascript/cacheUpdateSample.js | 45 - .../certificateCreateOrUpdateSample.js | 77 - .../v10/javascript/certificateDeleteSample.js | 43 - .../certificateGetEntityTagSample.js | 41 - .../v10/javascript/certificateGetSample.js | 56 - .../certificateListByServiceSample.js | 39 - .../certificateRefreshSecretSample.js | 41 - .../contentItemCreateOrUpdateSample.js | 55 - .../v10/javascript/contentItemDeleteSample.js | 45 - .../contentItemGetEntityTagSample.js | 43 - .../v10/javascript/contentItemGetSample.js | 43 - .../contentItemListByServiceSample.js | 44 - .../contentTypeCreateOrUpdateSample.js | 88 - .../v10/javascript/contentTypeDeleteSample.js | 43 - .../v10/javascript/contentTypeGetSample.js | 37 - .../contentTypeListByServiceSample.js | 39 - .../delegationSettingsCreateOrUpdateSample.js | 49 - .../delegationSettingsGetEntityTagSample.js | 36 - .../javascript/delegationSettingsGetSample.js | 36 - .../delegationSettingsListSecretsSample.js | 36 - .../delegationSettingsUpdateSample.js | 48 - .../deletedServicesGetByNameSample.js | 36 - ...deletedServicesListBySubscriptionSample.js | 37 - .../javascript/deletedServicesPurgeSample.js | 36 - .../diagnosticCreateOrUpdateSample.js | 55 - .../v10/javascript/diagnosticDeleteSample.js | 43 - .../diagnosticGetEntityTagSample.js | 37 - .../v10/javascript/diagnosticGetSample.js | 37 - .../diagnosticListByServiceSample.js | 39 - .../v10/javascript/diagnosticUpdateSample.js | 57 - .../documentationCreateOrUpdateSample.js | 46 - .../javascript/documentationDeleteSample.js | 37 - .../documentationGetEntityTagSample.js | 41 - .../v10/javascript/documentationGetSample.js | 37 - .../documentationListByServiceSample.js | 39 - .../javascript/documentationUpdateSample.js | 46 - .../emailTemplateCreateOrUpdateSample.js | 45 - .../javascript/emailTemplateDeleteSample.js | 43 - .../emailTemplateGetEntityTagSample.js | 41 - .../v10/javascript/emailTemplateGetSample.js | 37 - .../emailTemplateListByServiceSample.js | 39 - .../javascript/emailTemplateUpdateSample.js | 48 - .../gatewayApiCreateOrUpdateSample.js | 46 - .../v10/javascript/gatewayApiDeleteSample.js | 38 - .../gatewayApiGetEntityTagSample.js | 43 - .../gatewayApiListByServiceSample.js | 44 - ...ertificateAuthorityCreateOrUpdateSample.js | 45 - ...gatewayCertificateAuthorityDeleteSample.js | 45 - ...yCertificateAuthorityGetEntityTagSample.js | 43 - .../gatewayCertificateAuthorityGetSample.js | 43 - ...CertificateAuthorityListByServiceSample.js | 44 - .../javascript/gatewayCreateOrUpdateSample.js | 46 - .../v10/javascript/gatewayDeleteSample.js | 38 - .../javascript/gatewayGenerateTokenSample.js | 46 - .../javascript/gatewayGetEntityTagSample.js | 37 - .../v10/javascript/gatewayGetSample.js | 37 - ...stnameConfigurationCreateOrUpdateSample.js | 53 - ...atewayHostnameConfigurationDeleteSample.js | 45 - ...HostnameConfigurationGetEntityTagSample.js | 43 - .../gatewayHostnameConfigurationGetSample.js | 43 - ...ostnameConfigurationListByServiceSample.js | 44 - ...gatewayInvalidateDebugCredentialsSample.js | 41 - .../javascript/gatewayListByServiceSample.js | 39 - .../gatewayListDebugCredentialsSample.js | 48 - .../v10/javascript/gatewayListKeysSample.js | 37 - .../v10/javascript/gatewayListTraceSample.js | 45 - .../javascript/gatewayRegenerateKeySample.js | 45 - .../v10/javascript/gatewayUpdateSample.js | 48 - .../globalSchemaCreateOrUpdateSample.js | 91 - .../javascript/globalSchemaDeleteSample.js | 43 - .../globalSchemaGetEntityTagSample.js | 37 - .../v10/javascript/globalSchemaGetSample.js | 56 - .../globalSchemaListByServiceSample.js | 39 - .../graphQlApiResolverCreateOrUpdateSample.js | 49 - .../graphQlApiResolverDeleteSample.js | 45 - .../graphQlApiResolverGetEntityTagSample.js | 43 - .../javascript/graphQlApiResolverGetSample.js | 43 - .../graphQlApiResolverListByApiSample.js | 44 - ...QlApiResolverPolicyCreateOrUpdateSample.js | 56 - .../graphQlApiResolverPolicyDeleteSample.js | 47 - ...phQlApiResolverPolicyGetEntityTagSample.js | 45 - .../graphQlApiResolverPolicyGetSample.js | 45 - ...QlApiResolverPolicyListByResolverSample.js | 46 - .../graphQlApiResolverUpdateSample.js | 51 - .../javascript/groupCreateOrUpdateSample.js | 73 - .../v10/javascript/groupDeleteSample.js | 38 - .../v10/javascript/groupGetEntityTagSample.js | 37 - .../samples/v10/javascript/groupGetSample.js | 37 - .../javascript/groupListByServiceSample.js | 39 - .../v10/javascript/groupUpdateSample.js | 45 - .../groupUserCheckEntityExistsSample.js | 43 - .../v10/javascript/groupUserCreateSample.js | 38 - .../v10/javascript/groupUserDeleteSample.js | 38 - .../v10/javascript/groupUserListSample.js | 40 - .../identityProviderCreateOrUpdateSample.js | 46 - .../identityProviderDeleteSample.js | 43 - .../identityProviderGetEntityTagSample.js | 41 - .../javascript/identityProviderGetSample.js | 41 - .../identityProviderListByServiceSample.js | 39 - .../identityProviderListSecretsSample.js | 41 - .../identityProviderUpdateSample.js | 48 - .../samples/v10/javascript/issueGetSample.js | 37 - .../javascript/issueListByServiceSample.js | 39 - .../javascript/loggerCreateOrUpdateSample.js | 80 - .../v10/javascript/loggerDeleteSample.js | 38 - .../javascript/loggerGetEntityTagSample.js | 37 - .../samples/v10/javascript/loggerGetSample.js | 37 - .../javascript/loggerListByServiceSample.js | 39 - .../v10/javascript/loggerUpdateSample.js | 48 - .../namedValueCreateOrUpdateSample.js | 81 - .../v10/javascript/namedValueDeleteSample.js | 43 - .../namedValueGetEntityTagSample.js | 37 - .../v10/javascript/namedValueGetSample.js | 56 - .../namedValueListByServiceSample.js | 39 - .../javascript/namedValueListValueSample.js | 37 - .../namedValueRefreshSecretSample.js | 41 - .../v10/javascript/namedValueUpdateSample.js | 50 - .../networkStatusListByLocationSample.js | 41 - .../networkStatusListByServiceSample.js | 36 - .../notificationCreateOrUpdateSample.js | 41 - .../v10/javascript/notificationGetSample.js | 37 - .../notificationListByServiceSample.js | 39 - ...onRecipientEmailCheckEntityExistsSample.js | 43 - ...ationRecipientEmailCreateOrUpdateSample.js | 43 - .../notificationRecipientEmailDeleteSample.js | 43 - ...nRecipientEmailListByNotificationSample.js | 41 - ...ionRecipientUserCheckEntityExistsSample.js | 43 - ...cationRecipientUserCreateOrUpdateSample.js | 43 - .../notificationRecipientUserDeleteSample.js | 43 - ...onRecipientUserListByNotificationSample.js | 41 - ...enIdConnectProviderCreateOrUpdateSample.js | 50 - .../openIdConnectProviderDeleteSample.js | 43 - ...openIdConnectProviderGetEntityTagSample.js | 41 - .../openIdConnectProviderGetSample.js | 37 - ...penIdConnectProviderListByServiceSample.js | 42 - .../openIdConnectProviderListSecretsSample.js | 41 - .../openIdConnectProviderUpdateSample.js | 49 - .../javascript/operationListByTagsSample.js | 44 - .../javascript/operationStatusGetSample.js | 36 - .../javascript/operationsResultsGetSample.js | 36 - ...ependenciesEndpointsListByServiceSample.js | 39 - .../samples/v10/javascript/package.json | 32 - .../performConnectivityCheckAsyncSample.js | 79 - .../javascript/policyCreateOrUpdateSample.js | 47 - .../v10/javascript/policyDeleteSample.js | 38 - .../policyDescriptionListByServiceSample.js | 42 - .../policyFragmentCreateOrUpdateSample.js | 47 - .../javascript/policyFragmentDeleteSample.js | 38 - .../policyFragmentGetEntityTagSample.js | 37 - .../v10/javascript/policyFragmentGetSample.js | 58 - .../policyFragmentListByServiceSample.js | 39 - .../policyFragmentListReferencesSample.js | 37 - .../javascript/policyGetEntityTagSample.js | 37 - .../samples/v10/javascript/policyGetSample.js | 58 - .../javascript/policyListByServiceSample.js | 39 - .../policyRestrictionCreateOrUpdateSample.js | 49 - .../policyRestrictionDeleteSample.js | 44 - .../policyRestrictionGetEntityTagSample.js | 41 - .../javascript/policyRestrictionGetSample.js | 41 - .../policyRestrictionListByServiceSample.js | 39 - .../policyRestrictionUpdateSample.js | 47 - ...cyRestrictionValidationsByServiceSample.js | 39 - .../portalConfigCreateOrUpdateSample.js | 66 - .../portalConfigGetEntityTagSample.js | 41 - .../v10/javascript/portalConfigGetSample.js | 37 - .../portalConfigListByServiceSample.js | 39 - .../javascript/portalConfigUpdateSample.js | 66 - .../portalRevisionCreateOrUpdateSample.js | 46 - .../portalRevisionGetEntityTagSample.js | 41 - .../v10/javascript/portalRevisionGetSample.js | 37 - .../portalRevisionListByServiceSample.js | 39 - .../javascript/portalRevisionUpdateSample.js | 48 - .../portalSettingsListByServiceSample.js | 36 - ...eEndpointConnectionCreateOrUpdateSample.js | 51 - .../privateEndpointConnectionDeleteSample.js | 41 - ...rivateEndpointConnectionGetByNameSample.js | 41 - ...tConnectionGetPrivateLinkResourceSample.js | 41 - ...teEndpointConnectionListByServiceSample.js | 42 - ...onnectionListPrivateLinkResourcesSample.js | 39 - .../productApiCheckEntityExistsSample.js | 43 - .../productApiCreateOrUpdateSample.js | 43 - .../v10/javascript/productApiDeleteSample.js | 38 - .../productApiLinkCreateOrUpdateSample.js | 48 - .../javascript/productApiLinkDeleteSample.js | 43 - .../v10/javascript/productApiLinkGetSample.js | 43 - .../productApiLinkListByProductSample.js | 44 - .../productApiListByProductSample.js | 44 - .../javascript/productCreateOrUpdateSample.js | 45 - .../v10/javascript/productDeleteSample.js | 46 - .../javascript/productGetEntityTagSample.js | 37 - .../v10/javascript/productGetSample.js | 37 - .../productGroupCheckEntityExistsSample.js | 43 - .../productGroupCreateOrUpdateSample.js | 43 - .../javascript/productGroupDeleteSample.js | 43 - .../productGroupLinkCreateOrUpdateSample.js | 48 - .../productGroupLinkDeleteSample.js | 43 - .../javascript/productGroupLinkGetSample.js | 43 - .../productGroupLinkListByProductSample.js | 44 - .../productGroupListByProductSample.js | 44 - .../javascript/productListByServiceSample.js | 39 - .../v10/javascript/productListByTagsSample.js | 39 - .../productPolicyCreateOrUpdateSample.js | 49 - .../javascript/productPolicyDeleteSample.js | 45 - .../productPolicyGetEntityTagSample.js | 43 - .../v10/javascript/productPolicyGetSample.js | 43 - .../productPolicyListByProductSample.js | 44 - .../productSubscriptionsListSample.js | 44 - .../v10/javascript/productUpdateSample.js | 47 - .../productWikiCreateOrUpdateSample.js | 45 - .../v10/javascript/productWikiDeleteSample.js | 43 - .../productWikiGetEntityTagSample.js | 37 - .../v10/javascript/productWikiGetSample.js | 37 - .../v10/javascript/productWikiUpdateSample.js | 47 - .../v10/javascript/productWikisListSample.js | 40 - .../quotaByCounterKeysListByServiceSample.js | 41 - .../quotaByCounterKeysUpdateSample.js | 46 - .../javascript/quotaByPeriodKeysGetSample.js | 43 - .../quotaByPeriodKeysUpdateSample.js | 48 - .../javascript/regionListByServiceSample.js | 39 - .../v10/javascript/reportsListByApiSample.js | 41 - .../v10/javascript/reportsListByGeoSample.js | 41 - .../reportsListByOperationSample.js | 41 - .../javascript/reportsListByProductSample.js | 41 - .../javascript/reportsListByRequestSample.js | 41 - .../reportsListBySubscriptionSample.js | 45 - .../v10/javascript/reportsListByTimeSample.js | 47 - .../v10/javascript/reportsListByUserSample.js | 41 - .../signInSettingsCreateOrUpdateSample.js | 44 - .../signInSettingsGetEntityTagSample.js | 36 - .../v10/javascript/signInSettingsGetSample.js | 36 - .../javascript/signInSettingsUpdateSample.js | 43 - .../signUpSettingsCreateOrUpdateSample.js | 51 - .../signUpSettingsGetEntityTagSample.js | 36 - .../v10/javascript/signUpSettingsGetSample.js | 36 - .../javascript/signUpSettingsUpdateSample.js | 50 - .../subscriptionCreateOrUpdateSample.js | 49 - .../javascript/subscriptionDeleteSample.js | 38 - .../subscriptionGetEntityTagSample.js | 37 - .../v10/javascript/subscriptionGetSample.js | 37 - .../v10/javascript/subscriptionListSample.js | 39 - .../subscriptionListSecretsSample.js | 37 - .../subscriptionRegeneratePrimaryKeySample.js | 41 - ...ubscriptionRegenerateSecondaryKeySample.js | 41 - .../javascript/subscriptionUpdateSample.js | 45 - .../tagApiLinkCreateOrUpdateSample.js | 48 - .../v10/javascript/tagApiLinkDeleteSample.js | 38 - .../v10/javascript/tagApiLinkGetSample.js | 38 - .../tagApiLinkListByProductSample.js | 40 - .../v10/javascript/tagAssignToApiSample.js | 38 - .../javascript/tagAssignToOperationSample.js | 45 - .../javascript/tagAssignToProductSample.js | 38 - .../v10/javascript/tagCreateOrUpdateSample.js | 38 - .../samples/v10/javascript/tagDeleteSample.js | 38 - .../v10/javascript/tagDetachFromApiSample.js | 38 - .../tagDetachFromOperationSample.js | 45 - .../javascript/tagDetachFromProductSample.js | 43 - .../v10/javascript/tagGetByApiSample.js | 38 - .../v10/javascript/tagGetByOperationSample.js | 45 - .../v10/javascript/tagGetByProductSample.js | 38 - .../tagGetEntityStateByApiSample.js | 38 - .../tagGetEntityStateByOperationSample.js | 45 - .../tagGetEntityStateByProductSample.js | 43 - .../v10/javascript/tagGetEntityStateSample.js | 37 - .../samples/v10/javascript/tagGetSample.js | 37 - .../v10/javascript/tagListByApiSample.js | 40 - .../javascript/tagListByOperationSample.js | 46 - .../v10/javascript/tagListByProductSample.js | 40 - .../v10/javascript/tagListByServiceSample.js | 39 - .../tagOperationLinkCreateOrUpdateSample.js | 48 - .../tagOperationLinkDeleteSample.js | 43 - .../javascript/tagOperationLinkGetSample.js | 43 - .../tagOperationLinkListByProductSample.js | 44 - .../tagProductLinkCreateOrUpdateSample.js | 48 - .../javascript/tagProductLinkDeleteSample.js | 43 - .../v10/javascript/tagProductLinkGetSample.js | 43 - .../tagProductLinkListByProductSample.js | 44 - .../tagResourceListByServiceSample.js | 39 - .../samples/v10/javascript/tagUpdateSample.js | 45 - .../javascript/tenantAccessCreateSample.js | 45 - .../tenantAccessGetEntityTagSample.js | 37 - .../v10/javascript/tenantAccessGetSample.js | 56 - ...nantAccessGitRegeneratePrimaryKeySample.js | 41 - ...ntAccessGitRegenerateSecondaryKeySample.js | 41 - .../tenantAccessListByServiceSample.js | 39 - .../tenantAccessListSecretsSample.js | 37 - .../tenantAccessRegeneratePrimaryKeySample.js | 41 - ...enantAccessRegenerateSecondaryKeySample.js | 41 - .../javascript/tenantAccessUpdateSample.js | 45 - .../tenantConfigurationDeploySample.js | 43 - .../tenantConfigurationGetSyncStateSample.js | 41 - .../tenantConfigurationSaveSample.js | 43 - .../tenantConfigurationValidateSample.js | 43 - .../v10/javascript/tenantSettingsGetSample.js | 37 - .../tenantSettingsListByServiceSample.js | 39 - .../userConfirmationPasswordSendSample.js | 37 - .../javascript/userCreateOrUpdateSample.js | 48 - .../v10/javascript/userDeleteSample.js | 43 - .../javascript/userGenerateSsoUrlSample.js | 37 - .../v10/javascript/userGetEntityTagSample.js | 37 - .../samples/v10/javascript/userGetSample.js | 37 - .../userGetSharedAccessTokenSample.js | 46 - .../v10/javascript/userGroupListSample.js | 40 - .../javascript/userIdentitiesListSample.js | 40 - .../v10/javascript/userListByServiceSample.js | 39 - .../javascript/userSubscriptionGetSample.js | 38 - .../javascript/userSubscriptionListSample.js | 40 - .../v10/javascript/userUpdateSample.js | 49 - .../workspaceApiCreateOrUpdateSample.js | 58 - .../javascript/workspaceApiDeleteSample.js | 45 - ...kspaceApiDiagnosticCreateOrUpdateSample.js | 59 - .../workspaceApiDiagnosticDeleteSample.js | 47 - ...orkspaceApiDiagnosticGetEntityTagSample.js | 45 - .../workspaceApiDiagnosticGetSample.js | 45 - ...spaceApiDiagnosticListByWorkspaceSample.js | 46 - .../workspaceApiDiagnosticUpdateSample.js | 61 - .../javascript/workspaceApiExportGetSample.js | 76 - .../workspaceApiGetEntityTagSample.js | 43 - .../v10/javascript/workspaceApiGetSample.js | 58 - .../workspaceApiListByServiceSample.js | 44 - ...rkspaceApiOperationCreateOrUpdateSample.js | 73 - .../workspaceApiOperationDeleteSample.js | 47 - ...workspaceApiOperationGetEntityTagSample.js | 45 - .../workspaceApiOperationGetSample.js | 45 - .../workspaceApiOperationListByApiSample.js | 46 - ...eApiOperationPolicyCreateOrUpdateSample.js | 58 - ...workspaceApiOperationPolicyDeleteSample.js | 49 - ...aceApiOperationPolicyGetEntityTagSample.js | 47 - .../workspaceApiOperationPolicyGetSample.js | 47 - ...ApiOperationPolicyListByOperationSample.js | 48 - .../workspaceApiOperationUpdateSample.js | 80 - .../workspaceApiPolicyCreateOrUpdateSample.js | 54 - .../workspaceApiPolicyDeleteSample.js | 47 - .../workspaceApiPolicyGetEntityTagSample.js | 45 - .../javascript/workspaceApiPolicyGetSample.js | 45 - .../workspaceApiPolicyListByApiSample.js | 46 - ...workspaceApiReleaseCreateOrUpdateSample.js | 51 - .../workspaceApiReleaseDeleteSample.js | 47 - .../workspaceApiReleaseGetEntityTagSample.js | 45 - .../workspaceApiReleaseGetSample.js | 45 - .../workspaceApiReleaseListByServiceSample.js | 46 - .../workspaceApiReleaseUpdateSample.js | 53 - ...workspaceApiRevisionListByServiceSample.js | 46 - .../workspaceApiSchemaCreateOrUpdateSample.js | 51 - .../workspaceApiSchemaDeleteSample.js | 47 - .../workspaceApiSchemaGetEntityTagSample.js | 45 - .../javascript/workspaceApiSchemaGetSample.js | 45 - .../workspaceApiSchemaListByApiSample.js | 46 - .../javascript/workspaceApiUpdateSample.js | 51 - ...kspaceApiVersionSetCreateOrUpdateSample.js | 49 - .../workspaceApiVersionSetDeleteSample.js | 45 - ...orkspaceApiVersionSetGetEntityTagSample.js | 43 - .../workspaceApiVersionSetGetSample.js | 43 - ...rkspaceApiVersionSetListByServiceSample.js | 44 - .../workspaceApiVersionSetUpdateSample.js | 51 - .../workspaceBackendCreateOrUpdateSample.js | 105 - .../workspaceBackendDeleteSample.js | 45 - .../workspaceBackendGetEntityTagSample.js | 43 - .../javascript/workspaceBackendGetSample.js | 43 - .../workspaceBackendListByWorkspaceSample.js | 44 - .../workspaceBackendUpdateSample.js | 50 - ...orkspaceCertificateCreateOrUpdateSample.js | 81 - .../workspaceCertificateDeleteSample.js | 45 - .../workspaceCertificateGetEntityTagSample.js | 43 - .../workspaceCertificateGetSample.js | 68 - ...rkspaceCertificateListByWorkspaceSample.js | 44 - ...workspaceCertificateRefreshSecretSample.js | 43 - .../workspaceCreateOrUpdateSample.js | 46 - .../v10/javascript/workspaceDeleteSample.js | 43 - ...workspaceDiagnosticCreateOrUpdateSample.js | 57 - .../workspaceDiagnosticDeleteSample.js | 45 - .../workspaceDiagnosticGetEntityTagSample.js | 43 - .../workspaceDiagnosticGetSample.js | 43 - ...orkspaceDiagnosticListByWorkspaceSample.js | 44 - .../workspaceDiagnosticUpdateSample.js | 59 - .../javascript/workspaceGetEntityTagSample.js | 37 - .../v10/javascript/workspaceGetSample.js | 37 - ...rkspaceGlobalSchemaCreateOrUpdateSample.js | 50 - .../workspaceGlobalSchemaDeleteSample.js | 45 - ...workspaceGlobalSchemaGetEntityTagSample.js | 43 - .../workspaceGlobalSchemaGetSample.js | 43 - ...orkspaceGlobalSchemaListByServiceSample.js | 44 - .../workspaceGroupCreateOrUpdateSample.js | 77 - .../javascript/workspaceGroupDeleteSample.js | 45 - .../workspaceGroupGetEntityTagSample.js | 43 - .../v10/javascript/workspaceGroupGetSample.js | 43 - .../workspaceGroupListByServiceSample.js | 44 - .../javascript/workspaceGroupUpdateSample.js | 47 - ...rkspaceGroupUserCheckEntityExistsSample.js | 45 - .../workspaceGroupUserCreateSample.js | 45 - .../workspaceGroupUserDeleteSample.js | 45 - .../workspaceGroupUserListSample.js | 46 - .../workspaceListByServiceSample.js | 39 - .../workspaceLoggerCreateOrUpdateSample.js | 84 - .../javascript/workspaceLoggerDeleteSample.js | 45 - .../workspaceLoggerGetEntityTagSample.js | 43 - .../javascript/workspaceLoggerGetSample.js | 43 - .../workspaceLoggerListByWorkspaceSample.js | 44 - .../javascript/workspaceLoggerUpdateSample.js | 50 - ...workspaceNamedValueCreateOrUpdateSample.js | 85 - .../workspaceNamedValueDeleteSample.js | 45 - .../workspaceNamedValueGetEntityTagSample.js | 43 - .../workspaceNamedValueGetSample.js | 68 - .../workspaceNamedValueListByServiceSample.js | 44 - .../workspaceNamedValueListValueSample.js | 43 - .../workspaceNamedValueRefreshSecretSample.js | 43 - .../workspaceNamedValueUpdateSample.js | 52 - ...rkspaceNotificationCreateOrUpdateSample.js | 43 - .../workspaceNotificationGetSample.js | 43 - ...orkspaceNotificationListByServiceSample.js | 44 - ...onRecipientEmailCheckEntityExistsSample.js | 45 - ...ationRecipientEmailCreateOrUpdateSample.js | 45 - ...eNotificationRecipientEmailDeleteSample.js | 45 - ...nRecipientEmailListByNotificationSample.js | 43 - ...ionRecipientUserCheckEntityExistsSample.js | 45 - ...cationRecipientUserCreateOrUpdateSample.js | 45 - ...ceNotificationRecipientUserDeleteSample.js | 45 - ...onRecipientUserListByNotificationSample.js | 43 - .../workspacePolicyCreateOrUpdateSample.js | 86 - .../javascript/workspacePolicyDeleteSample.js | 45 - ...spacePolicyFragmentCreateOrUpdateSample.js | 49 - .../workspacePolicyFragmentDeleteSample.js | 45 - ...rkspacePolicyFragmentGetEntityTagSample.js | 43 - .../workspacePolicyFragmentGetSample.js | 71 - ...kspacePolicyFragmentListByServiceSample.js | 44 - ...spacePolicyFragmentListReferencesSample.js | 43 - .../workspacePolicyGetEntityTagSample.js | 43 - .../javascript/workspacePolicyGetSample.js | 43 - .../workspacePolicyListByApiSample.js | 44 - ...spaceProductApiLinkCreateOrUpdateSample.js | 50 - .../workspaceProductApiLinkDeleteSample.js | 45 - .../workspaceProductApiLinkGetSample.js | 45 - ...kspaceProductApiLinkListByProductSample.js | 46 - .../workspaceProductCreateOrUpdateSample.js | 47 - .../workspaceProductDeleteSample.js | 48 - .../workspaceProductGetEntityTagSample.js | 43 - .../javascript/workspaceProductGetSample.js | 43 - ...aceProductGroupLinkCreateOrUpdateSample.js | 50 - .../workspaceProductGroupLinkDeleteSample.js | 45 - .../workspaceProductGroupLinkGetSample.js | 45 - ...paceProductGroupLinkListByProductSample.js | 46 - .../workspaceProductListByServiceSample.js | 44 - ...kspaceProductPolicyCreateOrUpdateSample.js | 51 - .../workspaceProductPolicyDeleteSample.js | 47 - ...orkspaceProductPolicyGetEntityTagSample.js | 45 - .../workspaceProductPolicyGetSample.js | 45 - ...rkspaceProductPolicyListByProductSample.js | 43 - .../workspaceProductUpdateSample.js | 49 - ...rkspaceSubscriptionCreateOrUpdateSample.js | 51 - .../workspaceSubscriptionDeleteSample.js | 45 - ...workspaceSubscriptionGetEntityTagSample.js | 43 - .../workspaceSubscriptionGetSample.js | 43 - .../workspaceSubscriptionListSample.js | 44 - .../workspaceSubscriptionListSecretsSample.js | 43 - ...eSubscriptionRegeneratePrimaryKeySample.js | 43 - ...ubscriptionRegenerateSecondaryKeySample.js | 43 - .../workspaceSubscriptionUpdateSample.js | 47 - ...workspaceTagApiLinkCreateOrUpdateSample.js | 50 - .../workspaceTagApiLinkDeleteSample.js | 45 - .../workspaceTagApiLinkGetSample.js | 45 - .../workspaceTagApiLinkListByProductSample.js | 46 - .../workspaceTagCreateOrUpdateSample.js | 45 - .../javascript/workspaceTagDeleteSample.js | 45 - .../workspaceTagGetEntityStateSample.js | 43 - .../v10/javascript/workspaceTagGetSample.js | 38 - .../workspaceTagListByServiceSample.js | 44 - ...aceTagOperationLinkCreateOrUpdateSample.js | 50 - .../workspaceTagOperationLinkDeleteSample.js | 45 - .../workspaceTagOperationLinkGetSample.js | 45 - ...paceTagOperationLinkListByProductSample.js | 46 - ...spaceTagProductLinkCreateOrUpdateSample.js | 50 - .../workspaceTagProductLinkDeleteSample.js | 45 - .../workspaceTagProductLinkGetSample.js | 45 - ...kspaceTagProductLinkListByProductSample.js | 46 - .../javascript/workspaceTagUpdateSample.js | 47 - .../v10/javascript/workspaceUpdateSample.js | 48 - .../samples/v10/typescript/README.md | 1287 - .../samples/v10/typescript/package.json | 41 - .../src/allPoliciesListByServiceSample.ts | 44 - .../typescript/src/apiCreateOrUpdateSample.ts | 680 - .../v10/typescript/src/apiDeleteSample.ts | 45 - .../src/apiDiagnosticCreateOrUpdateSample.ts | 62 - .../src/apiDiagnosticDeleteSample.ts | 47 - .../src/apiDiagnosticGetEntityTagSample.ts | 45 - .../typescript/src/apiDiagnosticGetSample.ts | 45 - .../src/apiDiagnosticListByServiceSample.ts | 46 - .../src/apiDiagnosticUpdateSample.ts | 64 - .../v10/typescript/src/apiExportGetSample.ts | 76 - ...wayConfigConnectionCreateOrUpdateSample.ts | 52 - .../apiGatewayConfigConnectionDeleteSample.ts | 45 - .../apiGatewayConfigConnectionGetSample.ts | 43 - ...ewayConfigConnectionListByGatewaySample.ts | 44 - .../src/apiGatewayCreateOrUpdateSample.ts | 90 - .../typescript/src/apiGatewayDeleteSample.ts | 41 - .../v10/typescript/src/apiGatewayGetSample.ts | 38 - .../apiGatewayListByResourceGroupSample.ts | 42 - .../typescript/src/apiGatewayListSample.ts | 38 - .../typescript/src/apiGatewayUpdateSample.ts | 49 - .../typescript/src/apiGetEntityTagSample.ts | 43 - .../v10/typescript/src/apiGetSample.ts | 60 - .../apiIssueAttachmentCreateOrUpdateSample.ts | 56 - .../src/apiIssueAttachmentDeleteSample.ts | 49 - .../apiIssueAttachmentGetEntityTagSample.ts | 47 - .../src/apiIssueAttachmentGetSample.ts | 47 - .../apiIssueAttachmentListByServiceSample.ts | 48 - .../apiIssueCommentCreateOrUpdateSample.ts | 57 - .../src/apiIssueCommentDeleteSample.ts | 49 - .../src/apiIssueCommentGetEntityTagSample.ts | 47 - .../src/apiIssueCommentGetSample.ts | 47 - .../src/apiIssueCommentListByServiceSample.ts | 48 - .../src/apiIssueCreateOrUpdateSample.ts | 54 - .../typescript/src/apiIssueDeleteSample.ts | 47 - .../src/apiIssueGetEntityTagSample.ts | 45 - .../v10/typescript/src/apiIssueGetSample.ts | 45 - .../src/apiIssueListByServiceSample.ts | 46 - .../typescript/src/apiIssueUpdateSample.ts | 52 - .../typescript/src/apiListByServiceSample.ts | 44 - .../v10/typescript/src/apiListByTagsSample.ts | 44 - ...ementGatewaySkusListAvailableSkusSample.ts | 44 - .../src/apiManagementOperationsListSample.ts | 35 - ...eApplyNetworkConfigurationUpdatesSample.ts | 52 - .../src/apiManagementServiceBackupSample.ts | 113 - ...ementServiceCheckNameAvailabilitySample.ts | 42 - ...piManagementServiceCreateOrUpdateSample.ts | 528 - .../src/apiManagementServiceDeleteSample.ts | 41 - ...rviceGetDomainOwnershipIdentifierSample.ts | 36 - .../src/apiManagementServiceGetSample.ts | 87 - .../apiManagementServiceGetSsoTokenSample.ts | 41 - ...agementServiceListByResourceGroupSample.ts | 42 - .../src/apiManagementServiceListSample.ts | 38 - ...apiManagementServiceMigrateToStv2Sample.ts | 50 - .../src/apiManagementServiceRestoreSample.ts | 52 - ...rviceSkusListAvailableServiceSkusSample.ts | 70 - .../src/apiManagementServiceUpdateSample.ts | 126 - .../src/apiManagementSkusListSample.ts | 38 - .../apiManagementWorkspaceLinkGetSample.ts | 43 - ...gementWorkspaceLinksListByServiceSample.ts | 44 - .../src/apiOperationCreateOrUpdateSample.ts | 79 - .../src/apiOperationDeleteSample.ts | 47 - .../src/apiOperationGetEntityTagSample.ts | 45 - .../typescript/src/apiOperationGetSample.ts | 72 - .../src/apiOperationListByApiSample.ts | 46 - .../apiOperationPolicyCreateOrUpdateSample.ts | 60 - .../src/apiOperationPolicyDeleteSample.ts | 49 - .../apiOperationPolicyGetEntityTagSample.ts | 47 - .../src/apiOperationPolicyGetSample.ts | 47 - ...apiOperationPolicyListByOperationSample.ts | 45 - .../src/apiOperationUpdateSample.ts | 84 - .../src/apiPolicyCreateOrUpdateSample.ts | 94 - .../typescript/src/apiPolicyDeleteSample.ts | 47 - .../src/apiPolicyGetEntityTagSample.ts | 45 - .../v10/typescript/src/apiPolicyGetSample.ts | 45 - .../src/apiPolicyListByApiSample.ts | 43 - .../src/apiProductListByApisSample.ts | 46 - .../src/apiReleaseCreateOrUpdateSample.ts | 54 - .../typescript/src/apiReleaseDeleteSample.ts | 47 - .../src/apiReleaseGetEntityTagSample.ts | 45 - .../v10/typescript/src/apiReleaseGetSample.ts | 45 - .../src/apiReleaseListByServiceSample.ts | 46 - .../typescript/src/apiReleaseUpdateSample.ts | 56 - .../src/apiRevisionListByServiceSample.ts | 46 - .../src/apiSchemaCreateOrUpdateSample.ts | 51 - .../typescript/src/apiSchemaDeleteSample.ts | 47 - .../src/apiSchemaGetEntityTagSample.ts | 45 - .../v10/typescript/src/apiSchemaGetSample.ts | 45 - .../src/apiSchemaListByApiSample.ts | 46 - .../apiTagDescriptionCreateOrUpdateSample.ts | 55 - .../src/apiTagDescriptionDeleteSample.ts | 47 - .../apiTagDescriptionGetEntityTagSample.ts | 45 - .../src/apiTagDescriptionGetSample.ts | 45 - .../apiTagDescriptionListByServiceSample.ts | 46 - .../v10/typescript/src/apiUpdateSample.ts | 54 - .../src/apiVersionSetCreateOrUpdateSample.ts | 52 - .../src/apiVersionSetDeleteSample.ts | 45 - .../src/apiVersionSetGetEntityTagSample.ts | 43 - .../typescript/src/apiVersionSetGetSample.ts | 43 - .../src/apiVersionSetListByServiceSample.ts | 44 - .../src/apiVersionSetUpdateSample.ts | 54 - .../src/apiWikiCreateOrUpdateSample.ts | 47 - .../v10/typescript/src/apiWikiDeleteSample.ts | 45 - .../src/apiWikiGetEntityTagSample.ts | 43 - .../v10/typescript/src/apiWikiGetSample.ts | 43 - .../v10/typescript/src/apiWikiUpdateSample.ts | 52 - .../v10/typescript/src/apiWikisListSample.ts | 46 - ...izationAccessPolicyCreateOrUpdateSample.ts | 56 - .../authorizationAccessPolicyDeleteSample.ts | 49 - .../src/authorizationAccessPolicyGetSample.ts | 47 - ...onAccessPolicyListByAuthorizationSample.ts | 48 - .../authorizationConfirmConsentCodeSample.ts | 52 - .../src/authorizationCreateOrUpdateSample.ts | 89 - .../src/authorizationDeleteSample.ts | 47 - .../typescript/src/authorizationGetSample.ts | 45 - ...zationListByAuthorizationProviderSample.ts | 74 - .../src/authorizationLoginLinksPostSample.ts | 52 - ...thorizationProviderCreateOrUpdateSample.ts | 190 - .../src/authorizationProviderDeleteSample.ts | 45 - .../src/authorizationProviderGetSample.ts | 43 - ...uthorizationProviderListByServiceSample.ts | 44 - ...authorizationServerCreateOrUpdateSample.ts | 65 - .../src/authorizationServerDeleteSample.ts | 45 - .../authorizationServerGetEntityTagSample.ts | 43 - .../src/authorizationServerGetSample.ts | 43 - .../authorizationServerListByServiceSample.ts | 44 - .../authorizationServerListSecretsSample.ts | 43 - .../src/authorizationServerUpdateSample.ts | 55 - .../src/backendCreateOrUpdateSample.ts | 105 - .../v10/typescript/src/backendDeleteSample.ts | 45 - .../src/backendGetEntityTagSample.ts | 43 - .../v10/typescript/src/backendGetSample.ts | 43 - .../src/backendListByServiceSample.ts | 44 - .../typescript/src/backendReconnectSample.ts | 50 - .../v10/typescript/src/backendUpdateSample.ts | 53 - .../src/cacheCreateOrUpdateSample.ts | 52 - .../v10/typescript/src/cacheDeleteSample.ts | 45 - .../typescript/src/cacheGetEntityTagSample.ts | 43 - .../v10/typescript/src/cacheGetSample.ts | 43 - .../src/cacheListByServiceSample.ts | 44 - .../v10/typescript/src/cacheUpdateSample.ts | 50 - .../src/certificateCreateOrUpdateSample.ts | 84 - .../typescript/src/certificateDeleteSample.ts | 45 - .../src/certificateGetEntityTagSample.ts | 43 - .../typescript/src/certificateGetSample.ts | 68 - .../src/certificateListByServiceSample.ts | 44 - .../src/certificateRefreshSecretSample.ts | 43 - .../src/contentItemCreateOrUpdateSample.ts | 61 - .../typescript/src/contentItemDeleteSample.ts | 47 - .../src/contentItemGetEntityTagSample.ts | 45 - .../typescript/src/contentItemGetSample.ts | 45 - .../src/contentItemListByServiceSample.ts | 46 - .../src/contentTypeCreateOrUpdateSample.ts | 96 - .../typescript/src/contentTypeDeleteSample.ts | 45 - .../typescript/src/contentTypeGetSample.ts | 43 - .../src/contentTypeListByServiceSample.ts | 44 - .../delegationSettingsCreateOrUpdateSample.ts | 55 - .../delegationSettingsGetEntityTagSample.ts | 41 - .../src/delegationSettingsGetSample.ts | 41 - .../delegationSettingsListSecretsSample.ts | 41 - .../src/delegationSettingsUpdateSample.ts | 53 - .../src/deletedServicesGetByNameSample.ts | 37 - ...deletedServicesListBySubscriptionSample.ts | 38 - .../src/deletedServicesPurgeSample.ts | 40 - .../src/diagnosticCreateOrUpdateSample.ts | 60 - .../typescript/src/diagnosticDeleteSample.ts | 45 - .../src/diagnosticGetEntityTagSample.ts | 43 - .../v10/typescript/src/diagnosticGetSample.ts | 43 - .../src/diagnosticListByServiceSample.ts | 44 - .../typescript/src/diagnosticUpdateSample.ts | 62 - .../src/documentationCreateOrUpdateSample.ts | 51 - .../src/documentationDeleteSample.ts | 43 - .../src/documentationGetEntityTagSample.ts | 43 - .../typescript/src/documentationGetSample.ts | 43 - .../src/documentationListByServiceSample.ts | 44 - .../src/documentationUpdateSample.ts | 51 - .../src/emailTemplateCreateOrUpdateSample.ts | 50 - .../src/emailTemplateDeleteSample.ts | 45 - .../src/emailTemplateGetEntityTagSample.ts | 43 - .../typescript/src/emailTemplateGetSample.ts | 43 - .../src/emailTemplateListByServiceSample.ts | 44 - .../src/emailTemplateUpdateSample.ts | 53 - .../src/gatewayApiCreateOrUpdateSample.ts | 52 - .../typescript/src/gatewayApiDeleteSample.ts | 45 - .../src/gatewayApiGetEntityTagSample.ts | 45 - .../src/gatewayApiListByServiceSample.ts | 46 - ...ertificateAuthorityCreateOrUpdateSample.ts | 50 - ...gatewayCertificateAuthorityDeleteSample.ts | 47 - ...yCertificateAuthorityGetEntityTagSample.ts | 45 - .../gatewayCertificateAuthorityGetSample.ts | 45 - ...CertificateAuthorityListByServiceSample.ts | 46 - .../src/gatewayCreateOrUpdateSample.ts | 48 - .../v10/typescript/src/gatewayDeleteSample.ts | 45 - .../src/gatewayGenerateTokenSample.ts | 51 - .../src/gatewayGetEntityTagSample.ts | 43 - .../v10/typescript/src/gatewayGetSample.ts | 43 - ...stnameConfigurationCreateOrUpdateSample.ts | 58 - ...atewayHostnameConfigurationDeleteSample.ts | 47 - ...HostnameConfigurationGetEntityTagSample.ts | 45 - .../gatewayHostnameConfigurationGetSample.ts | 45 - ...ostnameConfigurationListByServiceSample.ts | 46 - ...gatewayInvalidateDebugCredentialsSample.ts | 43 - .../src/gatewayListByServiceSample.ts | 44 - .../src/gatewayListDebugCredentialsSample.ts | 53 - .../typescript/src/gatewayListKeysSample.ts | 43 - .../typescript/src/gatewayListTraceSample.ts | 50 - .../src/gatewayRegenerateKeySample.ts | 50 - .../v10/typescript/src/gatewayUpdateSample.ts | 50 - .../src/globalSchemaCreateOrUpdateSample.ts | 99 - .../src/globalSchemaDeleteSample.ts | 45 - .../src/globalSchemaGetEntityTagSample.ts | 43 - .../typescript/src/globalSchemaGetSample.ts | 68 - .../src/globalSchemaListByServiceSample.ts | 44 - .../graphQlApiResolverCreateOrUpdateSample.ts | 54 - .../src/graphQlApiResolverDeleteSample.ts | 47 - .../graphQlApiResolverGetEntityTagSample.ts | 45 - .../src/graphQlApiResolverGetSample.ts | 45 - .../src/graphQlApiResolverListByApiSample.ts | 46 - ...QlApiResolverPolicyCreateOrUpdateSample.ts | 62 - .../graphQlApiResolverPolicyDeleteSample.ts | 49 - ...phQlApiResolverPolicyGetEntityTagSample.ts | 47 - .../src/graphQlApiResolverPolicyGetSample.ts | 47 - ...QlApiResolverPolicyListByResolverSample.ts | 48 - .../src/graphQlApiResolverUpdateSample.ts | 56 - .../src/groupCreateOrUpdateSample.ts | 81 - .../v10/typescript/src/groupDeleteSample.ts | 45 - .../typescript/src/groupGetEntityTagSample.ts | 43 - .../v10/typescript/src/groupGetSample.ts | 43 - .../src/groupListByServiceSample.ts | 44 - .../v10/typescript/src/groupUpdateSample.ts | 50 - .../src/groupUserCheckEntityExistsSample.ts | 45 - .../typescript/src/groupUserCreateSample.ts | 45 - .../typescript/src/groupUserDeleteSample.ts | 45 - .../v10/typescript/src/groupUserListSample.ts | 46 - .../identityProviderCreateOrUpdateSample.ts | 51 - .../src/identityProviderDeleteSample.ts | 45 - .../src/identityProviderGetEntityTagSample.ts | 43 - .../src/identityProviderGetSample.ts | 43 - .../identityProviderListByServiceSample.ts | 44 - .../src/identityProviderListSecretsSample.ts | 43 - .../src/identityProviderUpdateSample.ts | 53 - .../v10/typescript/src/issueGetSample.ts | 43 - .../src/issueListByServiceSample.ts | 44 - .../src/loggerCreateOrUpdateSample.ts | 84 - .../v10/typescript/src/loggerDeleteSample.ts | 45 - .../src/loggerGetEntityTagSample.ts | 43 - .../v10/typescript/src/loggerGetSample.ts | 43 - .../src/loggerListByServiceSample.ts | 44 - .../v10/typescript/src/loggerUpdateSample.ts | 53 - .../src/namedValueCreateOrUpdateSample.ts | 88 - .../typescript/src/namedValueDeleteSample.ts | 45 - .../src/namedValueGetEntityTagSample.ts | 43 - .../v10/typescript/src/namedValueGetSample.ts | 68 - .../src/namedValueListByServiceSample.ts | 44 - .../src/namedValueListValueSample.ts | 43 - .../src/namedValueRefreshSecretSample.ts | 43 - .../typescript/src/namedValueUpdateSample.ts | 55 - .../src/networkStatusListByLocationSample.ts | 43 - .../src/networkStatusListByServiceSample.ts | 41 - .../src/notificationCreateOrUpdateSample.ts | 43 - .../typescript/src/notificationGetSample.ts | 43 - .../src/notificationListByServiceSample.ts | 44 - ...onRecipientEmailCheckEntityExistsSample.ts | 45 - ...ationRecipientEmailCreateOrUpdateSample.ts | 45 - .../notificationRecipientEmailDeleteSample.ts | 45 - ...nRecipientEmailListByNotificationSample.ts | 43 - ...ionRecipientUserCheckEntityExistsSample.ts | 45 - ...cationRecipientUserCreateOrUpdateSample.ts | 45 - .../notificationRecipientUserDeleteSample.ts | 45 - ...onRecipientUserListByNotificationSample.ts | 43 - ...enIdConnectProviderCreateOrUpdateSample.ts | 55 - .../src/openIdConnectProviderDeleteSample.ts | 45 - ...openIdConnectProviderGetEntityTagSample.ts | 43 - .../src/openIdConnectProviderGetSample.ts | 43 - ...penIdConnectProviderListByServiceSample.ts | 44 - .../openIdConnectProviderListSecretsSample.ts | 43 - .../src/openIdConnectProviderUpdateSample.ts | 54 - .../src/operationListByTagsSample.ts | 46 - .../src/operationStatusGetSample.ts | 37 - .../src/operationsResultsGetSample.ts | 37 - ...ependenciesEndpointsListByServiceSample.ts | 42 - .../performConnectivityCheckAsyncSample.ts | 86 - .../src/policyCreateOrUpdateSample.ts | 49 - .../v10/typescript/src/policyDeleteSample.ts | 45 - .../policyDescriptionListByServiceSample.ts | 47 - .../src/policyFragmentCreateOrUpdateSample.ts | 53 - .../src/policyFragmentDeleteSample.ts | 45 - .../src/policyFragmentGetEntityTagSample.ts | 43 - .../typescript/src/policyFragmentGetSample.ts | 74 - .../src/policyFragmentListByServiceSample.ts | 44 - .../src/policyFragmentListReferencesSample.ts | 43 - .../src/policyGetEntityTagSample.ts | 43 - .../v10/typescript/src/policyGetSample.ts | 74 - .../src/policyListByServiceSample.ts | 44 - .../policyRestrictionCreateOrUpdateSample.ts | 55 - .../src/policyRestrictionDeleteSample.ts | 49 - .../policyRestrictionGetEntityTagSample.ts | 43 - .../src/policyRestrictionGetSample.ts | 43 - .../policyRestrictionListByServiceSample.ts | 44 - .../src/policyRestrictionUpdateSample.ts | 52 - ...cyRestrictionValidationsByServiceSample.ts | 42 - .../src/portalConfigCreateOrUpdateSample.ts | 71 - .../src/portalConfigGetEntityTagSample.ts | 43 - .../typescript/src/portalConfigGetSample.ts | 43 - .../src/portalConfigListByServiceSample.ts | 44 - .../src/portalConfigUpdateSample.ts | 71 - .../src/portalRevisionCreateOrUpdateSample.ts | 51 - .../src/portalRevisionGetEntityTagSample.ts | 43 - .../typescript/src/portalRevisionGetSample.ts | 43 - .../src/portalRevisionListByServiceSample.ts | 44 - .../src/portalRevisionUpdateSample.ts | 53 - .../src/portalSettingsListByServiceSample.ts | 41 - ...eEndpointConnectionCreateOrUpdateSample.ts | 57 - .../privateEndpointConnectionDeleteSample.ts | 44 - ...rivateEndpointConnectionGetByNameSample.ts | 43 - ...tConnectionGetPrivateLinkResourceSample.ts | 44 - ...teEndpointConnectionListByServiceSample.ts | 44 - ...onnectionListPrivateLinkResourcesSample.ts | 42 - .../src/productApiCheckEntityExistsSample.ts | 45 - .../src/productApiCreateOrUpdateSample.ts | 45 - .../typescript/src/productApiDeleteSample.ts | 45 - .../src/productApiLinkCreateOrUpdateSample.ts | 53 - .../src/productApiLinkDeleteSample.ts | 45 - .../typescript/src/productApiLinkGetSample.ts | 45 - .../src/productApiLinkListByProductSample.ts | 46 - .../src/productApiListByProductSample.ts | 46 - .../src/productCreateOrUpdateSample.ts | 47 - .../v10/typescript/src/productDeleteSample.ts | 51 - .../src/productGetEntityTagSample.ts | 43 - .../v10/typescript/src/productGetSample.ts | 43 - .../productGroupCheckEntityExistsSample.ts | 45 - .../src/productGroupCreateOrUpdateSample.ts | 45 - .../src/productGroupDeleteSample.ts | 45 - .../productGroupLinkCreateOrUpdateSample.ts | 53 - .../src/productGroupLinkDeleteSample.ts | 45 - .../src/productGroupLinkGetSample.ts | 45 - .../productGroupLinkListByProductSample.ts | 46 - .../src/productGroupListByProductSample.ts | 46 - .../src/productListByServiceSample.ts | 44 - .../typescript/src/productListByTagsSample.ts | 44 - .../src/productPolicyCreateOrUpdateSample.ts | 51 - .../src/productPolicyDeleteSample.ts | 47 - .../src/productPolicyGetEntityTagSample.ts | 45 - .../typescript/src/productPolicyGetSample.ts | 45 - .../src/productPolicyListByProductSample.ts | 46 - .../src/productSubscriptionsListSample.ts | 46 - .../v10/typescript/src/productUpdateSample.ts | 52 - .../src/productWikiCreateOrUpdateSample.ts | 47 - .../typescript/src/productWikiDeleteSample.ts | 45 - .../src/productWikiGetEntityTagSample.ts | 43 - .../typescript/src/productWikiGetSample.ts | 43 - .../typescript/src/productWikiUpdateSample.ts | 52 - .../typescript/src/productWikisListSample.ts | 46 - .../quotaByCounterKeysListByServiceSample.ts | 43 - .../src/quotaByCounterKeysUpdateSample.ts | 51 - .../src/quotaByPeriodKeysGetSample.ts | 45 - .../src/quotaByPeriodKeysUpdateSample.ts | 53 - .../src/regionListByServiceSample.ts | 44 - .../typescript/src/reportsListByApiSample.ts | 47 - .../typescript/src/reportsListByGeoSample.ts | 47 - .../src/reportsListByOperationSample.ts | 47 - .../src/reportsListByProductSample.ts | 47 - .../src/reportsListByRequestSample.ts | 47 - .../src/reportsListBySubscriptionSample.ts | 47 - .../typescript/src/reportsListByTimeSample.ts | 49 - .../typescript/src/reportsListByUserSample.ts | 47 - .../src/signInSettingsCreateOrUpdateSample.ts | 50 - .../src/signInSettingsGetEntityTagSample.ts | 41 - .../typescript/src/signInSettingsGetSample.ts | 41 - .../src/signInSettingsUpdateSample.ts | 48 - .../src/signUpSettingsCreateOrUpdateSample.ts | 57 - .../src/signUpSettingsGetEntityTagSample.ts | 41 - .../typescript/src/signUpSettingsGetSample.ts | 41 - .../src/signUpSettingsUpdateSample.ts | 55 - .../src/subscriptionCreateOrUpdateSample.ts | 54 - .../src/subscriptionDeleteSample.ts | 45 - .../src/subscriptionGetEntityTagSample.ts | 43 - .../typescript/src/subscriptionGetSample.ts | 43 - .../typescript/src/subscriptionListSample.ts | 44 - .../src/subscriptionListSecretsSample.ts | 43 - .../subscriptionRegeneratePrimaryKeySample.ts | 43 - ...ubscriptionRegenerateSecondaryKeySample.ts | 43 - .../src/subscriptionUpdateSample.ts | 50 - .../src/tagApiLinkCreateOrUpdateSample.ts | 53 - .../typescript/src/tagApiLinkDeleteSample.ts | 45 - .../v10/typescript/src/tagApiLinkGetSample.ts | 45 - .../src/tagApiLinkListByProductSample.ts | 46 - .../typescript/src/tagAssignToApiSample.ts | 45 - .../src/tagAssignToOperationSample.ts | 47 - .../src/tagAssignToProductSample.ts | 45 - .../typescript/src/tagCreateOrUpdateSample.ts | 48 - .../v10/typescript/src/tagDeleteSample.ts | 45 - .../typescript/src/tagDetachFromApiSample.ts | 45 - .../src/tagDetachFromOperationSample.ts | 47 - .../src/tagDetachFromProductSample.ts | 45 - .../v10/typescript/src/tagGetByApiSample.ts | 45 - .../typescript/src/tagGetByOperationSample.ts | 47 - .../typescript/src/tagGetByProductSample.ts | 45 - .../src/tagGetEntityStateByApiSample.ts | 45 - .../src/tagGetEntityStateByOperationSample.ts | 47 - .../src/tagGetEntityStateByProductSample.ts | 45 - .../typescript/src/tagGetEntityStateSample.ts | 43 - .../v10/typescript/src/tagGetSample.ts | 39 - .../v10/typescript/src/tagListByApiSample.ts | 46 - .../src/tagListByOperationSample.ts | 48 - .../typescript/src/tagListByProductSample.ts | 46 - .../typescript/src/tagListByServiceSample.ts | 44 - .../tagOperationLinkCreateOrUpdateSample.ts | 53 - .../src/tagOperationLinkDeleteSample.ts | 45 - .../src/tagOperationLinkGetSample.ts | 45 - .../tagOperationLinkListByProductSample.ts | 46 - .../src/tagProductLinkCreateOrUpdateSample.ts | 53 - .../src/tagProductLinkDeleteSample.ts | 45 - .../typescript/src/tagProductLinkGetSample.ts | 45 - .../src/tagProductLinkListByProductSample.ts | 46 - .../src/tagResourceListByServiceSample.ts | 44 - .../v10/typescript/src/tagUpdateSample.ts | 50 - .../src/tenantAccessCreateSample.ts | 50 - .../src/tenantAccessGetEntityTagSample.ts | 43 - .../typescript/src/tenantAccessGetSample.ts | 68 - ...nantAccessGitRegeneratePrimaryKeySample.ts | 43 - ...ntAccessGitRegenerateSecondaryKeySample.ts | 43 - .../src/tenantAccessListByServiceSample.ts | 44 - .../src/tenantAccessListSecretsSample.ts | 43 - .../tenantAccessRegeneratePrimaryKeySample.ts | 43 - ...enantAccessRegenerateSecondaryKeySample.ts | 43 - .../src/tenantAccessUpdateSample.ts | 50 - .../src/tenantConfigurationDeploySample.ts | 48 - .../tenantConfigurationGetSyncStateSample.ts | 43 - .../src/tenantConfigurationSaveSample.ts | 48 - .../src/tenantConfigurationValidateSample.ts | 48 - .../typescript/src/tenantSettingsGetSample.ts | 43 - .../src/tenantSettingsListByServiceSample.ts | 44 - .../src/userConfirmationPasswordSendSample.ts | 43 - .../src/userCreateOrUpdateSample.ts | 53 - .../v10/typescript/src/userDeleteSample.ts | 45 - .../src/userGenerateSsoUrlSample.ts | 43 - .../typescript/src/userGetEntityTagSample.ts | 43 - .../v10/typescript/src/userGetSample.ts | 39 - .../src/userGetSharedAccessTokenSample.ts | 51 - .../v10/typescript/src/userGroupListSample.ts | 46 - .../src/userIdentitiesListSample.ts | 46 - .../typescript/src/userListByServiceSample.ts | 44 - .../src/userSubscriptionGetSample.ts | 45 - .../src/userSubscriptionListSample.ts | 46 - .../v10/typescript/src/userUpdateSample.ts | 54 - .../src/workspaceApiCreateOrUpdateSample.ts | 63 - .../src/workspaceApiDeleteSample.ts | 47 - ...kspaceApiDiagnosticCreateOrUpdateSample.ts | 64 - .../src/workspaceApiDiagnosticDeleteSample.ts | 49 - ...orkspaceApiDiagnosticGetEntityTagSample.ts | 47 - .../src/workspaceApiDiagnosticGetSample.ts | 47 - ...spaceApiDiagnosticListByWorkspaceSample.ts | 48 - .../src/workspaceApiDiagnosticUpdateSample.ts | 66 - .../src/workspaceApiExportGetSample.ts | 80 - .../src/workspaceApiGetEntityTagSample.ts | 45 - .../typescript/src/workspaceApiGetSample.ts | 72 - .../src/workspaceApiListByServiceSample.ts | 46 - ...rkspaceApiOperationCreateOrUpdateSample.ts | 81 - .../src/workspaceApiOperationDeleteSample.ts | 49 - ...workspaceApiOperationGetEntityTagSample.ts | 47 - .../src/workspaceApiOperationGetSample.ts | 47 - .../workspaceApiOperationListByApiSample.ts | 48 - ...eApiOperationPolicyCreateOrUpdateSample.ts | 64 - ...workspaceApiOperationPolicyDeleteSample.ts | 51 - ...aceApiOperationPolicyGetEntityTagSample.ts | 49 - .../workspaceApiOperationPolicyGetSample.ts | 49 - ...ApiOperationPolicyListByOperationSample.ts | 50 - .../src/workspaceApiOperationUpdateSample.ts | 86 - .../workspaceApiPolicyCreateOrUpdateSample.ts | 60 - .../src/workspaceApiPolicyDeleteSample.ts | 49 - .../workspaceApiPolicyGetEntityTagSample.ts | 47 - .../src/workspaceApiPolicyGetSample.ts | 47 - .../src/workspaceApiPolicyListByApiSample.ts | 48 - ...workspaceApiReleaseCreateOrUpdateSample.ts | 56 - .../src/workspaceApiReleaseDeleteSample.ts | 49 - .../workspaceApiReleaseGetEntityTagSample.ts | 47 - .../src/workspaceApiReleaseGetSample.ts | 47 - .../workspaceApiReleaseListByServiceSample.ts | 48 - .../src/workspaceApiReleaseUpdateSample.ts | 58 - ...workspaceApiRevisionListByServiceSample.ts | 48 - .../workspaceApiSchemaCreateOrUpdateSample.ts | 53 - .../src/workspaceApiSchemaDeleteSample.ts | 49 - .../workspaceApiSchemaGetEntityTagSample.ts | 47 - .../src/workspaceApiSchemaGetSample.ts | 47 - .../src/workspaceApiSchemaListByApiSample.ts | 48 - .../src/workspaceApiUpdateSample.ts | 56 - ...kspaceApiVersionSetCreateOrUpdateSample.ts | 54 - .../src/workspaceApiVersionSetDeleteSample.ts | 47 - ...orkspaceApiVersionSetGetEntityTagSample.ts | 45 - .../src/workspaceApiVersionSetGetSample.ts | 45 - ...rkspaceApiVersionSetListByServiceSample.ts | 46 - .../src/workspaceApiVersionSetUpdateSample.ts | 56 - .../workspaceBackendCreateOrUpdateSample.ts | 109 - .../src/workspaceBackendDeleteSample.ts | 47 - .../src/workspaceBackendGetEntityTagSample.ts | 45 - .../src/workspaceBackendGetSample.ts | 45 - .../workspaceBackendListByWorkspaceSample.ts | 46 - .../src/workspaceBackendUpdateSample.ts | 55 - ...orkspaceCertificateCreateOrUpdateSample.ts | 88 - .../src/workspaceCertificateDeleteSample.ts | 47 - .../workspaceCertificateGetEntityTagSample.ts | 45 - .../src/workspaceCertificateGetSample.ts | 72 - ...rkspaceCertificateListByWorkspaceSample.ts | 46 - ...workspaceCertificateRefreshSecretSample.ts | 45 - .../src/workspaceCreateOrUpdateSample.ts | 51 - .../typescript/src/workspaceDeleteSample.ts | 45 - ...workspaceDiagnosticCreateOrUpdateSample.ts | 62 - .../src/workspaceDiagnosticDeleteSample.ts | 47 - .../workspaceDiagnosticGetEntityTagSample.ts | 45 - .../src/workspaceDiagnosticGetSample.ts | 45 - ...orkspaceDiagnosticListByWorkspaceSample.ts | 46 - .../src/workspaceDiagnosticUpdateSample.ts | 64 - .../src/workspaceGetEntityTagSample.ts | 43 - .../v10/typescript/src/workspaceGetSample.ts | 43 - ...rkspaceGlobalSchemaCreateOrUpdateSample.ts | 55 - .../src/workspaceGlobalSchemaDeleteSample.ts | 47 - ...workspaceGlobalSchemaGetEntityTagSample.ts | 45 - .../src/workspaceGlobalSchemaGetSample.ts | 45 - ...orkspaceGlobalSchemaListByServiceSample.ts | 46 - .../src/workspaceGroupCreateOrUpdateSample.ts | 85 - .../src/workspaceGroupDeleteSample.ts | 47 - .../src/workspaceGroupGetEntityTagSample.ts | 45 - .../typescript/src/workspaceGroupGetSample.ts | 45 - .../src/workspaceGroupListByServiceSample.ts | 46 - .../src/workspaceGroupUpdateSample.ts | 52 - ...rkspaceGroupUserCheckEntityExistsSample.ts | 47 - .../src/workspaceGroupUserCreateSample.ts | 47 - .../src/workspaceGroupUserDeleteSample.ts | 47 - .../src/workspaceGroupUserListSample.ts | 48 - .../src/workspaceListByServiceSample.ts | 44 - .../workspaceLoggerCreateOrUpdateSample.ts | 88 - .../src/workspaceLoggerDeleteSample.ts | 47 - .../src/workspaceLoggerGetEntityTagSample.ts | 45 - .../src/workspaceLoggerGetSample.ts | 45 - .../workspaceLoggerListByWorkspaceSample.ts | 46 - .../src/workspaceLoggerUpdateSample.ts | 55 - ...workspaceNamedValueCreateOrUpdateSample.ts | 92 - .../src/workspaceNamedValueDeleteSample.ts | 47 - .../workspaceNamedValueGetEntityTagSample.ts | 45 - .../src/workspaceNamedValueGetSample.ts | 72 - .../workspaceNamedValueListByServiceSample.ts | 46 - .../src/workspaceNamedValueListValueSample.ts | 45 - .../workspaceNamedValueRefreshSecretSample.ts | 45 - .../src/workspaceNamedValueUpdateSample.ts | 57 - ...rkspaceNotificationCreateOrUpdateSample.ts | 45 - .../src/workspaceNotificationGetSample.ts | 45 - ...orkspaceNotificationListByServiceSample.ts | 46 - ...onRecipientEmailCheckEntityExistsSample.ts | 48 - ...ationRecipientEmailCreateOrUpdateSample.ts | 48 - ...eNotificationRecipientEmailDeleteSample.ts | 47 - ...nRecipientEmailListByNotificationSample.ts | 46 - ...ionRecipientUserCheckEntityExistsSample.ts | 48 - ...cationRecipientUserCreateOrUpdateSample.ts | 47 - ...ceNotificationRecipientUserDeleteSample.ts | 47 - ...onRecipientUserListByNotificationSample.ts | 46 - .../workspacePolicyCreateOrUpdateSample.ts | 94 - .../src/workspacePolicyDeleteSample.ts | 47 - ...spacePolicyFragmentCreateOrUpdateSample.ts | 56 - .../workspacePolicyFragmentDeleteSample.ts | 47 - ...rkspacePolicyFragmentGetEntityTagSample.ts | 45 - .../src/workspacePolicyFragmentGetSample.ts | 78 - ...kspacePolicyFragmentListByServiceSample.ts | 46 - ...spacePolicyFragmentListReferencesSample.ts | 45 - .../src/workspacePolicyGetEntityTagSample.ts | 45 - .../src/workspacePolicyGetSample.ts | 45 - .../src/workspacePolicyListByApiSample.ts | 46 - ...spaceProductApiLinkCreateOrUpdateSample.ts | 55 - .../workspaceProductApiLinkDeleteSample.ts | 47 - .../src/workspaceProductApiLinkGetSample.ts | 47 - ...kspaceProductApiLinkListByProductSample.ts | 48 - .../workspaceProductCreateOrUpdateSample.ts | 49 - .../src/workspaceProductDeleteSample.ts | 53 - .../src/workspaceProductGetEntityTagSample.ts | 45 - .../src/workspaceProductGetSample.ts | 45 - ...aceProductGroupLinkCreateOrUpdateSample.ts | 55 - .../workspaceProductGroupLinkDeleteSample.ts | 47 - .../src/workspaceProductGroupLinkGetSample.ts | 47 - ...paceProductGroupLinkListByProductSample.ts | 48 - .../workspaceProductListByServiceSample.ts | 46 - ...kspaceProductPolicyCreateOrUpdateSample.ts | 53 - .../src/workspaceProductPolicyDeleteSample.ts | 49 - ...orkspaceProductPolicyGetEntityTagSample.ts | 47 - .../src/workspaceProductPolicyGetSample.ts | 47 - ...rkspaceProductPolicyListByProductSample.ts | 45 - .../src/workspaceProductUpdateSample.ts | 54 - ...rkspaceSubscriptionCreateOrUpdateSample.ts | 56 - .../src/workspaceSubscriptionDeleteSample.ts | 47 - ...workspaceSubscriptionGetEntityTagSample.ts | 45 - .../src/workspaceSubscriptionGetSample.ts | 45 - .../src/workspaceSubscriptionListSample.ts | 46 - .../workspaceSubscriptionListSecretsSample.ts | 45 - ...eSubscriptionRegeneratePrimaryKeySample.ts | 45 - ...ubscriptionRegenerateSecondaryKeySample.ts | 45 - .../src/workspaceSubscriptionUpdateSample.ts | 52 - ...workspaceTagApiLinkCreateOrUpdateSample.ts | 55 - .../src/workspaceTagApiLinkDeleteSample.ts | 47 - .../src/workspaceTagApiLinkGetSample.ts | 47 - .../workspaceTagApiLinkListByProductSample.ts | 48 - .../src/workspaceTagCreateOrUpdateSample.ts | 50 - .../src/workspaceTagDeleteSample.ts | 47 - .../src/workspaceTagGetEntityStateSample.ts | 45 - .../typescript/src/workspaceTagGetSample.ts | 45 - .../src/workspaceTagListByServiceSample.ts | 46 - ...aceTagOperationLinkCreateOrUpdateSample.ts | 55 - .../workspaceTagOperationLinkDeleteSample.ts | 47 - .../src/workspaceTagOperationLinkGetSample.ts | 47 - ...paceTagOperationLinkListByProductSample.ts | 48 - ...spaceTagProductLinkCreateOrUpdateSample.ts | 55 - .../workspaceTagProductLinkDeleteSample.ts | 47 - .../src/workspaceTagProductLinkGetSample.ts | 47 - ...kspaceTagProductLinkListByProductSample.ts | 48 - .../src/workspaceTagUpdateSample.ts | 52 - .../typescript/src/workspaceUpdateSample.ts | 53 - .../samples/v10/typescript/tsconfig.json | 20 - .../samples/v11-beta/javascript/README.md | 1320 + .../allPoliciesListByServiceSample.js | 29 + .../javascript/apiCreateOrUpdateSample.js | 470 + .../v11-beta/javascript/apiDeleteSample.js | 24 + .../apiDiagnosticCreateOrUpdateSample.js | 43 + .../javascript/apiDiagnosticDeleteSample.js | 30 + .../apiDiagnosticGetEntityTagSample.js | 29 + .../javascript/apiDiagnosticGetSample.js | 30 + .../apiDiagnosticListByServiceSample.js | 29 + .../javascript/apiDiagnosticUpdateSample.js | 44 + .../v11-beta/javascript/apiExportGetSample.js | 52 + ...wayConfigConnectionCreateOrUpdateSample.js | 33 + .../apiGatewayConfigConnectionDeleteSample.js | 24 + .../apiGatewayConfigConnectionGetSample.js | 25 + ...ewayConfigConnectionListByGatewaySample.js | 32 + .../apiGatewayCreateOrUpdateSample.js | 59 + .../javascript/apiGatewayDeleteSample.js | 25 + .../javascript/apiGatewayGetSample.js | 25 + ...ewayHostnameBindingCreateOrUpdateSample.js | 36 + .../apiGatewayHostnameBindingDeleteSample.js | 24 + .../apiGatewayHostnameBindingGetSample.js | 25 + ...tewayHostnameBindingListByGatewaySample.js | 29 + ...tewayHostnameBindingRefreshSecretSample.js | 24 + .../apiGatewayListByResourceGroupSample.js | 29 + .../javascript/apiGatewayListSample.js | 29 + .../javascript/apiGatewayUpdateSample.js | 28 + .../javascript/apiGetEntityTagSample.js | 24 + .../v11-beta/javascript/apiGetSample.js | 40 + .../apiIssueAttachmentCreateOrUpdateSample.js | 32 + .../apiIssueAttachmentDeleteSample.js | 31 + .../apiIssueAttachmentGetEntityTagSample.js | 30 + .../javascript/apiIssueAttachmentGetSample.js | 31 + .../apiIssueAttachmentListByServiceSample.js | 34 + .../apiIssueCommentCreateOrUpdateSample.js | 37 + .../javascript/apiIssueCommentDeleteSample.js | 31 + .../apiIssueCommentGetEntityTagSample.js | 30 + .../javascript/apiIssueCommentGetSample.js | 31 + .../apiIssueCommentListByServiceSample.js | 34 + .../apiIssueCreateOrUpdateSample.js | 38 + .../javascript/apiIssueDeleteSample.js | 30 + .../javascript/apiIssueGetEntityTagSample.js | 29 + .../v11-beta/javascript/apiIssueGetSample.js | 30 + .../javascript/apiIssueListByServiceSample.js | 33 + .../javascript/apiIssueUpdateSample.js | 32 + .../javascript/apiListByServiceSample.js | 29 + .../javascript/apiListByTagsSample.js | 29 + ...ementGatewaySkusListAvailableSkusSample.js | 32 + .../apiManagementOperationsListSample.js | 28 + ...eApplyNetworkConfigurationUpdatesSample.js | 29 + .../apiManagementServiceBackupSample.js | 72 + ...ementServiceCheckNameAvailabilitySample.js | 25 + ...piManagementServiceCreateOrUpdateSample.js | 379 + .../apiManagementServiceDeleteSample.js | 25 + ...rviceGetDomainOwnershipIdentifierSample.js | 25 + .../apiManagementServiceGetSample.js | 55 + .../apiManagementServiceGetSsoTokenSample.js | 25 + ...agementServiceListByResourceGroupSample.js | 29 + .../apiManagementServiceListSample.js | 29 + ...apiManagementServiceMigrateToStv2Sample.js | 27 + ...ManagementServiceRefreshHostnamesSample.js | 25 + ...rcesPerformConnectivityCheckAsyncSample.js | 63 + .../apiManagementServiceRestoreSample.js | 31 + ...rviceSkusListAvailableServiceSkusSample.js | 54 + .../apiManagementServiceUpdateSample.js | 85 + .../javascript/apiManagementSkusListSample.js | 29 + .../apiManagementWorkspaceLinkGetSample.js | 25 + ...gementWorkspaceLinksListByServiceSample.js | 29 + .../apiOperationCreateOrUpdateSample.js | 60 + .../javascript/apiOperationDeleteSample.js | 30 + .../apiOperationGetEntityTagSample.js | 29 + .../javascript/apiOperationGetSample.js | 50 + .../javascript/apiOperationListByApiSample.js | 33 + .../apiOperationPolicyCreateOrUpdateSample.js | 37 + .../apiOperationPolicyDeleteSample.js | 31 + .../apiOperationPolicyGetEntityTagSample.js | 30 + .../javascript/apiOperationPolicyGetSample.js | 31 + ...apiOperationPolicyListByOperationSample.js | 30 + .../javascript/apiOperationUpdateSample.js | 58 + .../apiPolicyCreateOrUpdateSample.js | 62 + .../javascript/apiPolicyDeleteSample.js | 24 + .../javascript/apiPolicyGetEntityTagSample.js | 24 + .../v11-beta/javascript/apiPolicyGetSample.js | 30 + .../javascript/apiPolicyListByApiSample.js | 29 + .../javascript/apiProductListByApisSample.js | 33 + .../apiReleaseCreateOrUpdateSample.js | 29 + .../javascript/apiReleaseDeleteSample.js | 24 + .../apiReleaseGetEntityTagSample.js | 24 + .../javascript/apiReleaseGetSample.js | 30 + .../apiReleaseListByServiceSample.js | 29 + .../javascript/apiReleaseUpdateSample.js | 29 + .../apiRevisionListByServiceSample.js | 33 + .../apiSchemaCreateOrUpdateSample.js | 37 + .../javascript/apiSchemaDeleteSample.js | 30 + .../javascript/apiSchemaGetEntityTagSample.js | 29 + .../v11-beta/javascript/apiSchemaGetSample.js | 30 + .../javascript/apiSchemaListByApiSample.js | 33 + .../apiTagDescriptionCreateOrUpdateSample.js | 36 + .../apiTagDescriptionDeleteSample.js | 30 + .../apiTagDescriptionGetEntityTagSample.js | 29 + .../javascript/apiTagDescriptionGetSample.js | 30 + .../apiTagDescriptionListByServiceSample.js | 33 + .../javascript/apiToolCreateOrUpdateSample.js | 36 + .../javascript/apiToolDeleteSample.js | 29 + .../javascript/apiToolGetEntityTagSample.js | 29 + .../v11-beta/javascript/apiToolGetSample.js | 30 + .../javascript/apiToolListByApiSample.js | 29 + .../javascript/apiToolUpdateSample.js | 31 + .../v11-beta/javascript/apiUpdateSample.js | 29 + .../apiVersionSetCreateOrUpdateSample.js | 29 + .../javascript/apiVersionSetDeleteSample.js | 24 + .../apiVersionSetGetEntityTagSample.js | 24 + .../javascript/apiVersionSetGetSample.js | 25 + .../apiVersionSetListByServiceSample.js | 29 + .../javascript/apiVersionSetUpdateSample.js | 29 + .../javascript/apiWikiCreateOrUpdateSample.js | 30 + .../javascript/apiWikiDeleteSample.js | 24 + .../javascript/apiWikiGetEntityTagSample.js | 24 + .../v11-beta/javascript/apiWikiGetSample.js | 25 + .../javascript/apiWikiUpdateSample.js | 31 + .../v11-beta/javascript/apiWikisListSample.js | 33 + ...izationAccessPolicyCreateOrUpdateSample.js | 36 + .../authorizationAccessPolicyDeleteSample.js | 31 + .../authorizationAccessPolicyGetSample.js | 31 + ...onAccessPolicyListByAuthorizationSample.js | 34 + .../authorizationConfirmConsentCodeSample.js | 30 + .../authorizationCreateOrUpdateSample.js | 56 + .../javascript/authorizationDeleteSample.js | 24 + .../javascript/authorizationGetSample.js | 25 + ...zationListByAuthorizationProviderSample.js | 56 + .../authorizationLoginLinksPostSample.js | 31 + ...thorizationProviderCreateOrUpdateSample.js | 184 + .../authorizationProviderDeleteSample.js | 24 + .../authorizationProviderGetSample.js | 25 + ...uthorizationProviderListByServiceSample.js | 29 + ...uthorizationProviderRefreshSecretSample.js | 29 + ...authorizationServerCreateOrUpdateSample.js | 47 + .../authorizationServerDeleteSample.js | 24 + .../authorizationServerGetEntityTagSample.js | 24 + .../authorizationServerGetSample.js | 25 + .../authorizationServerListByServiceSample.js | 29 + .../authorizationServerListSecretsSample.js | 29 + .../authorizationServerUpdateSample.js | 36 + .../javascript/backendCreateOrUpdateSample.js | 281 + .../javascript/backendDeleteSample.js | 24 + .../javascript/backendGetEntityTagSample.js | 24 + .../v11-beta/javascript/backendGetSample.js | 25 + .../javascript/backendListByServiceSample.js | 29 + .../javascript/backendReconnectSample.js | 26 + .../javascript/backendUpdateSample.js | 28 + .../javascript/cacheCreateOrUpdateSample.js | 31 + .../v11-beta/javascript/cacheDeleteSample.js | 24 + .../javascript/cacheGetEntityTagSample.js | 24 + .../v11-beta/javascript/cacheGetSample.js | 25 + .../javascript/cacheListByServiceSample.js | 29 + .../v11-beta/javascript/cacheUpdateSample.js | 27 + .../certificateCreateOrUpdateSample.js | 49 + .../javascript/certificateDeleteSample.js | 24 + .../certificateGetEntityTagSample.js | 24 + .../javascript/certificateGetSample.js | 40 + .../certificateListByServiceSample.js | 29 + .../certificateRefreshSecretSample.js | 25 + .../clientApplicationCreateOrUpdateSample.js | 29 + .../clientApplicationDeleteSample.js | 24 + .../clientApplicationGetEntityTagSample.js | 24 + .../javascript/clientApplicationGetSample.js | 25 + .../clientApplicationListByServiceSample.js | 29 + .../clientApplicationListSecretsSample.js | 25 + ...lientApplicationProductLinkCreateSample.js | 34 + ...lientApplicationProductLinkDeleteSample.js | 24 + .../clientApplicationProductLinkGetSample.js | 30 + ...oductLinkListByClientApplicationsSample.js | 33 + .../contentItemCreateOrUpdateSample.js | 41 + .../javascript/contentItemDeleteSample.js | 30 + .../contentItemGetEntityTagSample.js | 29 + .../javascript/contentItemGetSample.js | 30 + .../contentItemListByServiceSample.js | 29 + .../contentTypeCreateOrUpdateSample.js | 70 + .../javascript/contentTypeDeleteSample.js | 24 + .../javascript/contentTypeGetSample.js | 25 + .../contentTypeListByServiceSample.js | 29 + .../delegationSettingsCreateOrUpdateSample.js | 35 + .../delegationSettingsGetEntityTagSample.js | 24 + .../javascript/delegationSettingsGetSample.js | 25 + .../delegationSettingsListSecretsSample.js | 25 + .../delegationSettingsUpdateSample.js | 29 + .../deletedServicesGetByNameSample.js | 25 + ...deletedServicesListBySubscriptionSample.js | 29 + .../javascript/deletedServicesPurgeSample.js | 25 + .../diagnosticCreateOrUpdateSample.js | 42 + .../javascript/diagnosticDeleteSample.js | 24 + .../diagnosticGetEntityTagSample.js | 24 + .../javascript/diagnosticGetSample.js | 25 + .../diagnosticListByServiceSample.js | 29 + .../javascript/diagnosticUpdateSample.js | 37 + .../documentationCreateOrUpdateSample.js | 30 + .../javascript/documentationDeleteSample.js | 24 + .../documentationGetEntityTagSample.js | 24 + .../javascript/documentationGetSample.js | 25 + .../documentationListByServiceSample.js | 29 + .../javascript/documentationUpdateSample.js | 31 + .../emailTemplateCreateOrUpdateSample.js | 30 + .../javascript/emailTemplateDeleteSample.js | 24 + .../emailTemplateGetEntityTagSample.js | 24 + .../javascript/emailTemplateGetSample.js | 29 + .../emailTemplateListByServiceSample.js | 29 + .../javascript/emailTemplateUpdateSample.js | 34 + .../gatewayApiCreateOrUpdateSample.js | 27 + .../javascript/gatewayApiDeleteSample.js | 24 + .../gatewayApiGetEntityTagSample.js | 24 + .../gatewayApiListByServiceSample.js | 29 + ...ertificateAuthorityCreateOrUpdateSample.js | 31 + ...gatewayCertificateAuthorityDeleteSample.js | 24 + ...yCertificateAuthorityGetEntityTagSample.js | 24 + .../gatewayCertificateAuthorityGetSample.js | 30 + ...CertificateAuthorityListByServiceSample.js | 33 + .../javascript/gatewayCreateOrUpdateSample.js | 28 + .../javascript/gatewayDeleteSample.js | 24 + .../javascript/gatewayGenerateTokenSample.js | 28 + .../javascript/gatewayGetEntityTagSample.js | 24 + .../v11-beta/javascript/gatewayGetSample.js | 25 + ...stnameConfigurationCreateOrUpdateSample.js | 39 + ...atewayHostnameConfigurationDeleteSample.js | 24 + ...HostnameConfigurationGetEntityTagSample.js | 24 + .../gatewayHostnameConfigurationGetSample.js | 30 + ...ostnameConfigurationListByServiceSample.js | 33 + ...gatewayInvalidateDebugCredentialsSample.js | 24 + .../javascript/gatewayListByServiceSample.js | 29 + .../gatewayListDebugCredentialsSample.js | 30 + .../javascript/gatewayListKeysSample.js | 25 + .../javascript/gatewayListTraceSample.js | 27 + .../javascript/gatewayRegenerateKeySample.js | 24 + .../javascript/gatewayUpdateSample.js | 28 + .../globalSchemaCreateOrUpdateSample.js | 63 + .../javascript/globalSchemaDeleteSample.js | 24 + .../globalSchemaGetEntityTagSample.js | 24 + .../javascript/globalSchemaGetSample.js | 40 + .../globalSchemaListByServiceSample.js | 29 + .../graphQLApiResolverCreateOrUpdateSample.js | 31 + .../graphQLApiResolverDeleteSample.js | 30 + .../graphQLApiResolverGetEntityTagSample.js | 29 + .../javascript/graphQLApiResolverGetSample.js | 30 + .../graphQLApiResolverListByApiSample.js | 33 + ...QLApiResolverPolicyCreateOrUpdateSample.js | 37 + .../graphQLApiResolverPolicyDeleteSample.js | 31 + ...phQLApiResolverPolicyGetEntityTagSample.js | 30 + .../graphQLApiResolverPolicyGetSample.js | 31 + ...QLApiResolverPolicyListByResolverSample.js | 34 + .../graphQLApiResolverUpdateSample.js | 36 + .../javascript/groupCreateOrUpdateSample.js | 47 + .../v11-beta/javascript/groupDeleteSample.js | 24 + .../javascript/groupGetEntityTagSample.js | 24 + .../v11-beta/javascript/groupGetSample.js | 25 + .../javascript/groupListByServiceSample.js | 29 + .../v11-beta/javascript/groupUpdateSample.js | 27 + .../groupUserCheckEntityExistsSample.js | 29 + .../javascript/groupUserCreateSample.js | 30 + .../javascript/groupUserDeleteSample.js | 24 + .../javascript/groupUserListSample.js | 33 + .../identityProviderCreateOrUpdateSample.js | 28 + .../identityProviderDeleteSample.js | 24 + .../identityProviderGetEntityTagSample.js | 24 + .../javascript/identityProviderGetSample.js | 25 + .../identityProviderListByServiceSample.js | 29 + .../identityProviderListSecretsSample.js | 25 + .../identityProviderUpdateSample.js | 28 + .../v11-beta/javascript/issueGetSample.js | 25 + .../javascript/issueListByServiceSample.js | 29 + .../javascript/loggerCreateOrUpdateSample.js | 52 + .../v11-beta/javascript/loggerDeleteSample.js | 24 + .../javascript/loggerGetEntityTagSample.js | 24 + .../v11-beta/javascript/loggerGetSample.js | 25 + .../javascript/loggerListByServiceSample.js | 29 + .../v11-beta/javascript/loggerUpdateSample.js | 28 + .../namedValueCreateOrUpdateSample.js | 53 + .../javascript/namedValueDeleteSample.js | 24 + .../namedValueGetEntityTagSample.js | 24 + .../javascript/namedValueGetSample.js | 40 + .../namedValueListByServiceSample.js | 29 + .../javascript/namedValueListValueSample.js | 29 + .../namedValueRefreshSecretSample.js | 25 + .../javascript/namedValueUpdateSample.js | 30 + .../networkStatusListByLocationSample.js | 29 + .../networkStatusListByServiceSample.js | 25 + .../notificationCreateOrUpdateSample.js | 29 + .../javascript/notificationGetSample.js | 29 + .../notificationListByServiceSample.js | 29 + ...onRecipientEmailCheckEntityExistsSample.js | 29 + ...ationRecipientEmailCreateOrUpdateSample.js | 30 + .../notificationRecipientEmailDeleteSample.js | 29 + ...nRecipientEmailListByNotificationSample.js | 29 + ...ionRecipientUserCheckEntityExistsSample.js | 29 + ...cationRecipientUserCreateOrUpdateSample.js | 30 + .../notificationRecipientUserDeleteSample.js | 29 + ...onRecipientUserListByNotificationSample.js | 29 + ...enIdConnectProviderCreateOrUpdateSample.js | 37 + .../openIdConnectProviderDeleteSample.js | 24 + ...openIdConnectProviderGetEntityTagSample.js | 24 + .../openIdConnectProviderGetSample.js | 29 + ...penIdConnectProviderListByServiceSample.js | 29 + .../openIdConnectProviderListSecretsSample.js | 29 + .../openIdConnectProviderUpdateSample.js | 31 + .../javascript/operationListByTagsSample.js | 29 + .../javascript/operationStatusGetSample.js | 28 + .../javascript/operationsResultsGetSample.js | 24 + ...ependenciesEndpointsListByServiceSample.js | 28 + .../samples/v11-beta/javascript/package.json | 36 + .../javascript/policyCreateOrUpdateSample.js | 29 + .../v11-beta/javascript/policyDeleteSample.js | 24 + .../policyDescriptionListByServiceSample.js | 27 + .../policyFragmentCreateOrUpdateSample.js | 34 + .../javascript/policyFragmentDeleteSample.js | 24 + .../policyFragmentGetEntityTagSample.js | 24 + .../javascript/policyFragmentGetSample.js | 42 + .../policyFragmentListByServiceSample.js | 29 + .../policyFragmentListReferencesSample.js | 29 + .../javascript/policyGetEntityTagSample.js | 24 + .../v11-beta/javascript/policyGetSample.js | 40 + .../javascript/policyListByServiceSample.js | 29 + .../policyRestrictionCreateOrUpdateSample.js | 31 + .../policyRestrictionDeleteSample.js | 26 + .../policyRestrictionGetEntityTagSample.js | 24 + .../javascript/policyRestrictionGetSample.js | 25 + .../policyRestrictionListByServiceSample.js | 29 + .../policyRestrictionUpdateSample.js | 31 + ...cyRestrictionValidationsByServiceSample.js | 25 + .../portalConfigCreateOrUpdateSample.js | 41 + .../portalConfigGetEntityTagSample.js | 24 + .../javascript/portalConfigGetSample.js | 25 + .../portalConfigListByServiceSample.js | 29 + .../javascript/portalConfigUpdateSample.js | 41 + .../portalRevisionCreateOrUpdateSample.js | 30 + .../portalRevisionGetEntityTagSample.js | 24 + .../javascript/portalRevisionGetSample.js | 25 + .../portalRevisionListByServiceSample.js | 29 + .../javascript/portalRevisionUpdateSample.js | 28 + .../portalSettingsListByServiceSample.js | 25 + ...eEndpointConnectionCreateOrUpdateSample.js | 38 + .../privateEndpointConnectionDeleteSample.js | 28 + ...rivateEndpointConnectionGetByNameSample.js | 29 + ...tConnectionGetPrivateLinkResourceSample.js | 29 + ...teEndpointConnectionListByServiceSample.js | 29 + ...onnectionListPrivateLinkResourcesSample.js | 28 + .../productApiCheckEntityExistsSample.js | 29 + .../productApiCreateOrUpdateSample.js | 30 + .../javascript/productApiDeleteSample.js | 24 + .../productApiLinkCreateOrUpdateSample.js | 34 + .../javascript/productApiLinkDeleteSample.js | 24 + .../javascript/productApiLinkGetSample.js | 25 + .../productApiLinkListByProductSample.js | 29 + .../productApiListByProductSample.js | 33 + .../javascript/productCreateOrUpdateSample.js | 27 + .../javascript/productDeleteSample.js | 26 + .../javascript/productGetEntityTagSample.js | 24 + .../v11-beta/javascript/productGetSample.js | 25 + .../productGroupCheckEntityExistsSample.js | 29 + .../productGroupCreateOrUpdateSample.js | 30 + .../javascript/productGroupDeleteSample.js | 24 + .../productGroupLinkCreateOrUpdateSample.js | 34 + .../productGroupLinkDeleteSample.js | 24 + .../javascript/productGroupLinkGetSample.js | 25 + .../productGroupLinkListByProductSample.js | 33 + .../productGroupListByProductSample.js | 33 + .../javascript/productListByServiceSample.js | 29 + .../javascript/productListByTagsSample.js | 29 + .../productPolicyCreateOrUpdateSample.js | 35 + .../javascript/productPolicyDeleteSample.js | 24 + .../productPolicyGetEntityTagSample.js | 24 + .../javascript/productPolicyGetSample.js | 30 + .../productPolicyListByProductSample.js | 33 + .../productSubscriptionsListSample.js | 33 + .../javascript/productUpdateSample.js | 27 + .../productWikiCreateOrUpdateSample.js | 30 + .../javascript/productWikiDeleteSample.js | 24 + .../productWikiGetEntityTagSample.js | 24 + .../javascript/productWikiGetSample.js | 25 + .../javascript/productWikiUpdateSample.js | 31 + .../javascript/productWikisListSample.js | 33 + .../quotaByCounterKeysListByServiceSample.js | 25 + .../quotaByCounterKeysUpdateSample.js | 28 + .../javascript/quotaByPeriodKeysGetSample.js | 30 + .../quotaByPeriodKeysUpdateSample.js | 31 + .../javascript/regionListByServiceSample.js | 29 + .../javascript/reportsListByApiSample.js | 33 + .../javascript/reportsListByGeoSample.js | 33 + .../reportsListByOperationSample.js | 33 + .../javascript/reportsListByProductSample.js | 33 + .../javascript/reportsListByRequestSample.js | 33 + .../reportsListBySubscriptionSample.js | 33 + .../javascript/reportsListByTimeSample.js | 34 + .../javascript/reportsListByUserSample.js | 33 + .../{v10 => v11-beta}/javascript/sample.env | 0 .../signInSettingsCreateOrUpdateSample.js | 30 + .../signInSettingsGetEntityTagSample.js | 24 + .../javascript/signInSettingsGetSample.js | 25 + .../javascript/signInSettingsUpdateSample.js | 24 + .../signUpSettingsCreateOrUpdateSample.js | 33 + .../signUpSettingsGetEntityTagSample.js | 24 + .../javascript/signUpSettingsGetSample.js | 25 + .../javascript/signUpSettingsUpdateSample.js | 27 + .../subscriptionCreateOrUpdateSample.js | 31 + .../javascript/subscriptionDeleteSample.js | 24 + .../subscriptionGetEntityTagSample.js | 24 + .../javascript/subscriptionGetSample.js | 25 + .../javascript/subscriptionListSample.js | 29 + .../subscriptionListSecretsSample.js | 29 + .../subscriptionRegeneratePrimaryKeySample.js | 24 + ...ubscriptionRegenerateSecondaryKeySample.js | 24 + .../javascript/subscriptionUpdateSample.js | 27 + .../tagApiLinkCreateOrUpdateSample.js | 28 + .../javascript/tagApiLinkDeleteSample.js | 24 + .../javascript/tagApiLinkGetSample.js | 25 + .../tagApiLinkListByProductSample.js | 29 + .../javascript/tagAssignToApiSample.js | 30 + .../javascript/tagAssignToOperationSample.js | 31 + .../javascript/tagAssignToProductSample.js | 30 + .../javascript/tagCreateOrUpdateSample.js | 27 + .../v11-beta/javascript/tagDeleteSample.js | 24 + .../javascript/tagDetachFromApiSample.js | 29 + .../tagDetachFromOperationSample.js | 30 + .../javascript/tagDetachFromProductSample.js | 29 + .../v11-beta/javascript/tagGetByApiSample.js | 30 + .../javascript/tagGetByOperationSample.js | 31 + .../javascript/tagGetByProductSample.js | 30 + .../tagGetEntityStateByApiSample.js | 29 + .../tagGetEntityStateByOperationSample.js | 30 + .../tagGetEntityStateByProductSample.js | 29 + .../javascript/tagGetEntityStateSample.js | 24 + .../v11-beta/javascript/tagGetSample.js | 25 + .../v11-beta/javascript/tagListByApiSample.js | 33 + .../javascript/tagListByOperationSample.js | 34 + .../javascript/tagListByProductSample.js | 33 + .../javascript/tagListByServiceSample.js | 29 + .../tagOperationLinkCreateOrUpdateSample.js | 34 + .../tagOperationLinkDeleteSample.js | 24 + .../javascript/tagOperationLinkGetSample.js | 25 + .../tagOperationLinkListByProductSample.js | 29 + .../tagProductLinkCreateOrUpdateSample.js | 34 + .../javascript/tagProductLinkDeleteSample.js | 24 + .../javascript/tagProductLinkGetSample.js | 25 + .../tagProductLinkListByProductSample.js | 29 + .../tagResourceListByServiceSample.js | 29 + .../v11-beta/javascript/tagUpdateSample.js | 27 + .../javascript/tenantAccessCreateSample.js | 27 + .../tenantAccessGetEntityTagSample.js | 24 + .../javascript/tenantAccessGetSample.js | 40 + ...nantAccessGitRegeneratePrimaryKeySample.js | 24 + ...ntAccessGitRegenerateSecondaryKeySample.js | 24 + .../tenantAccessListByServiceSample.js | 29 + .../tenantAccessListSecretsSample.js | 25 + .../tenantAccessRegeneratePrimaryKeySample.js | 24 + ...enantAccessRegenerateSecondaryKeySample.js | 24 + .../javascript/tenantAccessUpdateSample.js | 27 + .../tenantConfigurationDeploySample.js | 27 + .../tenantConfigurationGetSyncStateSample.js | 29 + .../tenantConfigurationSaveSample.js | 27 + .../tenantConfigurationValidateSample.js | 27 + .../javascript/tenantSettingsGetSample.js | 25 + .../tenantSettingsListByServiceSample.js | 29 + .../userConfirmationPasswordSendSample.js | 24 + .../javascript/userCreateOrUpdateSample.js | 30 + .../v11-beta/javascript/userDeleteSample.js | 24 + .../javascript/userGenerateSsoUrlSample.js | 29 + .../javascript/userGetEntityTagSample.js | 24 + .../v11-beta/javascript/userGetSample.js | 25 + .../userGetSharedAccessTokenSample.js | 28 + .../javascript/userGroupListSample.js | 33 + .../javascript/userIdentitiesListSample.js | 33 + .../javascript/userListByServiceSample.js | 29 + .../javascript/userSubscriptionGetSample.js | 30 + .../javascript/userSubscriptionListSample.js | 33 + .../v11-beta/javascript/userUpdateSample.js | 29 + .../workspaceApiCreateOrUpdateSample.js | 41 + .../javascript/workspaceApiDeleteSample.js | 24 + ...kspaceApiDiagnosticCreateOrUpdateSample.js | 44 + .../workspaceApiDiagnosticDeleteSample.js | 31 + ...orkspaceApiDiagnosticGetEntityTagSample.js | 30 + .../workspaceApiDiagnosticGetSample.js | 31 + ...spaceApiDiagnosticListByWorkspaceSample.js | 34 + .../workspaceApiDiagnosticUpdateSample.js | 45 + .../javascript/workspaceApiExportGetSample.js | 54 + .../workspaceApiGetEntityTagSample.js | 24 + .../javascript/workspaceApiGetSample.js | 45 + .../workspaceApiListByServiceSample.js | 29 + ...rkspaceApiOperationCreateOrUpdateSample.js | 61 + .../workspaceApiOperationDeleteSample.js | 31 + ...workspaceApiOperationGetEntityTagSample.js | 30 + .../workspaceApiOperationGetSample.js | 31 + .../workspaceApiOperationListByApiSample.js | 34 + ...eApiOperationPolicyCreateOrUpdateSample.js | 38 + ...workspaceApiOperationPolicyDeleteSample.js | 32 + ...aceApiOperationPolicyGetEntityTagSample.js | 31 + .../workspaceApiOperationPolicyGetSample.js | 32 + ...ApiOperationPolicyListByOperationSample.js | 35 + .../workspaceApiOperationUpdateSample.js | 59 + .../workspaceApiPolicyCreateOrUpdateSample.js | 37 + .../workspaceApiPolicyDeleteSample.js | 24 + .../workspaceApiPolicyGetEntityTagSample.js | 30 + .../javascript/workspaceApiPolicyGetSample.js | 31 + .../workspaceApiPolicyListByApiSample.js | 34 + ...workspaceApiReleaseCreateOrUpdateSample.js | 36 + .../workspaceApiReleaseDeleteSample.js | 31 + .../workspaceApiReleaseGetEntityTagSample.js | 30 + .../workspaceApiReleaseGetSample.js | 31 + .../workspaceApiReleaseListByServiceSample.js | 34 + .../workspaceApiReleaseUpdateSample.js | 37 + ...workspaceApiRevisionListByServiceSample.js | 34 + .../workspaceApiSchemaCreateOrUpdateSample.js | 38 + .../workspaceApiSchemaDeleteSample.js | 31 + .../workspaceApiSchemaGetEntityTagSample.js | 30 + .../javascript/workspaceApiSchemaGetSample.js | 31 + .../workspaceApiSchemaListByApiSample.js | 34 + .../javascript/workspaceApiUpdateSample.js | 29 + ...kspaceApiVersionSetCreateOrUpdateSample.js | 31 + .../workspaceApiVersionSetDeleteSample.js | 24 + ...orkspaceApiVersionSetGetEntityTagSample.js | 24 + .../workspaceApiVersionSetGetSample.js | 25 + ...rkspaceApiVersionSetListByServiceSample.js | 33 + .../workspaceApiVersionSetUpdateSample.js | 32 + .../workspaceBackendCreateOrUpdateSample.js | 81 + .../workspaceBackendDeleteSample.js | 24 + .../workspaceBackendGetEntityTagSample.js | 24 + .../javascript/workspaceBackendGetSample.js | 25 + .../workspaceBackendListByWorkspaceSample.js | 29 + .../workspaceBackendUpdateSample.js | 35 + ...orkspaceCertificateCreateOrUpdateSample.js | 61 + .../workspaceCertificateDeleteSample.js | 24 + .../workspaceCertificateGetEntityTagSample.js | 24 + .../workspaceCertificateGetSample.js | 50 + ...rkspaceCertificateListByWorkspaceSample.js | 33 + ...workspaceCertificateRefreshSecretSample.js | 30 + .../workspaceCreateOrUpdateSample.js | 28 + .../javascript/workspaceDeleteSample.js | 24 + ...workspaceDiagnosticCreateOrUpdateSample.js | 43 + .../workspaceDiagnosticDeleteSample.js | 30 + .../workspaceDiagnosticGetEntityTagSample.js | 29 + .../workspaceDiagnosticGetSample.js | 30 + ...orkspaceDiagnosticListByWorkspaceSample.js | 33 + .../workspaceDiagnosticUpdateSample.js | 44 + .../javascript/workspaceGetEntityTagSample.js | 24 + .../v11-beta/javascript/workspaceGetSample.js | 25 + ...rkspaceGlobalSchemaCreateOrUpdateSample.js | 36 + .../workspaceGlobalSchemaDeleteSample.js | 24 + ...workspaceGlobalSchemaGetEntityTagSample.js | 24 + .../workspaceGlobalSchemaGetSample.js | 25 + ...orkspaceGlobalSchemaListByServiceSample.js | 33 + .../workspaceGroupCreateOrUpdateSample.js | 57 + .../javascript/workspaceGroupDeleteSample.js | 24 + .../workspaceGroupGetEntityTagSample.js | 29 + .../javascript/workspaceGroupGetSample.js | 30 + .../workspaceGroupListByServiceSample.js | 29 + .../javascript/workspaceGroupUpdateSample.js | 32 + ...rkspaceGroupUserCheckEntityExistsSample.js | 30 + .../workspaceGroupUserCreateSample.js | 31 + .../workspaceGroupUserDeleteSample.js | 30 + .../workspaceGroupUserListSample.js | 34 + .../workspaceListByServiceSample.js | 29 + .../workspaceLoggerCreateOrUpdateSample.js | 58 + .../javascript/workspaceLoggerDeleteSample.js | 24 + .../workspaceLoggerGetEntityTagSample.js | 24 + .../javascript/workspaceLoggerGetSample.js | 25 + .../workspaceLoggerListByWorkspaceSample.js | 29 + .../javascript/workspaceLoggerUpdateSample.js | 28 + ...workspaceNamedValueCreateOrUpdateSample.js | 60 + .../workspaceNamedValueDeleteSample.js | 24 + .../workspaceNamedValueGetEntityTagSample.js | 29 + .../workspaceNamedValueGetSample.js | 45 + .../workspaceNamedValueListByServiceSample.js | 33 + .../workspaceNamedValueListValueSample.js | 30 + .../workspaceNamedValueRefreshSecretSample.js | 30 + .../workspaceNamedValueUpdateSample.js | 32 + ...rkspaceNotificationCreateOrUpdateSample.js | 30 + .../workspaceNotificationGetSample.js | 30 + ...orkspaceNotificationListByServiceSample.js | 33 + ...onRecipientEmailCheckEntityExistsSample.js | 30 + ...ationRecipientEmailCreateOrUpdateSample.js | 31 + ...eNotificationRecipientEmailDeleteSample.js | 30 + ...nRecipientEmailListByNotificationSample.js | 30 + ...ionRecipientUserCheckEntityExistsSample.js | 30 + ...cationRecipientUserCreateOrUpdateSample.js | 31 + ...ceNotificationRecipientUserDeleteSample.js | 30 + ...onRecipientUserListByNotificationSample.js | 30 + .../workspacePolicyCreateOrUpdateSample.js | 62 + .../javascript/workspacePolicyDeleteSample.js | 24 + ...spacePolicyFragmentCreateOrUpdateSample.js | 35 + .../workspacePolicyFragmentDeleteSample.js | 30 + ...rkspacePolicyFragmentGetEntityTagSample.js | 29 + .../workspacePolicyFragmentGetSample.js | 51 + ...kspacePolicyFragmentListByServiceSample.js | 33 + ...spacePolicyFragmentListReferencesSample.js | 30 + .../workspacePolicyGetEntityTagSample.js | 24 + .../javascript/workspacePolicyGetSample.js | 25 + .../workspacePolicyListByApiSample.js | 29 + ...spaceProductApiLinkCreateOrUpdateSample.js | 35 + .../workspaceProductApiLinkDeleteSample.js | 30 + .../workspaceProductApiLinkGetSample.js | 31 + ...kspaceProductApiLinkListByProductSample.js | 34 + .../workspaceProductCreateOrUpdateSample.js | 31 + .../workspaceProductDeleteSample.js | 26 + .../workspaceProductGetEntityTagSample.js | 24 + .../javascript/workspaceProductGetSample.js | 25 + ...aceProductGroupLinkCreateOrUpdateSample.js | 35 + .../workspaceProductGroupLinkDeleteSample.js | 30 + .../workspaceProductGroupLinkGetSample.js | 31 + ...paceProductGroupLinkListByProductSample.js | 34 + .../workspaceProductListByServiceSample.js | 29 + ...kspaceProductPolicyCreateOrUpdateSample.js | 36 + .../workspaceProductPolicyDeleteSample.js | 31 + ...orkspaceProductPolicyGetEntityTagSample.js | 30 + .../workspaceProductPolicyGetSample.js | 31 + ...rkspaceProductPolicyListByProductSample.js | 30 + .../workspaceProductUpdateSample.js | 32 + ...rkspaceSubscriptionCreateOrUpdateSample.js | 37 + .../workspaceSubscriptionDeleteSample.js | 24 + ...workspaceSubscriptionGetEntityTagSample.js | 29 + .../workspaceSubscriptionGetSample.js | 30 + .../workspaceSubscriptionListSample.js | 29 + .../workspaceSubscriptionListSecretsSample.js | 30 + ...eSubscriptionRegeneratePrimaryKeySample.js | 24 + ...ubscriptionRegenerateSecondaryKeySample.js | 29 + .../workspaceSubscriptionUpdateSample.js | 32 + ...workspaceTagApiLinkCreateOrUpdateSample.js | 35 + .../workspaceTagApiLinkDeleteSample.js | 24 + .../workspaceTagApiLinkGetSample.js | 31 + .../workspaceTagApiLinkListByProductSample.js | 34 + .../workspaceTagCreateOrUpdateSample.js | 27 + .../javascript/workspaceTagDeleteSample.js | 24 + .../workspaceTagGetEntityStateSample.js | 29 + .../javascript/workspaceTagGetSample.js | 30 + .../workspaceTagListByServiceSample.js | 29 + ...aceTagOperationLinkCreateOrUpdateSample.js | 35 + .../workspaceTagOperationLinkDeleteSample.js | 24 + .../workspaceTagOperationLinkGetSample.js | 31 + ...paceTagOperationLinkListByProductSample.js | 34 + ...spaceTagProductLinkCreateOrUpdateSample.js | 35 + .../workspaceTagProductLinkDeleteSample.js | 24 + .../workspaceTagProductLinkGetSample.js | 31 + ...kspaceTagProductLinkListByProductSample.js | 34 + .../javascript/workspaceTagUpdateSample.js | 27 + .../javascript/workspaceUpdateSample.js | 28 + .../samples/v11-beta/typescript/README.md | 1333 + .../samples/v11-beta/typescript/package.json | 43 + .../{v10 => v11-beta}/typescript/sample.env | 0 .../src/allPoliciesListByServiceSample.ts | 29 + .../typescript/src/apiCreateOrUpdateSample.ts | 470 + .../typescript/src/apiDeleteSample.ts | 24 + .../src/apiDiagnosticCreateOrUpdateSample.ts | 43 + .../src/apiDiagnosticDeleteSample.ts | 30 + .../src/apiDiagnosticGetEntityTagSample.ts | 29 + .../typescript/src/apiDiagnosticGetSample.ts | 30 + .../src/apiDiagnosticListByServiceSample.ts | 29 + .../src/apiDiagnosticUpdateSample.ts | 44 + .../typescript/src/apiExportGetSample.ts | 52 + ...wayConfigConnectionCreateOrUpdateSample.ts | 33 + .../apiGatewayConfigConnectionDeleteSample.ts | 24 + .../apiGatewayConfigConnectionGetSample.ts | 25 + ...ewayConfigConnectionListByGatewaySample.ts | 32 + .../src/apiGatewayCreateOrUpdateSample.ts | 59 + .../typescript/src/apiGatewayDeleteSample.ts | 25 + .../typescript/src/apiGatewayGetSample.ts | 25 + ...ewayHostnameBindingCreateOrUpdateSample.ts | 36 + .../apiGatewayHostnameBindingDeleteSample.ts | 24 + .../src/apiGatewayHostnameBindingGetSample.ts | 25 + ...tewayHostnameBindingListByGatewaySample.ts | 29 + ...tewayHostnameBindingRefreshSecretSample.ts | 24 + .../apiGatewayListByResourceGroupSample.ts | 29 + .../typescript/src/apiGatewayListSample.ts | 29 + .../typescript/src/apiGatewayUpdateSample.ts | 28 + .../typescript/src/apiGetEntityTagSample.ts | 24 + .../v11-beta/typescript/src/apiGetSample.ts | 40 + .../apiIssueAttachmentCreateOrUpdateSample.ts | 32 + .../src/apiIssueAttachmentDeleteSample.ts | 31 + .../apiIssueAttachmentGetEntityTagSample.ts | 30 + .../src/apiIssueAttachmentGetSample.ts | 31 + .../apiIssueAttachmentListByServiceSample.ts | 34 + .../apiIssueCommentCreateOrUpdateSample.ts | 37 + .../src/apiIssueCommentDeleteSample.ts | 31 + .../src/apiIssueCommentGetEntityTagSample.ts | 30 + .../src/apiIssueCommentGetSample.ts | 31 + .../src/apiIssueCommentListByServiceSample.ts | 34 + .../src/apiIssueCreateOrUpdateSample.ts | 38 + .../typescript/src/apiIssueDeleteSample.ts | 30 + .../src/apiIssueGetEntityTagSample.ts | 29 + .../typescript/src/apiIssueGetSample.ts | 30 + .../src/apiIssueListByServiceSample.ts | 33 + .../typescript/src/apiIssueUpdateSample.ts | 32 + .../typescript/src/apiListByServiceSample.ts | 29 + .../typescript/src/apiListByTagsSample.ts | 29 + ...ementGatewaySkusListAvailableSkusSample.ts | 32 + .../src/apiManagementOperationsListSample.ts | 28 + ...eApplyNetworkConfigurationUpdatesSample.ts | 29 + .../src/apiManagementServiceBackupSample.ts | 72 + ...ementServiceCheckNameAvailabilitySample.ts | 25 + ...piManagementServiceCreateOrUpdateSample.ts | 379 + .../src/apiManagementServiceDeleteSample.ts | 25 + ...rviceGetDomainOwnershipIdentifierSample.ts | 25 + .../src/apiManagementServiceGetSample.ts | 55 + .../apiManagementServiceGetSsoTokenSample.ts | 25 + ...agementServiceListByResourceGroupSample.ts | 29 + .../src/apiManagementServiceListSample.ts | 29 + ...apiManagementServiceMigrateToStv2Sample.ts | 27 + ...ManagementServiceRefreshHostnamesSample.ts | 25 + ...rcesPerformConnectivityCheckAsyncSample.ts | 63 + .../src/apiManagementServiceRestoreSample.ts | 31 + ...rviceSkusListAvailableServiceSkusSample.ts | 54 + .../src/apiManagementServiceUpdateSample.ts | 85 + .../src/apiManagementSkusListSample.ts | 29 + .../apiManagementWorkspaceLinkGetSample.ts | 25 + ...gementWorkspaceLinksListByServiceSample.ts | 29 + .../src/apiOperationCreateOrUpdateSample.ts | 60 + .../src/apiOperationDeleteSample.ts | 30 + .../src/apiOperationGetEntityTagSample.ts | 29 + .../typescript/src/apiOperationGetSample.ts | 50 + .../src/apiOperationListByApiSample.ts | 33 + .../apiOperationPolicyCreateOrUpdateSample.ts | 37 + .../src/apiOperationPolicyDeleteSample.ts | 31 + .../apiOperationPolicyGetEntityTagSample.ts | 30 + .../src/apiOperationPolicyGetSample.ts | 31 + ...apiOperationPolicyListByOperationSample.ts | 30 + .../src/apiOperationUpdateSample.ts | 58 + .../src/apiPolicyCreateOrUpdateSample.ts | 62 + .../typescript/src/apiPolicyDeleteSample.ts | 24 + .../src/apiPolicyGetEntityTagSample.ts | 24 + .../typescript/src/apiPolicyGetSample.ts | 30 + .../src/apiPolicyListByApiSample.ts | 29 + .../src/apiProductListByApisSample.ts | 33 + .../src/apiReleaseCreateOrUpdateSample.ts | 29 + .../typescript/src/apiReleaseDeleteSample.ts | 24 + .../src/apiReleaseGetEntityTagSample.ts | 24 + .../typescript/src/apiReleaseGetSample.ts | 30 + .../src/apiReleaseListByServiceSample.ts | 29 + .../typescript/src/apiReleaseUpdateSample.ts | 29 + .../src/apiRevisionListByServiceSample.ts | 33 + .../src/apiSchemaCreateOrUpdateSample.ts | 37 + .../typescript/src/apiSchemaDeleteSample.ts | 30 + .../src/apiSchemaGetEntityTagSample.ts | 29 + .../typescript/src/apiSchemaGetSample.ts | 30 + .../src/apiSchemaListByApiSample.ts | 33 + .../apiTagDescriptionCreateOrUpdateSample.ts | 36 + .../src/apiTagDescriptionDeleteSample.ts | 30 + .../apiTagDescriptionGetEntityTagSample.ts | 29 + .../src/apiTagDescriptionGetSample.ts | 30 + .../apiTagDescriptionListByServiceSample.ts | 33 + .../src/apiToolCreateOrUpdateSample.ts | 36 + .../typescript/src/apiToolDeleteSample.ts | 29 + .../src/apiToolGetEntityTagSample.ts | 29 + .../typescript/src/apiToolGetSample.ts | 30 + .../typescript/src/apiToolListByApiSample.ts | 29 + .../typescript/src/apiToolUpdateSample.ts | 31 + .../typescript/src/apiUpdateSample.ts | 29 + .../src/apiVersionSetCreateOrUpdateSample.ts | 29 + .../src/apiVersionSetDeleteSample.ts | 24 + .../src/apiVersionSetGetEntityTagSample.ts | 24 + .../typescript/src/apiVersionSetGetSample.ts | 25 + .../src/apiVersionSetListByServiceSample.ts | 29 + .../src/apiVersionSetUpdateSample.ts | 29 + .../src/apiWikiCreateOrUpdateSample.ts | 30 + .../typescript/src/apiWikiDeleteSample.ts | 24 + .../src/apiWikiGetEntityTagSample.ts | 24 + .../typescript/src/apiWikiGetSample.ts | 25 + .../typescript/src/apiWikiUpdateSample.ts | 31 + .../typescript/src/apiWikisListSample.ts | 33 + ...izationAccessPolicyCreateOrUpdateSample.ts | 36 + .../authorizationAccessPolicyDeleteSample.ts | 31 + .../src/authorizationAccessPolicyGetSample.ts | 31 + ...onAccessPolicyListByAuthorizationSample.ts | 34 + .../authorizationConfirmConsentCodeSample.ts | 30 + .../src/authorizationCreateOrUpdateSample.ts | 56 + .../src/authorizationDeleteSample.ts | 24 + .../typescript/src/authorizationGetSample.ts | 25 + ...zationListByAuthorizationProviderSample.ts | 56 + .../src/authorizationLoginLinksPostSample.ts | 31 + ...thorizationProviderCreateOrUpdateSample.ts | 184 + .../src/authorizationProviderDeleteSample.ts | 24 + .../src/authorizationProviderGetSample.ts | 25 + ...uthorizationProviderListByServiceSample.ts | 29 + ...uthorizationProviderRefreshSecretSample.ts | 29 + ...authorizationServerCreateOrUpdateSample.ts | 47 + .../src/authorizationServerDeleteSample.ts | 24 + .../authorizationServerGetEntityTagSample.ts | 24 + .../src/authorizationServerGetSample.ts | 25 + .../authorizationServerListByServiceSample.ts | 29 + .../authorizationServerListSecretsSample.ts | 29 + .../src/authorizationServerUpdateSample.ts | 36 + .../src/backendCreateOrUpdateSample.ts | 281 + .../typescript/src/backendDeleteSample.ts | 24 + .../src/backendGetEntityTagSample.ts | 24 + .../typescript/src/backendGetSample.ts | 25 + .../src/backendListByServiceSample.ts | 29 + .../typescript/src/backendReconnectSample.ts | 26 + .../typescript/src/backendUpdateSample.ts | 28 + .../src/cacheCreateOrUpdateSample.ts | 31 + .../typescript/src/cacheDeleteSample.ts | 24 + .../typescript/src/cacheGetEntityTagSample.ts | 24 + .../v11-beta/typescript/src/cacheGetSample.ts | 25 + .../src/cacheListByServiceSample.ts | 29 + .../typescript/src/cacheUpdateSample.ts | 27 + .../src/certificateCreateOrUpdateSample.ts | 49 + .../typescript/src/certificateDeleteSample.ts | 24 + .../src/certificateGetEntityTagSample.ts | 24 + .../typescript/src/certificateGetSample.ts | 40 + .../src/certificateListByServiceSample.ts | 29 + .../src/certificateRefreshSecretSample.ts | 25 + .../clientApplicationCreateOrUpdateSample.ts | 29 + .../src/clientApplicationDeleteSample.ts | 24 + .../clientApplicationGetEntityTagSample.ts | 24 + .../src/clientApplicationGetSample.ts | 25 + .../clientApplicationListByServiceSample.ts | 29 + .../src/clientApplicationListSecretsSample.ts | 25 + ...lientApplicationProductLinkCreateSample.ts | 34 + ...lientApplicationProductLinkDeleteSample.ts | 24 + .../clientApplicationProductLinkGetSample.ts | 30 + ...oductLinkListByClientApplicationsSample.ts | 33 + .../src/contentItemCreateOrUpdateSample.ts | 41 + .../typescript/src/contentItemDeleteSample.ts | 30 + .../src/contentItemGetEntityTagSample.ts | 29 + .../typescript/src/contentItemGetSample.ts | 30 + .../src/contentItemListByServiceSample.ts | 29 + .../src/contentTypeCreateOrUpdateSample.ts | 70 + .../typescript/src/contentTypeDeleteSample.ts | 24 + .../typescript/src/contentTypeGetSample.ts | 25 + .../src/contentTypeListByServiceSample.ts | 29 + .../delegationSettingsCreateOrUpdateSample.ts | 35 + .../delegationSettingsGetEntityTagSample.ts | 24 + .../src/delegationSettingsGetSample.ts | 25 + .../delegationSettingsListSecretsSample.ts | 25 + .../src/delegationSettingsUpdateSample.ts | 29 + .../src/deletedServicesGetByNameSample.ts | 25 + ...deletedServicesListBySubscriptionSample.ts | 29 + .../src/deletedServicesPurgeSample.ts | 25 + .../src/diagnosticCreateOrUpdateSample.ts | 42 + .../typescript/src/diagnosticDeleteSample.ts | 24 + .../src/diagnosticGetEntityTagSample.ts | 24 + .../typescript/src/diagnosticGetSample.ts | 25 + .../src/diagnosticListByServiceSample.ts | 29 + .../typescript/src/diagnosticUpdateSample.ts | 37 + .../src/documentationCreateOrUpdateSample.ts | 30 + .../src/documentationDeleteSample.ts | 24 + .../src/documentationGetEntityTagSample.ts | 24 + .../typescript/src/documentationGetSample.ts | 25 + .../src/documentationListByServiceSample.ts | 29 + .../src/documentationUpdateSample.ts | 31 + .../src/emailTemplateCreateOrUpdateSample.ts | 30 + .../src/emailTemplateDeleteSample.ts | 24 + .../src/emailTemplateGetEntityTagSample.ts | 24 + .../typescript/src/emailTemplateGetSample.ts | 29 + .../src/emailTemplateListByServiceSample.ts | 29 + .../src/emailTemplateUpdateSample.ts | 34 + .../src/gatewayApiCreateOrUpdateSample.ts | 27 + .../typescript/src/gatewayApiDeleteSample.ts | 24 + .../src/gatewayApiGetEntityTagSample.ts | 24 + .../src/gatewayApiListByServiceSample.ts | 29 + ...ertificateAuthorityCreateOrUpdateSample.ts | 31 + ...gatewayCertificateAuthorityDeleteSample.ts | 24 + ...yCertificateAuthorityGetEntityTagSample.ts | 24 + .../gatewayCertificateAuthorityGetSample.ts | 30 + ...CertificateAuthorityListByServiceSample.ts | 33 + .../src/gatewayCreateOrUpdateSample.ts | 28 + .../typescript/src/gatewayDeleteSample.ts | 24 + .../src/gatewayGenerateTokenSample.ts | 28 + .../src/gatewayGetEntityTagSample.ts | 24 + .../typescript/src/gatewayGetSample.ts | 25 + ...stnameConfigurationCreateOrUpdateSample.ts | 39 + ...atewayHostnameConfigurationDeleteSample.ts | 24 + ...HostnameConfigurationGetEntityTagSample.ts | 24 + .../gatewayHostnameConfigurationGetSample.ts | 30 + ...ostnameConfigurationListByServiceSample.ts | 33 + ...gatewayInvalidateDebugCredentialsSample.ts | 24 + .../src/gatewayListByServiceSample.ts | 29 + .../src/gatewayListDebugCredentialsSample.ts | 30 + .../typescript/src/gatewayListKeysSample.ts | 25 + .../typescript/src/gatewayListTraceSample.ts | 27 + .../src/gatewayRegenerateKeySample.ts | 24 + .../typescript/src/gatewayUpdateSample.ts | 28 + .../src/globalSchemaCreateOrUpdateSample.ts | 63 + .../src/globalSchemaDeleteSample.ts | 24 + .../src/globalSchemaGetEntityTagSample.ts | 24 + .../typescript/src/globalSchemaGetSample.ts | 40 + .../src/globalSchemaListByServiceSample.ts | 29 + .../graphQLApiResolverCreateOrUpdateSample.ts | 31 + .../src/graphQLApiResolverDeleteSample.ts | 30 + .../graphQLApiResolverGetEntityTagSample.ts | 29 + .../src/graphQLApiResolverGetSample.ts | 30 + .../src/graphQLApiResolverListByApiSample.ts | 33 + ...QLApiResolverPolicyCreateOrUpdateSample.ts | 37 + .../graphQLApiResolverPolicyDeleteSample.ts | 31 + ...phQLApiResolverPolicyGetEntityTagSample.ts | 30 + .../src/graphQLApiResolverPolicyGetSample.ts | 31 + ...QLApiResolverPolicyListByResolverSample.ts | 34 + .../src/graphQLApiResolverUpdateSample.ts | 36 + .../src/groupCreateOrUpdateSample.ts | 47 + .../typescript/src/groupDeleteSample.ts | 24 + .../typescript/src/groupGetEntityTagSample.ts | 24 + .../v11-beta/typescript/src/groupGetSample.ts | 25 + .../src/groupListByServiceSample.ts | 29 + .../typescript/src/groupUpdateSample.ts | 27 + .../src/groupUserCheckEntityExistsSample.ts | 29 + .../typescript/src/groupUserCreateSample.ts | 30 + .../typescript/src/groupUserDeleteSample.ts | 24 + .../typescript/src/groupUserListSample.ts | 33 + .../identityProviderCreateOrUpdateSample.ts | 28 + .../src/identityProviderDeleteSample.ts | 24 + .../src/identityProviderGetEntityTagSample.ts | 24 + .../src/identityProviderGetSample.ts | 25 + .../identityProviderListByServiceSample.ts | 29 + .../src/identityProviderListSecretsSample.ts | 25 + .../src/identityProviderUpdateSample.ts | 28 + .../v11-beta/typescript/src/issueGetSample.ts | 25 + .../src/issueListByServiceSample.ts | 29 + .../src/loggerCreateOrUpdateSample.ts | 52 + .../typescript/src/loggerDeleteSample.ts | 24 + .../src/loggerGetEntityTagSample.ts | 24 + .../typescript/src/loggerGetSample.ts | 25 + .../src/loggerListByServiceSample.ts | 29 + .../typescript/src/loggerUpdateSample.ts | 28 + .../src/namedValueCreateOrUpdateSample.ts | 53 + .../typescript/src/namedValueDeleteSample.ts | 24 + .../src/namedValueGetEntityTagSample.ts | 24 + .../typescript/src/namedValueGetSample.ts | 40 + .../src/namedValueListByServiceSample.ts | 29 + .../src/namedValueListValueSample.ts | 29 + .../src/namedValueRefreshSecretSample.ts | 25 + .../typescript/src/namedValueUpdateSample.ts | 30 + .../src/networkStatusListByLocationSample.ts | 29 + .../src/networkStatusListByServiceSample.ts | 25 + .../src/notificationCreateOrUpdateSample.ts | 29 + .../typescript/src/notificationGetSample.ts | 29 + .../src/notificationListByServiceSample.ts | 29 + ...onRecipientEmailCheckEntityExistsSample.ts | 29 + ...ationRecipientEmailCreateOrUpdateSample.ts | 30 + .../notificationRecipientEmailDeleteSample.ts | 29 + ...nRecipientEmailListByNotificationSample.ts | 29 + ...ionRecipientUserCheckEntityExistsSample.ts | 29 + ...cationRecipientUserCreateOrUpdateSample.ts | 30 + .../notificationRecipientUserDeleteSample.ts | 29 + ...onRecipientUserListByNotificationSample.ts | 29 + ...enIdConnectProviderCreateOrUpdateSample.ts | 37 + .../src/openIdConnectProviderDeleteSample.ts | 24 + ...openIdConnectProviderGetEntityTagSample.ts | 24 + .../src/openIdConnectProviderGetSample.ts | 29 + ...penIdConnectProviderListByServiceSample.ts | 29 + .../openIdConnectProviderListSecretsSample.ts | 29 + .../src/openIdConnectProviderUpdateSample.ts | 31 + .../src/operationListByTagsSample.ts | 29 + .../src/operationStatusGetSample.ts | 28 + .../src/operationsResultsGetSample.ts | 24 + ...ependenciesEndpointsListByServiceSample.ts | 28 + .../src/policyCreateOrUpdateSample.ts | 29 + .../typescript/src/policyDeleteSample.ts | 24 + .../policyDescriptionListByServiceSample.ts | 27 + .../src/policyFragmentCreateOrUpdateSample.ts | 34 + .../src/policyFragmentDeleteSample.ts | 24 + .../src/policyFragmentGetEntityTagSample.ts | 24 + .../typescript/src/policyFragmentGetSample.ts | 42 + .../src/policyFragmentListByServiceSample.ts | 29 + .../src/policyFragmentListReferencesSample.ts | 29 + .../src/policyGetEntityTagSample.ts | 24 + .../typescript/src/policyGetSample.ts | 40 + .../src/policyListByServiceSample.ts | 29 + .../policyRestrictionCreateOrUpdateSample.ts | 31 + .../src/policyRestrictionDeleteSample.ts | 26 + .../policyRestrictionGetEntityTagSample.ts | 24 + .../src/policyRestrictionGetSample.ts | 25 + .../policyRestrictionListByServiceSample.ts | 29 + .../src/policyRestrictionUpdateSample.ts | 31 + ...cyRestrictionValidationsByServiceSample.ts | 25 + .../src/portalConfigCreateOrUpdateSample.ts | 41 + .../src/portalConfigGetEntityTagSample.ts | 24 + .../typescript/src/portalConfigGetSample.ts | 25 + .../src/portalConfigListByServiceSample.ts | 29 + .../src/portalConfigUpdateSample.ts | 41 + .../src/portalRevisionCreateOrUpdateSample.ts | 30 + .../src/portalRevisionGetEntityTagSample.ts | 24 + .../typescript/src/portalRevisionGetSample.ts | 25 + .../src/portalRevisionListByServiceSample.ts | 29 + .../src/portalRevisionUpdateSample.ts | 28 + .../src/portalSettingsListByServiceSample.ts | 25 + ...eEndpointConnectionCreateOrUpdateSample.ts | 38 + .../privateEndpointConnectionDeleteSample.ts | 28 + ...rivateEndpointConnectionGetByNameSample.ts | 29 + ...tConnectionGetPrivateLinkResourceSample.ts | 29 + ...teEndpointConnectionListByServiceSample.ts | 29 + ...onnectionListPrivateLinkResourcesSample.ts | 28 + .../src/productApiCheckEntityExistsSample.ts | 29 + .../src/productApiCreateOrUpdateSample.ts | 30 + .../typescript/src/productApiDeleteSample.ts | 24 + .../src/productApiLinkCreateOrUpdateSample.ts | 34 + .../src/productApiLinkDeleteSample.ts | 24 + .../typescript/src/productApiLinkGetSample.ts | 25 + .../src/productApiLinkListByProductSample.ts | 29 + .../src/productApiListByProductSample.ts | 33 + .../src/productCreateOrUpdateSample.ts | 27 + .../typescript/src/productDeleteSample.ts | 26 + .../src/productGetEntityTagSample.ts | 24 + .../typescript/src/productGetSample.ts | 25 + .../productGroupCheckEntityExistsSample.ts | 29 + .../src/productGroupCreateOrUpdateSample.ts | 30 + .../src/productGroupDeleteSample.ts | 24 + .../productGroupLinkCreateOrUpdateSample.ts | 34 + .../src/productGroupLinkDeleteSample.ts | 24 + .../src/productGroupLinkGetSample.ts | 25 + .../productGroupLinkListByProductSample.ts | 33 + .../src/productGroupListByProductSample.ts | 33 + .../src/productListByServiceSample.ts | 29 + .../typescript/src/productListByTagsSample.ts | 29 + .../src/productPolicyCreateOrUpdateSample.ts | 35 + .../src/productPolicyDeleteSample.ts | 24 + .../src/productPolicyGetEntityTagSample.ts | 24 + .../typescript/src/productPolicyGetSample.ts | 30 + .../src/productPolicyListByProductSample.ts | 33 + .../src/productSubscriptionsListSample.ts | 33 + .../typescript/src/productUpdateSample.ts | 27 + .../src/productWikiCreateOrUpdateSample.ts | 30 + .../typescript/src/productWikiDeleteSample.ts | 24 + .../src/productWikiGetEntityTagSample.ts | 24 + .../typescript/src/productWikiGetSample.ts | 25 + .../typescript/src/productWikiUpdateSample.ts | 31 + .../typescript/src/productWikisListSample.ts | 33 + .../quotaByCounterKeysListByServiceSample.ts | 25 + .../src/quotaByCounterKeysUpdateSample.ts | 28 + .../src/quotaByPeriodKeysGetSample.ts | 30 + .../src/quotaByPeriodKeysUpdateSample.ts | 31 + .../src/regionListByServiceSample.ts | 29 + .../typescript/src/reportsListByApiSample.ts | 33 + .../typescript/src/reportsListByGeoSample.ts | 33 + .../src/reportsListByOperationSample.ts | 33 + .../src/reportsListByProductSample.ts | 33 + .../src/reportsListByRequestSample.ts | 33 + .../src/reportsListBySubscriptionSample.ts | 33 + .../typescript/src/reportsListByTimeSample.ts | 34 + .../typescript/src/reportsListByUserSample.ts | 33 + .../src/signInSettingsCreateOrUpdateSample.ts | 30 + .../src/signInSettingsGetEntityTagSample.ts | 24 + .../typescript/src/signInSettingsGetSample.ts | 25 + .../src/signInSettingsUpdateSample.ts | 24 + .../src/signUpSettingsCreateOrUpdateSample.ts | 33 + .../src/signUpSettingsGetEntityTagSample.ts | 24 + .../typescript/src/signUpSettingsGetSample.ts | 25 + .../src/signUpSettingsUpdateSample.ts | 27 + .../src/subscriptionCreateOrUpdateSample.ts | 31 + .../src/subscriptionDeleteSample.ts | 24 + .../src/subscriptionGetEntityTagSample.ts | 24 + .../typescript/src/subscriptionGetSample.ts | 25 + .../typescript/src/subscriptionListSample.ts | 29 + .../src/subscriptionListSecretsSample.ts | 29 + .../subscriptionRegeneratePrimaryKeySample.ts | 24 + ...ubscriptionRegenerateSecondaryKeySample.ts | 24 + .../src/subscriptionUpdateSample.ts | 27 + .../src/tagApiLinkCreateOrUpdateSample.ts | 28 + .../typescript/src/tagApiLinkDeleteSample.ts | 24 + .../typescript/src/tagApiLinkGetSample.ts | 25 + .../src/tagApiLinkListByProductSample.ts | 29 + .../typescript/src/tagAssignToApiSample.ts | 30 + .../src/tagAssignToOperationSample.ts | 31 + .../src/tagAssignToProductSample.ts | 30 + .../typescript/src/tagCreateOrUpdateSample.ts | 27 + .../typescript/src/tagDeleteSample.ts | 24 + .../typescript/src/tagDetachFromApiSample.ts | 29 + .../src/tagDetachFromOperationSample.ts | 30 + .../src/tagDetachFromProductSample.ts | 29 + .../typescript/src/tagGetByApiSample.ts | 30 + .../typescript/src/tagGetByOperationSample.ts | 31 + .../typescript/src/tagGetByProductSample.ts | 30 + .../src/tagGetEntityStateByApiSample.ts | 29 + .../src/tagGetEntityStateByOperationSample.ts | 30 + .../src/tagGetEntityStateByProductSample.ts | 29 + .../typescript/src/tagGetEntityStateSample.ts | 24 + .../v11-beta/typescript/src/tagGetSample.ts | 25 + .../typescript/src/tagListByApiSample.ts | 33 + .../src/tagListByOperationSample.ts | 34 + .../typescript/src/tagListByProductSample.ts | 33 + .../typescript/src/tagListByServiceSample.ts | 29 + .../tagOperationLinkCreateOrUpdateSample.ts | 34 + .../src/tagOperationLinkDeleteSample.ts | 24 + .../src/tagOperationLinkGetSample.ts | 25 + .../tagOperationLinkListByProductSample.ts | 29 + .../src/tagProductLinkCreateOrUpdateSample.ts | 34 + .../src/tagProductLinkDeleteSample.ts | 24 + .../typescript/src/tagProductLinkGetSample.ts | 25 + .../src/tagProductLinkListByProductSample.ts | 29 + .../src/tagResourceListByServiceSample.ts | 29 + .../typescript/src/tagUpdateSample.ts | 27 + .../src/tenantAccessCreateSample.ts | 27 + .../src/tenantAccessGetEntityTagSample.ts | 24 + .../typescript/src/tenantAccessGetSample.ts | 40 + ...nantAccessGitRegeneratePrimaryKeySample.ts | 24 + ...ntAccessGitRegenerateSecondaryKeySample.ts | 24 + .../src/tenantAccessListByServiceSample.ts | 29 + .../src/tenantAccessListSecretsSample.ts | 25 + .../tenantAccessRegeneratePrimaryKeySample.ts | 24 + ...enantAccessRegenerateSecondaryKeySample.ts | 24 + .../src/tenantAccessUpdateSample.ts | 27 + .../src/tenantConfigurationDeploySample.ts | 27 + .../tenantConfigurationGetSyncStateSample.ts | 29 + .../src/tenantConfigurationSaveSample.ts | 27 + .../src/tenantConfigurationValidateSample.ts | 27 + .../typescript/src/tenantSettingsGetSample.ts | 25 + .../src/tenantSettingsListByServiceSample.ts | 29 + .../src/userConfirmationPasswordSendSample.ts | 24 + .../src/userCreateOrUpdateSample.ts | 30 + .../typescript/src/userDeleteSample.ts | 24 + .../src/userGenerateSsoUrlSample.ts | 29 + .../typescript/src/userGetEntityTagSample.ts | 24 + .../v11-beta/typescript/src/userGetSample.ts | 25 + .../src/userGetSharedAccessTokenSample.ts | 28 + .../typescript/src/userGroupListSample.ts | 33 + .../src/userIdentitiesListSample.ts | 33 + .../typescript/src/userListByServiceSample.ts | 29 + .../src/userSubscriptionGetSample.ts | 30 + .../src/userSubscriptionListSample.ts | 33 + .../typescript/src/userUpdateSample.ts | 29 + .../src/workspaceApiCreateOrUpdateSample.ts | 41 + .../src/workspaceApiDeleteSample.ts | 24 + ...kspaceApiDiagnosticCreateOrUpdateSample.ts | 44 + .../src/workspaceApiDiagnosticDeleteSample.ts | 31 + ...orkspaceApiDiagnosticGetEntityTagSample.ts | 30 + .../src/workspaceApiDiagnosticGetSample.ts | 31 + ...spaceApiDiagnosticListByWorkspaceSample.ts | 34 + .../src/workspaceApiDiagnosticUpdateSample.ts | 45 + .../src/workspaceApiExportGetSample.ts | 54 + .../src/workspaceApiGetEntityTagSample.ts | 24 + .../typescript/src/workspaceApiGetSample.ts | 45 + .../src/workspaceApiListByServiceSample.ts | 29 + ...rkspaceApiOperationCreateOrUpdateSample.ts | 61 + .../src/workspaceApiOperationDeleteSample.ts | 31 + ...workspaceApiOperationGetEntityTagSample.ts | 30 + .../src/workspaceApiOperationGetSample.ts | 31 + .../workspaceApiOperationListByApiSample.ts | 34 + ...eApiOperationPolicyCreateOrUpdateSample.ts | 38 + ...workspaceApiOperationPolicyDeleteSample.ts | 32 + ...aceApiOperationPolicyGetEntityTagSample.ts | 31 + .../workspaceApiOperationPolicyGetSample.ts | 32 + ...ApiOperationPolicyListByOperationSample.ts | 35 + .../src/workspaceApiOperationUpdateSample.ts | 59 + .../workspaceApiPolicyCreateOrUpdateSample.ts | 37 + .../src/workspaceApiPolicyDeleteSample.ts | 24 + .../workspaceApiPolicyGetEntityTagSample.ts | 30 + .../src/workspaceApiPolicyGetSample.ts | 31 + .../src/workspaceApiPolicyListByApiSample.ts | 34 + ...workspaceApiReleaseCreateOrUpdateSample.ts | 36 + .../src/workspaceApiReleaseDeleteSample.ts | 31 + .../workspaceApiReleaseGetEntityTagSample.ts | 30 + .../src/workspaceApiReleaseGetSample.ts | 31 + .../workspaceApiReleaseListByServiceSample.ts | 34 + .../src/workspaceApiReleaseUpdateSample.ts | 37 + ...workspaceApiRevisionListByServiceSample.ts | 34 + .../workspaceApiSchemaCreateOrUpdateSample.ts | 38 + .../src/workspaceApiSchemaDeleteSample.ts | 31 + .../workspaceApiSchemaGetEntityTagSample.ts | 30 + .../src/workspaceApiSchemaGetSample.ts | 31 + .../src/workspaceApiSchemaListByApiSample.ts | 34 + .../src/workspaceApiUpdateSample.ts | 29 + ...kspaceApiVersionSetCreateOrUpdateSample.ts | 31 + .../src/workspaceApiVersionSetDeleteSample.ts | 24 + ...orkspaceApiVersionSetGetEntityTagSample.ts | 24 + .../src/workspaceApiVersionSetGetSample.ts | 25 + ...rkspaceApiVersionSetListByServiceSample.ts | 33 + .../src/workspaceApiVersionSetUpdateSample.ts | 32 + .../workspaceBackendCreateOrUpdateSample.ts | 81 + .../src/workspaceBackendDeleteSample.ts | 24 + .../src/workspaceBackendGetEntityTagSample.ts | 24 + .../src/workspaceBackendGetSample.ts | 25 + .../workspaceBackendListByWorkspaceSample.ts | 29 + .../src/workspaceBackendUpdateSample.ts | 35 + ...orkspaceCertificateCreateOrUpdateSample.ts | 61 + .../src/workspaceCertificateDeleteSample.ts | 24 + .../workspaceCertificateGetEntityTagSample.ts | 24 + .../src/workspaceCertificateGetSample.ts | 50 + ...rkspaceCertificateListByWorkspaceSample.ts | 33 + ...workspaceCertificateRefreshSecretSample.ts | 30 + .../src/workspaceCreateOrUpdateSample.ts | 28 + .../typescript/src/workspaceDeleteSample.ts | 24 + ...workspaceDiagnosticCreateOrUpdateSample.ts | 43 + .../src/workspaceDiagnosticDeleteSample.ts | 30 + .../workspaceDiagnosticGetEntityTagSample.ts | 29 + .../src/workspaceDiagnosticGetSample.ts | 30 + ...orkspaceDiagnosticListByWorkspaceSample.ts | 33 + .../src/workspaceDiagnosticUpdateSample.ts | 44 + .../src/workspaceGetEntityTagSample.ts | 24 + .../typescript/src/workspaceGetSample.ts | 25 + ...rkspaceGlobalSchemaCreateOrUpdateSample.ts | 36 + .../src/workspaceGlobalSchemaDeleteSample.ts | 24 + ...workspaceGlobalSchemaGetEntityTagSample.ts | 24 + .../src/workspaceGlobalSchemaGetSample.ts | 25 + ...orkspaceGlobalSchemaListByServiceSample.ts | 33 + .../src/workspaceGroupCreateOrUpdateSample.ts | 57 + .../src/workspaceGroupDeleteSample.ts | 24 + .../src/workspaceGroupGetEntityTagSample.ts | 29 + .../typescript/src/workspaceGroupGetSample.ts | 30 + .../src/workspaceGroupListByServiceSample.ts | 29 + .../src/workspaceGroupUpdateSample.ts | 32 + ...rkspaceGroupUserCheckEntityExistsSample.ts | 30 + .../src/workspaceGroupUserCreateSample.ts | 31 + .../src/workspaceGroupUserDeleteSample.ts | 30 + .../src/workspaceGroupUserListSample.ts | 34 + .../src/workspaceListByServiceSample.ts | 29 + .../workspaceLoggerCreateOrUpdateSample.ts | 58 + .../src/workspaceLoggerDeleteSample.ts | 24 + .../src/workspaceLoggerGetEntityTagSample.ts | 24 + .../src/workspaceLoggerGetSample.ts | 25 + .../workspaceLoggerListByWorkspaceSample.ts | 29 + .../src/workspaceLoggerUpdateSample.ts | 28 + ...workspaceNamedValueCreateOrUpdateSample.ts | 60 + .../src/workspaceNamedValueDeleteSample.ts | 24 + .../workspaceNamedValueGetEntityTagSample.ts | 29 + .../src/workspaceNamedValueGetSample.ts | 45 + .../workspaceNamedValueListByServiceSample.ts | 33 + .../src/workspaceNamedValueListValueSample.ts | 30 + .../workspaceNamedValueRefreshSecretSample.ts | 30 + .../src/workspaceNamedValueUpdateSample.ts | 32 + ...rkspaceNotificationCreateOrUpdateSample.ts | 30 + .../src/workspaceNotificationGetSample.ts | 30 + ...orkspaceNotificationListByServiceSample.ts | 33 + ...onRecipientEmailCheckEntityExistsSample.ts | 30 + ...ationRecipientEmailCreateOrUpdateSample.ts | 31 + ...eNotificationRecipientEmailDeleteSample.ts | 30 + ...nRecipientEmailListByNotificationSample.ts | 30 + ...ionRecipientUserCheckEntityExistsSample.ts | 30 + ...cationRecipientUserCreateOrUpdateSample.ts | 31 + ...ceNotificationRecipientUserDeleteSample.ts | 30 + ...onRecipientUserListByNotificationSample.ts | 30 + .../workspacePolicyCreateOrUpdateSample.ts | 62 + .../src/workspacePolicyDeleteSample.ts | 24 + ...spacePolicyFragmentCreateOrUpdateSample.ts | 35 + .../workspacePolicyFragmentDeleteSample.ts | 30 + ...rkspacePolicyFragmentGetEntityTagSample.ts | 29 + .../src/workspacePolicyFragmentGetSample.ts | 51 + ...kspacePolicyFragmentListByServiceSample.ts | 33 + ...spacePolicyFragmentListReferencesSample.ts | 30 + .../src/workspacePolicyGetEntityTagSample.ts | 24 + .../src/workspacePolicyGetSample.ts | 25 + .../src/workspacePolicyListByApiSample.ts | 29 + ...spaceProductApiLinkCreateOrUpdateSample.ts | 35 + .../workspaceProductApiLinkDeleteSample.ts | 30 + .../src/workspaceProductApiLinkGetSample.ts | 31 + ...kspaceProductApiLinkListByProductSample.ts | 34 + .../workspaceProductCreateOrUpdateSample.ts | 31 + .../src/workspaceProductDeleteSample.ts | 26 + .../src/workspaceProductGetEntityTagSample.ts | 24 + .../src/workspaceProductGetSample.ts | 25 + ...aceProductGroupLinkCreateOrUpdateSample.ts | 35 + .../workspaceProductGroupLinkDeleteSample.ts | 30 + .../src/workspaceProductGroupLinkGetSample.ts | 31 + ...paceProductGroupLinkListByProductSample.ts | 34 + .../workspaceProductListByServiceSample.ts | 29 + ...kspaceProductPolicyCreateOrUpdateSample.ts | 36 + .../src/workspaceProductPolicyDeleteSample.ts | 31 + ...orkspaceProductPolicyGetEntityTagSample.ts | 30 + .../src/workspaceProductPolicyGetSample.ts | 31 + ...rkspaceProductPolicyListByProductSample.ts | 30 + .../src/workspaceProductUpdateSample.ts | 32 + ...rkspaceSubscriptionCreateOrUpdateSample.ts | 37 + .../src/workspaceSubscriptionDeleteSample.ts | 24 + ...workspaceSubscriptionGetEntityTagSample.ts | 29 + .../src/workspaceSubscriptionGetSample.ts | 30 + .../src/workspaceSubscriptionListSample.ts | 29 + .../workspaceSubscriptionListSecretsSample.ts | 30 + ...eSubscriptionRegeneratePrimaryKeySample.ts | 24 + ...ubscriptionRegenerateSecondaryKeySample.ts | 29 + .../src/workspaceSubscriptionUpdateSample.ts | 32 + ...workspaceTagApiLinkCreateOrUpdateSample.ts | 35 + .../src/workspaceTagApiLinkDeleteSample.ts | 24 + .../src/workspaceTagApiLinkGetSample.ts | 31 + .../workspaceTagApiLinkListByProductSample.ts | 34 + .../src/workspaceTagCreateOrUpdateSample.ts | 27 + .../src/workspaceTagDeleteSample.ts | 24 + .../src/workspaceTagGetEntityStateSample.ts | 29 + .../typescript/src/workspaceTagGetSample.ts | 30 + .../src/workspaceTagListByServiceSample.ts | 29 + ...aceTagOperationLinkCreateOrUpdateSample.ts | 35 + .../workspaceTagOperationLinkDeleteSample.ts | 24 + .../src/workspaceTagOperationLinkGetSample.ts | 31 + ...paceTagOperationLinkListByProductSample.ts | 34 + ...spaceTagProductLinkCreateOrUpdateSample.ts | 35 + .../workspaceTagProductLinkDeleteSample.ts | 24 + .../src/workspaceTagProductLinkGetSample.ts | 31 + ...kspaceTagProductLinkListByProductSample.ts | 34 + .../src/workspaceTagUpdateSample.ts | 27 + .../typescript/src/workspaceUpdateSample.ts | 28 + .../samples/v11-beta/typescript/tsconfig.json | 17 + .../src/api/allPolicies/index.ts | 5 + .../src/api/allPolicies/operations.ts | 80 + .../src/api/allPolicies/options.ts | 7 + .../arm-apimanagement/src/api/api/index.ts | 21 + .../src/api/api/operations.ts | 455 + .../arm-apimanagement/src/api/api/options.ts | 55 + .../src/api/apiDiagnostic/index.ts | 12 + .../src/api/apiDiagnostic/operations.ts | 420 + .../src/api/apiDiagnostic/options.ts | 32 + .../src/api/apiExport/index.ts | 5 + .../src/api/apiExport/operations.ts | 83 + .../src/api/apiExport/options.ts | 7 + .../src/api/apiGateway/index.ts | 12 + .../src/api/apiGateway/operations.ts | 367 + .../src/api/apiGateway/options.ts | 41 + .../api/apiGatewayConfigConnection/index.ts | 10 + .../apiGatewayConfigConnection/operations.ts | 282 + .../api/apiGatewayConfigConnection/options.ts | 27 + .../api/apiGatewayHostnameBinding/index.ts | 11 + .../apiGatewayHostnameBinding/operations.ts | 332 + .../api/apiGatewayHostnameBinding/options.ts | 30 + .../src/api/apiIssue/index.ts | 12 + .../src/api/apiIssue/operations.ts | 415 + .../src/api/apiIssue/options.ts | 37 + .../src/api/apiIssueAttachment/index.ts | 11 + .../src/api/apiIssueAttachment/operations.ts | 366 + .../src/api/apiIssueAttachment/options.ts | 29 + .../src/api/apiIssueComment/index.ts | 11 + .../src/api/apiIssueComment/operations.ts | 366 + .../src/api/apiIssueComment/options.ts | 29 + .../src/api/apiManagementContext.ts | 52 + .../src/api/apiManagementGatewaySkus/index.ts | 5 + .../apiManagementGatewaySkus/operations.ts | 80 + .../api/apiManagementGatewaySkus/options.ts | 7 + .../src/api/apiManagementOperations/index.ts | 5 + .../api/apiManagementOperations/operations.ts | 73 + .../api/apiManagementOperations/options.ts | 7 + .../src/api/apiManagementService/index.ts | 35 + .../api/apiManagementService/operations.ts | 825 + .../src/api/apiManagementService/options.ts | 88 + .../apiManagementServiceResources/index.ts | 5 + .../operations.ts | 95 + .../apiManagementServiceResources/options.ts | 10 + .../src/api/apiManagementServiceSkus/index.ts | 5 + .../apiManagementServiceSkus/operations.ts | 80 + .../api/apiManagementServiceSkus/options.ts | 7 + .../src/api/apiManagementSkus/index.ts | 5 + .../src/api/apiManagementSkus/operations.ts | 74 + .../src/api/apiManagementSkus/options.ts | 7 + .../api/apiManagementWorkspaceLink/index.ts | 5 + .../apiManagementWorkspaceLink/operations.ts | 69 + .../api/apiManagementWorkspaceLink/options.ts | 7 + .../api/apiManagementWorkspaceLinks/index.ts | 5 + .../apiManagementWorkspaceLinks/operations.ts | 82 + .../apiManagementWorkspaceLinks/options.ts | 12 + .../src/api/apiOperation/index.ts | 12 + .../src/api/apiOperation/operations.ts | 423 + .../src/api/apiOperation/options.ts | 34 + .../src/api/apiOperationPolicy/index.ts | 11 + .../src/api/apiOperationPolicy/operations.ts | 357 + .../src/api/apiOperationPolicy/options.ts | 26 + .../src/api/apiPolicy/index.ts | 11 + .../src/api/apiPolicy/operations.ts | 324 + .../src/api/apiPolicy/options.ts | 26 + .../src/api/apiProduct/index.ts | 5 + .../src/api/apiProduct/operations.ts | 86 + .../src/api/apiProduct/options.ts | 14 + .../src/api/apiRelease/index.ts | 12 + .../src/api/apiRelease/operations.ts | 413 + .../src/api/apiRelease/options.ts | 32 + .../src/api/apiRevision/index.ts | 5 + .../src/api/apiRevision/operations.ts | 86 + .../src/api/apiRevision/options.ts | 14 + .../src/api/apiSchema/index.ts | 11 + .../src/api/apiSchema/operations.ts | 347 + .../src/api/apiSchema/options.ts | 34 + .../src/api/apiTagDescription/index.ts | 11 + .../src/api/apiTagDescription/operations.ts | 348 + .../src/api/apiTagDescription/options.ts | 29 + .../src/api/apiTool/index.ts | 12 + .../src/api/apiTool/operations.ts | 394 + .../src/api/apiTool/options.ts | 29 + .../src/api/apiVersionSet/index.ts | 12 + .../src/api/apiVersionSet/operations.ts | 395 + .../src/api/apiVersionSet/options.ts | 32 + .../src/api/apiWiki/index.ts | 11 + .../src/api/apiWiki/operations.ts | 317 + .../src/api/apiWiki/options.ts | 22 + .../src/api/apiWikis/index.ts | 5 + .../src/api/apiWikis/operations.ts | 84 + .../src/api/apiWikis/options.ts | 14 + .../src/api/authorization/index.ts | 17 + .../src/api/authorization/operations.ts | 363 + .../src/api/authorization/options.ts | 29 + .../api/authorizationAccessPolicy/index.ts | 10 + .../authorizationAccessPolicy/operations.ts | 312 + .../api/authorizationAccessPolicy/options.ts | 26 + .../src/api/authorizationLoginLinks/index.ts | 5 + .../api/authorizationLoginLinks/operations.ts | 86 + .../api/authorizationLoginLinks/options.ts | 7 + .../src/api/authorizationProvider/index.ts | 11 + .../api/authorizationProvider/operations.ts | 333 + .../src/api/authorizationProvider/options.ts | 29 + .../src/api/authorizationServer/index.ts | 21 + .../src/api/authorizationServer/operations.ts | 444 + .../src/api/authorizationServer/options.ts | 35 + .../src/api/backend/index.ts | 21 + .../src/api/backend/operations.ts | 446 + .../src/api/backend/options.ts | 39 + .../arm-apimanagement/src/api/cache/index.ts | 12 + .../src/api/cache/operations.ts | 384 + .../src/api/cache/options.ts | 30 + .../src/api/certificate/index.ts | 19 + .../src/api/certificate/operations.ts | 381 + .../src/api/certificate/options.ts | 34 + .../src/api/clientApplication/index.ts | 19 + .../src/api/clientApplication/operations.ts | 379 + .../src/api/clientApplication/options.ts | 29 + .../api/clientApplicationProductLink/index.ts | 10 + .../operations.ts | 289 + .../clientApplicationProductLink/options.ts | 21 + .../src/api/contentItem/index.ts | 11 + .../src/api/contentItem/operations.ts | 342 + .../src/api/contentItem/options.ts | 22 + .../src/api/contentType/index.ts | 10 + .../src/api/contentType/operations.ts | 263 + .../src/api/contentType/options.ts | 19 + .../src/api/delegationSettings/index.ts | 11 + .../src/api/delegationSettings/operations.ts | 291 + .../src/api/delegationSettings/options.ts | 22 + .../src/api/deletedServices/index.ts | 9 + .../src/api/deletedServices/operations.ts | 184 + .../src/api/deletedServices/options.ts | 16 + .../src/api/diagnostic/index.ts | 12 + .../src/api/diagnostic/operations.ts | 391 + .../src/api/diagnostic/options.ts | 32 + .../src/api/documentation/index.ts | 12 + .../src/api/documentation/operations.ts | 395 + .../src/api/documentation/options.ts | 32 + .../src/api/emailTemplate/index.ts | 12 + .../src/api/emailTemplate/operations.ts | 395 + .../src/api/emailTemplate/options.ts | 32 + .../src/api/gateway/index.ts | 31 + .../src/api/gateway/operations.ts | 765 + .../src/api/gateway/options.ts | 50 + .../src/api/gatewayApi/index.ts | 10 + .../src/api/gatewayApi/operations.ts | 273 + .../src/api/gatewayApi/options.ts | 26 + .../api/gatewayCertificateAuthority/index.ts | 11 + .../gatewayCertificateAuthority/operations.ts | 347 + .../gatewayCertificateAuthority/options.ts | 29 + .../api/gatewayHostnameConfiguration/index.ts | 11 + .../operations.ts | 340 + .../gatewayHostnameConfiguration/options.ts | 29 + .../src/api/globalSchema/index.ts | 11 + .../src/api/globalSchema/operations.ts | 323 + .../src/api/globalSchema/options.ts | 31 + .../src/api/graphQLApiResolver/index.ts | 12 + .../src/api/graphQLApiResolver/operations.ts | 420 + .../src/api/graphQLApiResolver/options.ts | 32 + .../src/api/graphQLApiResolverPolicy/index.ts | 11 + .../graphQLApiResolverPolicy/operations.ts | 363 + .../api/graphQLApiResolverPolicy/options.ts | 26 + .../arm-apimanagement/src/api/group/index.ts | 12 + .../src/api/group/operations.ts | 386 + .../src/api/group/options.ts | 32 + .../src/api/groupUser/index.ts | 10 + .../src/api/groupUser/operations.ts | 264 + .../src/api/groupUser/options.ts | 23 + .../src/api/identityProvider/index.ts | 21 + .../src/api/identityProvider/operations.ts | 461 + .../src/api/identityProvider/options.ts | 28 + .../arm-apimanagement/src/api/index.ts | 8 + .../arm-apimanagement/src/api/issue/index.ts | 5 + .../src/api/issue/operations.ts | 134 + .../src/api/issue/options.ts | 17 + .../arm-apimanagement/src/api/logger/index.ts | 12 + .../src/api/logger/operations.ts | 391 + .../src/api/logger/options.ts | 32 + .../src/api/namedValue/index.ts | 23 + .../src/api/namedValue/operations.ts | 529 + .../src/api/namedValue/options.ts | 48 + .../src/api/networkStatus/index.ts | 8 + .../src/api/networkStatus/operations.ts | 129 + .../src/api/networkStatus/options.ts | 10 + .../src/api/notification/index.ts | 9 + .../src/api/notification/operations.ts | 202 + .../src/api/notification/options.ts | 21 + .../api/notificationRecipientEmail/index.ts | 10 + .../notificationRecipientEmail/operations.ts | 259 + .../api/notificationRecipientEmail/options.ts | 16 + .../api/notificationRecipientUser/index.ts | 10 + .../notificationRecipientUser/operations.ts | 259 + .../api/notificationRecipientUser/options.ts | 16 + .../src/api/openIdConnectProvider/index.ts | 21 + .../api/openIdConnectProvider/operations.ts | 444 + .../src/api/openIdConnectProvider/options.ts | 35 + .../src/api/operation/index.ts | 5 + .../src/api/operation/operations.ts | 87 + .../src/api/operation/options.ts | 16 + .../src/api/operationStatus/index.ts | 5 + .../src/api/operationStatus/operations.ts | 66 + .../src/api/operationStatus/options.ts | 7 + .../src/api/operationsResults/index.ts | 5 + .../src/api/operationsResults/operations.ts | 57 + .../src/api/operationsResults/options.ts | 7 + .../index.ts | 5 + .../operations.ts | 66 + .../options.ts | 7 + .../arm-apimanagement/src/api/policy/index.ts | 11 + .../src/api/policy/operations.ts | 319 + .../src/api/policy/options.ts | 26 + .../src/api/policyDescription/index.ts | 5 + .../src/api/policyDescription/operations.ts | 67 + .../src/api/policyDescription/options.ts | 11 + .../src/api/policyFragment/index.ts | 19 + .../src/api/policyFragment/operations.ts | 369 + .../src/api/policyFragment/options.ts | 45 + .../src/api/policyRestriction/index.ts | 12 + .../src/api/policyRestriction/operations.ts | 398 + .../src/api/policyRestriction/options.ts | 28 + .../api/policyRestrictionValidations/index.ts | 5 + .../operations.ts | 73 + .../policyRestrictionValidations/options.ts | 10 + .../src/api/portalConfig/index.ts | 11 + .../src/api/portalConfig/operations.ts | 333 + .../src/api/portalConfig/options.ts | 19 + .../src/api/portalRevision/index.ts | 11 + .../src/api/portalRevision/operations.ts | 343 + .../src/api/portalRevision/options.ts | 39 + .../src/api/portalSettings/index.ts | 5 + .../src/api/portalSettings/operations.ts | 66 + .../src/api/portalSettings/options.ts | 7 + .../api/privateEndpointConnection/index.ts | 19 + .../privateEndpointConnection/operations.ts | 388 + .../api/privateEndpointConnection/options.ts | 28 + .../src/api/product/index.ts | 21 + .../src/api/product/operations.ts | 460 + .../src/api/product/options.ts | 51 + .../src/api/productApi/index.ts | 10 + .../src/api/productApi/operations.ts | 268 + .../src/api/productApi/options.ts | 23 + .../src/api/productApiLink/index.ts | 10 + .../src/api/productApiLink/operations.ts | 279 + .../src/api/productApiLink/options.ts | 23 + .../src/api/productGroup/index.ts | 10 + .../src/api/productGroup/operations.ts | 268 + .../src/api/productGroup/options.ts | 23 + .../src/api/productGroupLink/index.ts | 10 + .../src/api/productGroupLink/operations.ts | 279 + .../src/api/productGroupLink/options.ts | 23 + .../src/api/productPolicy/index.ts | 11 + .../src/api/productPolicy/operations.ts | 344 + .../src/api/productPolicy/options.ts | 26 + .../src/api/productSubscriptions/index.ts | 5 + .../api/productSubscriptions/operations.ts | 86 + .../src/api/productSubscriptions/options.ts | 14 + .../src/api/productWiki/index.ts | 11 + .../src/api/productWiki/operations.ts | 323 + .../src/api/productWiki/options.ts | 22 + .../src/api/productWikis/index.ts | 5 + .../src/api/productWikis/operations.ts | 84 + .../src/api/productWikis/options.ts | 14 + .../src/api/quotaByCounterKeys/index.ts | 8 + .../src/api/quotaByCounterKeys/operations.ts | 143 + .../src/api/quotaByCounterKeys/options.ts | 10 + .../src/api/quotaByPeriodKeys/index.ts | 8 + .../src/api/quotaByPeriodKeys/operations.ts | 151 + .../src/api/quotaByPeriodKeys/options.ts | 10 + .../arm-apimanagement/src/api/region/index.ts | 5 + .../src/api/region/operations.ts | 80 + .../src/api/region/options.ts | 7 + .../src/api/reports/index.ts | 23 + .../src/api/reports/operations.ts | 547 + .../src/api/reports/options.ts | 80 + .../src/api/signInSettings/index.ts | 10 + .../src/api/signInSettings/operations.ts | 239 + .../src/api/signInSettings/options.ts | 19 + .../src/api/signUpSettings/index.ts | 10 + .../src/api/signUpSettings/operations.ts | 239 + .../src/api/signUpSettings/options.ts | 19 + .../src/api/subscription/index.ts | 25 + .../src/api/subscription/operations.ts | 554 + .../src/api/subscription/options.ts | 59 + .../arm-apimanagement/src/api/tag/index.ts | 49 + .../src/api/tag/operations.ts | 1330 + .../arm-apimanagement/src/api/tag/options.ts | 100 + .../src/api/tagApiLink/index.ts | 10 + .../src/api/tagApiLink/operations.ts | 270 + .../src/api/tagApiLink/options.ts | 23 + .../src/api/tagOperationLink/index.ts | 10 + .../src/api/tagOperationLink/operations.ts | 279 + .../src/api/tagOperationLink/options.ts | 23 + .../src/api/tagProductLink/index.ts | 10 + .../src/api/tagProductLink/operations.ts | 279 + .../src/api/tagProductLink/options.ts | 23 + .../src/api/tagResource/index.ts | 5 + .../src/api/tagResource/operations.ts | 83 + .../src/api/tagResource/options.ts | 14 + .../src/api/tenantAccess/index.ts | 23 + .../src/api/tenantAccess/operations.ts | 511 + .../src/api/tenantAccess/options.ts | 31 + .../src/api/tenantAccessGit/index.ts | 8 + .../src/api/tenantAccessGit/operations.ts | 126 + .../src/api/tenantAccessGit/options.ts | 10 + .../src/api/tenantConfiguration/index.ts | 10 + .../src/api/tenantConfiguration/operations.ts | 282 + .../src/api/tenantConfiguration/options.ts | 25 + .../src/api/tenantSettings/index.ts | 8 + .../src/api/tenantSettings/operations.ts | 138 + .../src/api/tenantSettings/options.ts | 13 + .../arm-apimanagement/src/api/user/index.ts | 23 + .../src/api/user/operations.ts | 521 + .../arm-apimanagement/src/api/user/options.ts | 52 + .../src/api/userConfirmationPassword/index.ts | 5 + .../userConfirmationPassword/operations.ts | 61 + .../api/userConfirmationPassword/options.ts | 11 + .../src/api/userGroup/index.ts | 5 + .../src/api/userGroup/operations.ts | 84 + .../src/api/userGroup/options.ts | 14 + .../src/api/userIdentities/index.ts | 5 + .../src/api/userIdentities/operations.ts | 83 + .../src/api/userIdentities/options.ts | 7 + .../src/api/userSubscription/index.ts | 8 + .../src/api/userSubscription/operations.ts | 145 + .../src/api/userSubscription/options.ts | 17 + .../src/api/workspace/index.ts | 12 + .../src/api/workspace/operations.ts | 391 + .../src/api/workspace/options.ts | 32 + .../src/api/workspaceApi/index.ts | 12 + .../src/api/workspaceApi/operations.ts | 432 + .../src/api/workspaceApi/options.ts | 41 + .../src/api/workspaceApiDiagnostic/index.ts | 19 + .../api/workspaceApiDiagnostic/operations.ts | 446 + .../src/api/workspaceApiDiagnostic/options.ts | 32 + .../src/api/workspaceApiExport/index.ts | 5 + .../src/api/workspaceApiExport/operations.ts | 87 + .../src/api/workspaceApiExport/options.ts | 7 + .../src/api/workspaceApiOperation/index.ts | 12 + .../api/workspaceApiOperation/operations.ts | 446 + .../src/api/workspaceApiOperation/options.ts | 34 + .../api/workspaceApiOperationPolicy/index.ts | 11 + .../workspaceApiOperationPolicy/operations.ts | 391 + .../workspaceApiOperationPolicy/options.ts | 26 + .../src/api/workspaceApiPolicy/index.ts | 11 + .../src/api/workspaceApiPolicy/operations.ts | 363 + .../src/api/workspaceApiPolicy/options.ts | 26 + .../src/api/workspaceApiRelease/index.ts | 12 + .../src/api/workspaceApiRelease/operations.ts | 443 + .../src/api/workspaceApiRelease/options.ts | 32 + .../src/api/workspaceApiRevision/index.ts | 5 + .../api/workspaceApiRevision/operations.ts | 89 + .../src/api/workspaceApiRevision/options.ts | 14 + .../src/api/workspaceApiSchema/index.ts | 11 + .../src/api/workspaceApiSchema/operations.ts | 373 + .../src/api/workspaceApiSchema/options.ts | 34 + .../src/api/workspaceApiVersionSet/index.ts | 12 + .../api/workspaceApiVersionSet/operations.ts | 424 + .../src/api/workspaceApiVersionSet/options.ts | 32 + .../src/api/workspaceBackend/index.ts | 19 + .../src/api/workspaceBackend/operations.ts | 420 + .../src/api/workspaceBackend/options.ts | 32 + .../src/api/workspaceCertificate/index.ts | 19 + .../api/workspaceCertificate/operations.ts | 410 + .../src/api/workspaceCertificate/options.ts | 34 + .../src/api/workspaceDiagnostic/index.ts | 19 + .../src/api/workspaceDiagnostic/operations.ts | 422 + .../src/api/workspaceDiagnostic/options.ts | 32 + .../src/api/workspaceGlobalSchema/index.ts | 11 + .../api/workspaceGlobalSchema/operations.ts | 355 + .../src/api/workspaceGlobalSchema/options.ts | 31 + .../src/api/workspaceGroup/index.ts | 12 + .../src/api/workspaceGroup/operations.ts | 421 + .../src/api/workspaceGroup/options.ts | 32 + .../src/api/workspaceGroupUser/index.ts | 10 + .../src/api/workspaceGroupUser/operations.ts | 279 + .../src/api/workspaceGroupUser/options.ts | 23 + .../src/api/workspaceLogger/index.ts | 19 + .../src/api/workspaceLogger/operations.ts | 420 + .../src/api/workspaceLogger/options.ts | 32 + .../src/api/workspaceNamedValue/index.ts | 23 + .../src/api/workspaceNamedValue/operations.ts | 572 + .../src/api/workspaceNamedValue/options.ts | 49 + .../src/api/workspaceNotification/index.ts | 9 + .../api/workspaceNotification/operations.ts | 219 + .../src/api/workspaceNotification/options.ts | 21 + .../index.ts | 10 + .../operations.ts | 283 + .../options.ts | 16 + .../index.ts | 10 + .../operations.ts | 283 + .../options.ts | 16 + .../src/api/workspacePolicy/index.ts | 11 + .../src/api/workspacePolicy/operations.ts | 344 + .../src/api/workspacePolicy/options.ts | 26 + .../src/api/workspacePolicyFragment/index.ts | 19 + .../api/workspacePolicyFragment/operations.ts | 417 + .../api/workspacePolicyFragment/options.ts | 45 + .../src/api/workspaceProduct/index.ts | 12 + .../src/api/workspaceProduct/operations.ts | 423 + .../src/api/workspaceProduct/options.ts | 39 + .../src/api/workspaceProductApiLink/index.ts | 10 + .../api/workspaceProductApiLink/operations.ts | 295 + .../api/workspaceProductApiLink/options.ts | 23 + .../api/workspaceProductGroupLink/index.ts | 10 + .../workspaceProductGroupLink/operations.ts | 295 + .../api/workspaceProductGroupLink/options.ts | 23 + .../src/api/workspaceProductPolicy/index.ts | 11 + .../api/workspaceProductPolicy/operations.ts | 357 + .../src/api/workspaceProductPolicy/options.ts | 26 + .../src/api/workspaceSubscription/index.ts | 25 + .../api/workspaceSubscription/operations.ts | 607 + .../src/api/workspaceSubscription/options.ts | 59 + .../src/api/workspaceTag/index.ts | 19 + .../src/api/workspaceTag/operations.ts | 420 + .../src/api/workspaceTag/options.ts | 34 + .../src/api/workspaceTagApiLink/index.ts | 10 + .../src/api/workspaceTagApiLink/operations.ts | 292 + .../src/api/workspaceTagApiLink/options.ts | 23 + .../api/workspaceTagOperationLink/index.ts | 10 + .../workspaceTagOperationLink/operations.ts | 294 + .../api/workspaceTagOperationLink/options.ts | 23 + .../src/api/workspaceTagProductLink/index.ts | 10 + .../api/workspaceTagProductLink/operations.ts | 294 + .../api/workspaceTagProductLink/options.ts | 23 + .../src/apiManagementClient.ts | 1736 +- .../src/classic/allPolicies/index.ts | 34 + .../src/classic/api/index.ts | 227 + .../src/classic/apiDiagnostic/index.ts | 154 + .../src/classic/apiExport/index.ts | 39 + .../src/classic/apiGateway/index.ts | 199 + .../apiGatewayConfigConnection/index.ts | 207 + .../apiGatewayHostnameBinding/index.ts | 260 + .../src/classic/apiIssue/index.ts | 135 + .../src/classic/apiIssueAttachment/index.ts | 145 + .../src/classic/apiIssueComment/index.ts | 135 + .../classic/apiManagementGatewaySkus/index.ts | 36 + .../classic/apiManagementOperations/index.ts | 30 + .../src/classic/apiManagementService/index.ts | 479 + .../apiManagementServiceResources/index.ts | 92 + .../classic/apiManagementServiceSkus/index.ts | 36 + .../src/classic/apiManagementSkus/index.ts | 30 + .../apiManagementWorkspaceLink/index.ts | 37 + .../apiManagementWorkspaceLinks/index.ts | 36 + .../src/classic/apiOperation/index.ts | 152 + .../src/classic/apiOperationPolicy/index.ts | 144 + .../src/classic/apiPolicy/index.ts | 112 + .../src/classic/apiProduct/index.ts | 36 + .../src/classic/apiRelease/index.ts | 152 + .../src/classic/apiRevision/index.ts | 36 + .../src/classic/apiSchema/index.ts | 171 + .../src/classic/apiTagDescription/index.ts | 124 + .../src/classic/apiTool/index.ts | 130 + .../src/classic/apiVersionSet/index.ts | 124 + .../src/classic/apiWiki/index.ts | 107 + .../src/classic/apiWikis/index.ts | 36 + .../src/classic/authorization/index.ts | 161 + .../authorizationAccessPolicy/index.ts | 142 + .../classic/authorizationLoginLinks/index.ts | 53 + .../classic/authorizationProvider/index.ts | 113 + .../src/classic/authorizationServer/index.ts | 142 + .../src/classic/backend/index.ts | 136 + .../src/classic/cache/index.ts | 121 + .../src/classic/certificate/index.ts | 118 + .../src/classic/clientApplication/index.ts | 128 + .../clientApplicationProductLink/index.ts | 127 + .../src/classic/contentItem/index.ts | 131 + .../src/classic/contentType/index.ts | 83 + .../src/classic/delegationSettings/index.ts | 100 + .../src/classic/deletedServices/index.ts | 84 + .../src/classic/diagnostic/index.ts | 122 + .../src/classic/documentation/index.ts | 133 + .../src/classic/emailTemplate/index.ts | 128 + .../src/classic/gateway/index.ts | 229 + .../src/classic/gatewayApi/index.ts | 91 + .../gatewayCertificateAuthority/index.ts | 124 + .../gatewayHostnameConfiguration/index.ts | 115 + .../src/classic/globalSchema/index.ts | 154 + .../src/classic/graphQLApiResolver/index.ts | 154 + .../classic/graphQLApiResolverPolicy/index.ts | 145 + .../src/classic/group/index.ts | 125 + .../src/classic/groupUser/index.ts | 86 + .../src/classic/identityProvider/index.ts | 161 + .../arm-apimanagement/src/classic/index.ts | 144 + .../src/classic/issue/index.ts | 50 + .../src/classic/logger/index.ts | 121 + .../src/classic/namedValue/index.ts | 297 + .../src/classic/networkStatus/index.ts | 51 + .../src/classic/notification/index.ts | 64 + .../notificationRecipientEmail/index.ts | 97 + .../notificationRecipientUser/index.ts | 97 + .../classic/openIdConnectProvider/index.ts | 142 + .../src/classic/operation/index.ts | 36 + .../src/classic/operationStatus/index.ts | 32 + .../src/classic/operationsResults/index.ts | 31 + .../index.ts | 35 + .../src/classic/policy/index.ts | 102 + .../src/classic/policyDescription/index.ts | 35 + .../src/classic/policyFragment/index.ts | 164 + .../src/classic/policyRestriction/index.ts | 138 + .../policyRestrictionValidations/index.ts | 65 + .../src/classic/portalConfig/index.ts | 116 + .../src/classic/portalRevision/index.ts | 231 + .../src/classic/portalSettings/index.ts | 35 + .../privateEndpointConnection/index.ts | 233 + .../src/classic/product/index.ts | 138 + .../src/classic/productApi/index.ts | 91 + .../src/classic/productApiLink/index.ts | 104 + .../src/classic/productGroup/index.ts | 91 + .../src/classic/productGroupLink/index.ts | 104 + .../src/classic/productPolicy/index.ts | 123 + .../src/classic/productSubscriptions/index.ts | 38 + .../src/classic/productWiki/index.ts | 107 + .../src/classic/productWikis/index.ts | 36 + .../src/classic/quotaByCounterKeys/index.ts | 55 + .../src/classic/quotaByPeriodKeys/index.ts | 68 + .../src/classic/region/index.ts | 34 + .../src/classic/reports/index.ts | 147 + .../src/classic/signInSettings/index.ts | 79 + .../src/classic/signUpSettings/index.ts | 79 + .../src/classic/subscription/index.ts | 171 + .../src/classic/tag/index.ts | 409 + .../src/classic/tagApiLink/index.ts | 97 + .../src/classic/tagOperationLink/index.ts | 104 + .../src/classic/tagProductLink/index.ts | 104 + .../src/classic/tagResource/index.ts | 34 + .../src/classic/tenantAccess/index.ts | 157 + .../src/classic/tenantAccessGit/index.ts | 56 + .../src/classic/tenantConfiguration/index.ts | 245 + .../src/classic/tenantSettings/index.ts | 52 + .../src/classic/user/index.ts | 198 + .../classic/userConfirmationPassword/index.ts | 36 + .../src/classic/userGroup/index.ts | 36 + .../src/classic/userIdentities/index.ts | 38 + .../src/classic/userSubscription/index.ts | 56 + .../src/classic/workspace/index.ts | 121 + .../src/classic/workspaceApi/index.ts | 210 + .../classic/workspaceApiDiagnostic/index.ts | 187 + .../src/classic/workspaceApiExport/index.ts | 53 + .../classic/workspaceApiOperation/index.ts | 187 + .../workspaceApiOperationPolicy/index.ts | 185 + .../src/classic/workspaceApiPolicy/index.ts | 145 + .../src/classic/workspaceApiRelease/index.ts | 179 + .../src/classic/workspaceApiRevision/index.ts | 40 + .../src/classic/workspaceApiSchema/index.ts | 209 + .../classic/workspaceApiVersionSet/index.ts | 155 + .../src/classic/workspaceBackend/index.ts | 154 + .../src/classic/workspaceCertificate/index.ts | 150 + .../src/classic/workspaceDiagnostic/index.ts | 155 + .../classic/workspaceGlobalSchema/index.ts | 181 + .../src/classic/workspaceGroup/index.ts | 158 + .../src/classic/workspaceGroupUser/index.ts | 110 + .../src/classic/workspaceLogger/index.ts | 154 + .../src/classic/workspaceNamedValue/index.ts | 364 + .../classic/workspaceNotification/index.ts | 80 + .../index.ts | 139 + .../index.ts | 139 + .../src/classic/workspacePolicy/index.ts | 123 + .../classic/workspacePolicyFragment/index.ts | 190 + .../src/classic/workspaceProduct/index.ts | 154 + .../classic/workspaceProductApiLink/index.ts | 114 + .../workspaceProductGroupLink/index.ts | 122 + .../classic/workspaceProductPolicy/index.ts | 152 + .../classic/workspaceSubscription/index.ts | 210 + .../src/classic/workspaceTag/index.ts | 152 + .../src/classic/workspaceTagApiLink/index.ts | 113 + .../workspaceTagOperationLink/index.ts | 122 + .../classic/workspaceTagProductLink/index.ts | 114 + .../arm-apimanagement/src/index.ts | 1634 +- .../arm-apimanagement/src/logger.ts | 5 + .../arm-apimanagement/src/lroImpl.ts | 42 - .../arm-apimanagement/src/models/index.ts | 16053 +---------- .../arm-apimanagement/src/models/mappers.ts | 23230 ---------------- .../arm-apimanagement/src/models/models.ts | 19035 +++++++++++++ .../src/models/parameters.ts | 1939 -- .../src/operations/allPolicies.ts | 201 - .../arm-apimanagement/src/operations/api.ts | 809 - .../src/operations/apiDiagnostic.ts | 498 - .../src/operations/apiExport.ts | 87 - .../src/operations/apiGateway.ts | 728 - .../operations/apiGatewayConfigConnection.ts | 537 - .../src/operations/apiIssue.ts | 491 - .../src/operations/apiIssueAttachment.ts | 463 - .../src/operations/apiIssueComment.ts | 463 - .../operations/apiManagementGatewaySkus.ts | 201 - .../src/operations/apiManagementOperations.ts | 149 - .../src/operations/apiManagementService.ts | 1335 - .../operations/apiManagementServiceSkus.ts | 202 - .../src/operations/apiManagementSkus.ts | 153 - .../operations/apiManagementWorkspaceLink.ts | 77 - .../operations/apiManagementWorkspaceLinks.ts | 203 - .../src/operations/apiOperation.ts | 508 - .../src/operations/apiOperationPolicy.ts | 316 - .../src/operations/apiPolicy.ts | 283 - .../src/operations/apiProduct.ts | 221 - .../src/operations/apiRelease.ts | 495 - .../src/operations/apiRevision.ts | 221 - .../src/operations/apiSchema.ts | 531 - .../src/operations/apiTagDescription.ts | 448 - .../src/operations/apiVersionSet.ts | 461 - .../src/operations/apiWiki.ts | 275 - .../src/operations/apiWikis.ts | 216 - .../src/operations/authorization.ts | 459 - .../operations/authorizationAccessPolicy.ts | 436 - .../src/operations/authorizationLoginLinks.ts | 90 - .../src/operations/authorizationProvider.ts | 362 - .../src/operations/authorizationServer.ts | 493 - .../src/operations/backend.ts | 505 - .../arm-apimanagement/src/operations/cache.ts | 449 - .../src/operations/certificate.ts | 444 - .../src/operations/contentItem.ts | 430 - .../src/operations/contentType.ts | 352 - .../src/operations/delegationSettings.ts | 249 - .../src/operations/deletedServices.ts | 303 - .../src/operations/diagnostic.ts | 460 - .../src/operations/documentation.ts | 461 - .../src/operations/emailTemplate.ts | 455 - .../src/operations/gateway.ts | 741 - .../src/operations/gatewayApi.ts | 368 - .../operations/gatewayCertificateAuthority.ts | 447 - .../gatewayHostnameConfiguration.ts | 434 - .../src/operations/globalSchema.ts | 486 - .../src/operations/graphQLApiResolver.ts | 507 - .../operations/graphQLApiResolverPolicy.ts | 473 - .../arm-apimanagement/src/operations/group.ts | 450 - .../src/operations/groupUser.ts | 359 - .../src/operations/identityProvider.ts | 509 - .../arm-apimanagement/src/operations/index.ts | 144 - .../arm-apimanagement/src/operations/issue.ts | 250 - .../src/operations/logger.ts | 456 - .../src/operations/namedValue.ts | 828 - .../src/operations/networkStatus.ts | 127 - .../src/operations/notification.ts | 288 - .../operations/notificationRecipientEmail.ts | 215 - .../operations/notificationRecipientUser.ts | 215 - .../src/operations/openIdConnectProvider.ts | 493 - .../src/operations/operationOperations.ts | 225 - .../src/operations/operationStatus.ts | 71 - .../src/operations/operationsResults.ts | 72 - .../outboundNetworkDependenciesEndpoints.ts | 73 - .../src/operations/policy.ts | 389 - .../src/operations/policyDescription.ts | 71 - .../src/operations/policyFragment.ts | 530 - .../src/operations/policyRestriction.ts | 454 - .../policyRestrictionValidations.ts | 161 - .../src/operations/portalConfig.ts | 410 - .../src/operations/portalRevision.ts | 609 - .../src/operations/portalSettings.ts | 71 - .../privateEndpointConnectionOperations.ts | 531 - .../src/operations/product.ts | 627 - .../src/operations/productApi.ts | 361 - .../src/operations/productApiLink.ts | 375 - .../src/operations/productGroup.ts | 358 - .../src/operations/productGroupLink.ts | 375 - .../src/operations/productPolicy.ts | 423 - .../src/operations/productSubscriptions.ts | 221 - .../src/operations/productWiki.ts | 282 - .../src/operations/productWikis.ts | 223 - .../src/operations/quotaByCounterKeys.ts | 130 - .../src/operations/quotaByPeriodKeys.ts | 148 - .../src/operations/region.ts | 201 - .../src/operations/reports.ts | 1587 -- .../src/operations/signInSettings.ts | 209 - .../src/operations/signUpSettings.ts | 209 - .../src/operations/subscription.ts | 582 - .../arm-apimanagement/src/operations/tag.ts | 1616 -- .../src/operations/tagApiLink.ts | 368 - .../src/operations/tagOperationLink.ts | 375 - .../src/operations/tagProductLink.ts | 375 - .../src/operations/tagResource.ts | 206 - .../src/operations/tenantAccess.ts | 539 - .../src/operations/tenantAccessGit.ts | 112 - .../src/operations/tenantConfiguration.ts | 513 - .../src/operations/tenantSettings.ts | 246 - .../arm-apimanagement/src/operations/user.ts | 642 - .../operations/userConfirmationPassword.ts | 69 - .../src/operations/userGroup.ts | 221 - .../src/operations/userIdentities.ts | 216 - .../src/operations/userSubscription.ts | 269 - .../src/operations/workspace.ts | 460 - .../src/operations/workspaceApi.ts | 610 - .../src/operations/workspaceApiDiagnostic.ts | 561 - .../src/operations/workspaceApiExport.ts | 99 - .../src/operations/workspaceApiOperation.ts | 570 - .../operations/workspaceApiOperationPolicy.ts | 542 - .../src/operations/workspaceApiPolicy.ts | 473 - .../src/operations/workspaceApiRelease.ts | 564 - .../src/operations/workspaceApiRevision.ts | 239 - .../src/operations/workspaceApiSchema.ts | 578 - .../src/operations/workspaceApiVersionSet.ts | 514 - .../src/operations/workspaceBackend.ts | 514 - .../src/operations/workspaceCertificate.ts | 496 - .../src/operations/workspaceDiagnostic.ts | 514 - .../src/operations/workspaceGlobalSchema.ts | 540 - .../src/operations/workspaceGroup.ts | 510 - .../src/operations/workspaceGroupUser.ts | 396 - .../src/operations/workspaceLogger.ts | 509 - .../src/operations/workspaceNamedValue.ts | 901 - .../src/operations/workspaceNotification.ts | 326 - .../workspaceNotificationRecipientEmail.ts | 258 - .../workspaceNotificationRecipientUser.ts | 258 - .../src/operations/workspacePolicy.ts | 437 - .../src/operations/workspacePolicyFragment.ts | 579 - .../src/operations/workspaceProduct.ts | 511 - .../src/operations/workspaceProductApiLink.ts | 427 - .../operations/workspaceProductGroupLink.ts | 429 - .../src/operations/workspaceProductPolicy.ts | 325 - .../src/operations/workspaceSubscription.ts | 650 - .../src/operations/workspaceTag.ts | 503 - .../src/operations/workspaceTagApiLink.ts | 420 - .../operations/workspaceTagOperationLink.ts | 422 - .../src/operations/workspaceTagProductLink.ts | 420 - .../src/operationsInterfaces/allPolicies.ts | 29 - .../src/operationsInterfaces/api.ts | 175 - .../src/operationsInterfaces/apiDiagnostic.ts | 130 - .../src/operationsInterfaces/apiExport.ts | 38 - .../src/operationsInterfaces/apiGateway.ts | 147 - .../apiGatewayConfigConnection.ts | 125 - .../src/operationsInterfaces/apiIssue.ts | 126 - .../apiIssueAttachment.ts | 113 - .../operationsInterfaces/apiIssueComment.ts | 113 - .../apiManagementGatewaySkus.ts | 29 - .../apiManagementOperations.ts | 25 - .../apiManagementService.ts | 312 - .../apiManagementServiceSkus.ts | 29 - .../operationsInterfaces/apiManagementSkus.ts | 25 - .../apiManagementWorkspaceLink.ts | 30 - .../apiManagementWorkspaceLinks.ts | 29 - .../src/operationsInterfaces/apiOperation.ts | 137 - .../apiOperationPolicy.ts | 123 - .../src/operationsInterfaces/apiPolicy.ts | 108 - .../src/operationsInterfaces/apiProduct.ts | 28 - .../src/operationsInterfaces/apiRelease.ts | 132 - .../src/operationsInterfaces/apiRevision.ts | 31 - .../src/operationsInterfaces/apiSchema.ts | 132 - .../operationsInterfaces/apiTagDescription.ts | 114 - .../src/operationsInterfaces/apiVersionSet.ts | 119 - .../src/operationsInterfaces/apiWiki.ts | 100 - .../src/operationsInterfaces/apiWikis.ts | 28 - .../src/operationsInterfaces/authorization.ts | 106 - .../authorizationAccessPolicy.ts | 94 - .../authorizationLoginLinks.ts | 34 - .../authorizationProvider.ts | 78 - .../authorizationServer.ts | 129 - .../src/operationsInterfaces/backend.ts | 135 - .../src/operationsInterfaces/cache.ts | 119 - .../src/operationsInterfaces/certificate.ts | 114 - .../src/operationsInterfaces/contentItem.ts | 104 - .../src/operationsInterfaces/contentType.ts | 84 - .../delegationSettings.ts | 86 - .../operationsInterfaces/deletedServices.ts | 62 - .../src/operationsInterfaces/diagnostic.ts | 118 - .../src/operationsInterfaces/documentation.ts | 119 - .../src/operationsInterfaces/emailTemplate.ts | 115 - .../src/operationsInterfaces/gateway.ts | 224 - .../src/operationsInterfaces/gatewayApi.ts | 85 - .../gatewayCertificateAuthority.ts | 112 - .../gatewayHostnameConfiguration.ts | 113 - .../src/operationsInterfaces/globalSchema.ts | 114 - .../graphQLApiResolver.ts | 137 - .../graphQLApiResolverPolicy.ts | 124 - .../src/operationsInterfaces/group.ts | 115 - .../src/operationsInterfaces/groupUser.ts | 81 - .../operationsInterfaces/identityProvider.ts | 131 - .../src/operationsInterfaces/index.ts | 144 - .../src/operationsInterfaces/issue.ts | 44 - .../src/operationsInterfaces/logger.ts | 114 - .../src/operationsInterfaces/namedValue.ts | 207 - .../src/operationsInterfaces/networkStatus.ts | 45 - .../src/operationsInterfaces/notification.ts | 60 - .../notificationRecipientEmail.ts | 80 - .../notificationRecipientUser.ts | 80 - .../openIdConnectProvider.ts | 129 - .../operationOperations.ts | 32 - .../operationsInterfaces/operationStatus.ts | 27 - .../operationsInterfaces/operationsResults.ts | 27 - .../outboundNetworkDependenciesEndpoints.ts | 27 - .../src/operationsInterfaces/policy.ts | 94 - .../operationsInterfaces/policyDescription.ts | 27 - .../operationsInterfaces/policyFragment.ts | 129 - .../operationsInterfaces/policyRestriction.ts | 111 - .../policyRestrictionValidations.ts | 44 - .../src/operationsInterfaces/portalConfig.ts | 99 - .../operationsInterfaces/portalRevision.ts | 148 - .../operationsInterfaces/portalSettings.ts | 27 - .../privateEndpointConnectionOperations.ts | 138 - .../src/operationsInterfaces/product.ts | 127 - .../src/operationsInterfaces/productApi.ts | 84 - .../operationsInterfaces/productApiLink.ts | 86 - .../src/operationsInterfaces/productGroup.ts | 81 - .../operationsInterfaces/productGroupLink.ts | 86 - .../src/operationsInterfaces/productPolicy.ts | 104 - .../productSubscriptions.ts | 31 - .../src/operationsInterfaces/productWiki.ts | 100 - .../src/operationsInterfaces/productWikis.ts | 28 - .../quotaByCounterKeys.ts | 55 - .../operationsInterfaces/quotaByPeriodKeys.ts | 58 - .../src/operationsInterfaces/region.ts | 26 - .../src/operationsInterfaces/reports.ts | 205 - .../operationsInterfaces/signInSettings.ts | 73 - .../operationsInterfaces/signUpSettings.ts | 73 - .../src/operationsInterfaces/subscription.ts | 166 - .../src/operationsInterfaces/tag.ts | 382 - .../src/operationsInterfaces/tagApiLink.ts | 86 - .../operationsInterfaces/tagOperationLink.ts | 86 - .../operationsInterfaces/tagProductLink.ts | 86 - .../src/operationsInterfaces/tagResource.ts | 29 - .../src/operationsInterfaces/tenantAccess.ts | 145 - .../operationsInterfaces/tenantAccessGit.ts | 43 - .../tenantConfiguration.ts | 151 - .../operationsInterfaces/tenantSettings.ts | 45 - .../src/operationsInterfaces/user.ts | 169 - .../userConfirmationPassword.ts | 26 - .../src/operationsInterfaces/userGroup.ts | 28 - .../operationsInterfaces/userIdentities.ts | 31 - .../operationsInterfaces/userSubscription.ts | 49 - .../src/operationsInterfaces/workspace.ts | 118 - .../src/operationsInterfaces/workspaceApi.ts | 165 - .../workspaceApiDiagnostic.ts | 149 - .../workspaceApiExport.ts | 41 - .../workspaceApiOperation.ts | 155 - .../workspaceApiOperationPolicy.ts | 139 - .../workspaceApiPolicy.ts | 124 - .../workspaceApiRelease.ts | 150 - .../workspaceApiRevision.ts | 34 - .../workspaceApiSchema.ts | 150 - .../workspaceApiVersionSet.ts | 137 - .../operationsInterfaces/workspaceBackend.ts | 137 - .../workspaceCertificate.ts | 132 - .../workspaceDiagnostic.ts | 137 - .../workspaceGlobalSchema.ts | 134 - .../operationsInterfaces/workspaceGroup.ts | 133 - .../workspaceGroupUser.ts | 93 - .../operationsInterfaces/workspaceLogger.ts | 132 - .../workspaceNamedValue.ts | 240 - .../workspaceNotification.ts | 69 - .../workspaceNotificationRecipientEmail.ts | 92 - .../workspaceNotificationRecipientUser.ts | 92 - .../operationsInterfaces/workspacePolicy.ts | 109 - .../workspacePolicyFragment.ts | 150 - .../operationsInterfaces/workspaceProduct.ts | 132 - .../workspaceProductApiLink.ts | 98 - .../workspaceProductGroupLink.ts | 98 - .../workspaceProductPolicy.ts | 118 - .../workspaceSubscription.ts | 195 - .../src/operationsInterfaces/workspaceTag.ts | 132 - .../workspaceTagApiLink.ts | 98 - .../workspaceTagOperationLink.ts | 98 - .../workspaceTagProductLink.ts | 98 - .../arm-apimanagement/src/pagingHelper.ts | 39 - .../src/restorePollerHelpers.ts | 364 + .../src/static-helpers/cloudSettingHelpers.ts | 42 + .../src/static-helpers/pagingHelpers.ts | 267 + .../src/static-helpers/pollingHelpers.ts | 147 + .../serialization/check-prop-undefined.ts | 17 + .../src/static-helpers/simplePollerHelpers.ts | 119 + .../src/static-helpers/urlTemplate.ts | 227 + .../test/apimanagement_examples.spec.ts | 54 +- .../arm-apimanagement/test/snippets.spec.ts | 21 +- .../arm-apimanagement/tsconfig.json | 9 +- .../arm-apimanagement/tsp-location.yaml | 4 + .../arm-apimanagement/vitest.config.ts | 1 - .../arm-apimanagement/warp.config.yml | 148 +- sdk/apimanagement/ci.mgmt.yml | 4 +- 4040 files changed, 151189 insertions(+), 198779 deletions(-) delete mode 100644 sdk/apimanagement/arm-apimanagement/_meta.json delete mode 100644 sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json create mode 100644 sdk/apimanagement/arm-apimanagement/config/tsconfig.test.browser.json create mode 100644 sdk/apimanagement/arm-apimanagement/metadata.json create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingListByGatewaySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRefreshHostnamesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/apiToolUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkCreateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkListByClientApplicationsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyListByResolverSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/README.md delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/allPoliciesListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiExportGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionListByGatewaySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListByResourceGroupSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByTagsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementGatewaySkusListAvailableSkusSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementOperationsListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceBackupSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCheckNameAvailabilitySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSsoTokenSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListByResourceGroupSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceMigrateToStv2Sample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceRestoreSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementSkusListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinksListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyListByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiProductListByApisSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiRevisionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikisListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyListByAuthorizationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationConfirmConsentCodeSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationListByAuthorizationProviderSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationLoginLinksPostSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendReconnectSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateRefreshSecretSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesGetByNameSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesListBySubscriptionSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesPurgeSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGenerateTokenSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayInvalidateDebugCredentialsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListDebugCredentialsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListKeysSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListTraceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayRegenerateKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyListByResolverSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCreateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListValueSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueRefreshSecretSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByLocationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailListByNotificationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserListByNotificationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationListByTagsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationStatusGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationsResultsGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/package.json delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/performConnectivityCheckAsyncSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDescriptionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListReferencesSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionValidationsByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalSettingsListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetByNameSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByTagsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productSubscriptionsListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikisListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/regionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByGeoSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByRequestSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListBySubscriptionSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByTimeSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByUserSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegeneratePrimaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegenerateSecondaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagResourceListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessCreateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegeneratePrimaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegenerateSecondaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegeneratePrimaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegenerateSecondaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationDeploySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationGetSyncStateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationSaveSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationValidateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userConfirmationPasswordSendSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGenerateSsoUrlSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSharedAccessTokenSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGroupListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userIdentitiesListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticListByWorkspaceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiExportGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyListByOperationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiRevisionListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendListByWorkspaceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateListByWorkspaceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateRefreshSecretSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticListByWorkspaceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCreateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerListByWorkspaceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListValueSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueRefreshSecretSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserListByNotificationSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListReferencesSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyListByApiSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetEntityTagSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSecretsSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetEntityStateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagListByServiceSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkCreateOrUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkDeleteSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkGetSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkListByProductSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceUpdateSample.js delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/README.md delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/package.json delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/allPoliciesListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiExportGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListByResourceGroupSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByTagsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementOperationsListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceBackupSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSsoTokenSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListByResourceGroupSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceMigrateToStv2Sample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceRestoreSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementSkusListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyListByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiProductListByApisSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiRevisionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikisListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationConfirmConsentCodeSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationListByAuthorizationProviderSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationLoginLinksPostSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendReconnectSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateRefreshSecretSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesGetByNameSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesListBySubscriptionSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesPurgeSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGenerateTokenSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayInvalidateDebugCredentialsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListDebugCredentialsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListKeysSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListTraceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayRegenerateKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCreateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListValueSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueRefreshSecretSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByLocationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailListByNotificationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserListByNotificationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationListByTagsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationStatusGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationsResultsGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/performConnectivityCheckAsyncSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDescriptionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListReferencesSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionValidationsByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalSettingsListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetByNameSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByTagsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productSubscriptionsListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikisListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/regionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByGeoSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByRequestSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListBySubscriptionSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByTimeSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByUserSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegeneratePrimaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegenerateSecondaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagResourceListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessCreateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationDeploySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationGetSyncStateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationSaveSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationValidateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userConfirmationPasswordSendSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGenerateSsoUrlSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSharedAccessTokenSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGroupListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userIdentitiesListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiExportGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiRevisionListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendListByWorkspaceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateListByWorkspaceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateRefreshSecretSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCreateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerListByWorkspaceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListValueSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueRefreshSecretSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListReferencesSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyListByApiSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetEntityTagSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSecretsSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetEntityStateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagListByServiceSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkDeleteSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkGetSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkListByProductSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceUpdateSample.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/samples/v10/typescript/tsconfig.json create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/README.md create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/allPoliciesListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiExportGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionListByGatewaySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingListByGatewaySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListByResourceGroupSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByTagsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementGatewaySkusListAvailableSkusSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementOperationsListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceBackupSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCheckNameAvailabilitySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSsoTokenSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListByResourceGroupSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceMigrateToStv2Sample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRefreshHostnamesSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRestoreSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementSkusListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinksListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyListByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiProductListByApisSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiRevisionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikisListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyListByAuthorizationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationConfirmConsentCodeSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationListByAuthorizationProviderSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationLoginLinksPostSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendReconnectSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkCreateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkListByClientApplicationsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesGetByNameSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesListBySubscriptionSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesPurgeSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGenerateTokenSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayInvalidateDebugCredentialsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListDebugCredentialsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListKeysSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListTraceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayRegenerateKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyListByResolverSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCreateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListValueSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByLocationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailListByNotificationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserListByNotificationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationListByTagsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationStatusGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationsResultsGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/package.json create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDescriptionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListReferencesSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionValidationsByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalSettingsListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetByNameSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByTagsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productSubscriptionsListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikisListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/regionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByGeoSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByRequestSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListBySubscriptionSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByTimeSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByUserSample.js rename sdk/apimanagement/arm-apimanagement/samples/{v10 => v11-beta}/javascript/sample.env (100%) create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegeneratePrimaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegenerateSecondaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagResourceListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessCreateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegeneratePrimaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegenerateSecondaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegeneratePrimaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegenerateSecondaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationDeploySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationGetSyncStateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationSaveSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationValidateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userConfirmationPasswordSendSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGenerateSsoUrlSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSharedAccessTokenSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGroupListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userIdentitiesListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticListByWorkspaceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiExportGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyListByOperationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiRevisionListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendListByWorkspaceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateListByWorkspaceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticListByWorkspaceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCreateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerListByWorkspaceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListValueSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueRefreshSecretSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserListByNotificationSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListReferencesSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyListByApiSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetEntityTagSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSecretsSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetEntityStateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagListByServiceSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkCreateOrUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkDeleteSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkGetSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkListByProductSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceUpdateSample.js create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/README.md create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/package.json rename sdk/apimanagement/arm-apimanagement/samples/{v10 => v11-beta}/typescript/sample.env (100%) create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/allPoliciesListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiExportGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingListByGatewaySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListByResourceGroupSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByTagsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementOperationsListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceBackupSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSsoTokenSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListByResourceGroupSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceMigrateToStv2Sample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRefreshHostnamesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRestoreSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementSkusListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyListByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiProductListByApisSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiRevisionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikisListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationConfirmConsentCodeSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationListByAuthorizationProviderSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationLoginLinksPostSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendReconnectSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkCreateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkListByClientApplicationsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesGetByNameSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesListBySubscriptionSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesPurgeSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGenerateTokenSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayInvalidateDebugCredentialsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListDebugCredentialsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListKeysSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListTraceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayRegenerateKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyListByResolverSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCreateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListValueSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByLocationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailListByNotificationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserListByNotificationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationListByTagsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationStatusGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationsResultsGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDescriptionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListReferencesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionValidationsByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalSettingsListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetByNameSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByTagsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productSubscriptionsListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikisListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/regionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByGeoSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByRequestSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListBySubscriptionSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByTimeSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByUserSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegeneratePrimaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegenerateSecondaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagResourceListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessCreateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationDeploySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationGetSyncStateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationSaveSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationValidateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userConfirmationPasswordSendSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGenerateSsoUrlSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSharedAccessTokenSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGroupListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userIdentitiesListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiExportGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiRevisionListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendListByWorkspaceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateListByWorkspaceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCreateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerListByWorkspaceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListValueSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueRefreshSecretSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListReferencesSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyListByApiSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetEntityTagSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSecretsSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetEntityStateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagListByServiceSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkDeleteSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkGetSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkListByProductSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceUpdateSample.ts create mode 100644 sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/tsconfig.json create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/allPolicies/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/allPolicies/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/allPolicies/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/api/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/api/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/api/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiExport/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiExport/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiExport/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGateway/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGateway/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGateway/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssue/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssue/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementContext.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperation/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperation/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiProduct/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiProduct/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiProduct/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRelease/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRelease/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRelease/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRevision/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiRevision/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiSchema/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiSchema/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTool/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTool/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiTool/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWiki/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWiki/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWiki/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWikis/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWikis/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/apiWikis/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorization/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorization/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorization/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/backend/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/backend/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/backend/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/cache/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/cache/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/cache/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/certificate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/certificate/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/certificate/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplication/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplication/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplication/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentItem/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentItem/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentItem/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentType/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentType/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/contentType/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/deletedServices/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/deletedServices/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/deletedServices/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/diagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/diagnostic/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/diagnostic/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/documentation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/documentation/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/documentation/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gateway/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gateway/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gateway/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/globalSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/globalSchema/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/globalSchema/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/group/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/group/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/group/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/groupUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/groupUser/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/groupUser/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/identityProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/identityProvider/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/identityProvider/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/issue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/issue/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/issue/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/logger/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/logger/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/logger/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/namedValue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/namedValue/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/namedValue/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/networkStatus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/networkStatus/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/networkStatus/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notification/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notification/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notification/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operation/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operation/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationStatus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationStatus/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationStatus/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationsResults/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationsResults/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/operationsResults/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyDescription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyDescription/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyDescription/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyFragment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyFragment/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyFragment/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalConfig/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalConfig/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalConfig/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalRevision/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalRevision/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalSettings/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/portalSettings/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/product/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/product/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/product/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApi/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApi/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApiLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productApiLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroup/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroup/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWiki/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWiki/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWiki/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWikis/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWikis/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/productWikis/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/region/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/region/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/region/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/reports/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/reports/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/reports/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signInSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signInSettings/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signInSettings/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/subscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/subscription/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/subscription/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tag/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tag/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tag/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagResource/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagResource/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tagResource/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/user/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/user/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/user/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userGroup/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userGroup/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userIdentities/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userIdentities/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userIdentities/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userSubscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userSubscription/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/userSubscription/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspace/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspace/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspace/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/operations.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/options.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/allPolicies/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/api/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiExport/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiGateway/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayConfigConnection/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayHostnameBinding/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiIssue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiIssueAttachment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiIssueComment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementGatewaySkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementOperations/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementService/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceResources/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceSkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementSkus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLinks/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiOperation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiOperationPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiProduct/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiRelease/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiTagDescription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiTool/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiVersionSet/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiWiki/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/apiWikis/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/authorization/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/authorizationAccessPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/authorizationLoginLinks/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/authorizationProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/authorizationServer/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/backend/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/cache/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/certificate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/clientApplication/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/clientApplicationProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/contentItem/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/contentType/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/delegationSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/deletedServices/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/diagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/documentation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/emailTemplate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/gateway/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/gatewayApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/gatewayCertificateAuthority/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/gatewayHostnameConfiguration/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/globalSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolver/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolverPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/group/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/groupUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/identityProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/issue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/logger/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/namedValue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/networkStatus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/notification/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientEmail/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/openIdConnectProvider/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/operation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/operationStatus/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/operationsResults/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/outboundNetworkDependenciesEndpoints/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/policy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/policyDescription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/policyFragment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/policyRestriction/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/policyRestrictionValidations/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/portalConfig/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/portalRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/portalSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/privateEndpointConnection/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/product/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productGroupLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productSubscriptions/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productWiki/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/productWikis/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/quotaByCounterKeys/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/quotaByPeriodKeys/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/region/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/reports/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/signInSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/signUpSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/subscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tag/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tagApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tagOperationLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tagProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tagResource/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tenantAccess/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tenantAccessGit/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tenantConfiguration/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/tenantSettings/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/user/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/userConfirmationPassword/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/userGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/userIdentities/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/userSubscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspace/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApi/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiExport/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperation/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperationPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRelease/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRevision/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiVersionSet/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceBackend/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceCertificate/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceDiagnostic/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceGlobalSchema/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroup/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroupUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceLogger/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceNamedValue/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotification/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientEmail/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientUser/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicyFragment/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceProduct/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductGroupLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductPolicy/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceSubscription/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceTag/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagApiLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagOperationLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagProductLink/index.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/logger.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/lroImpl.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/models/mappers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/models/models.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/models/parameters.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/allPolicies.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/api.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiGateway.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiGatewayConfigConnection.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementGatewaySkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLinks.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/backend.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/cache.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/group.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/index.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/issue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/logger.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/notification.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/operationStatus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/operationsResults.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/policy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/policyRestriction.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/policyRestrictionValidations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/product.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productGroupLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/region.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/reports.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tag.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tagApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tagOperationLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tagProductLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/user.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspace.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiExport.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperationPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRelease.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiVersionSet.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceBackend.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceCertificate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceGlobalSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroupUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceLogger.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceNamedValue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotification.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientEmail.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicyFragment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceProduct.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductGroupLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceSubscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceTag.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagOperationLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagProductLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/allPolicies.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGateway.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGatewayConfigConnection.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementGatewaySkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLinks.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationStatus.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationsResults.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestriction.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestrictionValidations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroupLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagOperationLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagProductLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspace.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApi.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiExport.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperation.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperationPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRelease.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRevision.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiVersionSet.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceBackend.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceCertificate.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceDiagnostic.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGlobalSchema.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroup.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroupUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceLogger.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNamedValue.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotification.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientEmail.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientUser.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicyFragment.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProduct.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductGroupLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductPolicy.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceSubscription.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTag.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagApiLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagOperationLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagProductLink.ts delete mode 100644 sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/restorePollerHelpers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/cloudSettingHelpers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/pagingHelpers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/pollingHelpers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/serialization/check-prop-undefined.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/simplePollerHelpers.ts create mode 100644 sdk/apimanagement/arm-apimanagement/src/static-helpers/urlTemplate.ts create mode 100644 sdk/apimanagement/arm-apimanagement/tsp-location.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7cf126e71fbc..138a3804ccbb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -352,7 +352,7 @@ # PRLabel: %Mgmt /sdk/analysisservices/arm-analysisservices/ @qiaozha @MaryGao @JialinHuang803 -# PRLabel: %Mgmt +# PRLabel: %Mgmt %mgmt-review-needed /sdk/apimanagement/arm-apimanagement/ @qiaozha @MaryGao @JialinHuang803 # PRLabel: %Mgmt %mgmt-review-needed diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3994e72f2bd..ae132d7dc088 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1569,24 +1569,27 @@ importers: sdk/apimanagement/arm-apimanagement: dependencies: + '@azure-rest/core-client': + specifier: ^2.3.1 + version: link:../../core/core-client-rest '@azure/abort-controller': specifier: ^2.1.2 version: link:../../core/abort-controller '@azure/core-auth': specifier: ^1.9.0 version: link:../../core/core-auth - '@azure/core-client': - specifier: ^1.9.3 - version: link:../../core/core-client '@azure/core-lro': - specifier: ^2.5.4 - version: 2.7.2 - '@azure/core-paging': - specifier: ^1.6.2 - version: link:../../core/core-paging + specifier: ^3.1.0 + version: link:../../core/core-lro '@azure/core-rest-pipeline': specifier: link:../../core/core-rest-pipeline version: link:../../core/core-rest-pipeline + '@azure/core-util': + specifier: ^1.12.0 + version: link:../../core/core-util + '@azure/logger': + specifier: ^1.2.0 + version: link:../../core/logger tslib: specifier: ^2.8.1 version: 2.8.1 @@ -1603,12 +1606,12 @@ importers: '@azure/dev-tool': specifier: workspace:^ version: link:../../../common/tools/dev-tool + '@azure/eslint-plugin-azure-sdk': + specifier: workspace:^ + version: link:../../../common/tools/eslint-plugin-azure-sdk '@azure/identity': specifier: catalog:internal version: 4.13.0 - '@azure/logger': - specifier: ^1.1.4 - version: link:../../core/logger '@types/node': specifier: 'catalog:' version: 20.19.40 @@ -1624,9 +1627,15 @@ importers: dotenv: specifier: catalog:testing version: 16.6.1 + eslint: + specifier: 'catalog:' + version: 9.39.4 playwright: specifier: catalog:testing version: 1.60.0 + prettier: + specifier: 'catalog:' + version: 3.8.3 rimraf: specifier: 'catalog:' version: 6.1.3 diff --git a/sdk/apimanagement/arm-apimanagement/CHANGELOG.md b/sdk/apimanagement/arm-apimanagement/CHANGELOG.md index 68ada6042e2b..a1e22ea05dea 100644 --- a/sdk/apimanagement/arm-apimanagement/CHANGELOG.md +++ b/sdk/apimanagement/arm-apimanagement/CHANGELOG.md @@ -1,4 +1,524 @@ # Release History + +## 11.0.0-beta.1 (2026-05-29) +Compared with version 10.0.0 + +### Features Added + - Added operation group ApiGatewayHostnameBindingOperations + - Added operation group ApiManagementServiceResourcesOperations + - Added operation group ApiToolOperations + - Added operation group CacheOperations + - Added operation group ClientApplicationOperations + - Added operation group ClientApplicationProductLinkOperations + - Added operation group NotificationOperations + - Added operation ApiOperations.createOrUpdate + - Added operation ApiOperations.delete + - Added operation ApiGatewayOperations.createOrUpdate + - Added operation ApiGatewayOperations.delete + - Added operation ApiGatewayOperations.update + - Added operation ApiGatewayConfigConnectionOperations.createOrUpdate + - Added operation ApiGatewayConfigConnectionOperations.delete + - Added operation ApiManagementServiceOperations.applyNetworkConfigurationUpdates + - Added operation ApiManagementServiceOperations.backup + - Added operation ApiManagementServiceOperations.beginRefreshHostnames + - Added operation ApiManagementServiceOperations.beginRefreshHostnamesAndWait + - Added operation ApiManagementServiceOperations.createOrUpdate + - Added operation ApiManagementServiceOperations.delete + - Added operation ApiManagementServiceOperations.migrateToStv2 + - Added operation ApiManagementServiceOperations.refreshHostnames + - Added operation ApiManagementServiceOperations.restore + - Added operation ApiManagementServiceOperations.update + - Added operation ApiSchemaOperations.createOrUpdate + - Added operation AuthorizationProviderOperations.refreshSecret + - Added operation DeletedServicesOperations.purge + - Added operation GlobalSchemaOperations.createOrUpdate + - Added operation NamedValueOperations.createOrUpdate + - Added operation NamedValueOperations.refreshSecret + - Added operation NamedValueOperations.update + - Added operation PolicyFragmentOperations.createOrUpdate + - Added operation PolicyRestrictionValidationsOperations.byService + - Added operation PortalRevisionOperations.createOrUpdate + - Added operation PortalRevisionOperations.update + - Added operation PrivateEndpointConnectionOperations.createOrUpdate + - Added operation PrivateEndpointConnectionOperations.delete + - Added operation TenantConfigurationOperations.deploy + - Added operation TenantConfigurationOperations.save + - Added operation TenantConfigurationOperations.validate + - Added operation UserOperations.delete + - Added operation WorkspaceApiOperations.createOrUpdate + - Added operation WorkspaceApiSchemaOperations.createOrUpdate + - Added operation WorkspaceGlobalSchemaOperations.createOrUpdate + - Added operation WorkspaceNamedValueOperations.createOrUpdate + - Added operation WorkspaceNamedValueOperations.refreshSecret + - Added operation WorkspaceNamedValueOperations.update + - Added operation WorkspacePolicyFragmentOperations.createOrUpdate + - Added Interface AccessInformationContractProperties + - Added Interface AccessInformationCreateParameterProperties + - Added Interface AccessInformationUpdateParameterProperties + - Added Interface AllPoliciesContractProperties + - Added Interface ApiGatewayHostnameBindingCreateOrUpdateOptionalParams + - Added Interface ApiGatewayHostnameBindingDeleteOptionalParams + - Added Interface ApiGatewayHostnameBindingGetOptionalParams + - Added Interface ApiGatewayHostnameBindingListByGatewayOptionalParams + - Added Interface ApiGatewayHostnameBindingRefreshSecretOptionalParams + - Added Interface ApiManagementServiceRefreshHostnamesOptionalParams + - Added Interface ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams + - Added Interface ApiReleaseContractProperties + - Added Interface ApiToolCreateOrUpdateOptionalParams + - Added Interface ApiToolDeleteOptionalParams + - Added Interface ApiToolGetEntityTagOptionalParams + - Added Interface ApiToolGetOptionalParams + - Added Interface ApiToolListByApiOptionalParams + - Added Interface ApiToolUpdateOptionalParams + - Added Interface AssociationContractProperties + - Added Interface AuthorizationAccessPolicyContractProperties + - Added Interface AuthorizationContractProperties + - Added Interface AuthorizationProviderContractProperties + - Added Interface AuthorizationProviderFederatedIdentityCredentialsProperties + - Added Interface AuthorizationProviderKeyVaultContract + - Added Interface AuthorizationProviderKeyVaultCreateProperties + - Added Interface AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType + - Added Interface AuthorizationProviderRefreshSecretOptionalParams + - Added Interface BackendFailureResponse + - Added Interface BackendReconnectProperties + - Added Interface BackendSessionAffinity + - Added Interface BackendSessionId + - Added Interface CacheContractProperties + - Added Interface CacheUpdateProperties + - Added Interface CertificateContractProperties + - Added Interface CertificateCreateOrUpdateProperties + - Added Interface ClientApplicationContract + - Added Interface ClientApplicationContractProperties + - Added Interface ClientApplicationCreateOrUpdateOptionalParams + - Added Interface ClientApplicationDeleteOptionalParams + - Added Interface ClientApplicationGetEntityTagOptionalParams + - Added Interface ClientApplicationGetOptionalParams + - Added Interface ClientApplicationListByServiceOptionalParams + - Added Interface ClientApplicationListSecretsOptionalParams + - Added Interface ClientApplicationProductLinkContract + - Added Interface ClientApplicationProductLinkContractProperties + - Added Interface ClientApplicationProductLinkCreateOptionalParams + - Added Interface ClientApplicationProductLinkDeleteOptionalParams + - Added Interface ClientApplicationProductLinkGetOptionalParams + - Added Interface ClientApplicationProductLinkListByClientApplicationsOptionalParams + - Added Interface ClientApplicationSecretsContract + - Added Interface ClientApplicationSecretsContractEntra + - Added Interface ContentTypeContractProperties + - Added Interface DeletedServiceContractProperties + - Added Interface DeployConfigurationParameterProperties + - Added Interface DiagnosticContractProperties + - Added Interface DiagnosticContractUpdateProperties + - Added Interface DocumentationContractProperties + - Added Interface EmailTemplateContractProperties + - Added Interface EmailTemplateUpdateParameterProperties + - Added Interface GatewayCertificateAuthorityContractProperties + - Added Interface GatewayConfigConnectionBaseProperties + - Added Interface GatewayContractProperties + - Added Interface GatewayHostnameBindingBaseProperties + - Added Interface GatewayHostnameBindingCertificate + - Added Interface GatewayHostnameBindingKeyVault + - Added Interface GatewayHostnameBindingKeyVaultLastStatus + - Added Interface GatewayHostnameBindingResource + - Added Interface GatewayHostnameConfigurationContractProperties + - Added Interface GlobalSchemaContractProperties + - Added Interface GroupCreateParametersProperties + - Added Interface GroupUpdateParametersProperties + - Added Interface IssueAttachmentContractProperties + - Added Interface IssueCommentContractProperties + - Added Interface LLMDiagnosticSettings + - Added Interface LLMMessageDiagnosticSettings + - Added Interface LoggerContractProperties + - Added Interface LoggerUpdateParameters + - Added Interface ManagedServiceIdentity + - Added Interface McpEndpoint + - Added Interface McpProperties + - Added Interface NotificationContractProperties + - Added Interface OpenidConnectProviderContractProperties + - Added Interface OpenidConnectProviderUpdateContractProperties + - Added Interface OperationResultContractProperties + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface PolicyContractProperties + - Added Interface PolicyDescriptionContractProperties + - Added Interface PolicyFragmentContractProperties + - Added Interface PolicyRestrictionContractProperties + - Added Interface PortalConfigProperties + - Added Interface PortalDelegationSettingsProperties + - Added Interface PortalRevisionContractProperties + - Added Interface PortalSettingsContractProperties + - Added Interface PortalSigninSettingProperties + - Added Interface PortalSignupSettingsProperties + - Added Interface PrivateEndpointConnectionProperties + - Added Interface PrivateEndpointConnectionWrapperProperties + - Added Interface PrivateLinkResourceProperties + - Added Interface ProductApiLinkContractProperties + - Added Interface ProductApplicationContract + - Added Interface ProductApplicationContractEntra + - Added Interface ProductEntityBaseParametersApplication + - Added Interface ProductGroupLinkContractProperties + - Added Interface RecipientEmailContractProperties + - Added Interface RecipientUsersContractProperties + - Added Interface ResolverEntityBaseContract + - Added Interface ResolverUpdateContractProperties + - Added Interface RestorePollerOptions + - Added Interface SaveConfigurationParameterProperties + - Added Interface SchemaContractProperties + - Added Interface SchemaDocumentProperties + - Added Interface SimplePollerLike + - Added Interface SubscriptionContractProperties + - Added Interface SubscriptionCreateParameterProperties + - Added Interface SubscriptionUpdateParameterProperties + - Added Interface TagApiLinkContractProperties + - Added Interface TagContractProperties + - Added Interface TagOperationLinkContractProperties + - Added Interface TagProductLinkContractProperties + - Added Interface TagTagResourceContractProperties + - Added Interface TenantConfigurationSyncStateContractProperties + - Added Interface TenantSettingsContractProperties + - Added Interface ToolContract + - Added Interface ToolContractProperties + - Added Interface TrackedResource + - Added Interface UserAssignedIdentity + - Added Interface UserTokenParameterProperties + - Added Interface WikiContractProperties + - Added Interface WorkspaceContractProperties + - Interface AccessInformationContract has a new optional parameter systemData + - Interface AllPoliciesContract has a new optional parameter systemData + - Interface ApiContract has a new optional parameter mcpProperties + - Interface ApiContract has a new optional parameter systemData + - Interface ApiContractProperties has a new optional parameter mcpProperties + - Interface ApiContractUpdateProperties has a new optional parameter mcpProperties + - Interface ApiCreateOrUpdateParameter has a new optional parameter mcpProperties + - Interface ApiCreateOrUpdateProperties has a new optional parameter mcpProperties + - Interface ApiEntityBaseContract has a new optional parameter mcpProperties + - Interface ApiGatewayConfigConnectionListByGatewayOptionalParams has a new optional parameter skipToken + - Interface ApiGatewayConfigConnectionListByGatewayOptionalParams has a new optional parameter top + - Interface ApiGatewayListByResourceGroupOptionalParams has a new optional parameter skipToken + - Interface ApiGatewayListByResourceGroupOptionalParams has a new optional parameter top + - Interface ApiGatewayListOptionalParams has a new optional parameter skipToken + - Interface ApiGatewayListOptionalParams has a new optional parameter top + - Interface ApiManagementGatewayConfigConnectionResource has a new optional parameter systemData + - Interface ApiManagementServiceBaseProperties has a new optional parameter releaseChannel + - Interface ApiManagementServiceBaseProperties has a new optional parameter zoneRedundant + - Interface ApiManagementServiceListByResourceGroupOptionalParams has a new optional parameter skipToken + - Interface ApiManagementServiceListByResourceGroupOptionalParams has a new optional parameter top + - Interface ApiManagementServiceListOptionalParams has a new optional parameter skipToken + - Interface ApiManagementServiceListOptionalParams has a new optional parameter top + - Interface ApiManagementServiceProperties has a new optional parameter releaseChannel + - Interface ApiManagementServiceProperties has a new optional parameter zoneRedundant + - Interface ApiManagementServiceResource has a new optional parameter releaseChannel + - Interface ApiManagementServiceResource has a new optional parameter zoneRedundant + - Interface ApiManagementServiceUpdateParameters has a new optional parameter releaseChannel + - Interface ApiManagementServiceUpdateParameters has a new optional parameter zoneRedundant + - Interface ApiManagementServiceUpdateProperties has a new optional parameter releaseChannel + - Interface ApiManagementServiceUpdateProperties has a new optional parameter zoneRedundant + - Interface ApiManagementWorkspaceLinksListByServiceOptionalParams has a new optional parameter skipToken + - Interface ApiManagementWorkspaceLinksListByServiceOptionalParams has a new optional parameter top + - Interface ApiManagementWorkspaceLinksResource has a new optional parameter systemData + - Interface ApiReleaseContract has a new optional parameter systemData + - Interface ApiTagResourceContractProperties has a new optional parameter mcpProperties + - Interface ApiUpdateContract has a new optional parameter mcpProperties + - Interface ApiVersionSetContract has a new optional parameter systemData + - Interface AssociationContract has a new optional parameter systemData + - Interface AuthorizationAccessPolicyContract has a new optional parameter systemData + - Interface AuthorizationContract has a new optional parameter systemData + - Interface AuthorizationProviderContract has a new optional parameter systemData + - Interface AuthorizationProviderOAuth2GrantTypes has a new optional parameter authorizationCodeWithFederatedIdentityCredentials + - Interface AuthorizationProviderOAuth2Settings has a new optional parameter federatedIdentityCredentialsProperties + - Interface AuthorizationProviderOAuth2Settings has a new optional parameter keyVault + - Interface AuthorizationServerContract has a new optional parameter systemData + - Interface AuthorizationServerUpdateContract has a new optional parameter systemData + - Interface BackendBaseParameters has a new optional parameter azureRegion + - Interface BackendBaseParametersPool has a new optional parameter failureResponse + - Interface BackendBaseParametersPool has a new optional parameter sessionAffinity + - Interface BackendContract has a new optional parameter azureRegion + - Interface BackendContract has a new optional parameter systemData + - Interface BackendContractProperties has a new optional parameter azureRegion + - Interface BackendPool has a new optional parameter failureResponse + - Interface BackendPool has a new optional parameter sessionAffinity + - Interface BackendPoolItem has a new optional parameter preferredCarbonEmission + - Interface BackendReconnectContract has a new optional parameter systemData + - Interface BackendTlsProperties has a new optional parameter serverCertificateThumbprints + - Interface BackendTlsProperties has a new optional parameter serverX509Names + - Interface BackendUpdateParameterProperties has a new optional parameter azureRegion + - Interface BackendUpdateParameters has a new optional parameter azureRegion + - Interface CacheContract has a new optional parameter systemData + - Interface CertificateContract has a new optional parameter systemData + - Interface CircuitBreakerRule has a new optional parameter failureResponse + - Interface ContentItemContract has a new optional parameter systemData + - Interface ContentTypeContract has a new optional parameter systemData + - Interface DeletedServiceContract has a new optional parameter systemData + - Interface DiagnosticContract has a new optional parameter largeLanguageModel + - Interface DiagnosticContract has a new optional parameter systemData + - Interface DiagnosticUpdateContract has a new optional parameter systemData + - Interface DocumentationContract has a new optional parameter systemData + - Interface EmailTemplateContract has a new optional parameter systemData + - Interface GatewayCertificateAuthorityContract has a new optional parameter systemData + - Interface GatewayContract has a new optional parameter identity + - Interface GatewayContract has a new optional parameter systemData + - Interface GatewayHostnameConfigurationContract has a new optional parameter systemData + - Interface GlobalSchemaContract has a new optional parameter systemData + - Interface GroupContract has a new optional parameter systemData + - Interface IdentityProviderContract has a new optional parameter certificateId + - Interface IdentityProviderContract has a new optional parameter systemData + - Interface IdentityProviderContractProperties has a new optional parameter certificateId + - Interface IdentityProviderCreateContract has a new optional parameter certificateId + - Interface IdentityProviderCreateContract has a new optional parameter systemData + - Interface IdentityProviderCreateContractProperties has a new optional parameter certificateId + - Interface IdentityProviderUpdateParameters has a new optional parameter certificateId + - Interface IdentityProviderUpdateProperties has a new optional parameter certificateId + - Interface IssueAttachmentContract has a new optional parameter systemData + - Interface IssueCommentContract has a new optional parameter systemData + - Interface IssueContract has a new optional parameter systemData + - Interface LoggerContract has a new optional parameter systemData + - Interface NamedValueContract has a new optional parameter systemData + - Interface NamedValueCreateContract has a new optional parameter systemData + - Interface NotificationContract has a new optional parameter systemData + - Interface OpenidConnectProviderContract has a new optional parameter systemData + - Interface OperationContract has a new optional parameter systemData + - Interface OperationResultContract has a new optional parameter systemData + - Interface PolicyContract has a new optional parameter systemData + - Interface PolicyDescriptionContract has a new optional parameter systemData + - Interface PolicyFragmentContract has a new optional parameter systemData + - Interface PolicyRestrictionContract has a new optional parameter systemData + - Interface PortalConfigContract has a new optional parameter systemData + - Interface PortalDelegationSettings has a new optional parameter systemData + - Interface PortalRevisionContract has a new optional parameter systemData + - Interface PortalSettingsContract has a new optional parameter systemData + - Interface PortalSigninSettings has a new optional parameter systemData + - Interface PortalSignupSettings has a new optional parameter systemData + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Interface PrivateEndpointConnection has a new optional parameter systemData + - Interface PrivateLinkResource has a new optional parameter systemData + - Interface PrivateLinkResourceListResult has a new optional parameter nextLink + - Interface ProductApiLinkContract has a new optional parameter systemData + - Interface ProductContract has a new optional parameter application + - Interface ProductContract has a new optional parameter authenticationType + - Interface ProductContract has a new optional parameter systemData + - Interface ProductContractProperties has a new optional parameter application + - Interface ProductContractProperties has a new optional parameter authenticationType + - Interface ProductEntityBaseParameters has a new optional parameter application + - Interface ProductEntityBaseParameters has a new optional parameter authenticationType + - Interface ProductGroupLinkContract has a new optional parameter systemData + - Interface ProductTagResourceContractProperties has a new optional parameter application + - Interface ProductTagResourceContractProperties has a new optional parameter authenticationType + - Interface ProductUpdateParameters has a new optional parameter application + - Interface ProductUpdateParameters has a new optional parameter authenticationType + - Interface ProductUpdateProperties has a new optional parameter application + - Interface ProductUpdateProperties has a new optional parameter authenticationType + - Interface ProxyResource has a new optional parameter systemData + - Interface RecipientEmailContract has a new optional parameter systemData + - Interface RecipientUserContract has a new optional parameter systemData + - Interface ResolverContract has a new optional parameter systemData + - Interface Resource has a new optional parameter systemData + - Interface ResourceCollectionValueItem has a new optional parameter systemData + - Interface SchemaContract has a new optional parameter document + - Interface SchemaContract has a new optional parameter systemData + - Interface SubscriptionContract has a new optional parameter systemData + - Interface TagApiLinkContract has a new optional parameter systemData + - Interface TagContract has a new optional parameter systemData + - Interface TagDescriptionContract has a new optional parameter systemData + - Interface TagOperationLinkContract has a new optional parameter systemData + - Interface TagProductLinkContract has a new optional parameter systemData + - Interface TenantConfigurationSyncStateContract has a new optional parameter systemData + - Interface TenantSettingsContract has a new optional parameter systemData + - Interface UserContract has a new optional parameter systemData + - Interface WikiContract has a new optional parameter systemData + - Interface WorkspaceContract has a new optional parameter systemData + - Added Type Alias AzureSupportedClouds + - Added Type Alias BackendSessionIdSource + - Added Type Alias CarbonEmissionCategory + - Added Type Alias ClientApplicationState + - Added Type Alias KeyType + - Added Type Alias KeyVaultFetchCode + - Added Type Alias LlmDiagnosticSettings + - Added Type Alias LlmMessageLogTypes + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias McpTransportType + - Added Type Alias ProductAuthType + - Added Type Alias ReleaseChannel + - Added Enum AzureClouds + - Added Enum KnownBackendSessionIdSource + - Added Enum KnownCarbonEmissionCategory + - Added Enum KnownClientApplicationState + - Added Enum KnownLlmDiagnosticSettings + - Added Enum KnownLlmMessageLogTypes + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownMcpTransportType + - Added Enum KnownProductAuthType + - Added Enum KnownReleaseChannel + - Added Enum KnownVersions + - Enum KnownApiType has a new value Mcp + - Enum KnownSkuType has a new value PremiumV2 + - Enum KnownSoapApiType has a new value MCP + +### Breaking Changes + - Operation Api.beginDeleteAndWait has a new signature + - Operation Api.getEntityTag has a new signature + - Operation ApiDiagnostic.getEntityTag has a new signature + - Operation ApiGatewayConfigConnection.beginDeleteAndWait has a new signature + - Operation ApiIssue.getEntityTag has a new signature + - Operation ApiIssueAttachment.getEntityTag has a new signature + - Operation ApiIssueComment.getEntityTag has a new signature + - Operation ApiManagementService.beginDeleteAndWait has a new signature + - Operation ApiOperation.getEntityTag has a new signature + - Operation ApiOperationPolicy.getEntityTag has a new signature + - Operation ApiPolicy.getEntityTag has a new signature + - Operation ApiRelease.getEntityTag has a new signature + - Operation ApiSchema.getEntityTag has a new signature + - Operation ApiTagDescription.getEntityTag has a new signature + - Operation ApiVersionSet.getEntityTag has a new signature + - Operation ApiWiki.getEntityTag has a new signature + - Operation Authorization.confirmConsentCode has a new signature + - Operation AuthorizationServer.getEntityTag has a new signature + - Operation Backend.getEntityTag has a new signature + - Operation Certificate.getEntityTag has a new signature + - Operation ContentItem.getEntityTag has a new signature + - Operation DelegationSettings.getEntityTag has a new signature + - Operation DeletedServices.beginPurgeAndWait has a new signature + - Operation Diagnostic.getEntityTag has a new signature + - Operation Documentation.getEntityTag has a new signature + - Operation EmailTemplate.getEntityTag has a new signature + - Operation Gateway.getEntityTag has a new signature + - Operation GatewayApi.getEntityTag has a new signature + - Operation GatewayCertificateAuthority.getEntityTag has a new signature + - Operation GatewayHostnameConfiguration.getEntityTag has a new signature + - Operation GlobalSchema.getEntityTag has a new signature + - Operation GraphQLApiResolver.getEntityTag has a new signature + - Operation GraphQLApiResolverPolicy.getEntityTag has a new signature + - Operation Group.getEntityTag has a new signature + - Operation GroupUser.checkEntityExists has a new signature + - Operation IdentityProvider.getEntityTag has a new signature + - Operation Logger.getEntityTag has a new signature + - Operation NamedValue.getEntityTag has a new signature + - Operation NotificationRecipientEmail.checkEntityExists has a new signature + - Operation NotificationRecipientUser.checkEntityExists has a new signature + - Operation OpenIdConnectProvider.getEntityTag has a new signature + - Operation OperationsResults.get has a new signature + - Operation Policy.getEntityTag has a new signature + - Operation PolicyFragment.getEntityTag has a new signature + - Operation PolicyRestriction.getEntityTag has a new signature + - Operation PortalConfig.getEntityTag has a new signature + - Operation PortalRevision.getEntityTag has a new signature + - Operation Product.getEntityTag has a new signature + - Operation ProductApi.checkEntityExists has a new signature + - Operation ProductGroup.checkEntityExists has a new signature + - Operation ProductPolicy.getEntityTag has a new signature + - Operation ProductWiki.getEntityTag has a new signature + - Operation SignInSettings.getEntityTag has a new signature + - Operation SignUpSettings.getEntityTag has a new signature + - Operation Subscription.getEntityTag has a new signature + - Operation Tag.getEntityState has a new signature + - Operation Tag.getEntityStateByApi has a new signature + - Operation Tag.getEntityStateByOperation has a new signature + - Operation Tag.getEntityStateByProduct has a new signature + - Operation TenantAccess.getEntityTag has a new signature + - Operation User.beginDeleteAndWait has a new signature + - Operation User.getEntityTag has a new signature + - Operation Workspace.getEntityTag has a new signature + - Operation WorkspaceApi.getEntityTag has a new signature + - Operation WorkspaceApiDiagnostic.getEntityTag has a new signature + - Operation WorkspaceApiOperation.getEntityTag has a new signature + - Operation WorkspaceApiOperationPolicy.getEntityTag has a new signature + - Operation WorkspaceApiPolicy.getEntityTag has a new signature + - Operation WorkspaceApiRelease.getEntityTag has a new signature + - Operation WorkspaceApiSchema.getEntityTag has a new signature + - Operation WorkspaceApiVersionSet.getEntityTag has a new signature + - Operation WorkspaceBackend.getEntityTag has a new signature + - Operation WorkspaceCertificate.getEntityTag has a new signature + - Operation WorkspaceDiagnostic.getEntityTag has a new signature + - Operation WorkspaceGlobalSchema.getEntityTag has a new signature + - Operation WorkspaceGroup.getEntityTag has a new signature + - Operation WorkspaceGroupUser.checkEntityExists has a new signature + - Operation WorkspaceLogger.getEntityTag has a new signature + - Operation WorkspaceNamedValue.getEntityTag has a new signature + - Operation WorkspaceNotificationRecipientEmail.checkEntityExists has a new signature + - Operation WorkspaceNotificationRecipientUser.checkEntityExists has a new signature + - Operation WorkspacePolicy.getEntityTag has a new signature + - Operation WorkspacePolicyFragment.getEntityTag has a new signature + - Operation WorkspaceProduct.getEntityTag has a new signature + - Operation WorkspaceProductPolicy.getEntityTag has a new signature + - Operation WorkspaceSubscription.getEntityTag has a new signature + - Operation WorkspaceTag.getEntityState has a new signature + - Removed Interface AccessInformationCollection + - Removed Interface AllPoliciesCollection + - Removed Interface ApiCollection + - Removed Interface ApiReleaseCollection + - Removed Interface ApiRevisionCollection + - Removed Interface ApiRevisionInfoContract + - Removed Interface ApiVersionSetCollection + - Removed Interface AuthorizationAccessPolicyCollection + - Removed Interface AuthorizationCollection + - Removed Interface AuthorizationProviderCollection + - Removed Interface AuthorizationServerCollection + - Removed Interface BackendCollection + - Removed Interface Cache_2 + - Removed Interface CacheCollection + - Removed Interface CertificateCollection + - Removed Interface ContentItemCollection + - Removed Interface ContentTypeCollection + - Removed Interface DeletedServicesCollection + - Removed Interface DiagnosticCollection + - Removed Interface DocumentationCollection + - Removed Interface EmailTemplateCollection + - Removed Interface GatewayCertificateAuthorityCollection + - Removed Interface GatewayCollection + - Removed Interface GatewayHostnameConfigurationCollection + - Removed Interface GatewayResourceSkuResults + - Removed Interface GlobalSchemaCollection + - Removed Interface GroupCollection + - Removed Interface IdentityProviderList + - Removed Interface IssueAttachmentCollection + - Removed Interface IssueCollection + - Removed Interface IssueCommentCollection + - Removed Interface LoggerCollection + - Removed Interface NamedValueCollection + - Removed Interface Notification_2 + - Removed Interface NotificationCollection + - Removed Interface OpenIdConnectProviderCollection + - Removed Interface OperationCollection + - Removed Interface PerformConnectivityCheckAsyncOptionalParams + - Removed Interface PolicyFragmentCollection + - Removed Interface PolicyRestrictionCollection + - Removed Interface PolicyWithComplianceCollection + - Removed Interface PolicyWithComplianceContract + - Removed Interface PortalConfigCollection + - Removed Interface PortalRevisionCollection + - Removed Interface ProductApiLinkCollection + - Removed Interface ProductCollection + - Removed Interface ProductGroupLinkCollection + - Removed Interface QuotaCounterValueContract + - Removed Interface ReportCollection + - Removed Interface RequestReportCollection + - Removed Interface ResolverCollection + - Removed Interface ResolverResultContract + - Removed Interface ResolverResultLogItemContract + - Removed Interface ResourceSkuResults + - Removed Interface SchemaCollection + - Removed Interface SubscriptionCollection + - Removed Interface TagApiLinkCollection + - Removed Interface TagCollection + - Removed Interface TagDescriptionCollection + - Removed Interface TagOperationLinkCollection + - Removed Interface TagProductLinkCollection + - Removed Interface TagResourceCollection + - Removed Interface TagResourceContractProperties + - Removed Interface TenantSettingsCollection + - Removed Interface UserCollection + - Removed Interface UserIdentityCollection + - Removed Interface WikiCollection + - Removed Interface WorkspaceCollection + - Interface SchemaContract no longer has parameter components + - Interface SchemaContract no longer has parameter definitions + - Interface SchemaContract no longer has parameter value + - Parameter value of interface PrivateLinkResourceListResult is now required + - Parameter protocol of interface BackendContractProperties is now optional + - Parameter url of interface BackendContractProperties is now optional + - Removed Type Alias ApiVersionSetContractDetailsVersioningScheme + - Removed Type Alias AsyncResolverStatus + - Removed Type Alias KeyType_2 + - Removed Enum KnownApiVersionSetContractDetailsVersioningScheme + ## 10.0.0 (2025-04-17) diff --git a/sdk/apimanagement/arm-apimanagement/README.md b/sdk/apimanagement/arm-apimanagement/README.md index 07467e7962a8..9c6ec5037499 100644 --- a/sdk/apimanagement/arm-apimanagement/README.md +++ b/sdk/apimanagement/arm-apimanagement/README.md @@ -2,12 +2,14 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ApiManagement client. -ApiManagement Client +Resource provider operation status. -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-apimanagement) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement) +- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-apimanagement) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/samples) ## Getting started @@ -35,7 +37,7 @@ npm install @azure/arm-apimanagement To create a client object to access the Azure ApiManagement API, you will need the `endpoint` of your Azure ApiManagement resource and a `credential`. The Azure ApiManagement client can use Azure Active Directory credentials to authenticate. You can find the endpoint for your Azure ApiManagement resource in the [Azure Portal][azure_portal]. -You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: @@ -63,14 +65,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { ApiManagementClient } from "@azure/arm-apimanagement"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); ``` + ### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). @@ -96,7 +99,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/samples) directory for detailed examples on how to use this library. ## Contributing @@ -106,9 +109,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity diff --git a/sdk/apimanagement/arm-apimanagement/_meta.json b/sdk/apimanagement/arm-apimanagement/_meta.json deleted file mode 100644 index f6b75b21cf70..000000000000 --- a/sdk/apimanagement/arm-apimanagement/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "1d25c9efa2a42db235280cd4e44eab1f9897597f", - "readme": "specification/apimanagement/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\apimanagement\\resource-manager\\readme.md --use=@autorest/typescript@6.0.38 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.26", - "use": "@autorest/typescript@6.0.38" -} \ No newline at end of file diff --git a/sdk/apimanagement/arm-apimanagement/api-extractor.json b/sdk/apimanagement/arm-apimanagement/api-extractor.json index 16d81e2eb512..870d6d399477 100644 --- a/sdk/apimanagement/arm-apimanagement/api-extractor.json +++ b/sdk/apimanagement/arm-apimanagement/api-extractor.json @@ -1,3 +1 @@ -{ - "extends": "../../../api-extractor-base.json" -} +{ "extends": "../../../api-extractor-base.json" } diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json deleted file mode 100644 index 8431a95cbcb1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../../../tsconfig.json", - "include": [ - "../src", - "../test" - ] -} diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.samples.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.samples.json index 57cd018cf37b..d8f6f692f2e2 100644 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.samples.json +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../../eng/tsconfigs/samples.json", "compilerOptions": { "paths": { - "@azure/arm-apimanagement": [ - "../dist/esm" - ] + "@azure/arm-apimanagement": ["../dist/esm"] } } } diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.browser.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.browser.json index 2e75154106a2..429817e79b26 100644 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.browser.json +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.browser.json @@ -1,6 +1,4 @@ { "extends": "../../../../eng/tsconfigs/src.browser.json", - "include": [ - "../src/index.ts" - ] + "include": ["../src/index.ts"] } diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.cjs.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.cjs.json index 018cc5885d5b..b000a4a9909e 100644 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.cjs.json +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.cjs.json @@ -1,6 +1,4 @@ { "extends": "../../../../eng/tsconfigs/src.cjs.json", - "include": [ - "../src/index.ts" - ] + "include": ["../src/index.ts"] } diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.esm.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.esm.json index bc91d3d2b231..b393943938eb 100644 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.esm.json +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.src.esm.json @@ -1,6 +1,4 @@ { "extends": "../../../../eng/tsconfigs/src.esm.json", - "include": [ - "../src/index.ts" - ] + "include": ["../src/index.ts"] } diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.browser.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.browser.json new file mode 100644 index 000000000000..d92f0bf3fe98 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.browser.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../eng/tsconfigs/test.browser.json", + "compilerOptions": { + "paths": { + "@azure/arm-apimanagement": ["../src/index.ts"], + "@azure/arm-apimanagement/*": ["../src/*"], + "$internal/*": ["../src/*"] + } + } +} diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.node.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.node.json index d123d08c39d5..c8e433a8e7e2 100644 --- a/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.node.json +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.test.node.json @@ -1,3 +1,10 @@ { - "extends": "../../../../eng/tsconfigs/test.node.json" + "extends": "../../../../eng/tsconfigs/test.node.json", + "compilerOptions": { + "paths": { + "@azure/arm-apimanagement": ["../src/index.ts"], + "@azure/arm-apimanagement/*": ["../src/*"], + "$internal/*": ["../src/*"] + } + } } diff --git a/sdk/apimanagement/arm-apimanagement/eslint.config.mjs b/sdk/apimanagement/arm-apimanagement/eslint.config.mjs index 06fec08fcab3..6d2f8a5914c3 100644 --- a/sdk/apimanagement/arm-apimanagement/eslint.config.mjs +++ b/sdk/apimanagement/arm-apimanagement/eslint.config.mjs @@ -1,25 +1,14 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.config([ - { - rules: { - "@azure/azure-sdk/ts-modules-only-named": "warn", - "@azure/azure-sdk/ts-package-json-types": "warn", - "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", - "@azure/azure-sdk/ts-package-json-files-required": "off", - "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", - "tsdoc/syntax": "warn" - } - } - ]), +export default azsdkEslint.config([ { - files: ["src/**/*.ts", "src/**/*.mts", "test/**/*.ts"], - languageOptions: { - parserOptions: { - projectService: false, - project: "./config/tsconfig.lint.json", - }, + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", }, }, -]; +]); diff --git a/sdk/apimanagement/arm-apimanagement/metadata.json b/sdk/apimanagement/arm-apimanagement/metadata.json new file mode 100644 index 000000000000..8c706557c62f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/metadata.json @@ -0,0 +1,1236 @@ +{ + "apiVersions": { + "Microsoft.ApiManagement": "2025-09-01-preview" + }, + "emitterVersion": "0.53.3", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.ApiManagement", + "CrossLanguageDefinitionId": { + "@azure/arm-apimanagement!ApiContract:interface": "Microsoft.ApiManagement.ApiContract", + "@azure/arm-apimanagement!ApiContractProperties:interface": "Microsoft.ApiManagement.ApiContractProperties", + "@azure/arm-apimanagement!ApiVersionSetContractDetails:interface": "Microsoft.ApiManagement.ApiVersionSetContractDetails", + "@azure/arm-apimanagement!ApiEntityBaseContract:interface": "Microsoft.ApiManagement.ApiEntityBaseContract", + "@azure/arm-apimanagement!AuthenticationSettingsContract:interface": "Microsoft.ApiManagement.AuthenticationSettingsContract", + "@azure/arm-apimanagement!OAuth2AuthenticationSettingsContract:interface": "Microsoft.ApiManagement.OAuth2AuthenticationSettingsContract", + "@azure/arm-apimanagement!OpenIdAuthenticationSettingsContract:interface": "Microsoft.ApiManagement.OpenIdAuthenticationSettingsContract", + "@azure/arm-apimanagement!SubscriptionKeyParameterNamesContract:interface": "Microsoft.ApiManagement.SubscriptionKeyParameterNamesContract", + "@azure/arm-apimanagement!ApiContactInformation:interface": "Microsoft.ApiManagement.ApiContactInformation", + "@azure/arm-apimanagement!ApiLicenseInformation:interface": "Microsoft.ApiManagement.ApiLicenseInformation", + "@azure/arm-apimanagement!McpProperties:interface": "Microsoft.ApiManagement.McpProperties", + "@azure/arm-apimanagement!McpEndpoint:interface": "Microsoft.ApiManagement.McpEndpoint", + "@azure/arm-apimanagement!ProxyResource:interface": "Azure.ResourceManager.CommonTypes.ProxyResource", + "@azure/arm-apimanagement!Resource:interface": "Azure.ResourceManager.CommonTypes.Resource", + "@azure/arm-apimanagement!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-apimanagement!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "@azure/arm-apimanagement!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-apimanagement!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-apimanagement!ApiCreateOrUpdateParameter:interface": "Microsoft.ApiManagement.ApiCreateOrUpdateParameter", + "@azure/arm-apimanagement!ApiCreateOrUpdateProperties:interface": "Microsoft.ApiManagement.ApiCreateOrUpdateProperties", + "@azure/arm-apimanagement!ApiCreateOrUpdatePropertiesWsdlSelector:interface": "Microsoft.ApiManagement.ApiCreateOrUpdatePropertiesWsdlSelector", + "@azure/arm-apimanagement!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-apimanagement!ApiUpdateContract:interface": "Microsoft.ApiManagement.ApiUpdateContract", + "@azure/arm-apimanagement!ApiContractUpdateProperties:interface": "Microsoft.ApiManagement.ApiContractUpdateProperties", + "@azure/arm-apimanagement!ApiCollection:interface": "Microsoft.ApiManagement.ApiCollection", + "@azure/arm-apimanagement!ConnectivityCheckRequest:interface": "Microsoft.ApiManagement.ConnectivityCheckRequest", + "@azure/arm-apimanagement!ConnectivityCheckRequestSource:interface": "Microsoft.ApiManagement.ConnectivityCheckRequestSource", + "@azure/arm-apimanagement!ConnectivityCheckRequestDestination:interface": "Microsoft.ApiManagement.ConnectivityCheckRequestDestination", + "@azure/arm-apimanagement!ConnectivityCheckRequestProtocolConfiguration:interface": "Microsoft.ApiManagement.ConnectivityCheckRequestProtocolConfiguration", + "@azure/arm-apimanagement!ConnectivityCheckRequestProtocolConfigurationHttpConfiguration:interface": "Microsoft.ApiManagement.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", + "@azure/arm-apimanagement!HTTPHeader:interface": "Microsoft.ApiManagement.HttpHeader", + "@azure/arm-apimanagement!ConnectivityCheckResponse:interface": "Microsoft.ApiManagement.ConnectivityCheckResponse", + "@azure/arm-apimanagement!ConnectivityHop:interface": "Microsoft.ApiManagement.ConnectivityHop", + "@azure/arm-apimanagement!ConnectivityIssue:interface": "Microsoft.ApiManagement.ConnectivityIssue", + "@azure/arm-apimanagement!ApiReleaseContract:interface": "Microsoft.ApiManagement.ApiReleaseContract", + "@azure/arm-apimanagement!ApiReleaseContractProperties:interface": "Microsoft.ApiManagement.ApiReleaseContractProperties", + "@azure/arm-apimanagement!ApiReleaseCollection:interface": "Microsoft.ApiManagement.ApiReleaseCollection", + "@azure/arm-apimanagement!OperationContract:interface": "Microsoft.ApiManagement.OperationContract", + "@azure/arm-apimanagement!OperationContractProperties:interface": "Microsoft.ApiManagement.OperationContractProperties", + "@azure/arm-apimanagement!OperationEntityBaseContract:interface": "Microsoft.ApiManagement.OperationEntityBaseContract", + "@azure/arm-apimanagement!ParameterContract:interface": "Microsoft.ApiManagement.ParameterContract", + "@azure/arm-apimanagement!ParameterExampleContract:interface": "Microsoft.ApiManagement.ParameterExampleContract", + "@azure/arm-apimanagement!RequestContract:interface": "Microsoft.ApiManagement.RequestContract", + "@azure/arm-apimanagement!RepresentationContract:interface": "Microsoft.ApiManagement.RepresentationContract", + "@azure/arm-apimanagement!ResponseContract:interface": "Microsoft.ApiManagement.ResponseContract", + "@azure/arm-apimanagement!OperationUpdateContract:interface": "Microsoft.ApiManagement.OperationUpdateContract", + "@azure/arm-apimanagement!OperationUpdateContractProperties:interface": "Microsoft.ApiManagement.OperationUpdateContractProperties", + "@azure/arm-apimanagement!OperationCollection:interface": "Microsoft.ApiManagement.OperationCollection", + "@azure/arm-apimanagement!PolicyContract:interface": "Microsoft.ApiManagement.PolicyContract", + "@azure/arm-apimanagement!PolicyContractProperties:interface": "Microsoft.ApiManagement.PolicyContractProperties", + "@azure/arm-apimanagement!PolicyCollection:interface": "Microsoft.ApiManagement.PolicyCollection", + "@azure/arm-apimanagement!TagContract:interface": "Microsoft.ApiManagement.TagContract", + "@azure/arm-apimanagement!TagContractProperties:interface": "Microsoft.ApiManagement.TagContractProperties", + "@azure/arm-apimanagement!TagCollection:interface": "Microsoft.ApiManagement.TagCollection", + "@azure/arm-apimanagement!TagCreateUpdateParameters:interface": "Microsoft.ApiManagement.TagCreateUpdateParameters", + "@azure/arm-apimanagement!SchemaContract:interface": "Microsoft.ApiManagement.SchemaContract", + "@azure/arm-apimanagement!SchemaContractProperties:interface": "Microsoft.ApiManagement.SchemaContractProperties", + "@azure/arm-apimanagement!SchemaDocumentProperties:interface": "Microsoft.ApiManagement.SchemaDocumentProperties", + "@azure/arm-apimanagement!SchemaCollection:interface": "Microsoft.ApiManagement.SchemaCollection", + "@azure/arm-apimanagement!DiagnosticContract:interface": "Microsoft.ApiManagement.DiagnosticContract", + "@azure/arm-apimanagement!DiagnosticContractProperties:interface": "Microsoft.ApiManagement.DiagnosticContractProperties", + "@azure/arm-apimanagement!SamplingSettings:interface": "Microsoft.ApiManagement.SamplingSettings", + "@azure/arm-apimanagement!PipelineDiagnosticSettings:interface": "Microsoft.ApiManagement.PipelineDiagnosticSettings", + "@azure/arm-apimanagement!HttpMessageDiagnostic:interface": "Microsoft.ApiManagement.HttpMessageDiagnostic", + "@azure/arm-apimanagement!BodyDiagnosticSettings:interface": "Microsoft.ApiManagement.BodyDiagnosticSettings", + "@azure/arm-apimanagement!DataMasking:interface": "Microsoft.ApiManagement.DataMasking", + "@azure/arm-apimanagement!DataMaskingEntity:interface": "Microsoft.ApiManagement.DataMaskingEntity", + "@azure/arm-apimanagement!LLMDiagnosticSettings:interface": "Microsoft.ApiManagement.LLMDiagnosticSettings", + "@azure/arm-apimanagement!LLMMessageDiagnosticSettings:interface": "Microsoft.ApiManagement.LLMMessageDiagnosticSettings", + "@azure/arm-apimanagement!DiagnosticCollection:interface": "Microsoft.ApiManagement.DiagnosticCollection", + "@azure/arm-apimanagement!DiagnosticUpdateContract:interface": "Microsoft.ApiManagement.DiagnosticUpdateContract", + "@azure/arm-apimanagement!DiagnosticContractUpdateProperties:interface": "Microsoft.ApiManagement.DiagnosticContractUpdateProperties", + "@azure/arm-apimanagement!IssueContract:interface": "Microsoft.ApiManagement.IssueContract", + "@azure/arm-apimanagement!IssueContractProperties:interface": "Microsoft.ApiManagement.IssueContractProperties", + "@azure/arm-apimanagement!IssueContractBaseProperties:interface": "Microsoft.ApiManagement.IssueContractBaseProperties", + "@azure/arm-apimanagement!IssueCollection:interface": "Microsoft.ApiManagement.IssueCollection", + "@azure/arm-apimanagement!WikiContract:interface": "Microsoft.ApiManagement.WikiContract", + "@azure/arm-apimanagement!WikiContractProperties:interface": "Microsoft.ApiManagement.WikiContractProperties", + "@azure/arm-apimanagement!WikiDocumentationContract:interface": "Microsoft.ApiManagement.WikiDocumentationContract", + "@azure/arm-apimanagement!WikiUpdateContract:interface": "Microsoft.ApiManagement.WikiUpdateContract", + "@azure/arm-apimanagement!ApiVersionSetContract:interface": "Microsoft.ApiManagement.ApiVersionSetContract", + "@azure/arm-apimanagement!ApiVersionSetContractProperties:interface": "Microsoft.ApiManagement.ApiVersionSetContractProperties", + "@azure/arm-apimanagement!ApiVersionSetEntityBase:interface": "Microsoft.ApiManagement.ApiVersionSetEntityBase", + "@azure/arm-apimanagement!ApiVersionSetUpdateParameters:interface": "Microsoft.ApiManagement.ApiVersionSetUpdateParameters", + "@azure/arm-apimanagement!ApiVersionSetUpdateParametersProperties:interface": "Microsoft.ApiManagement.ApiVersionSetUpdateParametersProperties", + "@azure/arm-apimanagement!ApiVersionSetCollection:interface": "Microsoft.ApiManagement.ApiVersionSetCollection", + "@azure/arm-apimanagement!BackendContract:interface": "Microsoft.ApiManagement.BackendContract", + "@azure/arm-apimanagement!BackendContractProperties:interface": "Microsoft.ApiManagement.BackendContractProperties", + "@azure/arm-apimanagement!BackendBaseParameters:interface": "Microsoft.ApiManagement.BackendBaseParameters", + "@azure/arm-apimanagement!BackendProperties:interface": "Microsoft.ApiManagement.BackendProperties", + "@azure/arm-apimanagement!BackendServiceFabricClusterProperties:interface": "Microsoft.ApiManagement.BackendServiceFabricClusterProperties", + "@azure/arm-apimanagement!X509CertificateName:interface": "Microsoft.ApiManagement.X509CertificateName", + "@azure/arm-apimanagement!BackendCredentialsContract:interface": "Microsoft.ApiManagement.BackendCredentialsContract", + "@azure/arm-apimanagement!BackendAuthorizationHeaderCredentials:interface": "Microsoft.ApiManagement.BackendAuthorizationHeaderCredentials", + "@azure/arm-apimanagement!BackendProxyContract:interface": "Microsoft.ApiManagement.BackendProxyContract", + "@azure/arm-apimanagement!BackendTlsProperties:interface": "Microsoft.ApiManagement.BackendTlsProperties", + "@azure/arm-apimanagement!BackendCircuitBreaker:interface": "Microsoft.ApiManagement.BackendCircuitBreaker", + "@azure/arm-apimanagement!CircuitBreakerRule:interface": "Microsoft.ApiManagement.CircuitBreakerRule", + "@azure/arm-apimanagement!CircuitBreakerFailureCondition:interface": "Microsoft.ApiManagement.CircuitBreakerFailureCondition", + "@azure/arm-apimanagement!FailureStatusCodeRange:interface": "Microsoft.ApiManagement.FailureStatusCodeRange", + "@azure/arm-apimanagement!BackendFailureResponse:interface": "Microsoft.ApiManagement.BackendFailureResponse", + "@azure/arm-apimanagement!BackendBaseParametersPool:interface": "Microsoft.ApiManagement.BackendBaseParametersPool", + "@azure/arm-apimanagement!BackendPool:interface": "Microsoft.ApiManagement.BackendPool", + "@azure/arm-apimanagement!BackendPoolItem:interface": "Microsoft.ApiManagement.BackendPoolItem", + "@azure/arm-apimanagement!BackendSessionAffinity:interface": "Microsoft.ApiManagement.BackendSessionAffinity", + "@azure/arm-apimanagement!BackendSessionId:interface": "Microsoft.ApiManagement.BackendSessionId", + "@azure/arm-apimanagement!BackendUpdateParameters:interface": "Microsoft.ApiManagement.BackendUpdateParameters", + "@azure/arm-apimanagement!BackendUpdateParameterProperties:interface": "Microsoft.ApiManagement.BackendUpdateParameterProperties", + "@azure/arm-apimanagement!BackendCollection:interface": "Microsoft.ApiManagement.BackendCollection", + "@azure/arm-apimanagement!CertificateContract:interface": "Microsoft.ApiManagement.CertificateContract", + "@azure/arm-apimanagement!CertificateContractProperties:interface": "Microsoft.ApiManagement.CertificateContractProperties", + "@azure/arm-apimanagement!KeyVaultContractProperties:interface": "Microsoft.ApiManagement.KeyVaultContractProperties", + "@azure/arm-apimanagement!KeyVaultLastAccessStatusContractProperties:interface": "Microsoft.ApiManagement.KeyVaultLastAccessStatusContractProperties", + "@azure/arm-apimanagement!KeyVaultContractCreateProperties:interface": "Microsoft.ApiManagement.KeyVaultContractCreateProperties", + "@azure/arm-apimanagement!CertificateCreateOrUpdateParameters:interface": "Microsoft.ApiManagement.CertificateCreateOrUpdateParameters", + "@azure/arm-apimanagement!CertificateCreateOrUpdateProperties:interface": "Microsoft.ApiManagement.CertificateCreateOrUpdateProperties", + "@azure/arm-apimanagement!CertificateCollection:interface": "Microsoft.ApiManagement.CertificateCollection", + "@azure/arm-apimanagement!GroupContract:interface": "Microsoft.ApiManagement.GroupContract", + "@azure/arm-apimanagement!GroupContractProperties:interface": "Microsoft.ApiManagement.GroupContractProperties", + "@azure/arm-apimanagement!GroupCreateParameters:interface": "Microsoft.ApiManagement.GroupCreateParameters", + "@azure/arm-apimanagement!GroupCreateParametersProperties:interface": "Microsoft.ApiManagement.GroupCreateParametersProperties", + "@azure/arm-apimanagement!GroupUpdateParameters:interface": "Microsoft.ApiManagement.GroupUpdateParameters", + "@azure/arm-apimanagement!GroupUpdateParametersProperties:interface": "Microsoft.ApiManagement.GroupUpdateParametersProperties", + "@azure/arm-apimanagement!GroupCollection:interface": "Microsoft.ApiManagement.GroupCollection", + "@azure/arm-apimanagement!LoggerContract:interface": "Microsoft.ApiManagement.LoggerContract", + "@azure/arm-apimanagement!LoggerContractProperties:interface": "Microsoft.ApiManagement.LoggerContractProperties", + "@azure/arm-apimanagement!LoggerUpdateContract:interface": "Microsoft.ApiManagement.LoggerUpdateContract", + "@azure/arm-apimanagement!LoggerUpdateParameters:interface": "Microsoft.ApiManagement.LoggerUpdateParameters", + "@azure/arm-apimanagement!LoggerCollection:interface": "Microsoft.ApiManagement.LoggerCollection", + "@azure/arm-apimanagement!NamedValueContract:interface": "Microsoft.ApiManagement.NamedValueContract", + "@azure/arm-apimanagement!NamedValueContractProperties:interface": "Microsoft.ApiManagement.NamedValueContractProperties", + "@azure/arm-apimanagement!NamedValueEntityBaseParameters:interface": "Microsoft.ApiManagement.NamedValueEntityBaseParameters", + "@azure/arm-apimanagement!NamedValueCreateContract:interface": "Microsoft.ApiManagement.NamedValueCreateContract", + "@azure/arm-apimanagement!NamedValueCreateContractProperties:interface": "Microsoft.ApiManagement.NamedValueCreateContractProperties", + "@azure/arm-apimanagement!NamedValueUpdateParameters:interface": "Microsoft.ApiManagement.NamedValueUpdateParameters", + "@azure/arm-apimanagement!NamedValueUpdateParameterProperties:interface": "Microsoft.ApiManagement.NamedValueUpdateParameterProperties", + "@azure/arm-apimanagement!NamedValueCollection:interface": "Microsoft.ApiManagement.NamedValueCollection", + "@azure/arm-apimanagement!NamedValueSecretContract:interface": "Microsoft.ApiManagement.NamedValueSecretContract", + "@azure/arm-apimanagement!NotificationContract:interface": "Microsoft.ApiManagement.NotificationContract", + "@azure/arm-apimanagement!NotificationContractProperties:interface": "Microsoft.ApiManagement.NotificationContractProperties", + "@azure/arm-apimanagement!RecipientsContractProperties:interface": "Microsoft.ApiManagement.RecipientsContractProperties", + "@azure/arm-apimanagement!NotificationCollection:interface": "Microsoft.ApiManagement.NotificationCollection", + "@azure/arm-apimanagement!PolicyFragmentContract:interface": "Microsoft.ApiManagement.PolicyFragmentContract", + "@azure/arm-apimanagement!PolicyFragmentContractProperties:interface": "Microsoft.ApiManagement.PolicyFragmentContractProperties", + "@azure/arm-apimanagement!PolicyFragmentCollection:interface": "Microsoft.ApiManagement.PolicyFragmentCollection", + "@azure/arm-apimanagement!ResourceCollection:interface": "Microsoft.ApiManagement.ResourceCollection", + "@azure/arm-apimanagement!ResourceCollectionValueItem:interface": "Microsoft.ApiManagement.ResourceCollectionValueItem", + "@azure/arm-apimanagement!PortalSigninSettings:interface": "Microsoft.ApiManagement.PortalSigninSettings", + "@azure/arm-apimanagement!PortalSigninSettingProperties:interface": "Microsoft.ApiManagement.PortalSigninSettingProperties", + "@azure/arm-apimanagement!PortalSignupSettings:interface": "Microsoft.ApiManagement.PortalSignupSettings", + "@azure/arm-apimanagement!PortalSignupSettingsProperties:interface": "Microsoft.ApiManagement.PortalSignupSettingsProperties", + "@azure/arm-apimanagement!TermsOfServiceProperties:interface": "Microsoft.ApiManagement.TermsOfServiceProperties", + "@azure/arm-apimanagement!PortalDelegationSettings:interface": "Microsoft.ApiManagement.PortalDelegationSettings", + "@azure/arm-apimanagement!PortalDelegationSettingsProperties:interface": "Microsoft.ApiManagement.PortalDelegationSettingsProperties", + "@azure/arm-apimanagement!SubscriptionsDelegationSettingsProperties:interface": "Microsoft.ApiManagement.SubscriptionsDelegationSettingsProperties", + "@azure/arm-apimanagement!RegistrationDelegationSettingsProperties:interface": "Microsoft.ApiManagement.RegistrationDelegationSettingsProperties", + "@azure/arm-apimanagement!PortalSettingValidationKeyContract:interface": "Microsoft.ApiManagement.PortalSettingValidationKeyContract", + "@azure/arm-apimanagement!ProductContract:interface": "Microsoft.ApiManagement.ProductContract", + "@azure/arm-apimanagement!ProductContractProperties:interface": "Microsoft.ApiManagement.ProductContractProperties", + "@azure/arm-apimanagement!ProductEntityBaseParameters:interface": "Microsoft.ApiManagement.ProductEntityBaseParameters", + "@azure/arm-apimanagement!ProductEntityBaseParametersApplication:interface": "Microsoft.ApiManagement.ProductEntityBaseParametersApplication", + "@azure/arm-apimanagement!ProductApplicationContract:interface": "Microsoft.ApiManagement.ProductApplicationContract", + "@azure/arm-apimanagement!ProductApplicationContractEntra:interface": "Microsoft.ApiManagement.ProductApplicationContractEntra", + "@azure/arm-apimanagement!ProductUpdateParameters:interface": "Microsoft.ApiManagement.ProductUpdateParameters", + "@azure/arm-apimanagement!ProductUpdateProperties:interface": "Microsoft.ApiManagement.ProductUpdateProperties", + "@azure/arm-apimanagement!ProductCollection:interface": "Microsoft.ApiManagement.ProductCollection", + "@azure/arm-apimanagement!ProductApiLinkContract:interface": "Microsoft.ApiManagement.ProductApiLinkContract", + "@azure/arm-apimanagement!ProductApiLinkContractProperties:interface": "Microsoft.ApiManagement.ProductApiLinkContractProperties", + "@azure/arm-apimanagement!ProductApiLinkCollection:interface": "Microsoft.ApiManagement.ProductApiLinkCollection", + "@azure/arm-apimanagement!ProductGroupLinkContract:interface": "Microsoft.ApiManagement.ProductGroupLinkContract", + "@azure/arm-apimanagement!ProductGroupLinkContractProperties:interface": "Microsoft.ApiManagement.ProductGroupLinkContractProperties", + "@azure/arm-apimanagement!ProductGroupLinkCollection:interface": "Microsoft.ApiManagement.ProductGroupLinkCollection", + "@azure/arm-apimanagement!GlobalSchemaContract:interface": "Microsoft.ApiManagement.GlobalSchemaContract", + "@azure/arm-apimanagement!GlobalSchemaContractProperties:interface": "Microsoft.ApiManagement.GlobalSchemaContractProperties", + "@azure/arm-apimanagement!GlobalSchemaCollection:interface": "Microsoft.ApiManagement.GlobalSchemaCollection", + "@azure/arm-apimanagement!SubscriptionContract:interface": "Microsoft.ApiManagement.SubscriptionContract", + "@azure/arm-apimanagement!SubscriptionContractProperties:interface": "Microsoft.ApiManagement.SubscriptionContractProperties", + "@azure/arm-apimanagement!SubscriptionCollection:interface": "Microsoft.ApiManagement.SubscriptionCollection", + "@azure/arm-apimanagement!SubscriptionCreateParameters:interface": "Microsoft.ApiManagement.SubscriptionCreateParameters", + "@azure/arm-apimanagement!SubscriptionCreateParameterProperties:interface": "Microsoft.ApiManagement.SubscriptionCreateParameterProperties", + "@azure/arm-apimanagement!SubscriptionUpdateParameters:interface": "Microsoft.ApiManagement.SubscriptionUpdateParameters", + "@azure/arm-apimanagement!SubscriptionUpdateParameterProperties:interface": "Microsoft.ApiManagement.SubscriptionUpdateParameterProperties", + "@azure/arm-apimanagement!SubscriptionKeysContract:interface": "Microsoft.ApiManagement.SubscriptionKeysContract", + "@azure/arm-apimanagement!TagApiLinkContract:interface": "Microsoft.ApiManagement.TagApiLinkContract", + "@azure/arm-apimanagement!TagApiLinkContractProperties:interface": "Microsoft.ApiManagement.TagApiLinkContractProperties", + "@azure/arm-apimanagement!TagApiLinkCollection:interface": "Microsoft.ApiManagement.TagApiLinkCollection", + "@azure/arm-apimanagement!TagOperationLinkContract:interface": "Microsoft.ApiManagement.TagOperationLinkContract", + "@azure/arm-apimanagement!TagOperationLinkContractProperties:interface": "Microsoft.ApiManagement.TagOperationLinkContractProperties", + "@azure/arm-apimanagement!TagOperationLinkCollection:interface": "Microsoft.ApiManagement.TagOperationLinkCollection", + "@azure/arm-apimanagement!TagProductLinkContract:interface": "Microsoft.ApiManagement.TagProductLinkContract", + "@azure/arm-apimanagement!TagProductLinkContractProperties:interface": "Microsoft.ApiManagement.TagProductLinkContractProperties", + "@azure/arm-apimanagement!TagProductLinkCollection:interface": "Microsoft.ApiManagement.TagProductLinkCollection", + "@azure/arm-apimanagement!OperationListResult:interface": "Microsoft.ApiManagement.OperationListResult", + "@azure/arm-apimanagement!Operation:interface": "Microsoft.ApiManagement.Operation", + "@azure/arm-apimanagement!OperationDisplay:interface": "Microsoft.ApiManagement.OperationDisplay", + "@azure/arm-apimanagement!ApiManagementGatewayResource:interface": "Microsoft.ApiManagement.ApiManagementGatewayResource", + "@azure/arm-apimanagement!ApiManagementGatewayProperties:interface": "Microsoft.ApiManagement.ApiManagementGatewayProperties", + "@azure/arm-apimanagement!ApiManagementGatewayBaseProperties:interface": "Microsoft.ApiManagement.ApiManagementGatewayBaseProperties", + "@azure/arm-apimanagement!FrontendConfiguration:interface": "Microsoft.ApiManagement.FrontendConfiguration", + "@azure/arm-apimanagement!BackendConfiguration:interface": "Microsoft.ApiManagement.BackendConfiguration", + "@azure/arm-apimanagement!BackendSubnetConfiguration:interface": "Microsoft.ApiManagement.BackendSubnetConfiguration", + "@azure/arm-apimanagement!GatewayConfigurationApi:interface": "Microsoft.ApiManagement.GatewayConfigurationApi", + "@azure/arm-apimanagement!ApiManagementGatewaySkuProperties:interface": "Microsoft.ApiManagement.ApiManagementGatewaySkuProperties", + "@azure/arm-apimanagement!TrackedResource:interface": "Azure.ResourceManager.CommonTypes.TrackedResource", + "@azure/arm-apimanagement!ApiManagementGatewayUpdateParameters:interface": "Microsoft.ApiManagement.ApiManagementGatewayUpdateParameters", + "@azure/arm-apimanagement!ApiManagementGatewayUpdateProperties:interface": "Microsoft.ApiManagement.ApiManagementGatewayUpdateProperties", + "@azure/arm-apimanagement!ApiManagementGatewaySkuPropertiesForPatch:interface": "Microsoft.ApiManagement.ApiManagementGatewaySkuPropertiesForPatch", + "@azure/arm-apimanagement!ApimResource:interface": "Microsoft.ApiManagement.ApimResource", + "@azure/arm-apimanagement!ApiManagementGatewayListResult:interface": "Microsoft.ApiManagement.ApiManagementGatewayListResult", + "@azure/arm-apimanagement!GatewayResourceSkuResults:interface": "Microsoft.ApiManagement.GatewayResourceSkuResults", + "@azure/arm-apimanagement!GatewayResourceSkuResult:interface": "Microsoft.ApiManagement.GatewayResourceSkuResult", + "@azure/arm-apimanagement!GatewaySku:interface": "Microsoft.ApiManagement.GatewaySku", + "@azure/arm-apimanagement!GatewaySkuCapacity:interface": "Microsoft.ApiManagement.GatewaySkuCapacity", + "@azure/arm-apimanagement!TagResourceCollection:interface": "Microsoft.ApiManagement.TagResourceCollection", + "@azure/arm-apimanagement!TagResourceContract:interface": "Microsoft.ApiManagement.TagResourceContract", + "@azure/arm-apimanagement!TagTagResourceContractProperties:interface": "Microsoft.ApiManagement.TagTagResourceContractProperties", + "@azure/arm-apimanagement!ApiTagResourceContractProperties:interface": "Microsoft.ApiManagement.ApiTagResourceContractProperties", + "@azure/arm-apimanagement!OperationTagResourceContractProperties:interface": "Microsoft.ApiManagement.OperationTagResourceContractProperties", + "@azure/arm-apimanagement!ProductTagResourceContractProperties:interface": "Microsoft.ApiManagement.ProductTagResourceContractProperties", + "@azure/arm-apimanagement!ApiRevisionCollection:interface": "Microsoft.ApiManagement.ApiRevisionCollection", + "@azure/arm-apimanagement!ApiRevisionContract:interface": "Microsoft.ApiManagement.ApiRevisionContract", + "@azure/arm-apimanagement!ApiManagementServiceResource:interface": "Microsoft.ApiManagement.ApiManagementServiceResource", + "@azure/arm-apimanagement!ApiManagementServiceProperties:interface": "Microsoft.ApiManagement.ApiManagementServiceProperties", + "@azure/arm-apimanagement!ApiManagementServiceBaseProperties:interface": "Microsoft.ApiManagement.ApiManagementServiceBaseProperties", + "@azure/arm-apimanagement!HostnameConfiguration:interface": "Microsoft.ApiManagement.HostnameConfiguration", + "@azure/arm-apimanagement!CertificateInformation:interface": "Microsoft.ApiManagement.CertificateInformation", + "@azure/arm-apimanagement!ConfigurationApi:interface": "Microsoft.ApiManagement.ConfigurationApi", + "@azure/arm-apimanagement!VirtualNetworkConfiguration:interface": "Microsoft.ApiManagement.VirtualNetworkConfiguration", + "@azure/arm-apimanagement!AdditionalLocation:interface": "Microsoft.ApiManagement.AdditionalLocation", + "@azure/arm-apimanagement!ApiManagementServiceSkuProperties:interface": "Microsoft.ApiManagement.ApiManagementServiceSkuProperties", + "@azure/arm-apimanagement!CertificateConfiguration:interface": "Microsoft.ApiManagement.CertificateConfiguration", + "@azure/arm-apimanagement!ApiVersionConstraint:interface": "Microsoft.ApiManagement.ApiVersionConstraint", + "@azure/arm-apimanagement!RemotePrivateEndpointConnectionWrapper:interface": "Microsoft.ApiManagement.RemotePrivateEndpointConnectionWrapper", + "@azure/arm-apimanagement!PrivateEndpointConnectionWrapperProperties:interface": "Microsoft.ApiManagement.PrivateEndpointConnectionWrapperProperties", + "@azure/arm-apimanagement!ArmIdWrapper:interface": "Microsoft.ApiManagement.ArmIdWrapper", + "@azure/arm-apimanagement!PrivateLinkServiceConnectionState:interface": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "@azure/arm-apimanagement!ApiManagementServiceIdentity:interface": "Microsoft.ApiManagement.ApiManagementServiceIdentity", + "@azure/arm-apimanagement!UserIdentityProperties:interface": "Microsoft.ApiManagement.UserIdentityProperties", + "@azure/arm-apimanagement!ApiManagementServiceUpdateParameters:interface": "Microsoft.ApiManagement.ApiManagementServiceUpdateParameters", + "@azure/arm-apimanagement!ApiManagementServiceUpdateProperties:interface": "Microsoft.ApiManagement.ApiManagementServiceUpdateProperties", + "@azure/arm-apimanagement!ApiManagementServiceListResult:interface": "Microsoft.ApiManagement.ApiManagementServiceListResult", + "@azure/arm-apimanagement!ApiManagementServiceBackupRestoreParameters:interface": "Microsoft.ApiManagement.ApiManagementServiceBackupRestoreParameters", + "@azure/arm-apimanagement!MigrateToStv2Contract:interface": "Microsoft.ApiManagement.MigrateToStv2Contract", + "@azure/arm-apimanagement!ApiManagementServiceGetSsoTokenResult:interface": "Microsoft.ApiManagement.ApiManagementServiceGetSsoTokenResult", + "@azure/arm-apimanagement!ApiManagementServiceApplyNetworkConfigurationParameters:interface": "Microsoft.ApiManagement.ApiManagementServiceApplyNetworkConfigurationParameters", + "@azure/arm-apimanagement!ApiManagementServiceCheckNameAvailabilityParameters:interface": "Microsoft.ApiManagement.ApiManagementServiceCheckNameAvailabilityParameters", + "@azure/arm-apimanagement!ApiManagementServiceNameAvailabilityResult:interface": "Microsoft.ApiManagement.ApiManagementServiceNameAvailabilityResult", + "@azure/arm-apimanagement!ApiManagementServiceGetDomainOwnershipIdentifierResult:interface": "Microsoft.ApiManagement.ApiManagementServiceGetDomainOwnershipIdentifierResult", + "@azure/arm-apimanagement!AllPoliciesCollection:interface": "Microsoft.ApiManagement.AllPoliciesCollection", + "@azure/arm-apimanagement!AllPoliciesContract:interface": "Microsoft.ApiManagement.AllPoliciesContract", + "@azure/arm-apimanagement!AllPoliciesContractProperties:interface": "Microsoft.ApiManagement.AllPoliciesContractProperties", + "@azure/arm-apimanagement!ResourceSkuResults:interface": "Microsoft.ApiManagement.ResourceSkuResults", + "@azure/arm-apimanagement!ResourceSkuResult:interface": "Microsoft.ApiManagement.ResourceSkuResult", + "@azure/arm-apimanagement!ResourceSku:interface": "Microsoft.ApiManagement.ResourceSku", + "@azure/arm-apimanagement!ResourceSkuCapacity:interface": "Microsoft.ApiManagement.ResourceSkuCapacity", + "@azure/arm-apimanagement!NetworkStatusContractByLocation:interface": "Microsoft.ApiManagement.NetworkStatusContractByLocation", + "@azure/arm-apimanagement!NetworkStatusContract:interface": "Microsoft.ApiManagement.NetworkStatusContract", + "@azure/arm-apimanagement!ConnectivityStatusContract:interface": "Microsoft.ApiManagement.ConnectivityStatusContract", + "@azure/arm-apimanagement!OutboundEnvironmentEndpointList:interface": "Microsoft.ApiManagement.OutboundEnvironmentEndpointList", + "@azure/arm-apimanagement!OutboundEnvironmentEndpoint:interface": "Microsoft.ApiManagement.OutboundEnvironmentEndpoint", + "@azure/arm-apimanagement!EndpointDependency:interface": "Microsoft.ApiManagement.EndpointDependency", + "@azure/arm-apimanagement!EndpointDetail:interface": "Microsoft.ApiManagement.EndpointDetail", + "@azure/arm-apimanagement!PolicyDescriptionCollection:interface": "Microsoft.ApiManagement.PolicyDescriptionCollection", + "@azure/arm-apimanagement!PolicyDescriptionContract:interface": "Microsoft.ApiManagement.PolicyDescriptionContract", + "@azure/arm-apimanagement!PolicyDescriptionContractProperties:interface": "Microsoft.ApiManagement.PolicyDescriptionContractProperties", + "@azure/arm-apimanagement!OperationResultContract:interface": "Microsoft.ApiManagement.OperationResultContract", + "@azure/arm-apimanagement!OperationResultContractProperties:interface": "Microsoft.ApiManagement.OperationResultContractProperties", + "@azure/arm-apimanagement!ErrorResponseBody:interface": "Microsoft.ApiManagement.ErrorResponseBody", + "@azure/arm-apimanagement!ErrorFieldContract:interface": "Microsoft.ApiManagement.ErrorFieldContract", + "@azure/arm-apimanagement!OperationResultLogItemContract:interface": "Microsoft.ApiManagement.OperationResultLogItemContract", + "@azure/arm-apimanagement!PortalSettingsCollection:interface": "Microsoft.ApiManagement.PortalSettingsCollection", + "@azure/arm-apimanagement!PortalSettingsContract:interface": "Microsoft.ApiManagement.PortalSettingsContract", + "@azure/arm-apimanagement!PortalSettingsContractProperties:interface": "Microsoft.ApiManagement.PortalSettingsContractProperties", + "@azure/arm-apimanagement!QuotaCounterCollection:interface": "Microsoft.ApiManagement.QuotaCounterCollection", + "@azure/arm-apimanagement!QuotaCounterContract:interface": "Microsoft.ApiManagement.QuotaCounterContract", + "@azure/arm-apimanagement!QuotaCounterValueContractProperties:interface": "Microsoft.ApiManagement.QuotaCounterValueContractProperties", + "@azure/arm-apimanagement!QuotaCounterValueUpdateContract:interface": "Microsoft.ApiManagement.QuotaCounterValueUpdateContract", + "@azure/arm-apimanagement!RegionListResult:interface": "Microsoft.ApiManagement.RegionListResult", + "@azure/arm-apimanagement!RegionContract:interface": "Microsoft.ApiManagement.RegionContract", + "@azure/arm-apimanagement!ReportCollection:interface": "Microsoft.ApiManagement.ReportCollection", + "@azure/arm-apimanagement!ReportRecordContract:interface": "Microsoft.ApiManagement.ReportRecordContract", + "@azure/arm-apimanagement!RequestReportCollection:interface": "Microsoft.ApiManagement.RequestReportCollection", + "@azure/arm-apimanagement!RequestReportRecordContract:interface": "Microsoft.ApiManagement.RequestReportRecordContract", + "@azure/arm-apimanagement!ResolverContract:interface": "Microsoft.ApiManagement.ResolverContract", + "@azure/arm-apimanagement!ResolverEntityBaseContract:interface": "Microsoft.ApiManagement.ResolverEntityBaseContract", + "@azure/arm-apimanagement!ResolverUpdateContract:interface": "Microsoft.ApiManagement.ResolverUpdateContract", + "@azure/arm-apimanagement!ResolverUpdateContractProperties:interface": "Microsoft.ApiManagement.ResolverUpdateContractProperties", + "@azure/arm-apimanagement!ResolverCollection:interface": "Microsoft.ApiManagement.ResolverCollection", + "@azure/arm-apimanagement!IssueUpdateContract:interface": "Microsoft.ApiManagement.IssueUpdateContract", + "@azure/arm-apimanagement!IssueUpdateContractProperties:interface": "Microsoft.ApiManagement.IssueUpdateContractProperties", + "@azure/arm-apimanagement!IssueCommentContract:interface": "Microsoft.ApiManagement.IssueCommentContract", + "@azure/arm-apimanagement!IssueCommentContractProperties:interface": "Microsoft.ApiManagement.IssueCommentContractProperties", + "@azure/arm-apimanagement!IssueCommentCollection:interface": "Microsoft.ApiManagement.IssueCommentCollection", + "@azure/arm-apimanagement!IssueAttachmentContract:interface": "Microsoft.ApiManagement.IssueAttachmentContract", + "@azure/arm-apimanagement!IssueAttachmentContractProperties:interface": "Microsoft.ApiManagement.IssueAttachmentContractProperties", + "@azure/arm-apimanagement!IssueAttachmentCollection:interface": "Microsoft.ApiManagement.IssueAttachmentCollection", + "@azure/arm-apimanagement!TagDescriptionContract:interface": "Microsoft.ApiManagement.TagDescriptionContract", + "@azure/arm-apimanagement!TagDescriptionContractProperties:interface": "Microsoft.ApiManagement.TagDescriptionContractProperties", + "@azure/arm-apimanagement!TagDescriptionBaseProperties:interface": "Microsoft.ApiManagement.TagDescriptionBaseProperties", + "@azure/arm-apimanagement!TagDescriptionCreateParameters:interface": "Microsoft.ApiManagement.TagDescriptionCreateParameters", + "@azure/arm-apimanagement!TagDescriptionCollection:interface": "Microsoft.ApiManagement.TagDescriptionCollection", + "@azure/arm-apimanagement!WikiCollection:interface": "Microsoft.ApiManagement.WikiCollection", + "@azure/arm-apimanagement!ToolContract:interface": "Microsoft.ApiManagement.ToolContract", + "@azure/arm-apimanagement!ToolContractProperties:interface": "Microsoft.ApiManagement.ToolContractProperties", + "@azure/arm-apimanagement!ToolCollection:interface": "Microsoft.ApiManagement.ToolCollection", + "@azure/arm-apimanagement!AuthorizationProviderContract:interface": "Microsoft.ApiManagement.AuthorizationProviderContract", + "@azure/arm-apimanagement!AuthorizationProviderContractProperties:interface": "Microsoft.ApiManagement.AuthorizationProviderContractProperties", + "@azure/arm-apimanagement!AuthorizationProviderOAuth2Settings:interface": "Microsoft.ApiManagement.AuthorizationProviderOAuth2Settings", + "@azure/arm-apimanagement!AuthorizationProviderOAuth2GrantTypes:interface": "Microsoft.ApiManagement.AuthorizationProviderOAuth2GrantTypes", + "@azure/arm-apimanagement!AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType:interface": "Microsoft.ApiManagement.AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType", + "@azure/arm-apimanagement!AuthorizationProviderKeyVaultContract:interface": "Microsoft.ApiManagement.AuthorizationProviderKeyVaultContract", + "@azure/arm-apimanagement!AuthorizationProviderKeyVaultCreateProperties:interface": "Microsoft.ApiManagement.AuthorizationProviderKeyVaultCreateProperties", + "@azure/arm-apimanagement!AuthorizationProviderFederatedIdentityCredentialsProperties:interface": "Microsoft.ApiManagement.AuthorizationProviderFederatedIdentityCredentialsProperties", + "@azure/arm-apimanagement!AuthorizationProviderCollection:interface": "Microsoft.ApiManagement.AuthorizationProviderCollection", + "@azure/arm-apimanagement!AuthorizationContract:interface": "Microsoft.ApiManagement.AuthorizationContract", + "@azure/arm-apimanagement!AuthorizationContractProperties:interface": "Microsoft.ApiManagement.AuthorizationContractProperties", + "@azure/arm-apimanagement!AuthorizationError:interface": "Microsoft.ApiManagement.AuthorizationError", + "@azure/arm-apimanagement!AuthorizationCollection:interface": "Microsoft.ApiManagement.AuthorizationCollection", + "@azure/arm-apimanagement!AuthorizationConfirmConsentCodeRequestContract:interface": "Microsoft.ApiManagement.AuthorizationConfirmConsentCodeRequestContract", + "@azure/arm-apimanagement!AuthorizationLoginRequestContract:interface": "Microsoft.ApiManagement.AuthorizationLoginRequestContract", + "@azure/arm-apimanagement!AuthorizationLoginResponseContract:interface": "Microsoft.ApiManagement.AuthorizationLoginResponseContract", + "@azure/arm-apimanagement!AuthorizationAccessPolicyContract:interface": "Microsoft.ApiManagement.AuthorizationAccessPolicyContract", + "@azure/arm-apimanagement!AuthorizationAccessPolicyContractProperties:interface": "Microsoft.ApiManagement.AuthorizationAccessPolicyContractProperties", + "@azure/arm-apimanagement!AuthorizationAccessPolicyCollection:interface": "Microsoft.ApiManagement.AuthorizationAccessPolicyCollection", + "@azure/arm-apimanagement!AuthorizationServerContract:interface": "Microsoft.ApiManagement.AuthorizationServerContract", + "@azure/arm-apimanagement!AuthorizationServerContractProperties:interface": "Microsoft.ApiManagement.AuthorizationServerContractProperties", + "@azure/arm-apimanagement!AuthorizationServerContractBaseProperties:interface": "Microsoft.ApiManagement.AuthorizationServerContractBaseProperties", + "@azure/arm-apimanagement!TokenBodyParameterContract:interface": "Microsoft.ApiManagement.TokenBodyParameterContract", + "@azure/arm-apimanagement!AuthorizationServerUpdateContract:interface": "Microsoft.ApiManagement.AuthorizationServerUpdateContract", + "@azure/arm-apimanagement!AuthorizationServerUpdateContractProperties:interface": "Microsoft.ApiManagement.AuthorizationServerUpdateContractProperties", + "@azure/arm-apimanagement!AuthorizationServerCollection:interface": "Microsoft.ApiManagement.AuthorizationServerCollection", + "@azure/arm-apimanagement!AuthorizationServerSecretsContract:interface": "Microsoft.ApiManagement.AuthorizationServerSecretsContract", + "@azure/arm-apimanagement!BackendReconnectContract:interface": "Microsoft.ApiManagement.BackendReconnectContract", + "@azure/arm-apimanagement!BackendReconnectProperties:interface": "Microsoft.ApiManagement.BackendReconnectProperties", + "@azure/arm-apimanagement!CacheContract:interface": "Microsoft.ApiManagement.CacheContract", + "@azure/arm-apimanagement!CacheContractProperties:interface": "Microsoft.ApiManagement.CacheContractProperties", + "@azure/arm-apimanagement!CacheUpdateParameters:interface": "Microsoft.ApiManagement.CacheUpdateParameters", + "@azure/arm-apimanagement!CacheUpdateProperties:interface": "Microsoft.ApiManagement.CacheUpdateProperties", + "@azure/arm-apimanagement!CacheCollection:interface": "Microsoft.ApiManagement.CacheCollection", + "@azure/arm-apimanagement!ContentTypeContract:interface": "Microsoft.ApiManagement.ContentTypeContract", + "@azure/arm-apimanagement!ContentTypeContractProperties:interface": "Microsoft.ApiManagement.ContentTypeContractProperties", + "@azure/arm-apimanagement!ContentTypeCollection:interface": "Microsoft.ApiManagement.ContentTypeCollection", + "@azure/arm-apimanagement!ContentItemContract:interface": "Microsoft.ApiManagement.ContentItemContract", + "@azure/arm-apimanagement!ContentItemCollection:interface": "Microsoft.ApiManagement.ContentItemCollection", + "@azure/arm-apimanagement!DeletedServiceContract:interface": "Microsoft.ApiManagement.DeletedServiceContract", + "@azure/arm-apimanagement!DeletedServiceContractProperties:interface": "Microsoft.ApiManagement.DeletedServiceContractProperties", + "@azure/arm-apimanagement!DeletedServicesCollection:interface": "Microsoft.ApiManagement.DeletedServicesCollection", + "@azure/arm-apimanagement!DocumentationContract:interface": "Microsoft.ApiManagement.DocumentationContract", + "@azure/arm-apimanagement!DocumentationContractProperties:interface": "Microsoft.ApiManagement.DocumentationContractProperties", + "@azure/arm-apimanagement!DocumentationUpdateContract:interface": "Microsoft.ApiManagement.DocumentationUpdateContract", + "@azure/arm-apimanagement!DocumentationCollection:interface": "Microsoft.ApiManagement.DocumentationCollection", + "@azure/arm-apimanagement!EmailTemplateContract:interface": "Microsoft.ApiManagement.EmailTemplateContract", + "@azure/arm-apimanagement!EmailTemplateContractProperties:interface": "Microsoft.ApiManagement.EmailTemplateContractProperties", + "@azure/arm-apimanagement!EmailTemplateParametersContractProperties:interface": "Microsoft.ApiManagement.EmailTemplateParametersContractProperties", + "@azure/arm-apimanagement!EmailTemplateUpdateParameters:interface": "Microsoft.ApiManagement.EmailTemplateUpdateParameters", + "@azure/arm-apimanagement!EmailTemplateUpdateParameterProperties:interface": "Microsoft.ApiManagement.EmailTemplateUpdateParameterProperties", + "@azure/arm-apimanagement!EmailTemplateCollection:interface": "Microsoft.ApiManagement.EmailTemplateCollection", + "@azure/arm-apimanagement!ApiManagementGatewayConfigConnectionResource:interface": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResource", + "@azure/arm-apimanagement!GatewayConfigConnectionBaseProperties:interface": "Microsoft.ApiManagement.GatewayConfigConnectionBaseProperties", + "@azure/arm-apimanagement!ApiManagementGatewayConfigConnectionListResult:interface": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionListResult", + "@azure/arm-apimanagement!GatewayHostnameBindingResource:interface": "Microsoft.ApiManagement.GatewayHostnameBindingResource", + "@azure/arm-apimanagement!GatewayHostnameBindingBaseProperties:interface": "Microsoft.ApiManagement.GatewayHostnameBindingBaseProperties", + "@azure/arm-apimanagement!GatewayHostnameBindingKeyVault:interface": "Microsoft.ApiManagement.GatewayHostnameBindingKeyVault", + "@azure/arm-apimanagement!GatewayHostnameBindingKeyVaultLastStatus:interface": "Microsoft.ApiManagement.GatewayHostnameBindingKeyVaultLastStatus", + "@azure/arm-apimanagement!GatewayHostnameBindingCertificate:interface": "Microsoft.ApiManagement.GatewayHostnameBindingCertificate", + "@azure/arm-apimanagement!GatewayHostnameBindingListResult:interface": "Microsoft.ApiManagement.GatewayHostnameBindingListResult", + "@azure/arm-apimanagement!GatewayContract:interface": "Microsoft.ApiManagement.GatewayContract", + "@azure/arm-apimanagement!GatewayContractProperties:interface": "Microsoft.ApiManagement.GatewayContractProperties", + "@azure/arm-apimanagement!ResourceLocationDataContract:interface": "Microsoft.ApiManagement.ResourceLocationDataContract", + "@azure/arm-apimanagement!ManagedServiceIdentity:interface": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "@azure/arm-apimanagement!UserAssignedIdentity:interface": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "@azure/arm-apimanagement!GatewayCollection:interface": "Microsoft.ApiManagement.GatewayCollection", + "@azure/arm-apimanagement!GatewayKeysContract:interface": "Microsoft.ApiManagement.GatewayKeysContract", + "@azure/arm-apimanagement!GatewayKeyRegenerationRequestContract:interface": "Microsoft.ApiManagement.GatewayKeyRegenerationRequestContract", + "@azure/arm-apimanagement!GatewayTokenRequestContract:interface": "Microsoft.ApiManagement.GatewayTokenRequestContract", + "@azure/arm-apimanagement!GatewayTokenContract:interface": "Microsoft.ApiManagement.GatewayTokenContract", + "@azure/arm-apimanagement!GatewayListDebugCredentialsContract:interface": "Microsoft.ApiManagement.GatewayListDebugCredentialsContract", + "@azure/arm-apimanagement!GatewayDebugCredentialsContract:interface": "Microsoft.ApiManagement.GatewayDebugCredentialsContract", + "@azure/arm-apimanagement!GatewayListTraceContract:interface": "Microsoft.ApiManagement.GatewayListTraceContract", + "@azure/arm-apimanagement!AssociationContract:interface": "Microsoft.ApiManagement.AssociationContract", + "@azure/arm-apimanagement!AssociationContractProperties:interface": "Microsoft.ApiManagement.AssociationContractProperties", + "@azure/arm-apimanagement!GatewayHostnameConfigurationContract:interface": "Microsoft.ApiManagement.GatewayHostnameConfigurationContract", + "@azure/arm-apimanagement!GatewayHostnameConfigurationContractProperties:interface": "Microsoft.ApiManagement.GatewayHostnameConfigurationContractProperties", + "@azure/arm-apimanagement!GatewayHostnameConfigurationCollection:interface": "Microsoft.ApiManagement.GatewayHostnameConfigurationCollection", + "@azure/arm-apimanagement!GatewayCertificateAuthorityContract:interface": "Microsoft.ApiManagement.GatewayCertificateAuthorityContract", + "@azure/arm-apimanagement!GatewayCertificateAuthorityContractProperties:interface": "Microsoft.ApiManagement.GatewayCertificateAuthorityContractProperties", + "@azure/arm-apimanagement!GatewayCertificateAuthorityCollection:interface": "Microsoft.ApiManagement.GatewayCertificateAuthorityCollection", + "@azure/arm-apimanagement!UserCollection:interface": "Microsoft.ApiManagement.UserCollection", + "@azure/arm-apimanagement!UserContract:interface": "Microsoft.ApiManagement.UserContract", + "@azure/arm-apimanagement!UserContractProperties:interface": "Microsoft.ApiManagement.UserContractProperties", + "@azure/arm-apimanagement!UserEntityBaseParameters:interface": "Microsoft.ApiManagement.UserEntityBaseParameters", + "@azure/arm-apimanagement!UserIdentityContract:interface": "Microsoft.ApiManagement.UserIdentityContract", + "@azure/arm-apimanagement!IdentityProviderContract:interface": "Microsoft.ApiManagement.IdentityProviderContract", + "@azure/arm-apimanagement!IdentityProviderContractProperties:interface": "Microsoft.ApiManagement.IdentityProviderContractProperties", + "@azure/arm-apimanagement!IdentityProviderBaseParameters:interface": "Microsoft.ApiManagement.IdentityProviderBaseParameters", + "@azure/arm-apimanagement!IdentityProviderCreateContract:interface": "Microsoft.ApiManagement.IdentityProviderCreateContract", + "@azure/arm-apimanagement!IdentityProviderCreateContractProperties:interface": "Microsoft.ApiManagement.IdentityProviderCreateContractProperties", + "@azure/arm-apimanagement!IdentityProviderUpdateParameters:interface": "Microsoft.ApiManagement.IdentityProviderUpdateParameters", + "@azure/arm-apimanagement!IdentityProviderUpdateProperties:interface": "Microsoft.ApiManagement.IdentityProviderUpdateProperties", + "@azure/arm-apimanagement!IdentityProviderList:interface": "Microsoft.ApiManagement.IdentityProviderList", + "@azure/arm-apimanagement!ClientSecretContract:interface": "Microsoft.ApiManagement.ClientSecretContract", + "@azure/arm-apimanagement!RecipientUserCollection:interface": "Microsoft.ApiManagement.RecipientUserCollection", + "@azure/arm-apimanagement!RecipientUserContract:interface": "Microsoft.ApiManagement.RecipientUserContract", + "@azure/arm-apimanagement!RecipientUsersContractProperties:interface": "Microsoft.ApiManagement.RecipientUsersContractProperties", + "@azure/arm-apimanagement!RecipientEmailCollection:interface": "Microsoft.ApiManagement.RecipientEmailCollection", + "@azure/arm-apimanagement!RecipientEmailContract:interface": "Microsoft.ApiManagement.RecipientEmailContract", + "@azure/arm-apimanagement!RecipientEmailContractProperties:interface": "Microsoft.ApiManagement.RecipientEmailContractProperties", + "@azure/arm-apimanagement!OpenidConnectProviderContract:interface": "Microsoft.ApiManagement.OpenidConnectProviderContract", + "@azure/arm-apimanagement!OpenidConnectProviderContractProperties:interface": "Microsoft.ApiManagement.OpenidConnectProviderContractProperties", + "@azure/arm-apimanagement!OpenidConnectProviderUpdateContract:interface": "Microsoft.ApiManagement.OpenidConnectProviderUpdateContract", + "@azure/arm-apimanagement!OpenidConnectProviderUpdateContractProperties:interface": "Microsoft.ApiManagement.OpenidConnectProviderUpdateContractProperties", + "@azure/arm-apimanagement!OpenIdConnectProviderCollection:interface": "Microsoft.ApiManagement.OpenIdConnectProviderCollection", + "@azure/arm-apimanagement!PolicyRestrictionContract:interface": "Microsoft.ApiManagement.PolicyRestrictionContract", + "@azure/arm-apimanagement!PolicyRestrictionContractProperties:interface": "Microsoft.ApiManagement.PolicyRestrictionContractProperties", + "@azure/arm-apimanagement!PolicyRestrictionUpdateContract:interface": "Microsoft.ApiManagement.PolicyRestrictionUpdateContract", + "@azure/arm-apimanagement!PolicyRestrictionCollection:interface": "Microsoft.ApiManagement.PolicyRestrictionCollection", + "@azure/arm-apimanagement!PortalConfigContract:interface": "Microsoft.ApiManagement.PortalConfigContract", + "@azure/arm-apimanagement!PortalConfigProperties:interface": "Microsoft.ApiManagement.PortalConfigProperties", + "@azure/arm-apimanagement!PortalConfigPropertiesSignin:interface": "Microsoft.ApiManagement.PortalConfigPropertiesSignin", + "@azure/arm-apimanagement!PortalConfigPropertiesSignup:interface": "Microsoft.ApiManagement.PortalConfigPropertiesSignup", + "@azure/arm-apimanagement!PortalConfigTermsOfServiceProperties:interface": "Microsoft.ApiManagement.PortalConfigTermsOfServiceProperties", + "@azure/arm-apimanagement!PortalConfigDelegationProperties:interface": "Microsoft.ApiManagement.PortalConfigDelegationProperties", + "@azure/arm-apimanagement!PortalConfigCorsProperties:interface": "Microsoft.ApiManagement.PortalConfigCorsProperties", + "@azure/arm-apimanagement!PortalConfigCspProperties:interface": "Microsoft.ApiManagement.PortalConfigCspProperties", + "@azure/arm-apimanagement!PortalConfigCollection:interface": "Microsoft.ApiManagement.PortalConfigCollection", + "@azure/arm-apimanagement!ClientApplicationContract:interface": "Microsoft.ApiManagement.ClientApplicationContract", + "@azure/arm-apimanagement!ClientApplicationContractProperties:interface": "Microsoft.ApiManagement.ClientApplicationContractProperties", + "@azure/arm-apimanagement!ClientApplicationCollection:interface": "Microsoft.ApiManagement.ClientApplicationCollection", + "@azure/arm-apimanagement!ClientApplicationSecretsContract:interface": "Microsoft.ApiManagement.ClientApplicationSecretsContract", + "@azure/arm-apimanagement!ClientApplicationSecretsContractEntra:interface": "Microsoft.ApiManagement.ClientApplicationSecretsContractEntra", + "@azure/arm-apimanagement!ClientApplicationProductLinkContract:interface": "Microsoft.ApiManagement.ClientApplicationProductLinkContract", + "@azure/arm-apimanagement!ClientApplicationProductLinkContractProperties:interface": "Microsoft.ApiManagement.ClientApplicationProductLinkContractProperties", + "@azure/arm-apimanagement!ClientApplicationProductLinkCollection:interface": "Microsoft.ApiManagement.ClientApplicationProductLinkCollection", + "@azure/arm-apimanagement!PortalRevisionContract:interface": "Microsoft.ApiManagement.PortalRevisionContract", + "@azure/arm-apimanagement!PortalRevisionContractProperties:interface": "Microsoft.ApiManagement.PortalRevisionContractProperties", + "@azure/arm-apimanagement!PortalRevisionCollection:interface": "Microsoft.ApiManagement.PortalRevisionCollection", + "@azure/arm-apimanagement!PrivateEndpointConnection:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection", + "@azure/arm-apimanagement!PrivateEndpointConnectionProperties:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "@azure/arm-apimanagement!PrivateEndpoint:interface": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "@azure/arm-apimanagement!PrivateEndpointConnectionRequest:interface": "Microsoft.ApiManagement.PrivateEndpointConnectionRequest", + "@azure/arm-apimanagement!PrivateEndpointConnectionRequestProperties:interface": "Microsoft.ApiManagement.PrivateEndpointConnectionRequestProperties", + "@azure/arm-apimanagement!PrivateEndpointConnectionListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-apimanagement!PrivateLinkResource:interface": "Microsoft.ApiManagement.PrivateLinkResource", + "@azure/arm-apimanagement!PrivateLinkResourceProperties:interface": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "@azure/arm-apimanagement!PrivateLinkResourceListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-apimanagement!TenantSettingsContract:interface": "Microsoft.ApiManagement.TenantSettingsContract", + "@azure/arm-apimanagement!TenantSettingsContractProperties:interface": "Microsoft.ApiManagement.TenantSettingsContractProperties", + "@azure/arm-apimanagement!TenantSettingsCollection:interface": "Microsoft.ApiManagement.TenantSettingsCollection", + "@azure/arm-apimanagement!AccessInformationContract:interface": "Microsoft.ApiManagement.AccessInformationContract", + "@azure/arm-apimanagement!AccessInformationContractProperties:interface": "Microsoft.ApiManagement.AccessInformationContractProperties", + "@azure/arm-apimanagement!AccessInformationCreateParameters:interface": "Microsoft.ApiManagement.AccessInformationCreateParameters", + "@azure/arm-apimanagement!AccessInformationCreateParameterProperties:interface": "Microsoft.ApiManagement.AccessInformationCreateParameterProperties", + "@azure/arm-apimanagement!AccessInformationUpdateParameters:interface": "Microsoft.ApiManagement.AccessInformationUpdateParameters", + "@azure/arm-apimanagement!AccessInformationUpdateParameterProperties:interface": "Microsoft.ApiManagement.AccessInformationUpdateParameterProperties", + "@azure/arm-apimanagement!AccessInformationCollection:interface": "Microsoft.ApiManagement.AccessInformationCollection", + "@azure/arm-apimanagement!AccessInformationSecretsContract:interface": "Microsoft.ApiManagement.AccessInformationSecretsContract", + "@azure/arm-apimanagement!DeployConfigurationParameters:interface": "Microsoft.ApiManagement.DeployConfigurationParameters", + "@azure/arm-apimanagement!DeployConfigurationParameterProperties:interface": "Microsoft.ApiManagement.DeployConfigurationParameterProperties", + "@azure/arm-apimanagement!SaveConfigurationParameter:interface": "Microsoft.ApiManagement.SaveConfigurationParameter", + "@azure/arm-apimanagement!SaveConfigurationParameterProperties:interface": "Microsoft.ApiManagement.SaveConfigurationParameterProperties", + "@azure/arm-apimanagement!TenantConfigurationSyncStateContract:interface": "Microsoft.ApiManagement.TenantConfigurationSyncStateContract", + "@azure/arm-apimanagement!TenantConfigurationSyncStateContractProperties:interface": "Microsoft.ApiManagement.TenantConfigurationSyncStateContractProperties", + "@azure/arm-apimanagement!UserCreateParameters:interface": "Microsoft.ApiManagement.UserCreateParameters", + "@azure/arm-apimanagement!UserCreateParameterProperties:interface": "Microsoft.ApiManagement.UserCreateParameterProperties", + "@azure/arm-apimanagement!UserUpdateParameters:interface": "Microsoft.ApiManagement.UserUpdateParameters", + "@azure/arm-apimanagement!UserUpdateParametersProperties:interface": "Microsoft.ApiManagement.UserUpdateParametersProperties", + "@azure/arm-apimanagement!GenerateSsoUrlResult:interface": "Microsoft.ApiManagement.GenerateSsoUrlResult", + "@azure/arm-apimanagement!UserTokenParameters:interface": "Microsoft.ApiManagement.UserTokenParameters", + "@azure/arm-apimanagement!UserTokenParameterProperties:interface": "Microsoft.ApiManagement.UserTokenParameterProperties", + "@azure/arm-apimanagement!UserTokenResult:interface": "Microsoft.ApiManagement.UserTokenResult", + "@azure/arm-apimanagement!UserIdentityCollection:interface": "Microsoft.ApiManagement.UserIdentityCollection", + "@azure/arm-apimanagement!ApiManagementWorkspaceLinksResource:interface": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResource", + "@azure/arm-apimanagement!ApiManagementWorkspaceLinksProperties:interface": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksProperties", + "@azure/arm-apimanagement!WorkspaceLinksBaseProperties:interface": "Microsoft.ApiManagement.WorkspaceLinksBaseProperties", + "@azure/arm-apimanagement!WorkspaceLinksGateway:interface": "Microsoft.ApiManagement.WorkspaceLinksGateway", + "@azure/arm-apimanagement!ApiManagementWorkspaceLinksListResult:interface": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksListResult", + "@azure/arm-apimanagement!WorkspaceContract:interface": "Microsoft.ApiManagement.WorkspaceContract", + "@azure/arm-apimanagement!WorkspaceContractProperties:interface": "Microsoft.ApiManagement.WorkspaceContractProperties", + "@azure/arm-apimanagement!WorkspaceCollection:interface": "Microsoft.ApiManagement.WorkspaceCollection", + "@azure/arm-apimanagement!ApiExportResult:interface": "Microsoft.ApiManagement.ApiExportResult", + "@azure/arm-apimanagement!ApiExportResultValue:interface": "Microsoft.ApiManagement.ApiExportResultValue", + "@azure/arm-apimanagement!ApiManagementSkusResult:interface": "Microsoft.ApiManagement.ApiManagementSkusResult", + "@azure/arm-apimanagement!ApiManagementSku:interface": "Microsoft.ApiManagement.ApiManagementSku", + "@azure/arm-apimanagement!ApiManagementSkuCapacity:interface": "Microsoft.ApiManagement.ApiManagementSkuCapacity", + "@azure/arm-apimanagement!ApiManagementSkuLocationInfo:interface": "Microsoft.ApiManagement.ApiManagementSkuLocationInfo", + "@azure/arm-apimanagement!ApiManagementSkuZoneDetails:interface": "Microsoft.ApiManagement.ApiManagementSkuZoneDetails", + "@azure/arm-apimanagement!ApiManagementSkuCapabilities:interface": "Microsoft.ApiManagement.ApiManagementSkuCapabilities", + "@azure/arm-apimanagement!ApiManagementSkuCosts:interface": "Microsoft.ApiManagement.ApiManagementSkuCosts", + "@azure/arm-apimanagement!ApiManagementSkuRestrictions:interface": "Microsoft.ApiManagement.ApiManagementSkuRestrictions", + "@azure/arm-apimanagement!ApiManagementSkuRestrictionInfo:interface": "Microsoft.ApiManagement.ApiManagementSkuRestrictionInfo", + "@azure/arm-apimanagement!OperationStatusResult:interface": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "@azure/arm-apimanagement!KnownProtocol:enum": "Microsoft.ApiManagement.Protocol", + "@azure/arm-apimanagement!KnownVersioningScheme:enum": "Microsoft.ApiManagement.VersioningScheme", + "@azure/arm-apimanagement!KnownBearerTokenSendingMethods:enum": "Microsoft.ApiManagement.BearerTokenSendingMethods", + "@azure/arm-apimanagement!KnownApiType:enum": "Microsoft.ApiManagement.ApiType", + "@azure/arm-apimanagement!KnownMcpTransportType:enum": "Microsoft.ApiManagement.McpTransportType", + "@azure/arm-apimanagement!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-apimanagement!KnownContentFormat:enum": "Microsoft.ApiManagement.ContentFormat", + "@azure/arm-apimanagement!KnownSoapApiType:enum": "Microsoft.ApiManagement.SoapApiType", + "@azure/arm-apimanagement!KnownTranslateRequiredQueryParametersConduct:enum": "Microsoft.ApiManagement.TranslateRequiredQueryParametersConduct", + "@azure/arm-apimanagement!KnownResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-apimanagement!KnownPreferredIPVersion:enum": "Microsoft.ApiManagement.PreferredIPVersion", + "@azure/arm-apimanagement!KnownConnectivityCheckProtocol:enum": "Microsoft.ApiManagement.ConnectivityCheckProtocol", + "@azure/arm-apimanagement!KnownMethod:enum": "Microsoft.ApiManagement.Method", + "@azure/arm-apimanagement!KnownOrigin:enum": "Microsoft.ApiManagement.Origin", + "@azure/arm-apimanagement!KnownSeverity:enum": "Microsoft.ApiManagement.Severity", + "@azure/arm-apimanagement!KnownIssueType:enum": "Microsoft.ApiManagement.IssueType", + "@azure/arm-apimanagement!KnownConnectionStatus:enum": "Microsoft.ApiManagement.ConnectionStatus", + "@azure/arm-apimanagement!KnownPolicyIdName:enum": "Microsoft.ApiManagement.PolicyIdName", + "@azure/arm-apimanagement!KnownPolicyExportFormat:enum": "Microsoft.ApiManagement.PolicyExportFormat", + "@azure/arm-apimanagement!KnownPolicyContentFormat:enum": "Microsoft.ApiManagement.PolicyContentFormat", + "@azure/arm-apimanagement!KnownAlwaysLog:enum": "Microsoft.ApiManagement.AlwaysLog", + "@azure/arm-apimanagement!KnownSamplingType:enum": "Microsoft.ApiManagement.SamplingType", + "@azure/arm-apimanagement!KnownDataMaskingMode:enum": "Microsoft.ApiManagement.DataMaskingMode", + "@azure/arm-apimanagement!KnownLlm-diagnostic-settings:enum": "Microsoft.ApiManagement.LlmDiagnosticSettings", + "@azure/arm-apimanagement!KnownLlm-message-log-types:enum": "Microsoft.ApiManagement.LlmMessageLogTypes", + "@azure/arm-apimanagement!KnownHttpCorrelationProtocol:enum": "Microsoft.ApiManagement.HttpCorrelationProtocol", + "@azure/arm-apimanagement!KnownVerbosity:enum": "Microsoft.ApiManagement.Verbosity", + "@azure/arm-apimanagement!KnownOperationNameFormat:enum": "Microsoft.ApiManagement.OperationNameFormat", + "@azure/arm-apimanagement!KnownState:enum": "Microsoft.ApiManagement.State", + "@azure/arm-apimanagement!KnownBackendProtocol:enum": "Microsoft.ApiManagement.BackendProtocol", + "@azure/arm-apimanagement!KnownCarbonEmissionCategory:enum": "Microsoft.ApiManagement.CarbonEmissionCategory", + "@azure/arm-apimanagement!KnownBackend-sessionId-source:enum": "Microsoft.ApiManagement.BackendSessionIdSource", + "@azure/arm-apimanagement!KnownBackendType:enum": "Microsoft.ApiManagement.BackendType", + "@azure/arm-apimanagement!KnownGroupType:enum": "Microsoft.ApiManagement.GroupType", + "@azure/arm-apimanagement!KnownLoggerType:enum": "Microsoft.ApiManagement.LoggerType", + "@azure/arm-apimanagement!KnownKeyVaultRefreshState:enum": "Microsoft.ApiManagement.KeyVaultRefreshState", + "@azure/arm-apimanagement!KnownNotificationName:enum": "Microsoft.ApiManagement.NotificationName", + "@azure/arm-apimanagement!KnownPolicyFragmentContentFormat:enum": "Microsoft.ApiManagement.PolicyFragmentContentFormat", + "@azure/arm-apimanagement!KnownProductAuthType:enum": "Microsoft.ApiManagement.ProductAuthType", + "@azure/arm-apimanagement!KnownProductState:enum": "Microsoft.ApiManagement.ProductState", + "@azure/arm-apimanagement!KnownSchemaType:enum": "Microsoft.ApiManagement.SchemaType", + "@azure/arm-apimanagement!KnownSubscriptionState:enum": "Microsoft.ApiManagement.SubscriptionState", + "@azure/arm-apimanagement!KnownAppType:enum": "Microsoft.ApiManagement.AppType", + "@azure/arm-apimanagement!KnownVirtualNetworkType:enum": "Microsoft.ApiManagement.VirtualNetworkType", + "@azure/arm-apimanagement!KnownApiGatewaySkuType:enum": "Microsoft.ApiManagement.ApiGatewaySkuType", + "@azure/arm-apimanagement!KnownGatewaySkuCapacityScaleType:enum": "Microsoft.ApiManagement.GatewaySkuCapacityScaleType", + "@azure/arm-apimanagement!KnownHostnameType:enum": "Microsoft.ApiManagement.HostnameType", + "@azure/arm-apimanagement!KnownCertificateSource:enum": "Microsoft.ApiManagement.CertificateSource", + "@azure/arm-apimanagement!KnownCertificateStatus:enum": "Microsoft.ApiManagement.CertificateStatus", + "@azure/arm-apimanagement!KnownPublicNetworkAccess:enum": "Microsoft.ApiManagement.PublicNetworkAccess", + "@azure/arm-apimanagement!KnownLegacyApiState:enum": "Microsoft.ApiManagement.LegacyApiState", + "@azure/arm-apimanagement!KnownSkuType:enum": "Microsoft.ApiManagement.SkuType", + "@azure/arm-apimanagement!KnownNatGatewayState:enum": "Microsoft.ApiManagement.NatGatewayState", + "@azure/arm-apimanagement!KnownPlatformVersion:enum": "Microsoft.ApiManagement.PlatformVersion", + "@azure/arm-apimanagement!KnownCertificateConfigurationStoreName:enum": "Microsoft.ApiManagement.CertificateConfigurationStoreName", + "@azure/arm-apimanagement!KnownPrivateEndpointServiceConnectionStatus:enum": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "@azure/arm-apimanagement!KnownLegacyPortalStatus:enum": "Microsoft.ApiManagement.LegacyPortalStatus", + "@azure/arm-apimanagement!KnownDeveloperPortalStatus:enum": "Microsoft.ApiManagement.DeveloperPortalStatus", + "@azure/arm-apimanagement!KnownReleaseChannel:enum": "Microsoft.ApiManagement.ReleaseChannel", + "@azure/arm-apimanagement!KnownApimIdentityType:enum": "Microsoft.ApiManagement.ApimIdentityType", + "@azure/arm-apimanagement!KnownAccessType:enum": "Microsoft.ApiManagement.AccessType", + "@azure/arm-apimanagement!KnownMigrateToStv2Mode:enum": "Microsoft.ApiManagement.MigrateToStv2Mode", + "@azure/arm-apimanagement!KnownNameAvailabilityReason:enum": "Microsoft.ApiManagement.NameAvailabilityReason", + "@azure/arm-apimanagement!KnownPolicyComplianceState:enum": "Microsoft.ApiManagement.PolicyComplianceState", + "@azure/arm-apimanagement!KnownResourceSkuCapacityScaleType:enum": "Microsoft.ApiManagement.ResourceSkuCapacityScaleType", + "@azure/arm-apimanagement!KnownConnectivityStatusType:enum": "Microsoft.ApiManagement.ConnectivityStatusType", + "@azure/arm-apimanagement!KnownPolicyScopeContract:enum": "Microsoft.ApiManagement.PolicyScopeContract", + "@azure/arm-apimanagement!KnownAsyncOperationStatus:enum": "Microsoft.ApiManagement.AsyncOperationStatus", + "@azure/arm-apimanagement!KnownAuthorizationType:enum": "Microsoft.ApiManagement.AuthorizationType", + "@azure/arm-apimanagement!KnownOAuth2GrantType:enum": "Microsoft.ApiManagement.OAuth2GrantType", + "@azure/arm-apimanagement!KnownGrantType:enum": "Microsoft.ApiManagement.GrantType", + "@azure/arm-apimanagement!KnownAuthorizationMethod:enum": "Microsoft.ApiManagement.AuthorizationMethod", + "@azure/arm-apimanagement!KnownClientAuthenticationMethod:enum": "Microsoft.ApiManagement.ClientAuthenticationMethod", + "@azure/arm-apimanagement!KnownBearerTokenSendingMethod:enum": "Microsoft.ApiManagement.BearerTokenSendingMethod", + "@azure/arm-apimanagement!KnownTemplateName:enum": "Microsoft.ApiManagement.TemplateName", + "@azure/arm-apimanagement!KnownKeyVaultFetchCode:enum": "Microsoft.ApiManagement.KeyVaultFetchCode", + "@azure/arm-apimanagement!KnownManagedServiceIdentityType:enum": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "@azure/arm-apimanagement!KnownKeyType:enum": "Microsoft.ApiManagement.KeyType", + "@azure/arm-apimanagement!KnownGatewayListDebugCredentialsContractPurpose:enum": "Microsoft.ApiManagement.GatewayListDebugCredentialsContractPurpose", + "@azure/arm-apimanagement!KnownUserState:enum": "Microsoft.ApiManagement.UserState", + "@azure/arm-apimanagement!KnownIdentityProviderType:enum": "Microsoft.ApiManagement.IdentityProviderType", + "@azure/arm-apimanagement!KnownPolicyRestrictionRequireBase:enum": "Microsoft.ApiManagement.PolicyRestrictionRequireBase", + "@azure/arm-apimanagement!KnownPortalSettingsCspMode:enum": "Microsoft.ApiManagement.PortalSettingsCspMode", + "@azure/arm-apimanagement!KnownClientApplicationState:enum": "Microsoft.ApiManagement.ClientApplicationState", + "@azure/arm-apimanagement!KnownPortalRevisionStatus:enum": "Microsoft.ApiManagement.PortalRevisionStatus", + "@azure/arm-apimanagement!KnownPrivateEndpointConnectionProvisioningState:enum": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "@azure/arm-apimanagement!KnownSettingsTypeName:enum": "Microsoft.ApiManagement.SettingsTypeName", + "@azure/arm-apimanagement!KnownAccessIdName:enum": "Microsoft.ApiManagement.AccessIdName", + "@azure/arm-apimanagement!KnownConfigurationIdName:enum": "Microsoft.ApiManagement.ConfigurationIdName", + "@azure/arm-apimanagement!KnownConfirmation:enum": "Microsoft.ApiManagement.Confirmation", + "@azure/arm-apimanagement!KnownExportFormat:enum": "Microsoft.ApiManagement.ExportFormat", + "@azure/arm-apimanagement!KnownExportApi:enum": "Microsoft.ApiManagement.ExportApi", + "@azure/arm-apimanagement!KnownExportResultFormat:enum": "Microsoft.ApiManagement.ExportResultFormat", + "@azure/arm-apimanagement!KnownApiManagementSkuCapacityScaleType:enum": "Microsoft.ApiManagement.ApiManagementSkuCapacityScaleType", + "@azure/arm-apimanagement!KnownApiManagementSkuRestrictionsType:enum": "Microsoft.ApiManagement.ApiManagementSkuRestrictionsType", + "@azure/arm-apimanagement!KnownApiManagementSkuRestrictionsReasonCode:enum": "Microsoft.ApiManagement.ApiManagementSkuRestrictionsReasonCode", + "@azure/arm-apimanagement!KnownVersions:enum": "Microsoft.ApiManagement.Versions", + "@azure/arm-apimanagement!ManagedServiceIdentityUserAssignedIdentity:type": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentity.anonymous", + "@azure/arm-apimanagement!OperationsResultsOperations#get:member": "Microsoft.ApiManagement.OperationsResultsOperationGroup.get", + "@azure/arm-apimanagement!OperationStatusOperations#get:member": "Microsoft.ApiManagement.OperationStatusOperationGroup.get", + "@azure/arm-apimanagement!WorkspaceApiExportOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiExportOperationGroup.get", + "@azure/arm-apimanagement!ApiManagementSkusOperations#list:member": "Microsoft.ApiManagement.ApiManagementSkusOperationGroup.list", + "@azure/arm-apimanagement!ApiExportOperations#get:member": "Microsoft.ApiManagement.ApiExportOperationGroup.get", + "@azure/arm-apimanagement!WorkspaceOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceContracts.listByService", + "@azure/arm-apimanagement!WorkspaceOperations#delete:member": "Microsoft.ApiManagement.WorkspaceContracts.delete", + "@azure/arm-apimanagement!WorkspaceOperations#update:member": "Microsoft.ApiManagement.WorkspaceContracts.update", + "@azure/arm-apimanagement!WorkspaceOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceContracts.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceContracts.getEntityTag", + "@azure/arm-apimanagement!WorkspaceOperations#get:member": "Microsoft.ApiManagement.WorkspaceContracts.get", + "@azure/arm-apimanagement!ApiManagementWorkspaceLinksOperations#listByService:member": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.listByService", + "@azure/arm-apimanagement!ApiManagementWorkspaceLinkOperations#get:member": "Microsoft.ApiManagement.ApiManagementWorkspaceLinksResources.get", + "@azure/arm-apimanagement!UserConfirmationPasswordOperations#send:member": "Microsoft.ApiManagement.UserContracts.send", + "@azure/arm-apimanagement!UserIdentitiesOperations#List:member": "Microsoft.ApiManagement.UserContracts.userIdentitiesList", + "@azure/arm-apimanagement!UserGroupOperations#list:member": "Microsoft.ApiManagement.UserContracts.list", + "@azure/arm-apimanagement!UserOperations#getSharedAccessToken:member": "Microsoft.ApiManagement.UserContracts.getSharedAccessToken", + "@azure/arm-apimanagement!UserOperations#generateSsoUrl:member": "Microsoft.ApiManagement.UserContracts.generateSsoUrl", + "@azure/arm-apimanagement!UserOperations#listByService:member": "Microsoft.ApiManagement.UserContracts.listByService", + "@azure/arm-apimanagement!UserOperations#delete:member": "Microsoft.ApiManagement.UserContracts.delete", + "@azure/arm-apimanagement!UserOperations#update:member": "Microsoft.ApiManagement.UserContracts.update", + "@azure/arm-apimanagement!UserOperations#createOrUpdate:member": "Microsoft.ApiManagement.UserContracts.createOrUpdate", + "@azure/arm-apimanagement!UserOperations#getEntityTag:member": "Microsoft.ApiManagement.UserContracts.getEntityTag", + "@azure/arm-apimanagement!UserOperations#get:member": "Microsoft.ApiManagement.UserContracts.get", + "@azure/arm-apimanagement!TenantConfigurationOperations#getSyncState:member": "Microsoft.ApiManagement.AccessInformationContracts.getSyncState", + "@azure/arm-apimanagement!TenantConfigurationOperations#validate:member": "Microsoft.ApiManagement.AccessInformationContracts.validate", + "@azure/arm-apimanagement!TenantConfigurationOperations#save:member": "Microsoft.ApiManagement.AccessInformationContracts.save", + "@azure/arm-apimanagement!TenantConfigurationOperations#deploy:member": "Microsoft.ApiManagement.AccessInformationContracts.deploy", + "@azure/arm-apimanagement!TenantAccessGitOperations#RegenerateSecondaryKey:member": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegenerateSecondaryKey", + "@azure/arm-apimanagement!TenantAccessGitOperations#RegeneratePrimaryKey:member": "Microsoft.ApiManagement.AccessInformationContracts.tenantAccessGitRegeneratePrimaryKey", + "@azure/arm-apimanagement!TenantAccessOperations#listSecrets:member": "Microsoft.ApiManagement.AccessInformationContracts.listSecrets", + "@azure/arm-apimanagement!TenantAccessOperations#regenerateSecondaryKey:member": "Microsoft.ApiManagement.AccessInformationContracts.regenerateSecondaryKey", + "@azure/arm-apimanagement!TenantAccessOperations#regeneratePrimaryKey:member": "Microsoft.ApiManagement.AccessInformationContracts.regeneratePrimaryKey", + "@azure/arm-apimanagement!TenantAccessOperations#listByService:member": "Microsoft.ApiManagement.AccessInformationContracts.listByService", + "@azure/arm-apimanagement!TenantAccessOperations#update:member": "Microsoft.ApiManagement.AccessInformationContracts.update", + "@azure/arm-apimanagement!TenantAccessOperations#create:member": "Microsoft.ApiManagement.AccessInformationContracts.create", + "@azure/arm-apimanagement!TenantAccessOperations#getEntityTag:member": "Microsoft.ApiManagement.AccessInformationContracts.getEntityTag", + "@azure/arm-apimanagement!TenantAccessOperations#get:member": "Microsoft.ApiManagement.AccessInformationContracts.get", + "@azure/arm-apimanagement!TagProductLinkOperations#listByProduct:member": "Microsoft.ApiManagement.TagProductLinkContracts.listByProduct", + "@azure/arm-apimanagement!TagProductLinkOperations#delete:member": "Microsoft.ApiManagement.TagProductLinkContracts.delete", + "@azure/arm-apimanagement!TagProductLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.TagProductLinkContracts.createOrUpdate", + "@azure/arm-apimanagement!TagProductLinkOperations#get:member": "Microsoft.ApiManagement.TagProductLinkContracts.get", + "@azure/arm-apimanagement!TagOperationLinkOperations#listByProduct:member": "Microsoft.ApiManagement.TagOperationLinkContracts.listByProduct", + "@azure/arm-apimanagement!TagOperationLinkOperations#delete:member": "Microsoft.ApiManagement.TagOperationLinkContracts.delete", + "@azure/arm-apimanagement!TagOperationLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.TagOperationLinkContracts.createOrUpdate", + "@azure/arm-apimanagement!TagOperationLinkOperations#get:member": "Microsoft.ApiManagement.TagOperationLinkContracts.get", + "@azure/arm-apimanagement!TagApiLinkOperations#listByProduct:member": "Microsoft.ApiManagement.TagApiLinkContracts.listByProduct", + "@azure/arm-apimanagement!TagApiLinkOperations#delete:member": "Microsoft.ApiManagement.TagApiLinkContracts.delete", + "@azure/arm-apimanagement!TagApiLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.TagApiLinkContracts.createOrUpdate", + "@azure/arm-apimanagement!TagApiLinkOperations#get:member": "Microsoft.ApiManagement.TagApiLinkContracts.get", + "@azure/arm-apimanagement!SubscriptionOperations#listSecrets:member": "Microsoft.ApiManagement.SubscriptionContracts.listSecrets", + "@azure/arm-apimanagement!SubscriptionOperations#regenerateSecondaryKey:member": "Microsoft.ApiManagement.SubscriptionContracts.regenerateSecondaryKey", + "@azure/arm-apimanagement!SubscriptionOperations#regeneratePrimaryKey:member": "Microsoft.ApiManagement.SubscriptionContracts.regeneratePrimaryKey", + "@azure/arm-apimanagement!SubscriptionOperations#list:member": "Microsoft.ApiManagement.SubscriptionContracts.list", + "@azure/arm-apimanagement!SubscriptionOperations#delete:member": "Microsoft.ApiManagement.SubscriptionContracts.delete", + "@azure/arm-apimanagement!SubscriptionOperations#update:member": "Microsoft.ApiManagement.SubscriptionContracts.update", + "@azure/arm-apimanagement!SubscriptionOperations#createOrUpdate:member": "Microsoft.ApiManagement.SubscriptionContracts.createOrUpdate", + "@azure/arm-apimanagement!SubscriptionOperations#getEntityTag:member": "Microsoft.ApiManagement.SubscriptionContracts.getEntityTag", + "@azure/arm-apimanagement!SubscriptionOperations#get:member": "Microsoft.ApiManagement.SubscriptionContracts.get", + "@azure/arm-apimanagement!TenantSettingsOperations#listByService:member": "Microsoft.ApiManagement.TenantSettingsContracts.listByService", + "@azure/arm-apimanagement!TenantSettingsOperations#get:member": "Microsoft.ApiManagement.TenantSettingsContracts.get", + "@azure/arm-apimanagement!GlobalSchemaOperations#listByService:member": "Microsoft.ApiManagement.GlobalSchemaContracts.listByService", + "@azure/arm-apimanagement!GlobalSchemaOperations#delete:member": "Microsoft.ApiManagement.GlobalSchemaContracts.delete", + "@azure/arm-apimanagement!GlobalSchemaOperations#createOrUpdate:member": "Microsoft.ApiManagement.GlobalSchemaContracts.createOrUpdate", + "@azure/arm-apimanagement!GlobalSchemaOperations#getEntityTag:member": "Microsoft.ApiManagement.GlobalSchemaContracts.getEntityTag", + "@azure/arm-apimanagement!GlobalSchemaOperations#get:member": "Microsoft.ApiManagement.GlobalSchemaContracts.get", + "@azure/arm-apimanagement!ProductGroupLinkOperations#listByProduct:member": "Microsoft.ApiManagement.ProductGroupLinkContracts.listByProduct", + "@azure/arm-apimanagement!ProductGroupLinkOperations#delete:member": "Microsoft.ApiManagement.ProductGroupLinkContracts.delete", + "@azure/arm-apimanagement!ProductGroupLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.ProductGroupLinkContracts.createOrUpdate", + "@azure/arm-apimanagement!ProductGroupLinkOperations#get:member": "Microsoft.ApiManagement.ProductGroupLinkContracts.get", + "@azure/arm-apimanagement!ProductApiLinkOperations#listByProduct:member": "Microsoft.ApiManagement.ProductApiLinkContracts.listByProduct", + "@azure/arm-apimanagement!ProductApiLinkOperations#delete:member": "Microsoft.ApiManagement.ProductApiLinkContracts.delete", + "@azure/arm-apimanagement!ProductApiLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.ProductApiLinkContracts.createOrUpdate", + "@azure/arm-apimanagement!ProductApiLinkOperations#get:member": "Microsoft.ApiManagement.ProductApiLinkContracts.get", + "@azure/arm-apimanagement!ProductSubscriptionsOperations#list:member": "Microsoft.ApiManagement.ProductContracts.list", + "@azure/arm-apimanagement!ProductGroupOperations#Delete:member": "Microsoft.ApiManagement.ProductContracts.productGroupDelete", + "@azure/arm-apimanagement!ProductGroupOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.ProductContracts.productGroupCreateOrUpdate", + "@azure/arm-apimanagement!ProductGroupOperations#CheckEntityExists:member": "Microsoft.ApiManagement.ProductContracts.productGroupCheckEntityExists", + "@azure/arm-apimanagement!ProductGroupOperations#ListByProduct:member": "Microsoft.ApiManagement.ProductContracts.productGroupListByProduct", + "@azure/arm-apimanagement!ProductApiOperations#Delete:member": "Microsoft.ApiManagement.ProductContracts.productApiDelete", + "@azure/arm-apimanagement!ProductApiOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.ProductContracts.productApiCreateOrUpdate", + "@azure/arm-apimanagement!ProductApiOperations#checkEntityExists:member": "Microsoft.ApiManagement.ProductContracts.checkEntityExists", + "@azure/arm-apimanagement!ProductApiOperations#listByProduct:member": "Microsoft.ApiManagement.ProductContracts.listByProduct", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#listPrivateLinkResources:member": "Microsoft.ApiManagement.PrivateLinkResources.listPrivateLinkResources", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#getPrivateLinkResource:member": "Microsoft.ApiManagement.PrivateLinkResources.getPrivateLinkResource", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#listByService:member": "Microsoft.ApiManagement.PrivateEndpointConnections.listByService", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#delete:member": "Microsoft.ApiManagement.PrivateEndpointConnections.delete", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#createOrUpdate:member": "Microsoft.ApiManagement.PrivateEndpointConnections.createOrUpdate", + "@azure/arm-apimanagement!PrivateEndpointConnectionOperations#getByName:member": "Microsoft.ApiManagement.PrivateEndpointConnections.getByName", + "@azure/arm-apimanagement!PortalRevisionOperations#listByService:member": "Microsoft.ApiManagement.PortalRevisionContracts.listByService", + "@azure/arm-apimanagement!PortalRevisionOperations#update:member": "Microsoft.ApiManagement.PortalRevisionContracts.update", + "@azure/arm-apimanagement!PortalRevisionOperations#createOrUpdate:member": "Microsoft.ApiManagement.PortalRevisionContracts.createOrUpdate", + "@azure/arm-apimanagement!PortalRevisionOperations#getEntityTag:member": "Microsoft.ApiManagement.PortalRevisionContracts.getEntityTag", + "@azure/arm-apimanagement!PortalRevisionOperations#get:member": "Microsoft.ApiManagement.PortalRevisionContracts.get", + "@azure/arm-apimanagement!ClientApplicationProductLinkOperations#listByClientApplications:member": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.listByClientApplications", + "@azure/arm-apimanagement!ClientApplicationProductLinkOperations#delete:member": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.delete", + "@azure/arm-apimanagement!ClientApplicationProductLinkOperations#create:member": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.create", + "@azure/arm-apimanagement!ClientApplicationProductLinkOperations#get:member": "Microsoft.ApiManagement.ClientApplicationProductLinkContracts.get", + "@azure/arm-apimanagement!ClientApplicationOperations#listSecrets:member": "Microsoft.ApiManagement.ClientApplicationContracts.listSecrets", + "@azure/arm-apimanagement!ClientApplicationOperations#listByService:member": "Microsoft.ApiManagement.ClientApplicationContracts.listByService", + "@azure/arm-apimanagement!ClientApplicationOperations#delete:member": "Microsoft.ApiManagement.ClientApplicationContracts.delete", + "@azure/arm-apimanagement!ClientApplicationOperations#createOrUpdate:member": "Microsoft.ApiManagement.ClientApplicationContracts.createOrUpdate", + "@azure/arm-apimanagement!ClientApplicationOperations#getEntityTag:member": "Microsoft.ApiManagement.ClientApplicationContracts.getEntityTag", + "@azure/arm-apimanagement!ClientApplicationOperations#get:member": "Microsoft.ApiManagement.ClientApplicationContracts.get", + "@azure/arm-apimanagement!PortalConfigOperations#listByService:member": "Microsoft.ApiManagement.PortalConfigContracts.listByService", + "@azure/arm-apimanagement!PortalConfigOperations#update:member": "Microsoft.ApiManagement.PortalConfigContracts.update", + "@azure/arm-apimanagement!PortalConfigOperations#createOrUpdate:member": "Microsoft.ApiManagement.PortalConfigContracts.createOrUpdate", + "@azure/arm-apimanagement!PortalConfigOperations#getEntityTag:member": "Microsoft.ApiManagement.PortalConfigContracts.getEntityTag", + "@azure/arm-apimanagement!PortalConfigOperations#get:member": "Microsoft.ApiManagement.PortalConfigContracts.get", + "@azure/arm-apimanagement!PolicyRestrictionOperations#listByService:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.listByService", + "@azure/arm-apimanagement!PolicyRestrictionOperations#delete:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.delete", + "@azure/arm-apimanagement!PolicyRestrictionOperations#update:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.update", + "@azure/arm-apimanagement!PolicyRestrictionOperations#createOrUpdate:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.createOrUpdate", + "@azure/arm-apimanagement!PolicyRestrictionOperations#getEntityTag:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.getEntityTag", + "@azure/arm-apimanagement!PolicyRestrictionOperations#get:member": "Microsoft.ApiManagement.PolicyRestrictionContracts.get", + "@azure/arm-apimanagement!PolicyFragmentOperations#listReferences:member": "Microsoft.ApiManagement.PolicyFragmentContracts.listReferences", + "@azure/arm-apimanagement!PolicyFragmentOperations#listByService:member": "Microsoft.ApiManagement.PolicyFragmentContracts.listByService", + "@azure/arm-apimanagement!PolicyFragmentOperations#delete:member": "Microsoft.ApiManagement.PolicyFragmentContracts.delete", + "@azure/arm-apimanagement!PolicyFragmentOperations#createOrUpdate:member": "Microsoft.ApiManagement.PolicyFragmentContracts.createOrUpdate", + "@azure/arm-apimanagement!PolicyFragmentOperations#getEntityTag:member": "Microsoft.ApiManagement.PolicyFragmentContracts.getEntityTag", + "@azure/arm-apimanagement!PolicyFragmentOperations#get:member": "Microsoft.ApiManagement.PolicyFragmentContracts.get", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#listSecrets:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listSecrets", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#listByService:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.listByService", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#delete:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.delete", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#update:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.update", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#createOrUpdate:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.createOrUpdate", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#getEntityTag:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.getEntityTag", + "@azure/arm-apimanagement!OpenIdConnectProviderOperations#get:member": "Microsoft.ApiManagement.OpenidConnectProviderContracts.get", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientEmailOperations#Delete:member": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailDelete", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientEmailOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCreateOrUpdate", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientEmailOperations#CheckEntityExists:member": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailCheckEntityExists", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientEmailOperations#ListByNotification:member": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientEmailListByNotification", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientUserOperations#delete:member": "Microsoft.ApiManagement.WorkspaceNotification.delete", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientUserOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.WorkspaceNotification.workspaceNotificationRecipientUserCreateOrUpdate", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientUserOperations#checkEntityExists:member": "Microsoft.ApiManagement.WorkspaceNotification.checkEntityExists", + "@azure/arm-apimanagement!WorkspaceNotificationRecipientUserOperations#listByNotification:member": "Microsoft.ApiManagement.WorkspaceNotification.listByNotification", + "@azure/arm-apimanagement!NotificationRecipientEmailOperations#Delete:member": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailDelete", + "@azure/arm-apimanagement!NotificationRecipientEmailOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCreateOrUpdate", + "@azure/arm-apimanagement!NotificationRecipientEmailOperations#CheckEntityExists:member": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailCheckEntityExists", + "@azure/arm-apimanagement!NotificationRecipientEmailOperations#ListByNotification:member": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientEmailListByNotification", + "@azure/arm-apimanagement!NotificationRecipientUserOperations#delete:member": "Microsoft.ApiManagement.NotificationContracts.delete", + "@azure/arm-apimanagement!NotificationRecipientUserOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.NotificationContracts.notificationRecipientUserCreateOrUpdate", + "@azure/arm-apimanagement!NotificationRecipientUserOperations#checkEntityExists:member": "Microsoft.ApiManagement.NotificationContracts.checkEntityExists", + "@azure/arm-apimanagement!NotificationRecipientUserOperations#listByNotification:member": "Microsoft.ApiManagement.NotificationContracts.listByNotification", + "@azure/arm-apimanagement!NotificationOperations#listByService:member": "Microsoft.ApiManagement.NotificationContracts.listByService", + "@azure/arm-apimanagement!NotificationOperations#createOrUpdate:member": "Microsoft.ApiManagement.NotificationContracts.createOrUpdate", + "@azure/arm-apimanagement!NotificationOperations#get:member": "Microsoft.ApiManagement.NotificationContracts.get", + "@azure/arm-apimanagement!NamedValueOperations#refreshSecret:member": "Microsoft.ApiManagement.NamedValueContracts.refreshSecret", + "@azure/arm-apimanagement!NamedValueOperations#listValue:member": "Microsoft.ApiManagement.NamedValueContracts.listValue", + "@azure/arm-apimanagement!NamedValueOperations#listByService:member": "Microsoft.ApiManagement.NamedValueContracts.listByService", + "@azure/arm-apimanagement!NamedValueOperations#delete:member": "Microsoft.ApiManagement.NamedValueContracts.delete", + "@azure/arm-apimanagement!NamedValueOperations#update:member": "Microsoft.ApiManagement.NamedValueContracts.update", + "@azure/arm-apimanagement!NamedValueOperations#createOrUpdate:member": "Microsoft.ApiManagement.NamedValueContracts.createOrUpdate", + "@azure/arm-apimanagement!NamedValueOperations#getEntityTag:member": "Microsoft.ApiManagement.NamedValueContracts.getEntityTag", + "@azure/arm-apimanagement!NamedValueOperations#get:member": "Microsoft.ApiManagement.NamedValueContracts.get", + "@azure/arm-apimanagement!LoggerOperations#listByService:member": "Microsoft.ApiManagement.LoggerContracts.listByService", + "@azure/arm-apimanagement!LoggerOperations#delete:member": "Microsoft.ApiManagement.LoggerContracts.delete", + "@azure/arm-apimanagement!LoggerOperations#update:member": "Microsoft.ApiManagement.LoggerContracts.update", + "@azure/arm-apimanagement!LoggerOperations#createOrUpdate:member": "Microsoft.ApiManagement.LoggerContracts.createOrUpdate", + "@azure/arm-apimanagement!LoggerOperations#getEntityTag:member": "Microsoft.ApiManagement.LoggerContracts.getEntityTag", + "@azure/arm-apimanagement!LoggerOperations#get:member": "Microsoft.ApiManagement.LoggerContracts.get", + "@azure/arm-apimanagement!IdentityProviderOperations#listSecrets:member": "Microsoft.ApiManagement.IdentityProviderContracts.listSecrets", + "@azure/arm-apimanagement!IdentityProviderOperations#listByService:member": "Microsoft.ApiManagement.IdentityProviderContracts.listByService", + "@azure/arm-apimanagement!IdentityProviderOperations#delete:member": "Microsoft.ApiManagement.IdentityProviderContracts.delete", + "@azure/arm-apimanagement!IdentityProviderOperations#update:member": "Microsoft.ApiManagement.IdentityProviderContracts.update", + "@azure/arm-apimanagement!IdentityProviderOperations#createOrUpdate:member": "Microsoft.ApiManagement.IdentityProviderContracts.createOrUpdate", + "@azure/arm-apimanagement!IdentityProviderOperations#getEntityTag:member": "Microsoft.ApiManagement.IdentityProviderContracts.getEntityTag", + "@azure/arm-apimanagement!IdentityProviderOperations#get:member": "Microsoft.ApiManagement.IdentityProviderContracts.get", + "@azure/arm-apimanagement!WorkspaceGroupUserOperations#Delete:member": "Microsoft.ApiManagement.WorkspaceGroup.workspaceGroupUserDelete", + "@azure/arm-apimanagement!WorkspaceGroupUserOperations#create:member": "Microsoft.ApiManagement.WorkspaceGroup.create", + "@azure/arm-apimanagement!WorkspaceGroupUserOperations#checkEntityExists:member": "Microsoft.ApiManagement.WorkspaceGroup.checkEntityExists", + "@azure/arm-apimanagement!WorkspaceGroupUserOperations#list:member": "Microsoft.ApiManagement.WorkspaceGroup.list", + "@azure/arm-apimanagement!GroupUserOperations#Delete:member": "Microsoft.ApiManagement.GroupContracts.groupUserDelete", + "@azure/arm-apimanagement!GroupUserOperations#create:member": "Microsoft.ApiManagement.GroupContracts.create", + "@azure/arm-apimanagement!GroupUserOperations#checkEntityExists:member": "Microsoft.ApiManagement.GroupContracts.checkEntityExists", + "@azure/arm-apimanagement!GroupUserOperations#list:member": "Microsoft.ApiManagement.GroupContracts.list", + "@azure/arm-apimanagement!GroupOperations#listByService:member": "Microsoft.ApiManagement.GroupContracts.listByService", + "@azure/arm-apimanagement!GroupOperations#delete:member": "Microsoft.ApiManagement.GroupContracts.delete", + "@azure/arm-apimanagement!GroupOperations#update:member": "Microsoft.ApiManagement.GroupContracts.update", + "@azure/arm-apimanagement!GroupOperations#createOrUpdate:member": "Microsoft.ApiManagement.GroupContracts.createOrUpdate", + "@azure/arm-apimanagement!GroupOperations#getEntityTag:member": "Microsoft.ApiManagement.GroupContracts.getEntityTag", + "@azure/arm-apimanagement!GroupOperations#get:member": "Microsoft.ApiManagement.GroupContracts.get", + "@azure/arm-apimanagement!GatewayCertificateAuthorityOperations#listByService:member": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.listByService", + "@azure/arm-apimanagement!GatewayCertificateAuthorityOperations#delete:member": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.delete", + "@azure/arm-apimanagement!GatewayCertificateAuthorityOperations#createOrUpdate:member": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.createOrUpdate", + "@azure/arm-apimanagement!GatewayCertificateAuthorityOperations#getEntityTag:member": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.getEntityTag", + "@azure/arm-apimanagement!GatewayCertificateAuthorityOperations#get:member": "Microsoft.ApiManagement.GatewayCertificateAuthorityContracts.get", + "@azure/arm-apimanagement!GatewayHostnameConfigurationOperations#listByService:member": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.listByService", + "@azure/arm-apimanagement!GatewayHostnameConfigurationOperations#delete:member": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.delete", + "@azure/arm-apimanagement!GatewayHostnameConfigurationOperations#createOrUpdate:member": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.createOrUpdate", + "@azure/arm-apimanagement!GatewayHostnameConfigurationOperations#getEntityTag:member": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.getEntityTag", + "@azure/arm-apimanagement!GatewayHostnameConfigurationOperations#get:member": "Microsoft.ApiManagement.GatewayHostnameConfigurationContracts.get", + "@azure/arm-apimanagement!GatewayApiOperations#Delete:member": "Microsoft.ApiManagement.GatewayContracts.gatewayApiDelete", + "@azure/arm-apimanagement!GatewayApiOperations#CreateOrUpdate:member": "Microsoft.ApiManagement.GatewayContracts.gatewayApiCreateOrUpdate", + "@azure/arm-apimanagement!GatewayApiOperations#GetEntityTag:member": "Microsoft.ApiManagement.GatewayContracts.gatewayApiGetEntityTag", + "@azure/arm-apimanagement!GatewayApiOperations#ListByService:member": "Microsoft.ApiManagement.GatewayContracts.gatewayApiListByService", + "@azure/arm-apimanagement!GatewayOperations#listTrace:member": "Microsoft.ApiManagement.GatewayContracts.listTrace", + "@azure/arm-apimanagement!GatewayOperations#listDebugCredentials:member": "Microsoft.ApiManagement.GatewayContracts.listDebugCredentials", + "@azure/arm-apimanagement!GatewayOperations#invalidateDebugCredentials:member": "Microsoft.ApiManagement.GatewayContracts.invalidateDebugCredentials", + "@azure/arm-apimanagement!GatewayOperations#generateToken:member": "Microsoft.ApiManagement.GatewayContracts.generateToken", + "@azure/arm-apimanagement!GatewayOperations#regenerateKey:member": "Microsoft.ApiManagement.GatewayContracts.regenerateKey", + "@azure/arm-apimanagement!GatewayOperations#listKeys:member": "Microsoft.ApiManagement.GatewayContracts.listKeys", + "@azure/arm-apimanagement!GatewayOperations#listByService:member": "Microsoft.ApiManagement.GatewayContracts.listByService", + "@azure/arm-apimanagement!GatewayOperations#delete:member": "Microsoft.ApiManagement.GatewayContracts.delete", + "@azure/arm-apimanagement!GatewayOperations#update:member": "Microsoft.ApiManagement.GatewayContracts.update", + "@azure/arm-apimanagement!GatewayOperations#createOrUpdate:member": "Microsoft.ApiManagement.GatewayContracts.createOrUpdate", + "@azure/arm-apimanagement!GatewayOperations#getEntityTag:member": "Microsoft.ApiManagement.GatewayContracts.getEntityTag", + "@azure/arm-apimanagement!GatewayOperations#get:member": "Microsoft.ApiManagement.GatewayContracts.get", + "@azure/arm-apimanagement!ApiGatewayHostnameBindingOperations#refreshSecret:member": "Microsoft.ApiManagement.GatewayHostnameBindingResources.refreshSecret", + "@azure/arm-apimanagement!ApiGatewayHostnameBindingOperations#listByGateway:member": "Microsoft.ApiManagement.GatewayHostnameBindingResources.listByGateway", + "@azure/arm-apimanagement!ApiGatewayHostnameBindingOperations#delete:member": "Microsoft.ApiManagement.GatewayHostnameBindingResources.delete", + "@azure/arm-apimanagement!ApiGatewayHostnameBindingOperations#createOrUpdate:member": "Microsoft.ApiManagement.GatewayHostnameBindingResources.createOrUpdate", + "@azure/arm-apimanagement!ApiGatewayHostnameBindingOperations#get:member": "Microsoft.ApiManagement.GatewayHostnameBindingResources.get", + "@azure/arm-apimanagement!ApiGatewayConfigConnectionOperations#listByGateway:member": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.listByGateway", + "@azure/arm-apimanagement!ApiGatewayConfigConnectionOperations#delete:member": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.delete", + "@azure/arm-apimanagement!ApiGatewayConfigConnectionOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.createOrUpdate", + "@azure/arm-apimanagement!ApiGatewayConfigConnectionOperations#get:member": "Microsoft.ApiManagement.ApiManagementGatewayConfigConnectionResources.get", + "@azure/arm-apimanagement!EmailTemplateOperations#listByService:member": "Microsoft.ApiManagement.EmailTemplateContracts.listByService", + "@azure/arm-apimanagement!EmailTemplateOperations#delete:member": "Microsoft.ApiManagement.EmailTemplateContracts.delete", + "@azure/arm-apimanagement!EmailTemplateOperations#update:member": "Microsoft.ApiManagement.EmailTemplateContracts.update", + "@azure/arm-apimanagement!EmailTemplateOperations#createOrUpdate:member": "Microsoft.ApiManagement.EmailTemplateContracts.createOrUpdate", + "@azure/arm-apimanagement!EmailTemplateOperations#getEntityTag:member": "Microsoft.ApiManagement.EmailTemplateContracts.getEntityTag", + "@azure/arm-apimanagement!EmailTemplateOperations#get:member": "Microsoft.ApiManagement.EmailTemplateContracts.get", + "@azure/arm-apimanagement!DocumentationOperations#listByService:member": "Microsoft.ApiManagement.DocumentationContracts.listByService", + "@azure/arm-apimanagement!DocumentationOperations#delete:member": "Microsoft.ApiManagement.DocumentationContracts.delete", + "@azure/arm-apimanagement!DocumentationOperations#update:member": "Microsoft.ApiManagement.DocumentationContracts.update", + "@azure/arm-apimanagement!DocumentationOperations#createOrUpdate:member": "Microsoft.ApiManagement.DocumentationContracts.createOrUpdate", + "@azure/arm-apimanagement!DocumentationOperations#getEntityTag:member": "Microsoft.ApiManagement.DocumentationContracts.getEntityTag", + "@azure/arm-apimanagement!DocumentationOperations#get:member": "Microsoft.ApiManagement.DocumentationContracts.get", + "@azure/arm-apimanagement!DeletedServicesOperations#listBySubscription:member": "Microsoft.ApiManagement.DeletedServicesOperationGroup.listBySubscription", + "@azure/arm-apimanagement!DeletedServicesOperations#purge:member": "Microsoft.ApiManagement.DeletedServiceContracts.purge", + "@azure/arm-apimanagement!DeletedServicesOperations#getByName:member": "Microsoft.ApiManagement.DeletedServiceContracts.getByName", + "@azure/arm-apimanagement!ContentItemOperations#listByService:member": "Microsoft.ApiManagement.ContentItemContracts.listByService", + "@azure/arm-apimanagement!ContentItemOperations#delete:member": "Microsoft.ApiManagement.ContentItemContracts.delete", + "@azure/arm-apimanagement!ContentItemOperations#createOrUpdate:member": "Microsoft.ApiManagement.ContentItemContracts.createOrUpdate", + "@azure/arm-apimanagement!ContentItemOperations#getEntityTag:member": "Microsoft.ApiManagement.ContentItemContracts.getEntityTag", + "@azure/arm-apimanagement!ContentItemOperations#get:member": "Microsoft.ApiManagement.ContentItemContracts.get", + "@azure/arm-apimanagement!ContentTypeOperations#listByService:member": "Microsoft.ApiManagement.ContentTypeContracts.listByService", + "@azure/arm-apimanagement!ContentTypeOperations#delete:member": "Microsoft.ApiManagement.ContentTypeContracts.delete", + "@azure/arm-apimanagement!ContentTypeOperations#createOrUpdate:member": "Microsoft.ApiManagement.ContentTypeContracts.createOrUpdate", + "@azure/arm-apimanagement!ContentTypeOperations#get:member": "Microsoft.ApiManagement.ContentTypeContracts.get", + "@azure/arm-apimanagement!CertificateOperations#refreshSecret:member": "Microsoft.ApiManagement.CertificateContracts.refreshSecret", + "@azure/arm-apimanagement!CertificateOperations#listByService:member": "Microsoft.ApiManagement.CertificateContracts.listByService", + "@azure/arm-apimanagement!CertificateOperations#delete:member": "Microsoft.ApiManagement.CertificateContracts.delete", + "@azure/arm-apimanagement!CertificateOperations#createOrUpdate:member": "Microsoft.ApiManagement.CertificateContracts.createOrUpdate", + "@azure/arm-apimanagement!CertificateOperations#getEntityTag:member": "Microsoft.ApiManagement.CertificateContracts.getEntityTag", + "@azure/arm-apimanagement!CertificateOperations#get:member": "Microsoft.ApiManagement.CertificateContracts.get", + "@azure/arm-apimanagement!CacheOperations#listByService:member": "Microsoft.ApiManagement.CacheContracts.listByService", + "@azure/arm-apimanagement!CacheOperations#delete:member": "Microsoft.ApiManagement.CacheContracts.delete", + "@azure/arm-apimanagement!CacheOperations#update:member": "Microsoft.ApiManagement.CacheContracts.update", + "@azure/arm-apimanagement!CacheOperations#createOrUpdate:member": "Microsoft.ApiManagement.CacheContracts.createOrUpdate", + "@azure/arm-apimanagement!CacheOperations#getEntityTag:member": "Microsoft.ApiManagement.CacheContracts.getEntityTag", + "@azure/arm-apimanagement!CacheOperations#get:member": "Microsoft.ApiManagement.CacheContracts.get", + "@azure/arm-apimanagement!BackendOperations#reconnect:member": "Microsoft.ApiManagement.BackendContracts.reconnect", + "@azure/arm-apimanagement!BackendOperations#listByService:member": "Microsoft.ApiManagement.BackendContracts.listByService", + "@azure/arm-apimanagement!BackendOperations#delete:member": "Microsoft.ApiManagement.BackendContracts.delete", + "@azure/arm-apimanagement!BackendOperations#update:member": "Microsoft.ApiManagement.BackendContracts.update", + "@azure/arm-apimanagement!BackendOperations#createOrUpdate:member": "Microsoft.ApiManagement.BackendContracts.createOrUpdate", + "@azure/arm-apimanagement!BackendOperations#getEntityTag:member": "Microsoft.ApiManagement.BackendContracts.getEntityTag", + "@azure/arm-apimanagement!BackendOperations#get:member": "Microsoft.ApiManagement.BackendContracts.get", + "@azure/arm-apimanagement!AuthorizationServerOperations#listSecrets:member": "Microsoft.ApiManagement.AuthorizationServerContracts.listSecrets", + "@azure/arm-apimanagement!AuthorizationServerOperations#listByService:member": "Microsoft.ApiManagement.AuthorizationServerContracts.listByService", + "@azure/arm-apimanagement!AuthorizationServerOperations#delete:member": "Microsoft.ApiManagement.AuthorizationServerContracts.delete", + "@azure/arm-apimanagement!AuthorizationServerOperations#update:member": "Microsoft.ApiManagement.AuthorizationServerContracts.update", + "@azure/arm-apimanagement!AuthorizationServerOperations#createOrUpdate:member": "Microsoft.ApiManagement.AuthorizationServerContracts.createOrUpdate", + "@azure/arm-apimanagement!AuthorizationServerOperations#getEntityTag:member": "Microsoft.ApiManagement.AuthorizationServerContracts.getEntityTag", + "@azure/arm-apimanagement!AuthorizationServerOperations#get:member": "Microsoft.ApiManagement.AuthorizationServerContracts.get", + "@azure/arm-apimanagement!AuthorizationAccessPolicyOperations#listByAuthorization:member": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.listByAuthorization", + "@azure/arm-apimanagement!AuthorizationAccessPolicyOperations#delete:member": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.delete", + "@azure/arm-apimanagement!AuthorizationAccessPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.createOrUpdate", + "@azure/arm-apimanagement!AuthorizationAccessPolicyOperations#get:member": "Microsoft.ApiManagement.AuthorizationAccessPolicyContracts.get", + "@azure/arm-apimanagement!AuthorizationLoginLinksOperations#post:member": "Microsoft.ApiManagement.AuthorizationContracts.post", + "@azure/arm-apimanagement!AuthorizationOperations#confirmConsentCode:member": "Microsoft.ApiManagement.AuthorizationContracts.confirmConsentCode", + "@azure/arm-apimanagement!AuthorizationOperations#listByAuthorizationProvider:member": "Microsoft.ApiManagement.AuthorizationContracts.listByAuthorizationProvider", + "@azure/arm-apimanagement!AuthorizationOperations#delete:member": "Microsoft.ApiManagement.AuthorizationContracts.delete", + "@azure/arm-apimanagement!AuthorizationOperations#createOrUpdate:member": "Microsoft.ApiManagement.AuthorizationContracts.createOrUpdate", + "@azure/arm-apimanagement!AuthorizationOperations#get:member": "Microsoft.ApiManagement.AuthorizationContracts.get", + "@azure/arm-apimanagement!AuthorizationProviderOperations#refreshSecret:member": "Microsoft.ApiManagement.AuthorizationProviderContracts.refreshSecret", + "@azure/arm-apimanagement!AuthorizationProviderOperations#listByService:member": "Microsoft.ApiManagement.AuthorizationProviderContracts.listByService", + "@azure/arm-apimanagement!AuthorizationProviderOperations#delete:member": "Microsoft.ApiManagement.AuthorizationProviderContracts.delete", + "@azure/arm-apimanagement!AuthorizationProviderOperations#createOrUpdate:member": "Microsoft.ApiManagement.AuthorizationProviderContracts.createOrUpdate", + "@azure/arm-apimanagement!AuthorizationProviderOperations#get:member": "Microsoft.ApiManagement.AuthorizationProviderContracts.get", + "@azure/arm-apimanagement!ApiVersionSetOperations#listByService:member": "Microsoft.ApiManagement.ApiVersionSetContracts.listByService", + "@azure/arm-apimanagement!ApiVersionSetOperations#delete:member": "Microsoft.ApiManagement.ApiVersionSetContracts.delete", + "@azure/arm-apimanagement!ApiVersionSetOperations#update:member": "Microsoft.ApiManagement.ApiVersionSetContracts.update", + "@azure/arm-apimanagement!ApiVersionSetOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiVersionSetContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiVersionSetOperations#getEntityTag:member": "Microsoft.ApiManagement.ApiVersionSetContracts.getEntityTag", + "@azure/arm-apimanagement!ApiVersionSetOperations#get:member": "Microsoft.ApiManagement.ApiVersionSetContracts.get", + "@azure/arm-apimanagement!ApiToolOperations#listByApi:member": "Microsoft.ApiManagement.ToolContracts.listByApi", + "@azure/arm-apimanagement!ApiToolOperations#delete:member": "Microsoft.ApiManagement.ToolContracts.delete", + "@azure/arm-apimanagement!ApiToolOperations#update:member": "Microsoft.ApiManagement.ToolContracts.update", + "@azure/arm-apimanagement!ApiToolOperations#createOrUpdate:member": "Microsoft.ApiManagement.ToolContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiToolOperations#getEntityTag:member": "Microsoft.ApiManagement.ToolContracts.getEntityTag", + "@azure/arm-apimanagement!ApiToolOperations#get:member": "Microsoft.ApiManagement.ToolContracts.get", + "@azure/arm-apimanagement!ProductWikisOperations#list:member": "Microsoft.ApiManagement.ProductWiki.list", + "@azure/arm-apimanagement!ApiWikisOperations#list:member": "Microsoft.ApiManagement.WikiContracts.list", + "@azure/arm-apimanagement!ApiWikiOperations#delete:member": "Microsoft.ApiManagement.WikiContracts.delete", + "@azure/arm-apimanagement!ApiWikiOperations#update:member": "Microsoft.ApiManagement.WikiContracts.update", + "@azure/arm-apimanagement!ApiWikiOperations#createOrUpdate:member": "Microsoft.ApiManagement.WikiContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiWikiOperations#getEntityTag:member": "Microsoft.ApiManagement.WikiContracts.getEntityTag", + "@azure/arm-apimanagement!ApiWikiOperations#get:member": "Microsoft.ApiManagement.WikiContracts.get", + "@azure/arm-apimanagement!ApiTagDescriptionOperations#listByService:member": "Microsoft.ApiManagement.TagDescriptionContracts.listByService", + "@azure/arm-apimanagement!ApiTagDescriptionOperations#delete:member": "Microsoft.ApiManagement.TagDescriptionContracts.delete", + "@azure/arm-apimanagement!ApiTagDescriptionOperations#createOrUpdate:member": "Microsoft.ApiManagement.TagDescriptionContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiTagDescriptionOperations#getEntityTag:member": "Microsoft.ApiManagement.TagDescriptionContracts.getEntityTag", + "@azure/arm-apimanagement!ApiTagDescriptionOperations#get:member": "Microsoft.ApiManagement.TagDescriptionContracts.get", + "@azure/arm-apimanagement!ApiIssueAttachmentOperations#listByService:member": "Microsoft.ApiManagement.IssueAttachmentContracts.listByService", + "@azure/arm-apimanagement!ApiIssueAttachmentOperations#delete:member": "Microsoft.ApiManagement.IssueAttachmentContracts.delete", + "@azure/arm-apimanagement!ApiIssueAttachmentOperations#createOrUpdate:member": "Microsoft.ApiManagement.IssueAttachmentContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiIssueAttachmentOperations#getEntityTag:member": "Microsoft.ApiManagement.IssueAttachmentContracts.getEntityTag", + "@azure/arm-apimanagement!ApiIssueAttachmentOperations#get:member": "Microsoft.ApiManagement.IssueAttachmentContracts.get", + "@azure/arm-apimanagement!ApiIssueCommentOperations#listByService:member": "Microsoft.ApiManagement.IssueCommentContracts.listByService", + "@azure/arm-apimanagement!ApiIssueCommentOperations#delete:member": "Microsoft.ApiManagement.IssueCommentContracts.delete", + "@azure/arm-apimanagement!ApiIssueCommentOperations#createOrUpdate:member": "Microsoft.ApiManagement.IssueCommentContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiIssueCommentOperations#getEntityTag:member": "Microsoft.ApiManagement.IssueCommentContracts.getEntityTag", + "@azure/arm-apimanagement!ApiIssueCommentOperations#get:member": "Microsoft.ApiManagement.IssueCommentContracts.get", + "@azure/arm-apimanagement!ApiIssueOperations#listByService:member": "Microsoft.ApiManagement.IssueContracts.listByService", + "@azure/arm-apimanagement!ApiIssueOperations#delete:member": "Microsoft.ApiManagement.IssueContracts.delete", + "@azure/arm-apimanagement!ApiIssueOperations#update:member": "Microsoft.ApiManagement.IssueContracts.update", + "@azure/arm-apimanagement!ApiIssueOperations#createOrUpdate:member": "Microsoft.ApiManagement.IssueContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiIssueOperations#getEntityTag:member": "Microsoft.ApiManagement.IssueContracts.getEntityTag", + "@azure/arm-apimanagement!ApiIssueOperations#get:member": "Microsoft.ApiManagement.IssueContracts.get", + "@azure/arm-apimanagement!ApiDiagnosticOperations#listByService:member": "Microsoft.ApiManagement.DiagnosticContracts.listByService", + "@azure/arm-apimanagement!ApiDiagnosticOperations#delete:member": "Microsoft.ApiManagement.DiagnosticContracts.delete", + "@azure/arm-apimanagement!ApiDiagnosticOperations#update:member": "Microsoft.ApiManagement.DiagnosticContracts.update", + "@azure/arm-apimanagement!ApiDiagnosticOperations#createOrUpdate:member": "Microsoft.ApiManagement.DiagnosticContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiDiagnosticOperations#getEntityTag:member": "Microsoft.ApiManagement.DiagnosticContracts.getEntityTag", + "@azure/arm-apimanagement!ApiDiagnosticOperations#get:member": "Microsoft.ApiManagement.DiagnosticContracts.get", + "@azure/arm-apimanagement!ApiSchemaOperations#listByApi:member": "Microsoft.ApiManagement.SchemaContracts.listByApi", + "@azure/arm-apimanagement!ApiSchemaOperations#delete:member": "Microsoft.ApiManagement.SchemaContracts.delete", + "@azure/arm-apimanagement!ApiSchemaOperations#createOrUpdate:member": "Microsoft.ApiManagement.SchemaContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiSchemaOperations#getEntityTag:member": "Microsoft.ApiManagement.SchemaContracts.getEntityTag", + "@azure/arm-apimanagement!ApiSchemaOperations#get:member": "Microsoft.ApiManagement.SchemaContracts.get", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#listByApi:member": "Microsoft.ApiManagement.ResolverContracts.listByApi", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#delete:member": "Microsoft.ApiManagement.ResolverContracts.delete", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#update:member": "Microsoft.ApiManagement.ResolverContracts.update", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#createOrUpdate:member": "Microsoft.ApiManagement.ResolverContracts.createOrUpdate", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#getEntityTag:member": "Microsoft.ApiManagement.ResolverContracts.getEntityTag", + "@azure/arm-apimanagement!GraphQLApiResolverOperations#get:member": "Microsoft.ApiManagement.ResolverContracts.get", + "@azure/arm-apimanagement!ApiOperationPolicyOperations#listByOperation:member": "Microsoft.ApiManagement.PolicyContracts.listByOperation", + "@azure/arm-apimanagement!ApiOperationPolicyOperations#delete:member": "Microsoft.ApiManagement.PolicyContracts.delete", + "@azure/arm-apimanagement!ApiOperationPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.PolicyContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiOperationPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.PolicyContracts.getEntityTag", + "@azure/arm-apimanagement!ApiOperationPolicyOperations#get:member": "Microsoft.ApiManagement.PolicyContracts.get", + "@azure/arm-apimanagement!ApiOperationOperations#listByApi:member": "Microsoft.ApiManagement.OperationContracts.listByApi", + "@azure/arm-apimanagement!ApiOperationOperations#delete:member": "Microsoft.ApiManagement.OperationContracts.delete", + "@azure/arm-apimanagement!ApiOperationOperations#update:member": "Microsoft.ApiManagement.OperationContracts.update", + "@azure/arm-apimanagement!ApiOperationOperations#createOrUpdate:member": "Microsoft.ApiManagement.OperationContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiOperationOperations#getEntityTag:member": "Microsoft.ApiManagement.OperationContracts.getEntityTag", + "@azure/arm-apimanagement!ApiOperationOperations#get:member": "Microsoft.ApiManagement.OperationContracts.get", + "@azure/arm-apimanagement!ApiReleaseOperations#listByService:member": "Microsoft.ApiManagement.ApiReleaseContracts.listByService", + "@azure/arm-apimanagement!ApiReleaseOperations#delete:member": "Microsoft.ApiManagement.ApiReleaseContracts.delete", + "@azure/arm-apimanagement!ApiReleaseOperations#update:member": "Microsoft.ApiManagement.ApiReleaseContracts.update", + "@azure/arm-apimanagement!ApiReleaseOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiReleaseContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiReleaseOperations#getEntityTag:member": "Microsoft.ApiManagement.ApiReleaseContracts.getEntityTag", + "@azure/arm-apimanagement!ApiReleaseOperations#get:member": "Microsoft.ApiManagement.ApiReleaseContracts.get", + "@azure/arm-apimanagement!TagResourceOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.tagResourceListByService", + "@azure/arm-apimanagement!ReportsOperations#listByRequest:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByRequest", + "@azure/arm-apimanagement!ReportsOperations#listByTime:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTime", + "@azure/arm-apimanagement!ReportsOperations#listBySubscription:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listBySubscription", + "@azure/arm-apimanagement!ReportsOperations#listByGeo:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByGeo", + "@azure/arm-apimanagement!ReportsOperations#listByProduct:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByProduct", + "@azure/arm-apimanagement!ReportsOperations#listByOperation:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByOperation", + "@azure/arm-apimanagement!ReportsOperations#listByUser:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByUser", + "@azure/arm-apimanagement!ReportsOperations#listByApi:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByApi", + "@azure/arm-apimanagement!RegionOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.regionListByService", + "@azure/arm-apimanagement!QuotaByPeriodKeysOperations#Update:member": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysUpdate", + "@azure/arm-apimanagement!QuotaByPeriodKeysOperations#Get:member": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByPeriodKeysGet", + "@azure/arm-apimanagement!QuotaByCounterKeysOperations#Update:member": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysUpdate", + "@azure/arm-apimanagement!QuotaByCounterKeysOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.quotaByCounterKeysListByService", + "@azure/arm-apimanagement!ProductOperations#listByService:member": "Microsoft.ApiManagement.ProductContracts.listByService", + "@azure/arm-apimanagement!ProductOperations#delete:member": "Microsoft.ApiManagement.ProductContracts.delete", + "@azure/arm-apimanagement!ProductOperations#update:member": "Microsoft.ApiManagement.ProductContracts.update", + "@azure/arm-apimanagement!ProductOperations#createOrUpdate:member": "Microsoft.ApiManagement.ProductContracts.createOrUpdate", + "@azure/arm-apimanagement!ProductOperations#getEntityTag:member": "Microsoft.ApiManagement.ProductContracts.getEntityTag", + "@azure/arm-apimanagement!ProductOperations#get:member": "Microsoft.ApiManagement.ProductContracts.get", + "@azure/arm-apimanagement!ProductOperations#ListByTags:member": "Microsoft.ApiManagement.ApiManagementServiceResources.productListByTags", + "@azure/arm-apimanagement!PortalSettingsOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.portalSettingsListByService", + "@azure/arm-apimanagement!PolicyRestrictionValidationsOperations#byService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.byService", + "@azure/arm-apimanagement!PolicyDescriptionOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.policyDescriptionListByService", + "@azure/arm-apimanagement!OutboundNetworkDependenciesEndpointsOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.outboundNetworkDependenciesEndpointsListByService", + "@azure/arm-apimanagement!NetworkStatusOperations#listByLocation:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByLocation", + "@azure/arm-apimanagement!NetworkStatusOperations#ListByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.networkStatusListByService", + "@azure/arm-apimanagement!ApiManagementServiceSkusOperations#listAvailableServiceSkus:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listAvailableServiceSkus", + "@azure/arm-apimanagement!AllPoliciesOperations#listByService:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByService", + "@azure/arm-apimanagement!ApiManagementServiceOperations#getDomainOwnershipIdentifier:member": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.getDomainOwnershipIdentifier", + "@azure/arm-apimanagement!ApiManagementServiceOperations#checkNameAvailability:member": "Microsoft.ApiManagement.ApiManagementServiceOperationGroup.checkNameAvailability", + "@azure/arm-apimanagement!ApiManagementServiceOperations#refreshHostnames:member": "Microsoft.ApiManagement.ApiManagementServiceResources.refreshHostnames", + "@azure/arm-apimanagement!ApiManagementServiceOperations#applyNetworkConfigurationUpdates:member": "Microsoft.ApiManagement.ApiManagementServiceResources.applyNetworkConfigurationUpdates", + "@azure/arm-apimanagement!ApiManagementServiceOperations#getSsoToken:member": "Microsoft.ApiManagement.ApiManagementServiceResources.getSsoToken", + "@azure/arm-apimanagement!ApiManagementServiceOperations#migrateToStv2:member": "Microsoft.ApiManagement.ApiManagementServiceResources.migrateToStv2", + "@azure/arm-apimanagement!ApiManagementServiceOperations#backup:member": "Microsoft.ApiManagement.ApiManagementServiceResources.backup", + "@azure/arm-apimanagement!ApiManagementServiceOperations#restore:member": "Microsoft.ApiManagement.ApiManagementServiceResources.restore", + "@azure/arm-apimanagement!ApiManagementServiceOperations#list:member": "Microsoft.ApiManagement.ApiManagementServiceResources.list", + "@azure/arm-apimanagement!ApiManagementServiceOperations#listByResourceGroup:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByResourceGroup", + "@azure/arm-apimanagement!ApiManagementServiceOperations#delete:member": "Microsoft.ApiManagement.ApiManagementServiceResources.delete", + "@azure/arm-apimanagement!ApiManagementServiceOperations#update:member": "Microsoft.ApiManagement.ApiManagementServiceResources.update", + "@azure/arm-apimanagement!ApiManagementServiceOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiManagementServiceResources.createOrUpdate", + "@azure/arm-apimanagement!ApiManagementServiceOperations#get:member": "Microsoft.ApiManagement.ApiManagementServiceResources.get", + "@azure/arm-apimanagement!WorkspaceApiRevisionOperations#ListByService:member": "Microsoft.ApiManagement.WorkspaceApi.workspaceApiRevisionListByService", + "@azure/arm-apimanagement!OperationOperations#listByTags:member": "Microsoft.ApiManagement.ApiContracts.listByTags", + "@azure/arm-apimanagement!ApiProductOperations#listByApis:member": "Microsoft.ApiManagement.ApiContracts.listByApis", + "@azure/arm-apimanagement!ApiRevisionOperations#ListByService:member": "Microsoft.ApiManagement.ApiContracts.apiRevisionListByService", + "@azure/arm-apimanagement!ApiOperations#listByTags:member": "Microsoft.ApiManagement.ApiManagementServiceResources.listByTags", + "@azure/arm-apimanagement!ApiOperations#listByService:member": "Microsoft.ApiManagement.ApiContracts.listByService", + "@azure/arm-apimanagement!ApiOperations#delete:member": "Microsoft.ApiManagement.ApiContracts.delete", + "@azure/arm-apimanagement!ApiOperations#update:member": "Microsoft.ApiManagement.ApiContracts.update", + "@azure/arm-apimanagement!ApiOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiContracts.createOrUpdate", + "@azure/arm-apimanagement!ApiOperations#getEntityTag:member": "Microsoft.ApiManagement.ApiContracts.getEntityTag", + "@azure/arm-apimanagement!ApiOperations#get:member": "Microsoft.ApiManagement.ApiContracts.get", + "@azure/arm-apimanagement!ApiManagementGatewaySkusOperations#listAvailableSkus:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.listAvailableSkus", + "@azure/arm-apimanagement!ApiGatewayOperations#list:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.list", + "@azure/arm-apimanagement!ApiGatewayOperations#listByResourceGroup:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.listByResourceGroup", + "@azure/arm-apimanagement!ApiGatewayOperations#delete:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.delete", + "@azure/arm-apimanagement!ApiGatewayOperations#update:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.update", + "@azure/arm-apimanagement!ApiGatewayOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.createOrUpdate", + "@azure/arm-apimanagement!ApiGatewayOperations#get:member": "Microsoft.ApiManagement.ApiManagementGatewayResources.get", + "@azure/arm-apimanagement!ApiManagementOperationsOperations#list:member": "Azure.ResourceManager.Legacy.Operations.list", + "@azure/arm-apimanagement!WorkspaceTagProductLinkOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceTagProductLink.listByProduct", + "@azure/arm-apimanagement!WorkspaceTagProductLinkOperations#delete:member": "Microsoft.ApiManagement.WorkspaceTagProductLink.delete", + "@azure/arm-apimanagement!WorkspaceTagProductLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceTagProductLink.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceTagProductLinkOperations#get:member": "Microsoft.ApiManagement.WorkspaceTagProductLink.get", + "@azure/arm-apimanagement!WorkspaceTagOperationLinkOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceTagOperationLink.listByProduct", + "@azure/arm-apimanagement!WorkspaceTagOperationLinkOperations#delete:member": "Microsoft.ApiManagement.WorkspaceTagOperationLink.delete", + "@azure/arm-apimanagement!WorkspaceTagOperationLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceTagOperationLink.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceTagOperationLinkOperations#get:member": "Microsoft.ApiManagement.WorkspaceTagOperationLink.get", + "@azure/arm-apimanagement!WorkspaceTagApiLinkOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceTagApiLink.listByProduct", + "@azure/arm-apimanagement!WorkspaceTagApiLinkOperations#delete:member": "Microsoft.ApiManagement.WorkspaceTagApiLink.delete", + "@azure/arm-apimanagement!WorkspaceTagApiLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceTagApiLink.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceTagApiLinkOperations#get:member": "Microsoft.ApiManagement.WorkspaceTagApiLink.get", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#listSecrets:member": "Microsoft.ApiManagement.WorkspaceSubscription.listSecrets", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#regenerateSecondaryKey:member": "Microsoft.ApiManagement.WorkspaceSubscription.regenerateSecondaryKey", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#regeneratePrimaryKey:member": "Microsoft.ApiManagement.WorkspaceSubscription.regeneratePrimaryKey", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#list:member": "Microsoft.ApiManagement.WorkspaceSubscription.list", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#delete:member": "Microsoft.ApiManagement.WorkspaceSubscription.delete", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#update:member": "Microsoft.ApiManagement.WorkspaceSubscription.update", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceSubscription.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceSubscription.getEntityTag", + "@azure/arm-apimanagement!WorkspaceSubscriptionOperations#get:member": "Microsoft.ApiManagement.WorkspaceSubscription.get", + "@azure/arm-apimanagement!UserSubscriptionOperations#list:member": "Microsoft.ApiManagement.UserSubscription.list", + "@azure/arm-apimanagement!UserSubscriptionOperations#get:member": "Microsoft.ApiManagement.UserSubscription.get", + "@azure/arm-apimanagement!WorkspaceGlobalSchemaOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceGlobalSchema.listByService", + "@azure/arm-apimanagement!WorkspaceGlobalSchemaOperations#delete:member": "Microsoft.ApiManagement.WorkspaceGlobalSchema.delete", + "@azure/arm-apimanagement!WorkspaceGlobalSchemaOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceGlobalSchema.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceGlobalSchemaOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceGlobalSchema.getEntityTag", + "@azure/arm-apimanagement!WorkspaceGlobalSchemaOperations#get:member": "Microsoft.ApiManagement.WorkspaceGlobalSchema.get", + "@azure/arm-apimanagement!WorkspaceProductGroupLinkOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceProductGroupLink.listByProduct", + "@azure/arm-apimanagement!WorkspaceProductGroupLinkOperations#delete:member": "Microsoft.ApiManagement.WorkspaceProductGroupLink.delete", + "@azure/arm-apimanagement!WorkspaceProductGroupLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceProductGroupLink.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceProductGroupLinkOperations#get:member": "Microsoft.ApiManagement.WorkspaceProductGroupLink.get", + "@azure/arm-apimanagement!WorkspaceProductApiLinkOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceProductApiLink.listByProduct", + "@azure/arm-apimanagement!WorkspaceProductApiLinkOperations#delete:member": "Microsoft.ApiManagement.WorkspaceProductApiLink.delete", + "@azure/arm-apimanagement!WorkspaceProductApiLinkOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceProductApiLink.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceProductApiLinkOperations#get:member": "Microsoft.ApiManagement.WorkspaceProductApiLink.get", + "@azure/arm-apimanagement!WorkspaceProductOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceProduct.listByService", + "@azure/arm-apimanagement!WorkspaceProductOperations#delete:member": "Microsoft.ApiManagement.WorkspaceProduct.delete", + "@azure/arm-apimanagement!WorkspaceProductOperations#update:member": "Microsoft.ApiManagement.WorkspaceProduct.update", + "@azure/arm-apimanagement!WorkspaceProductOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceProduct.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceProductOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceProduct.getEntityTag", + "@azure/arm-apimanagement!WorkspaceProductOperations#get:member": "Microsoft.ApiManagement.WorkspaceProduct.get", + "@azure/arm-apimanagement!DelegationSettingsOperations#listSecrets:member": "Microsoft.ApiManagement.DelegationSettings.listSecrets", + "@azure/arm-apimanagement!DelegationSettingsOperations#update:member": "Microsoft.ApiManagement.DelegationSettings.update", + "@azure/arm-apimanagement!DelegationSettingsOperations#createOrUpdate:member": "Microsoft.ApiManagement.DelegationSettings.createOrUpdate", + "@azure/arm-apimanagement!DelegationSettingsOperations#getEntityTag:member": "Microsoft.ApiManagement.DelegationSettings.getEntityTag", + "@azure/arm-apimanagement!DelegationSettingsOperations#get:member": "Microsoft.ApiManagement.DelegationSettings.get", + "@azure/arm-apimanagement!SignUpSettingsOperations#update:member": "Microsoft.ApiManagement.SignUpSettings.update", + "@azure/arm-apimanagement!SignUpSettingsOperations#createOrUpdate:member": "Microsoft.ApiManagement.SignUpSettings.createOrUpdate", + "@azure/arm-apimanagement!SignUpSettingsOperations#getEntityTag:member": "Microsoft.ApiManagement.SignUpSettings.getEntityTag", + "@azure/arm-apimanagement!SignUpSettingsOperations#get:member": "Microsoft.ApiManagement.SignUpSettings.get", + "@azure/arm-apimanagement!SignInSettingsOperations#update:member": "Microsoft.ApiManagement.SignInSettings.update", + "@azure/arm-apimanagement!SignInSettingsOperations#createOrUpdate:member": "Microsoft.ApiManagement.SignInSettings.createOrUpdate", + "@azure/arm-apimanagement!SignInSettingsOperations#getEntityTag:member": "Microsoft.ApiManagement.SignInSettings.getEntityTag", + "@azure/arm-apimanagement!SignInSettingsOperations#get:member": "Microsoft.ApiManagement.SignInSettings.get", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#listReferences:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.listReferences", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#listByService:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.listByService", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#delete:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.delete", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.createOrUpdate", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.getEntityTag", + "@azure/arm-apimanagement!WorkspacePolicyFragmentOperations#get:member": "Microsoft.ApiManagement.WorkspacePolicyFragment.get", + "@azure/arm-apimanagement!WorkspaceNotificationOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceNotification.listByService", + "@azure/arm-apimanagement!WorkspaceNotificationOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceNotification.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceNotificationOperations#get:member": "Microsoft.ApiManagement.WorkspaceNotification.get", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#refreshSecret:member": "Microsoft.ApiManagement.WorkspaceNamedValue.refreshSecret", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#listValue:member": "Microsoft.ApiManagement.WorkspaceNamedValue.listValue", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceNamedValue.listByService", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#delete:member": "Microsoft.ApiManagement.WorkspaceNamedValue.delete", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#update:member": "Microsoft.ApiManagement.WorkspaceNamedValue.update", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceNamedValue.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceNamedValue.getEntityTag", + "@azure/arm-apimanagement!WorkspaceNamedValueOperations#get:member": "Microsoft.ApiManagement.WorkspaceNamedValue.get", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#listByWorkspace:member": "Microsoft.ApiManagement.WorkspaceLogger.listByWorkspace", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#delete:member": "Microsoft.ApiManagement.WorkspaceLogger.delete", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#update:member": "Microsoft.ApiManagement.WorkspaceLogger.update", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceLogger.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceLogger.getEntityTag", + "@azure/arm-apimanagement!WorkspaceLoggerOperations#get:member": "Microsoft.ApiManagement.WorkspaceLogger.get", + "@azure/arm-apimanagement!WorkspaceGroupOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceGroup.listByService", + "@azure/arm-apimanagement!WorkspaceGroupOperations#delete:member": "Microsoft.ApiManagement.WorkspaceGroup.delete", + "@azure/arm-apimanagement!WorkspaceGroupOperations#update:member": "Microsoft.ApiManagement.WorkspaceGroup.update", + "@azure/arm-apimanagement!WorkspaceGroupOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceGroup.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceGroupOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceGroup.getEntityTag", + "@azure/arm-apimanagement!WorkspaceGroupOperations#get:member": "Microsoft.ApiManagement.WorkspaceGroup.get", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#refreshSecret:member": "Microsoft.ApiManagement.WorkspaceCertificate.refreshSecret", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#listByWorkspace:member": "Microsoft.ApiManagement.WorkspaceCertificate.listByWorkspace", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#delete:member": "Microsoft.ApiManagement.WorkspaceCertificate.delete", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceCertificate.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceCertificate.getEntityTag", + "@azure/arm-apimanagement!WorkspaceCertificateOperations#get:member": "Microsoft.ApiManagement.WorkspaceCertificate.get", + "@azure/arm-apimanagement!WorkspaceBackendOperations#listByWorkspace:member": "Microsoft.ApiManagement.WorkspaceBackend.listByWorkspace", + "@azure/arm-apimanagement!WorkspaceBackendOperations#delete:member": "Microsoft.ApiManagement.WorkspaceBackend.delete", + "@azure/arm-apimanagement!WorkspaceBackendOperations#update:member": "Microsoft.ApiManagement.WorkspaceBackend.update", + "@azure/arm-apimanagement!WorkspaceBackendOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceBackend.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceBackendOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceBackend.getEntityTag", + "@azure/arm-apimanagement!WorkspaceBackendOperations#get:member": "Microsoft.ApiManagement.WorkspaceBackend.get", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.listByService", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.delete", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#update:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.update", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiVersionSetOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiVersionSet.get", + "@azure/arm-apimanagement!ProductWikiOperations#delete:member": "Microsoft.ApiManagement.ProductWiki.delete", + "@azure/arm-apimanagement!ProductWikiOperations#update:member": "Microsoft.ApiManagement.ProductWiki.update", + "@azure/arm-apimanagement!ProductWikiOperations#createOrUpdate:member": "Microsoft.ApiManagement.ProductWiki.createOrUpdate", + "@azure/arm-apimanagement!ProductWikiOperations#getEntityTag:member": "Microsoft.ApiManagement.ProductWiki.getEntityTag", + "@azure/arm-apimanagement!ProductWikiOperations#get:member": "Microsoft.ApiManagement.ProductWiki.get", + "@azure/arm-apimanagement!IssueOperations#listByService:member": "Microsoft.ApiManagement.Issue.listByService", + "@azure/arm-apimanagement!IssueOperations#get:member": "Microsoft.ApiManagement.Issue.get", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#listByWorkspace:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.listByWorkspace", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.delete", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#update:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.update", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiDiagnosticOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiDiagnostic.get", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#listByWorkspace:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.listByWorkspace", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#delete:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.delete", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#update:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.update", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.getEntityTag", + "@azure/arm-apimanagement!WorkspaceDiagnosticOperations#get:member": "Microsoft.ApiManagement.WorkspaceDiagnostic.get", + "@azure/arm-apimanagement!DiagnosticOperations#listByService:member": "Microsoft.ApiManagement.Diagnostic.listByService", + "@azure/arm-apimanagement!DiagnosticOperations#delete:member": "Microsoft.ApiManagement.Diagnostic.delete", + "@azure/arm-apimanagement!DiagnosticOperations#update:member": "Microsoft.ApiManagement.Diagnostic.update", + "@azure/arm-apimanagement!DiagnosticOperations#createOrUpdate:member": "Microsoft.ApiManagement.Diagnostic.createOrUpdate", + "@azure/arm-apimanagement!DiagnosticOperations#getEntityTag:member": "Microsoft.ApiManagement.Diagnostic.getEntityTag", + "@azure/arm-apimanagement!DiagnosticOperations#get:member": "Microsoft.ApiManagement.Diagnostic.get", + "@azure/arm-apimanagement!WorkspaceApiSchemaOperations#listByApi:member": "Microsoft.ApiManagement.WorkspaceApiSchema.listByApi", + "@azure/arm-apimanagement!WorkspaceApiSchemaOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiSchema.delete", + "@azure/arm-apimanagement!WorkspaceApiSchemaOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiSchema.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiSchemaOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiSchema.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiSchemaOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiSchema.get", + "@azure/arm-apimanagement!WorkspaceTagOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceTag.listByService", + "@azure/arm-apimanagement!WorkspaceTagOperations#delete:member": "Microsoft.ApiManagement.WorkspaceTag.delete", + "@azure/arm-apimanagement!WorkspaceTagOperations#update:member": "Microsoft.ApiManagement.WorkspaceTag.update", + "@azure/arm-apimanagement!WorkspaceTagOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceTag.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceTagOperations#getEntityState:member": "Microsoft.ApiManagement.WorkspaceTag.getEntityState", + "@azure/arm-apimanagement!WorkspaceTagOperations#get:member": "Microsoft.ApiManagement.WorkspaceTag.get", + "@azure/arm-apimanagement!TagOperations#listByService:member": "Microsoft.ApiManagement.TagContractOperationGroup.listByService", + "@azure/arm-apimanagement!TagOperations#delete:member": "Microsoft.ApiManagement.TagContractOperationGroup.delete", + "@azure/arm-apimanagement!TagOperations#update:member": "Microsoft.ApiManagement.TagContractOperationGroup.update", + "@azure/arm-apimanagement!TagOperations#createOrUpdate:member": "Microsoft.ApiManagement.TagContractOperationGroup.createOrUpdate", + "@azure/arm-apimanagement!TagOperations#getEntityState:member": "Microsoft.ApiManagement.TagContractOperationGroup.getEntityState", + "@azure/arm-apimanagement!TagOperations#get:member": "Microsoft.ApiManagement.TagContractOperationGroup.get", + "@azure/arm-apimanagement!TagOperations#listByProduct:member": "Microsoft.ApiManagement.TagContractOperation.listByProduct", + "@azure/arm-apimanagement!TagOperations#detachFromProduct:member": "Microsoft.ApiManagement.TagContractOperation.detachFromProduct", + "@azure/arm-apimanagement!TagOperations#assignToProduct:member": "Microsoft.ApiManagement.TagContractOperation.assignToProduct", + "@azure/arm-apimanagement!TagOperations#getEntityStateByProduct:member": "Microsoft.ApiManagement.TagContractOperation.getEntityStateByProduct", + "@azure/arm-apimanagement!TagOperations#getByProduct:member": "Microsoft.ApiManagement.TagContractOperation.getByProduct", + "@azure/arm-apimanagement!TagOperations#listByOperation:member": "Microsoft.ApiManagement.TagContracts.listByOperation", + "@azure/arm-apimanagement!TagOperations#detachFromOperation:member": "Microsoft.ApiManagement.TagContracts.detachFromOperation", + "@azure/arm-apimanagement!TagOperations#assignToOperation:member": "Microsoft.ApiManagement.TagContracts.assignToOperation", + "@azure/arm-apimanagement!TagOperations#getEntityStateByOperation:member": "Microsoft.ApiManagement.TagContracts.getEntityStateByOperation", + "@azure/arm-apimanagement!TagOperations#getByOperation:member": "Microsoft.ApiManagement.TagContracts.getByOperation", + "@azure/arm-apimanagement!TagOperations#listByApi:member": "Microsoft.ApiManagement.Tag.listByApi", + "@azure/arm-apimanagement!TagOperations#detachFromApi:member": "Microsoft.ApiManagement.Tag.detachFromApi", + "@azure/arm-apimanagement!TagOperations#assignToApi:member": "Microsoft.ApiManagement.Tag.assignToApi", + "@azure/arm-apimanagement!TagOperations#getEntityStateByApi:member": "Microsoft.ApiManagement.Tag.getEntityStateByApi", + "@azure/arm-apimanagement!TagOperations#getByApi:member": "Microsoft.ApiManagement.Tag.getByApi", + "@azure/arm-apimanagement!WorkspaceProductPolicyOperations#listByProduct:member": "Microsoft.ApiManagement.WorkspaceProductPolicy.listByProduct", + "@azure/arm-apimanagement!WorkspaceProductPolicyOperations#delete:member": "Microsoft.ApiManagement.WorkspaceProductPolicy.delete", + "@azure/arm-apimanagement!WorkspaceProductPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceProductPolicy.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceProductPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceProductPolicy.getEntityTag", + "@azure/arm-apimanagement!WorkspaceProductPolicyOperations#get:member": "Microsoft.ApiManagement.WorkspaceProductPolicy.get", + "@azure/arm-apimanagement!WorkspaceApiPolicyOperations#listByApi:member": "Microsoft.ApiManagement.WorkspaceApiPolicy.listByApi", + "@azure/arm-apimanagement!WorkspaceApiPolicyOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiPolicy.delete", + "@azure/arm-apimanagement!WorkspaceApiPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiPolicy.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiPolicy.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiPolicyOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiPolicy.get", + "@azure/arm-apimanagement!WorkspaceApiOperationPolicyOperations#listByOperation:member": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.listByOperation", + "@azure/arm-apimanagement!WorkspaceApiOperationPolicyOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.delete", + "@azure/arm-apimanagement!WorkspaceApiOperationPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiOperationPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiOperationPolicyOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiOperationPolicy.get", + "@azure/arm-apimanagement!WorkspacePolicyOperations#listByApi:member": "Microsoft.ApiManagement.WorkspacePolicy.listByApi", + "@azure/arm-apimanagement!WorkspacePolicyOperations#delete:member": "Microsoft.ApiManagement.WorkspacePolicy.delete", + "@azure/arm-apimanagement!WorkspacePolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspacePolicy.createOrUpdate", + "@azure/arm-apimanagement!WorkspacePolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspacePolicy.getEntityTag", + "@azure/arm-apimanagement!WorkspacePolicyOperations#get:member": "Microsoft.ApiManagement.WorkspacePolicy.get", + "@azure/arm-apimanagement!ProductPolicyOperations#listByProduct:member": "Microsoft.ApiManagement.ProductPolicy.listByProduct", + "@azure/arm-apimanagement!ProductPolicyOperations#delete:member": "Microsoft.ApiManagement.ProductPolicy.delete", + "@azure/arm-apimanagement!ProductPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.ProductPolicy.createOrUpdate", + "@azure/arm-apimanagement!ProductPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.ProductPolicy.getEntityTag", + "@azure/arm-apimanagement!ProductPolicyOperations#get:member": "Microsoft.ApiManagement.ProductPolicy.get", + "@azure/arm-apimanagement!PolicyOperations#listByService:member": "Microsoft.ApiManagement.Policy.listByService", + "@azure/arm-apimanagement!PolicyOperations#delete:member": "Microsoft.ApiManagement.Policy.delete", + "@azure/arm-apimanagement!PolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.Policy.createOrUpdate", + "@azure/arm-apimanagement!PolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.Policy.getEntityTag", + "@azure/arm-apimanagement!PolicyOperations#get:member": "Microsoft.ApiManagement.Policy.get", + "@azure/arm-apimanagement!ApiPolicyOperations#listByApi:member": "Microsoft.ApiManagement.ApiPolicy.listByApi", + "@azure/arm-apimanagement!ApiPolicyOperations#delete:member": "Microsoft.ApiManagement.ApiPolicy.delete", + "@azure/arm-apimanagement!ApiPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.ApiPolicy.createOrUpdate", + "@azure/arm-apimanagement!ApiPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.ApiPolicy.getEntityTag", + "@azure/arm-apimanagement!ApiPolicyOperations#get:member": "Microsoft.ApiManagement.ApiPolicy.get", + "@azure/arm-apimanagement!GraphQLApiResolverPolicyOperations#listByResolver:member": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.listByResolver", + "@azure/arm-apimanagement!GraphQLApiResolverPolicyOperations#delete:member": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.delete", + "@azure/arm-apimanagement!GraphQLApiResolverPolicyOperations#createOrUpdate:member": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.createOrUpdate", + "@azure/arm-apimanagement!GraphQLApiResolverPolicyOperations#getEntityTag:member": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.getEntityTag", + "@azure/arm-apimanagement!GraphQLApiResolverPolicyOperations#get:member": "Microsoft.ApiManagement.GraphQLApiResolverPolicy.get", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#listByApi:member": "Microsoft.ApiManagement.WorkspaceApiOperation.listByApi", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiOperation.delete", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#update:member": "Microsoft.ApiManagement.WorkspaceApiOperation.update", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiOperation.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiOperation.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiOperationOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiOperation.get", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceApiRelease.listByService", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApiRelease.delete", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#update:member": "Microsoft.ApiManagement.WorkspaceApiRelease.update", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApiRelease.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApiRelease.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiReleaseOperations#get:member": "Microsoft.ApiManagement.WorkspaceApiRelease.get", + "@azure/arm-apimanagement!ApiManagementServiceResourcesOperations#performConnectivityCheckAsync:member": "Microsoft.ApiManagement.ApiManagementServiceResources.performConnectivityCheckAsync", + "@azure/arm-apimanagement!WorkspaceApiOperations#listByService:member": "Microsoft.ApiManagement.WorkspaceApi.listByService", + "@azure/arm-apimanagement!WorkspaceApiOperations#delete:member": "Microsoft.ApiManagement.WorkspaceApi.delete", + "@azure/arm-apimanagement!WorkspaceApiOperations#update:member": "Microsoft.ApiManagement.WorkspaceApi.update", + "@azure/arm-apimanagement!WorkspaceApiOperations#createOrUpdate:member": "Microsoft.ApiManagement.WorkspaceApi.createOrUpdate", + "@azure/arm-apimanagement!WorkspaceApiOperations#getEntityTag:member": "Microsoft.ApiManagement.WorkspaceApi.getEntityTag", + "@azure/arm-apimanagement!WorkspaceApiOperations#get:member": "Microsoft.ApiManagement.WorkspaceApi.get" + } + } +} diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index 89488e0935dc..45bfd0ba06aa 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -1,120 +1,2130 @@ { "name": "@azure/arm-apimanagement", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", + "version": "11.0.0-beta.1", "description": "A generated SDK for ApiManagementClient.", - "version": "10.0.0", "engines": { "node": ">=20.0.0" }, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.3", - "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.19.1", - "tslib": "^2.8.1" + "sideEffects": false, + "autoPublish": false, + "type": "module", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", + "browser": "./dist/browser/index.js", + "imports": { + "#platform/*": { + "browser": "./src/*-browser.mts", + "default": "./src/*.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./api": { + "browser": { + "types": "./dist/browser/api/index.d.ts", + "default": "./dist/browser/api/index.js" + }, + "import": { + "types": "./dist/esm/api/index.d.ts", + "default": "./dist/esm/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/index.d.ts", + "default": "./dist/commonjs/api/index.js" + } + }, + "./api/operationsResults": { + "browser": { + "types": "./dist/browser/api/operationsResults/index.d.ts", + "default": "./dist/browser/api/operationsResults/index.js" + }, + "import": { + "types": "./dist/esm/api/operationsResults/index.d.ts", + "default": "./dist/esm/api/operationsResults/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operationsResults/index.d.ts", + "default": "./dist/commonjs/api/operationsResults/index.js" + } + }, + "./api/operationStatus": { + "browser": { + "types": "./dist/browser/api/operationStatus/index.d.ts", + "default": "./dist/browser/api/operationStatus/index.js" + }, + "import": { + "types": "./dist/esm/api/operationStatus/index.d.ts", + "default": "./dist/esm/api/operationStatus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operationStatus/index.d.ts", + "default": "./dist/commonjs/api/operationStatus/index.js" + } + }, + "./api/workspaceApiExport": { + "browser": { + "types": "./dist/browser/api/workspaceApiExport/index.d.ts", + "default": "./dist/browser/api/workspaceApiExport/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiExport/index.d.ts", + "default": "./dist/esm/api/workspaceApiExport/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiExport/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiExport/index.js" + } + }, + "./api/apiManagementSkus": { + "browser": { + "types": "./dist/browser/api/apiManagementSkus/index.d.ts", + "default": "./dist/browser/api/apiManagementSkus/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementSkus/index.d.ts", + "default": "./dist/esm/api/apiManagementSkus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementSkus/index.d.ts", + "default": "./dist/commonjs/api/apiManagementSkus/index.js" + } + }, + "./api/apiExport": { + "browser": { + "types": "./dist/browser/api/apiExport/index.d.ts", + "default": "./dist/browser/api/apiExport/index.js" + }, + "import": { + "types": "./dist/esm/api/apiExport/index.d.ts", + "default": "./dist/esm/api/apiExport/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiExport/index.d.ts", + "default": "./dist/commonjs/api/apiExport/index.js" + } + }, + "./api/workspace": { + "browser": { + "types": "./dist/browser/api/workspace/index.d.ts", + "default": "./dist/browser/api/workspace/index.js" + }, + "import": { + "types": "./dist/esm/api/workspace/index.d.ts", + "default": "./dist/esm/api/workspace/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspace/index.d.ts", + "default": "./dist/commonjs/api/workspace/index.js" + } + }, + "./api/apiManagementWorkspaceLinks": { + "browser": { + "types": "./dist/browser/api/apiManagementWorkspaceLinks/index.d.ts", + "default": "./dist/browser/api/apiManagementWorkspaceLinks/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementWorkspaceLinks/index.d.ts", + "default": "./dist/esm/api/apiManagementWorkspaceLinks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementWorkspaceLinks/index.d.ts", + "default": "./dist/commonjs/api/apiManagementWorkspaceLinks/index.js" + } + }, + "./api/apiManagementWorkspaceLink": { + "browser": { + "types": "./dist/browser/api/apiManagementWorkspaceLink/index.d.ts", + "default": "./dist/browser/api/apiManagementWorkspaceLink/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementWorkspaceLink/index.d.ts", + "default": "./dist/esm/api/apiManagementWorkspaceLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementWorkspaceLink/index.d.ts", + "default": "./dist/commonjs/api/apiManagementWorkspaceLink/index.js" + } + }, + "./api/userConfirmationPassword": { + "browser": { + "types": "./dist/browser/api/userConfirmationPassword/index.d.ts", + "default": "./dist/browser/api/userConfirmationPassword/index.js" + }, + "import": { + "types": "./dist/esm/api/userConfirmationPassword/index.d.ts", + "default": "./dist/esm/api/userConfirmationPassword/index.js" + }, + "require": { + "types": "./dist/commonjs/api/userConfirmationPassword/index.d.ts", + "default": "./dist/commonjs/api/userConfirmationPassword/index.js" + } + }, + "./api/userIdentities": { + "browser": { + "types": "./dist/browser/api/userIdentities/index.d.ts", + "default": "./dist/browser/api/userIdentities/index.js" + }, + "import": { + "types": "./dist/esm/api/userIdentities/index.d.ts", + "default": "./dist/esm/api/userIdentities/index.js" + }, + "require": { + "types": "./dist/commonjs/api/userIdentities/index.d.ts", + "default": "./dist/commonjs/api/userIdentities/index.js" + } + }, + "./api/userGroup": { + "browser": { + "types": "./dist/browser/api/userGroup/index.d.ts", + "default": "./dist/browser/api/userGroup/index.js" + }, + "import": { + "types": "./dist/esm/api/userGroup/index.d.ts", + "default": "./dist/esm/api/userGroup/index.js" + }, + "require": { + "types": "./dist/commonjs/api/userGroup/index.d.ts", + "default": "./dist/commonjs/api/userGroup/index.js" + } + }, + "./api/user": { + "browser": { + "types": "./dist/browser/api/user/index.d.ts", + "default": "./dist/browser/api/user/index.js" + }, + "import": { + "types": "./dist/esm/api/user/index.d.ts", + "default": "./dist/esm/api/user/index.js" + }, + "require": { + "types": "./dist/commonjs/api/user/index.d.ts", + "default": "./dist/commonjs/api/user/index.js" + } + }, + "./api/tenantConfiguration": { + "browser": { + "types": "./dist/browser/api/tenantConfiguration/index.d.ts", + "default": "./dist/browser/api/tenantConfiguration/index.js" + }, + "import": { + "types": "./dist/esm/api/tenantConfiguration/index.d.ts", + "default": "./dist/esm/api/tenantConfiguration/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tenantConfiguration/index.d.ts", + "default": "./dist/commonjs/api/tenantConfiguration/index.js" + } + }, + "./api/tenantAccessGit": { + "browser": { + "types": "./dist/browser/api/tenantAccessGit/index.d.ts", + "default": "./dist/browser/api/tenantAccessGit/index.js" + }, + "import": { + "types": "./dist/esm/api/tenantAccessGit/index.d.ts", + "default": "./dist/esm/api/tenantAccessGit/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tenantAccessGit/index.d.ts", + "default": "./dist/commonjs/api/tenantAccessGit/index.js" + } + }, + "./api/tenantAccess": { + "browser": { + "types": "./dist/browser/api/tenantAccess/index.d.ts", + "default": "./dist/browser/api/tenantAccess/index.js" + }, + "import": { + "types": "./dist/esm/api/tenantAccess/index.d.ts", + "default": "./dist/esm/api/tenantAccess/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tenantAccess/index.d.ts", + "default": "./dist/commonjs/api/tenantAccess/index.js" + } + }, + "./api/tagProductLink": { + "browser": { + "types": "./dist/browser/api/tagProductLink/index.d.ts", + "default": "./dist/browser/api/tagProductLink/index.js" + }, + "import": { + "types": "./dist/esm/api/tagProductLink/index.d.ts", + "default": "./dist/esm/api/tagProductLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tagProductLink/index.d.ts", + "default": "./dist/commonjs/api/tagProductLink/index.js" + } + }, + "./api/tagOperationLink": { + "browser": { + "types": "./dist/browser/api/tagOperationLink/index.d.ts", + "default": "./dist/browser/api/tagOperationLink/index.js" + }, + "import": { + "types": "./dist/esm/api/tagOperationLink/index.d.ts", + "default": "./dist/esm/api/tagOperationLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tagOperationLink/index.d.ts", + "default": "./dist/commonjs/api/tagOperationLink/index.js" + } + }, + "./api/tagApiLink": { + "browser": { + "types": "./dist/browser/api/tagApiLink/index.d.ts", + "default": "./dist/browser/api/tagApiLink/index.js" + }, + "import": { + "types": "./dist/esm/api/tagApiLink/index.d.ts", + "default": "./dist/esm/api/tagApiLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tagApiLink/index.d.ts", + "default": "./dist/commonjs/api/tagApiLink/index.js" + } + }, + "./api/subscription": { + "browser": { + "types": "./dist/browser/api/subscription/index.d.ts", + "default": "./dist/browser/api/subscription/index.js" + }, + "import": { + "types": "./dist/esm/api/subscription/index.d.ts", + "default": "./dist/esm/api/subscription/index.js" + }, + "require": { + "types": "./dist/commonjs/api/subscription/index.d.ts", + "default": "./dist/commonjs/api/subscription/index.js" + } + }, + "./api/tenantSettings": { + "browser": { + "types": "./dist/browser/api/tenantSettings/index.d.ts", + "default": "./dist/browser/api/tenantSettings/index.js" + }, + "import": { + "types": "./dist/esm/api/tenantSettings/index.d.ts", + "default": "./dist/esm/api/tenantSettings/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tenantSettings/index.d.ts", + "default": "./dist/commonjs/api/tenantSettings/index.js" + } + }, + "./api/globalSchema": { + "browser": { + "types": "./dist/browser/api/globalSchema/index.d.ts", + "default": "./dist/browser/api/globalSchema/index.js" + }, + "import": { + "types": "./dist/esm/api/globalSchema/index.d.ts", + "default": "./dist/esm/api/globalSchema/index.js" + }, + "require": { + "types": "./dist/commonjs/api/globalSchema/index.d.ts", + "default": "./dist/commonjs/api/globalSchema/index.js" + } + }, + "./api/productGroupLink": { + "browser": { + "types": "./dist/browser/api/productGroupLink/index.d.ts", + "default": "./dist/browser/api/productGroupLink/index.js" + }, + "import": { + "types": "./dist/esm/api/productGroupLink/index.d.ts", + "default": "./dist/esm/api/productGroupLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productGroupLink/index.d.ts", + "default": "./dist/commonjs/api/productGroupLink/index.js" + } + }, + "./api/productApiLink": { + "browser": { + "types": "./dist/browser/api/productApiLink/index.d.ts", + "default": "./dist/browser/api/productApiLink/index.js" + }, + "import": { + "types": "./dist/esm/api/productApiLink/index.d.ts", + "default": "./dist/esm/api/productApiLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productApiLink/index.d.ts", + "default": "./dist/commonjs/api/productApiLink/index.js" + } + }, + "./api/productSubscriptions": { + "browser": { + "types": "./dist/browser/api/productSubscriptions/index.d.ts", + "default": "./dist/browser/api/productSubscriptions/index.js" + }, + "import": { + "types": "./dist/esm/api/productSubscriptions/index.d.ts", + "default": "./dist/esm/api/productSubscriptions/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productSubscriptions/index.d.ts", + "default": "./dist/commonjs/api/productSubscriptions/index.js" + } + }, + "./api/productGroup": { + "browser": { + "types": "./dist/browser/api/productGroup/index.d.ts", + "default": "./dist/browser/api/productGroup/index.js" + }, + "import": { + "types": "./dist/esm/api/productGroup/index.d.ts", + "default": "./dist/esm/api/productGroup/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productGroup/index.d.ts", + "default": "./dist/commonjs/api/productGroup/index.js" + } + }, + "./api/productApi": { + "browser": { + "types": "./dist/browser/api/productApi/index.d.ts", + "default": "./dist/browser/api/productApi/index.js" + }, + "import": { + "types": "./dist/esm/api/productApi/index.d.ts", + "default": "./dist/esm/api/productApi/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productApi/index.d.ts", + "default": "./dist/commonjs/api/productApi/index.js" + } + }, + "./api/privateEndpointConnection": { + "browser": { + "types": "./dist/browser/api/privateEndpointConnection/index.d.ts", + "default": "./dist/browser/api/privateEndpointConnection/index.js" + }, + "import": { + "types": "./dist/esm/api/privateEndpointConnection/index.d.ts", + "default": "./dist/esm/api/privateEndpointConnection/index.js" + }, + "require": { + "types": "./dist/commonjs/api/privateEndpointConnection/index.d.ts", + "default": "./dist/commonjs/api/privateEndpointConnection/index.js" + } + }, + "./api/portalRevision": { + "browser": { + "types": "./dist/browser/api/portalRevision/index.d.ts", + "default": "./dist/browser/api/portalRevision/index.js" + }, + "import": { + "types": "./dist/esm/api/portalRevision/index.d.ts", + "default": "./dist/esm/api/portalRevision/index.js" + }, + "require": { + "types": "./dist/commonjs/api/portalRevision/index.d.ts", + "default": "./dist/commonjs/api/portalRevision/index.js" + } + }, + "./api/clientApplicationProductLink": { + "browser": { + "types": "./dist/browser/api/clientApplicationProductLink/index.d.ts", + "default": "./dist/browser/api/clientApplicationProductLink/index.js" + }, + "import": { + "types": "./dist/esm/api/clientApplicationProductLink/index.d.ts", + "default": "./dist/esm/api/clientApplicationProductLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/clientApplicationProductLink/index.d.ts", + "default": "./dist/commonjs/api/clientApplicationProductLink/index.js" + } + }, + "./api/clientApplication": { + "browser": { + "types": "./dist/browser/api/clientApplication/index.d.ts", + "default": "./dist/browser/api/clientApplication/index.js" + }, + "import": { + "types": "./dist/esm/api/clientApplication/index.d.ts", + "default": "./dist/esm/api/clientApplication/index.js" + }, + "require": { + "types": "./dist/commonjs/api/clientApplication/index.d.ts", + "default": "./dist/commonjs/api/clientApplication/index.js" + } + }, + "./api/portalConfig": { + "browser": { + "types": "./dist/browser/api/portalConfig/index.d.ts", + "default": "./dist/browser/api/portalConfig/index.js" + }, + "import": { + "types": "./dist/esm/api/portalConfig/index.d.ts", + "default": "./dist/esm/api/portalConfig/index.js" + }, + "require": { + "types": "./dist/commonjs/api/portalConfig/index.d.ts", + "default": "./dist/commonjs/api/portalConfig/index.js" + } + }, + "./api/policyRestriction": { + "browser": { + "types": "./dist/browser/api/policyRestriction/index.d.ts", + "default": "./dist/browser/api/policyRestriction/index.js" + }, + "import": { + "types": "./dist/esm/api/policyRestriction/index.d.ts", + "default": "./dist/esm/api/policyRestriction/index.js" + }, + "require": { + "types": "./dist/commonjs/api/policyRestriction/index.d.ts", + "default": "./dist/commonjs/api/policyRestriction/index.js" + } + }, + "./api/policyFragment": { + "browser": { + "types": "./dist/browser/api/policyFragment/index.d.ts", + "default": "./dist/browser/api/policyFragment/index.js" + }, + "import": { + "types": "./dist/esm/api/policyFragment/index.d.ts", + "default": "./dist/esm/api/policyFragment/index.js" + }, + "require": { + "types": "./dist/commonjs/api/policyFragment/index.d.ts", + "default": "./dist/commonjs/api/policyFragment/index.js" + } + }, + "./api/openIdConnectProvider": { + "browser": { + "types": "./dist/browser/api/openIdConnectProvider/index.d.ts", + "default": "./dist/browser/api/openIdConnectProvider/index.js" + }, + "import": { + "types": "./dist/esm/api/openIdConnectProvider/index.d.ts", + "default": "./dist/esm/api/openIdConnectProvider/index.js" + }, + "require": { + "types": "./dist/commonjs/api/openIdConnectProvider/index.d.ts", + "default": "./dist/commonjs/api/openIdConnectProvider/index.js" + } + }, + "./api/workspaceNotificationRecipientEmail": { + "browser": { + "types": "./dist/browser/api/workspaceNotificationRecipientEmail/index.d.ts", + "default": "./dist/browser/api/workspaceNotificationRecipientEmail/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceNotificationRecipientEmail/index.d.ts", + "default": "./dist/esm/api/workspaceNotificationRecipientEmail/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceNotificationRecipientEmail/index.d.ts", + "default": "./dist/commonjs/api/workspaceNotificationRecipientEmail/index.js" + } + }, + "./api/workspaceNotificationRecipientUser": { + "browser": { + "types": "./dist/browser/api/workspaceNotificationRecipientUser/index.d.ts", + "default": "./dist/browser/api/workspaceNotificationRecipientUser/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceNotificationRecipientUser/index.d.ts", + "default": "./dist/esm/api/workspaceNotificationRecipientUser/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceNotificationRecipientUser/index.d.ts", + "default": "./dist/commonjs/api/workspaceNotificationRecipientUser/index.js" + } + }, + "./api/notificationRecipientEmail": { + "browser": { + "types": "./dist/browser/api/notificationRecipientEmail/index.d.ts", + "default": "./dist/browser/api/notificationRecipientEmail/index.js" + }, + "import": { + "types": "./dist/esm/api/notificationRecipientEmail/index.d.ts", + "default": "./dist/esm/api/notificationRecipientEmail/index.js" + }, + "require": { + "types": "./dist/commonjs/api/notificationRecipientEmail/index.d.ts", + "default": "./dist/commonjs/api/notificationRecipientEmail/index.js" + } + }, + "./api/notificationRecipientUser": { + "browser": { + "types": "./dist/browser/api/notificationRecipientUser/index.d.ts", + "default": "./dist/browser/api/notificationRecipientUser/index.js" + }, + "import": { + "types": "./dist/esm/api/notificationRecipientUser/index.d.ts", + "default": "./dist/esm/api/notificationRecipientUser/index.js" + }, + "require": { + "types": "./dist/commonjs/api/notificationRecipientUser/index.d.ts", + "default": "./dist/commonjs/api/notificationRecipientUser/index.js" + } + }, + "./api/notification": { + "browser": { + "types": "./dist/browser/api/notification/index.d.ts", + "default": "./dist/browser/api/notification/index.js" + }, + "import": { + "types": "./dist/esm/api/notification/index.d.ts", + "default": "./dist/esm/api/notification/index.js" + }, + "require": { + "types": "./dist/commonjs/api/notification/index.d.ts", + "default": "./dist/commonjs/api/notification/index.js" + } + }, + "./api/namedValue": { + "browser": { + "types": "./dist/browser/api/namedValue/index.d.ts", + "default": "./dist/browser/api/namedValue/index.js" + }, + "import": { + "types": "./dist/esm/api/namedValue/index.d.ts", + "default": "./dist/esm/api/namedValue/index.js" + }, + "require": { + "types": "./dist/commonjs/api/namedValue/index.d.ts", + "default": "./dist/commonjs/api/namedValue/index.js" + } + }, + "./api/logger": { + "browser": { + "types": "./dist/browser/api/logger/index.d.ts", + "default": "./dist/browser/api/logger/index.js" + }, + "import": { + "types": "./dist/esm/api/logger/index.d.ts", + "default": "./dist/esm/api/logger/index.js" + }, + "require": { + "types": "./dist/commonjs/api/logger/index.d.ts", + "default": "./dist/commonjs/api/logger/index.js" + } + }, + "./api/identityProvider": { + "browser": { + "types": "./dist/browser/api/identityProvider/index.d.ts", + "default": "./dist/browser/api/identityProvider/index.js" + }, + "import": { + "types": "./dist/esm/api/identityProvider/index.d.ts", + "default": "./dist/esm/api/identityProvider/index.js" + }, + "require": { + "types": "./dist/commonjs/api/identityProvider/index.d.ts", + "default": "./dist/commonjs/api/identityProvider/index.js" + } + }, + "./api/workspaceGroupUser": { + "browser": { + "types": "./dist/browser/api/workspaceGroupUser/index.d.ts", + "default": "./dist/browser/api/workspaceGroupUser/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceGroupUser/index.d.ts", + "default": "./dist/esm/api/workspaceGroupUser/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceGroupUser/index.d.ts", + "default": "./dist/commonjs/api/workspaceGroupUser/index.js" + } + }, + "./api/groupUser": { + "browser": { + "types": "./dist/browser/api/groupUser/index.d.ts", + "default": "./dist/browser/api/groupUser/index.js" + }, + "import": { + "types": "./dist/esm/api/groupUser/index.d.ts", + "default": "./dist/esm/api/groupUser/index.js" + }, + "require": { + "types": "./dist/commonjs/api/groupUser/index.d.ts", + "default": "./dist/commonjs/api/groupUser/index.js" + } + }, + "./api/group": { + "browser": { + "types": "./dist/browser/api/group/index.d.ts", + "default": "./dist/browser/api/group/index.js" + }, + "import": { + "types": "./dist/esm/api/group/index.d.ts", + "default": "./dist/esm/api/group/index.js" + }, + "require": { + "types": "./dist/commonjs/api/group/index.d.ts", + "default": "./dist/commonjs/api/group/index.js" + } + }, + "./api/gatewayCertificateAuthority": { + "browser": { + "types": "./dist/browser/api/gatewayCertificateAuthority/index.d.ts", + "default": "./dist/browser/api/gatewayCertificateAuthority/index.js" + }, + "import": { + "types": "./dist/esm/api/gatewayCertificateAuthority/index.d.ts", + "default": "./dist/esm/api/gatewayCertificateAuthority/index.js" + }, + "require": { + "types": "./dist/commonjs/api/gatewayCertificateAuthority/index.d.ts", + "default": "./dist/commonjs/api/gatewayCertificateAuthority/index.js" + } + }, + "./api/gatewayHostnameConfiguration": { + "browser": { + "types": "./dist/browser/api/gatewayHostnameConfiguration/index.d.ts", + "default": "./dist/browser/api/gatewayHostnameConfiguration/index.js" + }, + "import": { + "types": "./dist/esm/api/gatewayHostnameConfiguration/index.d.ts", + "default": "./dist/esm/api/gatewayHostnameConfiguration/index.js" + }, + "require": { + "types": "./dist/commonjs/api/gatewayHostnameConfiguration/index.d.ts", + "default": "./dist/commonjs/api/gatewayHostnameConfiguration/index.js" + } + }, + "./api/gatewayApi": { + "browser": { + "types": "./dist/browser/api/gatewayApi/index.d.ts", + "default": "./dist/browser/api/gatewayApi/index.js" + }, + "import": { + "types": "./dist/esm/api/gatewayApi/index.d.ts", + "default": "./dist/esm/api/gatewayApi/index.js" + }, + "require": { + "types": "./dist/commonjs/api/gatewayApi/index.d.ts", + "default": "./dist/commonjs/api/gatewayApi/index.js" + } + }, + "./api/gateway": { + "browser": { + "types": "./dist/browser/api/gateway/index.d.ts", + "default": "./dist/browser/api/gateway/index.js" + }, + "import": { + "types": "./dist/esm/api/gateway/index.d.ts", + "default": "./dist/esm/api/gateway/index.js" + }, + "require": { + "types": "./dist/commonjs/api/gateway/index.d.ts", + "default": "./dist/commonjs/api/gateway/index.js" + } + }, + "./api/apiGatewayHostnameBinding": { + "browser": { + "types": "./dist/browser/api/apiGatewayHostnameBinding/index.d.ts", + "default": "./dist/browser/api/apiGatewayHostnameBinding/index.js" + }, + "import": { + "types": "./dist/esm/api/apiGatewayHostnameBinding/index.d.ts", + "default": "./dist/esm/api/apiGatewayHostnameBinding/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiGatewayHostnameBinding/index.d.ts", + "default": "./dist/commonjs/api/apiGatewayHostnameBinding/index.js" + } + }, + "./api/apiGatewayConfigConnection": { + "browser": { + "types": "./dist/browser/api/apiGatewayConfigConnection/index.d.ts", + "default": "./dist/browser/api/apiGatewayConfigConnection/index.js" + }, + "import": { + "types": "./dist/esm/api/apiGatewayConfigConnection/index.d.ts", + "default": "./dist/esm/api/apiGatewayConfigConnection/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiGatewayConfigConnection/index.d.ts", + "default": "./dist/commonjs/api/apiGatewayConfigConnection/index.js" + } + }, + "./api/emailTemplate": { + "browser": { + "types": "./dist/browser/api/emailTemplate/index.d.ts", + "default": "./dist/browser/api/emailTemplate/index.js" + }, + "import": { + "types": "./dist/esm/api/emailTemplate/index.d.ts", + "default": "./dist/esm/api/emailTemplate/index.js" + }, + "require": { + "types": "./dist/commonjs/api/emailTemplate/index.d.ts", + "default": "./dist/commonjs/api/emailTemplate/index.js" + } + }, + "./api/documentation": { + "browser": { + "types": "./dist/browser/api/documentation/index.d.ts", + "default": "./dist/browser/api/documentation/index.js" + }, + "import": { + "types": "./dist/esm/api/documentation/index.d.ts", + "default": "./dist/esm/api/documentation/index.js" + }, + "require": { + "types": "./dist/commonjs/api/documentation/index.d.ts", + "default": "./dist/commonjs/api/documentation/index.js" + } + }, + "./api/deletedServices": { + "browser": { + "types": "./dist/browser/api/deletedServices/index.d.ts", + "default": "./dist/browser/api/deletedServices/index.js" + }, + "import": { + "types": "./dist/esm/api/deletedServices/index.d.ts", + "default": "./dist/esm/api/deletedServices/index.js" + }, + "require": { + "types": "./dist/commonjs/api/deletedServices/index.d.ts", + "default": "./dist/commonjs/api/deletedServices/index.js" + } + }, + "./api/contentItem": { + "browser": { + "types": "./dist/browser/api/contentItem/index.d.ts", + "default": "./dist/browser/api/contentItem/index.js" + }, + "import": { + "types": "./dist/esm/api/contentItem/index.d.ts", + "default": "./dist/esm/api/contentItem/index.js" + }, + "require": { + "types": "./dist/commonjs/api/contentItem/index.d.ts", + "default": "./dist/commonjs/api/contentItem/index.js" + } + }, + "./api/contentType": { + "browser": { + "types": "./dist/browser/api/contentType/index.d.ts", + "default": "./dist/browser/api/contentType/index.js" + }, + "import": { + "types": "./dist/esm/api/contentType/index.d.ts", + "default": "./dist/esm/api/contentType/index.js" + }, + "require": { + "types": "./dist/commonjs/api/contentType/index.d.ts", + "default": "./dist/commonjs/api/contentType/index.js" + } + }, + "./api/certificate": { + "browser": { + "types": "./dist/browser/api/certificate/index.d.ts", + "default": "./dist/browser/api/certificate/index.js" + }, + "import": { + "types": "./dist/esm/api/certificate/index.d.ts", + "default": "./dist/esm/api/certificate/index.js" + }, + "require": { + "types": "./dist/commonjs/api/certificate/index.d.ts", + "default": "./dist/commonjs/api/certificate/index.js" + } + }, + "./api/cache": { + "browser": { + "types": "./dist/browser/api/cache/index.d.ts", + "default": "./dist/browser/api/cache/index.js" + }, + "import": { + "types": "./dist/esm/api/cache/index.d.ts", + "default": "./dist/esm/api/cache/index.js" + }, + "require": { + "types": "./dist/commonjs/api/cache/index.d.ts", + "default": "./dist/commonjs/api/cache/index.js" + } + }, + "./api/backend": { + "browser": { + "types": "./dist/browser/api/backend/index.d.ts", + "default": "./dist/browser/api/backend/index.js" + }, + "import": { + "types": "./dist/esm/api/backend/index.d.ts", + "default": "./dist/esm/api/backend/index.js" + }, + "require": { + "types": "./dist/commonjs/api/backend/index.d.ts", + "default": "./dist/commonjs/api/backend/index.js" + } + }, + "./api/authorizationServer": { + "browser": { + "types": "./dist/browser/api/authorizationServer/index.d.ts", + "default": "./dist/browser/api/authorizationServer/index.js" + }, + "import": { + "types": "./dist/esm/api/authorizationServer/index.d.ts", + "default": "./dist/esm/api/authorizationServer/index.js" + }, + "require": { + "types": "./dist/commonjs/api/authorizationServer/index.d.ts", + "default": "./dist/commonjs/api/authorizationServer/index.js" + } + }, + "./api/authorizationAccessPolicy": { + "browser": { + "types": "./dist/browser/api/authorizationAccessPolicy/index.d.ts", + "default": "./dist/browser/api/authorizationAccessPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/authorizationAccessPolicy/index.d.ts", + "default": "./dist/esm/api/authorizationAccessPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/authorizationAccessPolicy/index.d.ts", + "default": "./dist/commonjs/api/authorizationAccessPolicy/index.js" + } + }, + "./api/authorizationLoginLinks": { + "browser": { + "types": "./dist/browser/api/authorizationLoginLinks/index.d.ts", + "default": "./dist/browser/api/authorizationLoginLinks/index.js" + }, + "import": { + "types": "./dist/esm/api/authorizationLoginLinks/index.d.ts", + "default": "./dist/esm/api/authorizationLoginLinks/index.js" + }, + "require": { + "types": "./dist/commonjs/api/authorizationLoginLinks/index.d.ts", + "default": "./dist/commonjs/api/authorizationLoginLinks/index.js" + } + }, + "./api/authorization": { + "browser": { + "types": "./dist/browser/api/authorization/index.d.ts", + "default": "./dist/browser/api/authorization/index.js" + }, + "import": { + "types": "./dist/esm/api/authorization/index.d.ts", + "default": "./dist/esm/api/authorization/index.js" + }, + "require": { + "types": "./dist/commonjs/api/authorization/index.d.ts", + "default": "./dist/commonjs/api/authorization/index.js" + } + }, + "./api/authorizationProvider": { + "browser": { + "types": "./dist/browser/api/authorizationProvider/index.d.ts", + "default": "./dist/browser/api/authorizationProvider/index.js" + }, + "import": { + "types": "./dist/esm/api/authorizationProvider/index.d.ts", + "default": "./dist/esm/api/authorizationProvider/index.js" + }, + "require": { + "types": "./dist/commonjs/api/authorizationProvider/index.d.ts", + "default": "./dist/commonjs/api/authorizationProvider/index.js" + } + }, + "./api/apiVersionSet": { + "browser": { + "types": "./dist/browser/api/apiVersionSet/index.d.ts", + "default": "./dist/browser/api/apiVersionSet/index.js" + }, + "import": { + "types": "./dist/esm/api/apiVersionSet/index.d.ts", + "default": "./dist/esm/api/apiVersionSet/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiVersionSet/index.d.ts", + "default": "./dist/commonjs/api/apiVersionSet/index.js" + } + }, + "./api/apiTool": { + "browser": { + "types": "./dist/browser/api/apiTool/index.d.ts", + "default": "./dist/browser/api/apiTool/index.js" + }, + "import": { + "types": "./dist/esm/api/apiTool/index.d.ts", + "default": "./dist/esm/api/apiTool/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiTool/index.d.ts", + "default": "./dist/commonjs/api/apiTool/index.js" + } + }, + "./api/productWikis": { + "browser": { + "types": "./dist/browser/api/productWikis/index.d.ts", + "default": "./dist/browser/api/productWikis/index.js" + }, + "import": { + "types": "./dist/esm/api/productWikis/index.d.ts", + "default": "./dist/esm/api/productWikis/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productWikis/index.d.ts", + "default": "./dist/commonjs/api/productWikis/index.js" + } + }, + "./api/apiWikis": { + "browser": { + "types": "./dist/browser/api/apiWikis/index.d.ts", + "default": "./dist/browser/api/apiWikis/index.js" + }, + "import": { + "types": "./dist/esm/api/apiWikis/index.d.ts", + "default": "./dist/esm/api/apiWikis/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiWikis/index.d.ts", + "default": "./dist/commonjs/api/apiWikis/index.js" + } + }, + "./api/apiWiki": { + "browser": { + "types": "./dist/browser/api/apiWiki/index.d.ts", + "default": "./dist/browser/api/apiWiki/index.js" + }, + "import": { + "types": "./dist/esm/api/apiWiki/index.d.ts", + "default": "./dist/esm/api/apiWiki/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiWiki/index.d.ts", + "default": "./dist/commonjs/api/apiWiki/index.js" + } + }, + "./api/apiTagDescription": { + "browser": { + "types": "./dist/browser/api/apiTagDescription/index.d.ts", + "default": "./dist/browser/api/apiTagDescription/index.js" + }, + "import": { + "types": "./dist/esm/api/apiTagDescription/index.d.ts", + "default": "./dist/esm/api/apiTagDescription/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiTagDescription/index.d.ts", + "default": "./dist/commonjs/api/apiTagDescription/index.js" + } + }, + "./api/apiIssueAttachment": { + "browser": { + "types": "./dist/browser/api/apiIssueAttachment/index.d.ts", + "default": "./dist/browser/api/apiIssueAttachment/index.js" + }, + "import": { + "types": "./dist/esm/api/apiIssueAttachment/index.d.ts", + "default": "./dist/esm/api/apiIssueAttachment/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiIssueAttachment/index.d.ts", + "default": "./dist/commonjs/api/apiIssueAttachment/index.js" + } + }, + "./api/apiIssueComment": { + "browser": { + "types": "./dist/browser/api/apiIssueComment/index.d.ts", + "default": "./dist/browser/api/apiIssueComment/index.js" + }, + "import": { + "types": "./dist/esm/api/apiIssueComment/index.d.ts", + "default": "./dist/esm/api/apiIssueComment/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiIssueComment/index.d.ts", + "default": "./dist/commonjs/api/apiIssueComment/index.js" + } + }, + "./api/apiIssue": { + "browser": { + "types": "./dist/browser/api/apiIssue/index.d.ts", + "default": "./dist/browser/api/apiIssue/index.js" + }, + "import": { + "types": "./dist/esm/api/apiIssue/index.d.ts", + "default": "./dist/esm/api/apiIssue/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiIssue/index.d.ts", + "default": "./dist/commonjs/api/apiIssue/index.js" + } + }, + "./api/apiDiagnostic": { + "browser": { + "types": "./dist/browser/api/apiDiagnostic/index.d.ts", + "default": "./dist/browser/api/apiDiagnostic/index.js" + }, + "import": { + "types": "./dist/esm/api/apiDiagnostic/index.d.ts", + "default": "./dist/esm/api/apiDiagnostic/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiDiagnostic/index.d.ts", + "default": "./dist/commonjs/api/apiDiagnostic/index.js" + } + }, + "./api/apiSchema": { + "browser": { + "types": "./dist/browser/api/apiSchema/index.d.ts", + "default": "./dist/browser/api/apiSchema/index.js" + }, + "import": { + "types": "./dist/esm/api/apiSchema/index.d.ts", + "default": "./dist/esm/api/apiSchema/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiSchema/index.d.ts", + "default": "./dist/commonjs/api/apiSchema/index.js" + } + }, + "./api/graphQLApiResolver": { + "browser": { + "types": "./dist/browser/api/graphQLApiResolver/index.d.ts", + "default": "./dist/browser/api/graphQLApiResolver/index.js" + }, + "import": { + "types": "./dist/esm/api/graphQLApiResolver/index.d.ts", + "default": "./dist/esm/api/graphQLApiResolver/index.js" + }, + "require": { + "types": "./dist/commonjs/api/graphQLApiResolver/index.d.ts", + "default": "./dist/commonjs/api/graphQLApiResolver/index.js" + } + }, + "./api/apiOperationPolicy": { + "browser": { + "types": "./dist/browser/api/apiOperationPolicy/index.d.ts", + "default": "./dist/browser/api/apiOperationPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/apiOperationPolicy/index.d.ts", + "default": "./dist/esm/api/apiOperationPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiOperationPolicy/index.d.ts", + "default": "./dist/commonjs/api/apiOperationPolicy/index.js" + } + }, + "./api/apiOperation": { + "browser": { + "types": "./dist/browser/api/apiOperation/index.d.ts", + "default": "./dist/browser/api/apiOperation/index.js" + }, + "import": { + "types": "./dist/esm/api/apiOperation/index.d.ts", + "default": "./dist/esm/api/apiOperation/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiOperation/index.d.ts", + "default": "./dist/commonjs/api/apiOperation/index.js" + } + }, + "./api/apiRelease": { + "browser": { + "types": "./dist/browser/api/apiRelease/index.d.ts", + "default": "./dist/browser/api/apiRelease/index.js" + }, + "import": { + "types": "./dist/esm/api/apiRelease/index.d.ts", + "default": "./dist/esm/api/apiRelease/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiRelease/index.d.ts", + "default": "./dist/commonjs/api/apiRelease/index.js" + } + }, + "./api/tagResource": { + "browser": { + "types": "./dist/browser/api/tagResource/index.d.ts", + "default": "./dist/browser/api/tagResource/index.js" + }, + "import": { + "types": "./dist/esm/api/tagResource/index.d.ts", + "default": "./dist/esm/api/tagResource/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tagResource/index.d.ts", + "default": "./dist/commonjs/api/tagResource/index.js" + } + }, + "./api/reports": { + "browser": { + "types": "./dist/browser/api/reports/index.d.ts", + "default": "./dist/browser/api/reports/index.js" + }, + "import": { + "types": "./dist/esm/api/reports/index.d.ts", + "default": "./dist/esm/api/reports/index.js" + }, + "require": { + "types": "./dist/commonjs/api/reports/index.d.ts", + "default": "./dist/commonjs/api/reports/index.js" + } + }, + "./api/region": { + "browser": { + "types": "./dist/browser/api/region/index.d.ts", + "default": "./dist/browser/api/region/index.js" + }, + "import": { + "types": "./dist/esm/api/region/index.d.ts", + "default": "./dist/esm/api/region/index.js" + }, + "require": { + "types": "./dist/commonjs/api/region/index.d.ts", + "default": "./dist/commonjs/api/region/index.js" + } + }, + "./api/quotaByPeriodKeys": { + "browser": { + "types": "./dist/browser/api/quotaByPeriodKeys/index.d.ts", + "default": "./dist/browser/api/quotaByPeriodKeys/index.js" + }, + "import": { + "types": "./dist/esm/api/quotaByPeriodKeys/index.d.ts", + "default": "./dist/esm/api/quotaByPeriodKeys/index.js" + }, + "require": { + "types": "./dist/commonjs/api/quotaByPeriodKeys/index.d.ts", + "default": "./dist/commonjs/api/quotaByPeriodKeys/index.js" + } + }, + "./api/quotaByCounterKeys": { + "browser": { + "types": "./dist/browser/api/quotaByCounterKeys/index.d.ts", + "default": "./dist/browser/api/quotaByCounterKeys/index.js" + }, + "import": { + "types": "./dist/esm/api/quotaByCounterKeys/index.d.ts", + "default": "./dist/esm/api/quotaByCounterKeys/index.js" + }, + "require": { + "types": "./dist/commonjs/api/quotaByCounterKeys/index.d.ts", + "default": "./dist/commonjs/api/quotaByCounterKeys/index.js" + } + }, + "./api/product": { + "browser": { + "types": "./dist/browser/api/product/index.d.ts", + "default": "./dist/browser/api/product/index.js" + }, + "import": { + "types": "./dist/esm/api/product/index.d.ts", + "default": "./dist/esm/api/product/index.js" + }, + "require": { + "types": "./dist/commonjs/api/product/index.d.ts", + "default": "./dist/commonjs/api/product/index.js" + } + }, + "./api/portalSettings": { + "browser": { + "types": "./dist/browser/api/portalSettings/index.d.ts", + "default": "./dist/browser/api/portalSettings/index.js" + }, + "import": { + "types": "./dist/esm/api/portalSettings/index.d.ts", + "default": "./dist/esm/api/portalSettings/index.js" + }, + "require": { + "types": "./dist/commonjs/api/portalSettings/index.d.ts", + "default": "./dist/commonjs/api/portalSettings/index.js" + } + }, + "./api/policyRestrictionValidations": { + "browser": { + "types": "./dist/browser/api/policyRestrictionValidations/index.d.ts", + "default": "./dist/browser/api/policyRestrictionValidations/index.js" + }, + "import": { + "types": "./dist/esm/api/policyRestrictionValidations/index.d.ts", + "default": "./dist/esm/api/policyRestrictionValidations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/policyRestrictionValidations/index.d.ts", + "default": "./dist/commonjs/api/policyRestrictionValidations/index.js" + } + }, + "./api/policyDescription": { + "browser": { + "types": "./dist/browser/api/policyDescription/index.d.ts", + "default": "./dist/browser/api/policyDescription/index.js" + }, + "import": { + "types": "./dist/esm/api/policyDescription/index.d.ts", + "default": "./dist/esm/api/policyDescription/index.js" + }, + "require": { + "types": "./dist/commonjs/api/policyDescription/index.d.ts", + "default": "./dist/commonjs/api/policyDescription/index.js" + } + }, + "./api/outboundNetworkDependenciesEndpoints": { + "browser": { + "types": "./dist/browser/api/outboundNetworkDependenciesEndpoints/index.d.ts", + "default": "./dist/browser/api/outboundNetworkDependenciesEndpoints/index.js" + }, + "import": { + "types": "./dist/esm/api/outboundNetworkDependenciesEndpoints/index.d.ts", + "default": "./dist/esm/api/outboundNetworkDependenciesEndpoints/index.js" + }, + "require": { + "types": "./dist/commonjs/api/outboundNetworkDependenciesEndpoints/index.d.ts", + "default": "./dist/commonjs/api/outboundNetworkDependenciesEndpoints/index.js" + } + }, + "./api/networkStatus": { + "browser": { + "types": "./dist/browser/api/networkStatus/index.d.ts", + "default": "./dist/browser/api/networkStatus/index.js" + }, + "import": { + "types": "./dist/esm/api/networkStatus/index.d.ts", + "default": "./dist/esm/api/networkStatus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/networkStatus/index.d.ts", + "default": "./dist/commonjs/api/networkStatus/index.js" + } + }, + "./api/apiManagementServiceSkus": { + "browser": { + "types": "./dist/browser/api/apiManagementServiceSkus/index.d.ts", + "default": "./dist/browser/api/apiManagementServiceSkus/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementServiceSkus/index.d.ts", + "default": "./dist/esm/api/apiManagementServiceSkus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementServiceSkus/index.d.ts", + "default": "./dist/commonjs/api/apiManagementServiceSkus/index.js" + } + }, + "./api/allPolicies": { + "browser": { + "types": "./dist/browser/api/allPolicies/index.d.ts", + "default": "./dist/browser/api/allPolicies/index.js" + }, + "import": { + "types": "./dist/esm/api/allPolicies/index.d.ts", + "default": "./dist/esm/api/allPolicies/index.js" + }, + "require": { + "types": "./dist/commonjs/api/allPolicies/index.d.ts", + "default": "./dist/commonjs/api/allPolicies/index.js" + } + }, + "./api/apiManagementService": { + "browser": { + "types": "./dist/browser/api/apiManagementService/index.d.ts", + "default": "./dist/browser/api/apiManagementService/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementService/index.d.ts", + "default": "./dist/esm/api/apiManagementService/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementService/index.d.ts", + "default": "./dist/commonjs/api/apiManagementService/index.js" + } + }, + "./api/workspaceApiRevision": { + "browser": { + "types": "./dist/browser/api/workspaceApiRevision/index.d.ts", + "default": "./dist/browser/api/workspaceApiRevision/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiRevision/index.d.ts", + "default": "./dist/esm/api/workspaceApiRevision/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiRevision/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiRevision/index.js" + } + }, + "./api/operation": { + "browser": { + "types": "./dist/browser/api/operation/index.d.ts", + "default": "./dist/browser/api/operation/index.js" + }, + "import": { + "types": "./dist/esm/api/operation/index.d.ts", + "default": "./dist/esm/api/operation/index.js" + }, + "require": { + "types": "./dist/commonjs/api/operation/index.d.ts", + "default": "./dist/commonjs/api/operation/index.js" + } + }, + "./api/apiProduct": { + "browser": { + "types": "./dist/browser/api/apiProduct/index.d.ts", + "default": "./dist/browser/api/apiProduct/index.js" + }, + "import": { + "types": "./dist/esm/api/apiProduct/index.d.ts", + "default": "./dist/esm/api/apiProduct/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiProduct/index.d.ts", + "default": "./dist/commonjs/api/apiProduct/index.js" + } + }, + "./api/apiRevision": { + "browser": { + "types": "./dist/browser/api/apiRevision/index.d.ts", + "default": "./dist/browser/api/apiRevision/index.js" + }, + "import": { + "types": "./dist/esm/api/apiRevision/index.d.ts", + "default": "./dist/esm/api/apiRevision/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiRevision/index.d.ts", + "default": "./dist/commonjs/api/apiRevision/index.js" + } + }, + "./api/api": { + "browser": { + "types": "./dist/browser/api/api/index.d.ts", + "default": "./dist/browser/api/api/index.js" + }, + "import": { + "types": "./dist/esm/api/api/index.d.ts", + "default": "./dist/esm/api/api/index.js" + }, + "require": { + "types": "./dist/commonjs/api/api/index.d.ts", + "default": "./dist/commonjs/api/api/index.js" + } + }, + "./api/apiManagementGatewaySkus": { + "browser": { + "types": "./dist/browser/api/apiManagementGatewaySkus/index.d.ts", + "default": "./dist/browser/api/apiManagementGatewaySkus/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementGatewaySkus/index.d.ts", + "default": "./dist/esm/api/apiManagementGatewaySkus/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementGatewaySkus/index.d.ts", + "default": "./dist/commonjs/api/apiManagementGatewaySkus/index.js" + } + }, + "./api/apiGateway": { + "browser": { + "types": "./dist/browser/api/apiGateway/index.d.ts", + "default": "./dist/browser/api/apiGateway/index.js" + }, + "import": { + "types": "./dist/esm/api/apiGateway/index.d.ts", + "default": "./dist/esm/api/apiGateway/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiGateway/index.d.ts", + "default": "./dist/commonjs/api/apiGateway/index.js" + } + }, + "./api/apiManagementOperations": { + "browser": { + "types": "./dist/browser/api/apiManagementOperations/index.d.ts", + "default": "./dist/browser/api/apiManagementOperations/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementOperations/index.d.ts", + "default": "./dist/esm/api/apiManagementOperations/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementOperations/index.d.ts", + "default": "./dist/commonjs/api/apiManagementOperations/index.js" + } + }, + "./api/workspaceTagProductLink": { + "browser": { + "types": "./dist/browser/api/workspaceTagProductLink/index.d.ts", + "default": "./dist/browser/api/workspaceTagProductLink/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceTagProductLink/index.d.ts", + "default": "./dist/esm/api/workspaceTagProductLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceTagProductLink/index.d.ts", + "default": "./dist/commonjs/api/workspaceTagProductLink/index.js" + } + }, + "./api/workspaceTagOperationLink": { + "browser": { + "types": "./dist/browser/api/workspaceTagOperationLink/index.d.ts", + "default": "./dist/browser/api/workspaceTagOperationLink/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceTagOperationLink/index.d.ts", + "default": "./dist/esm/api/workspaceTagOperationLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceTagOperationLink/index.d.ts", + "default": "./dist/commonjs/api/workspaceTagOperationLink/index.js" + } + }, + "./api/workspaceTagApiLink": { + "browser": { + "types": "./dist/browser/api/workspaceTagApiLink/index.d.ts", + "default": "./dist/browser/api/workspaceTagApiLink/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceTagApiLink/index.d.ts", + "default": "./dist/esm/api/workspaceTagApiLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceTagApiLink/index.d.ts", + "default": "./dist/commonjs/api/workspaceTagApiLink/index.js" + } + }, + "./api/workspaceSubscription": { + "browser": { + "types": "./dist/browser/api/workspaceSubscription/index.d.ts", + "default": "./dist/browser/api/workspaceSubscription/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceSubscription/index.d.ts", + "default": "./dist/esm/api/workspaceSubscription/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceSubscription/index.d.ts", + "default": "./dist/commonjs/api/workspaceSubscription/index.js" + } + }, + "./api/userSubscription": { + "browser": { + "types": "./dist/browser/api/userSubscription/index.d.ts", + "default": "./dist/browser/api/userSubscription/index.js" + }, + "import": { + "types": "./dist/esm/api/userSubscription/index.d.ts", + "default": "./dist/esm/api/userSubscription/index.js" + }, + "require": { + "types": "./dist/commonjs/api/userSubscription/index.d.ts", + "default": "./dist/commonjs/api/userSubscription/index.js" + } + }, + "./api/workspaceGlobalSchema": { + "browser": { + "types": "./dist/browser/api/workspaceGlobalSchema/index.d.ts", + "default": "./dist/browser/api/workspaceGlobalSchema/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceGlobalSchema/index.d.ts", + "default": "./dist/esm/api/workspaceGlobalSchema/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceGlobalSchema/index.d.ts", + "default": "./dist/commonjs/api/workspaceGlobalSchema/index.js" + } + }, + "./api/workspaceProductGroupLink": { + "browser": { + "types": "./dist/browser/api/workspaceProductGroupLink/index.d.ts", + "default": "./dist/browser/api/workspaceProductGroupLink/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceProductGroupLink/index.d.ts", + "default": "./dist/esm/api/workspaceProductGroupLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceProductGroupLink/index.d.ts", + "default": "./dist/commonjs/api/workspaceProductGroupLink/index.js" + } + }, + "./api/workspaceProductApiLink": { + "browser": { + "types": "./dist/browser/api/workspaceProductApiLink/index.d.ts", + "default": "./dist/browser/api/workspaceProductApiLink/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceProductApiLink/index.d.ts", + "default": "./dist/esm/api/workspaceProductApiLink/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceProductApiLink/index.d.ts", + "default": "./dist/commonjs/api/workspaceProductApiLink/index.js" + } + }, + "./api/workspaceProduct": { + "browser": { + "types": "./dist/browser/api/workspaceProduct/index.d.ts", + "default": "./dist/browser/api/workspaceProduct/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceProduct/index.d.ts", + "default": "./dist/esm/api/workspaceProduct/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceProduct/index.d.ts", + "default": "./dist/commonjs/api/workspaceProduct/index.js" + } + }, + "./api/delegationSettings": { + "browser": { + "types": "./dist/browser/api/delegationSettings/index.d.ts", + "default": "./dist/browser/api/delegationSettings/index.js" + }, + "import": { + "types": "./dist/esm/api/delegationSettings/index.d.ts", + "default": "./dist/esm/api/delegationSettings/index.js" + }, + "require": { + "types": "./dist/commonjs/api/delegationSettings/index.d.ts", + "default": "./dist/commonjs/api/delegationSettings/index.js" + } + }, + "./api/signUpSettings": { + "browser": { + "types": "./dist/browser/api/signUpSettings/index.d.ts", + "default": "./dist/browser/api/signUpSettings/index.js" + }, + "import": { + "types": "./dist/esm/api/signUpSettings/index.d.ts", + "default": "./dist/esm/api/signUpSettings/index.js" + }, + "require": { + "types": "./dist/commonjs/api/signUpSettings/index.d.ts", + "default": "./dist/commonjs/api/signUpSettings/index.js" + } + }, + "./api/signInSettings": { + "browser": { + "types": "./dist/browser/api/signInSettings/index.d.ts", + "default": "./dist/browser/api/signInSettings/index.js" + }, + "import": { + "types": "./dist/esm/api/signInSettings/index.d.ts", + "default": "./dist/esm/api/signInSettings/index.js" + }, + "require": { + "types": "./dist/commonjs/api/signInSettings/index.d.ts", + "default": "./dist/commonjs/api/signInSettings/index.js" + } + }, + "./api/workspacePolicyFragment": { + "browser": { + "types": "./dist/browser/api/workspacePolicyFragment/index.d.ts", + "default": "./dist/browser/api/workspacePolicyFragment/index.js" + }, + "import": { + "types": "./dist/esm/api/workspacePolicyFragment/index.d.ts", + "default": "./dist/esm/api/workspacePolicyFragment/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspacePolicyFragment/index.d.ts", + "default": "./dist/commonjs/api/workspacePolicyFragment/index.js" + } + }, + "./api/workspaceNotification": { + "browser": { + "types": "./dist/browser/api/workspaceNotification/index.d.ts", + "default": "./dist/browser/api/workspaceNotification/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceNotification/index.d.ts", + "default": "./dist/esm/api/workspaceNotification/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceNotification/index.d.ts", + "default": "./dist/commonjs/api/workspaceNotification/index.js" + } + }, + "./api/workspaceNamedValue": { + "browser": { + "types": "./dist/browser/api/workspaceNamedValue/index.d.ts", + "default": "./dist/browser/api/workspaceNamedValue/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceNamedValue/index.d.ts", + "default": "./dist/esm/api/workspaceNamedValue/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceNamedValue/index.d.ts", + "default": "./dist/commonjs/api/workspaceNamedValue/index.js" + } + }, + "./api/workspaceLogger": { + "browser": { + "types": "./dist/browser/api/workspaceLogger/index.d.ts", + "default": "./dist/browser/api/workspaceLogger/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceLogger/index.d.ts", + "default": "./dist/esm/api/workspaceLogger/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceLogger/index.d.ts", + "default": "./dist/commonjs/api/workspaceLogger/index.js" + } + }, + "./api/workspaceGroup": { + "browser": { + "types": "./dist/browser/api/workspaceGroup/index.d.ts", + "default": "./dist/browser/api/workspaceGroup/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceGroup/index.d.ts", + "default": "./dist/esm/api/workspaceGroup/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceGroup/index.d.ts", + "default": "./dist/commonjs/api/workspaceGroup/index.js" + } + }, + "./api/workspaceCertificate": { + "browser": { + "types": "./dist/browser/api/workspaceCertificate/index.d.ts", + "default": "./dist/browser/api/workspaceCertificate/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceCertificate/index.d.ts", + "default": "./dist/esm/api/workspaceCertificate/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceCertificate/index.d.ts", + "default": "./dist/commonjs/api/workspaceCertificate/index.js" + } + }, + "./api/workspaceBackend": { + "browser": { + "types": "./dist/browser/api/workspaceBackend/index.d.ts", + "default": "./dist/browser/api/workspaceBackend/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceBackend/index.d.ts", + "default": "./dist/esm/api/workspaceBackend/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceBackend/index.d.ts", + "default": "./dist/commonjs/api/workspaceBackend/index.js" + } + }, + "./api/workspaceApiVersionSet": { + "browser": { + "types": "./dist/browser/api/workspaceApiVersionSet/index.d.ts", + "default": "./dist/browser/api/workspaceApiVersionSet/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiVersionSet/index.d.ts", + "default": "./dist/esm/api/workspaceApiVersionSet/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiVersionSet/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiVersionSet/index.js" + } + }, + "./api/productWiki": { + "browser": { + "types": "./dist/browser/api/productWiki/index.d.ts", + "default": "./dist/browser/api/productWiki/index.js" + }, + "import": { + "types": "./dist/esm/api/productWiki/index.d.ts", + "default": "./dist/esm/api/productWiki/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productWiki/index.d.ts", + "default": "./dist/commonjs/api/productWiki/index.js" + } + }, + "./api/issue": { + "browser": { + "types": "./dist/browser/api/issue/index.d.ts", + "default": "./dist/browser/api/issue/index.js" + }, + "import": { + "types": "./dist/esm/api/issue/index.d.ts", + "default": "./dist/esm/api/issue/index.js" + }, + "require": { + "types": "./dist/commonjs/api/issue/index.d.ts", + "default": "./dist/commonjs/api/issue/index.js" + } + }, + "./api/workspaceApiDiagnostic": { + "browser": { + "types": "./dist/browser/api/workspaceApiDiagnostic/index.d.ts", + "default": "./dist/browser/api/workspaceApiDiagnostic/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiDiagnostic/index.d.ts", + "default": "./dist/esm/api/workspaceApiDiagnostic/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiDiagnostic/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiDiagnostic/index.js" + } + }, + "./api/workspaceDiagnostic": { + "browser": { + "types": "./dist/browser/api/workspaceDiagnostic/index.d.ts", + "default": "./dist/browser/api/workspaceDiagnostic/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceDiagnostic/index.d.ts", + "default": "./dist/esm/api/workspaceDiagnostic/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceDiagnostic/index.d.ts", + "default": "./dist/commonjs/api/workspaceDiagnostic/index.js" + } + }, + "./api/diagnostic": { + "browser": { + "types": "./dist/browser/api/diagnostic/index.d.ts", + "default": "./dist/browser/api/diagnostic/index.js" + }, + "import": { + "types": "./dist/esm/api/diagnostic/index.d.ts", + "default": "./dist/esm/api/diagnostic/index.js" + }, + "require": { + "types": "./dist/commonjs/api/diagnostic/index.d.ts", + "default": "./dist/commonjs/api/diagnostic/index.js" + } + }, + "./api/workspaceApiSchema": { + "browser": { + "types": "./dist/browser/api/workspaceApiSchema/index.d.ts", + "default": "./dist/browser/api/workspaceApiSchema/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiSchema/index.d.ts", + "default": "./dist/esm/api/workspaceApiSchema/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiSchema/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiSchema/index.js" + } + }, + "./api/workspaceTag": { + "browser": { + "types": "./dist/browser/api/workspaceTag/index.d.ts", + "default": "./dist/browser/api/workspaceTag/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceTag/index.d.ts", + "default": "./dist/esm/api/workspaceTag/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceTag/index.d.ts", + "default": "./dist/commonjs/api/workspaceTag/index.js" + } + }, + "./api/tag": { + "browser": { + "types": "./dist/browser/api/tag/index.d.ts", + "default": "./dist/browser/api/tag/index.js" + }, + "import": { + "types": "./dist/esm/api/tag/index.d.ts", + "default": "./dist/esm/api/tag/index.js" + }, + "require": { + "types": "./dist/commonjs/api/tag/index.d.ts", + "default": "./dist/commonjs/api/tag/index.js" + } + }, + "./api/workspaceProductPolicy": { + "browser": { + "types": "./dist/browser/api/workspaceProductPolicy/index.d.ts", + "default": "./dist/browser/api/workspaceProductPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceProductPolicy/index.d.ts", + "default": "./dist/esm/api/workspaceProductPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceProductPolicy/index.d.ts", + "default": "./dist/commonjs/api/workspaceProductPolicy/index.js" + } + }, + "./api/workspaceApiPolicy": { + "browser": { + "types": "./dist/browser/api/workspaceApiPolicy/index.d.ts", + "default": "./dist/browser/api/workspaceApiPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiPolicy/index.d.ts", + "default": "./dist/esm/api/workspaceApiPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiPolicy/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiPolicy/index.js" + } + }, + "./api/workspaceApiOperationPolicy": { + "browser": { + "types": "./dist/browser/api/workspaceApiOperationPolicy/index.d.ts", + "default": "./dist/browser/api/workspaceApiOperationPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiOperationPolicy/index.d.ts", + "default": "./dist/esm/api/workspaceApiOperationPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiOperationPolicy/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiOperationPolicy/index.js" + } + }, + "./api/workspacePolicy": { + "browser": { + "types": "./dist/browser/api/workspacePolicy/index.d.ts", + "default": "./dist/browser/api/workspacePolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/workspacePolicy/index.d.ts", + "default": "./dist/esm/api/workspacePolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspacePolicy/index.d.ts", + "default": "./dist/commonjs/api/workspacePolicy/index.js" + } + }, + "./api/productPolicy": { + "browser": { + "types": "./dist/browser/api/productPolicy/index.d.ts", + "default": "./dist/browser/api/productPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/productPolicy/index.d.ts", + "default": "./dist/esm/api/productPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/productPolicy/index.d.ts", + "default": "./dist/commonjs/api/productPolicy/index.js" + } + }, + "./api/policy": { + "browser": { + "types": "./dist/browser/api/policy/index.d.ts", + "default": "./dist/browser/api/policy/index.js" + }, + "import": { + "types": "./dist/esm/api/policy/index.d.ts", + "default": "./dist/esm/api/policy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/policy/index.d.ts", + "default": "./dist/commonjs/api/policy/index.js" + } + }, + "./api/apiPolicy": { + "browser": { + "types": "./dist/browser/api/apiPolicy/index.d.ts", + "default": "./dist/browser/api/apiPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/apiPolicy/index.d.ts", + "default": "./dist/esm/api/apiPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiPolicy/index.d.ts", + "default": "./dist/commonjs/api/apiPolicy/index.js" + } + }, + "./api/graphQLApiResolverPolicy": { + "browser": { + "types": "./dist/browser/api/graphQLApiResolverPolicy/index.d.ts", + "default": "./dist/browser/api/graphQLApiResolverPolicy/index.js" + }, + "import": { + "types": "./dist/esm/api/graphQLApiResolverPolicy/index.d.ts", + "default": "./dist/esm/api/graphQLApiResolverPolicy/index.js" + }, + "require": { + "types": "./dist/commonjs/api/graphQLApiResolverPolicy/index.d.ts", + "default": "./dist/commonjs/api/graphQLApiResolverPolicy/index.js" + } + }, + "./api/workspaceApiOperation": { + "browser": { + "types": "./dist/browser/api/workspaceApiOperation/index.d.ts", + "default": "./dist/browser/api/workspaceApiOperation/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiOperation/index.d.ts", + "default": "./dist/esm/api/workspaceApiOperation/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiOperation/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiOperation/index.js" + } + }, + "./api/workspaceApiRelease": { + "browser": { + "types": "./dist/browser/api/workspaceApiRelease/index.d.ts", + "default": "./dist/browser/api/workspaceApiRelease/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApiRelease/index.d.ts", + "default": "./dist/esm/api/workspaceApiRelease/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApiRelease/index.d.ts", + "default": "./dist/commonjs/api/workspaceApiRelease/index.js" + } + }, + "./api/apiManagementServiceResources": { + "browser": { + "types": "./dist/browser/api/apiManagementServiceResources/index.d.ts", + "default": "./dist/browser/api/apiManagementServiceResources/index.js" + }, + "import": { + "types": "./dist/esm/api/apiManagementServiceResources/index.d.ts", + "default": "./dist/esm/api/apiManagementServiceResources/index.js" + }, + "require": { + "types": "./dist/commonjs/api/apiManagementServiceResources/index.d.ts", + "default": "./dist/commonjs/api/apiManagementServiceResources/index.js" + } + }, + "./api/workspaceApi": { + "browser": { + "types": "./dist/browser/api/workspaceApi/index.d.ts", + "default": "./dist/browser/api/workspaceApi/index.js" + }, + "import": { + "types": "./dist/esm/api/workspaceApi/index.d.ts", + "default": "./dist/esm/api/workspaceApi/index.js" + }, + "require": { + "types": "./dist/commonjs/api/workspaceApi/index.d.ts", + "default": "./dist/commonjs/api/workspaceApi/index.js" + } + }, + "./models": { + "browser": { + "types": "./dist/browser/models/index.d.ts", + "default": "./dist/browser/models/index.js" + }, + "import": { + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + } }, "keywords": [ "node", "azure", + "cloud", "typescript", "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", + "files": [ + "dist/", + "!dist/**/*.d.*ts.map", + "README.md", + "LICENSE" + ], + "sdk-type": "mgmt", + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js", + "directory": "sdk/apimanagement/arm-apimanagement" + }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/apiManagementContext.ts", + "prefix": "userAgentInfo" + } + ] + }, + "dependencies": { + "@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.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", - "@azure/logger": "^1.1.4", "@types/node": "catalog:", + "cross-env": "catalog:", + "eslint": "catalog:", + "prettier": "catalog:", + "rimraf": "catalog:", "@vitest/browser-playwright": "catalog:testing", "@vitest/coverage-istanbul": "catalog:testing", - "cross-env": "catalog:", "dotenv": "catalog:testing", "playwright": "catalog:testing", - "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:testing" }, - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:samples": "tsc -p config/tsconfig.samples.json && dev-tool samples publish -f", - "check-format": "echo skipped", "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", - "lint": "echo skipped", + "extract-api": "rimraf review && dev-tool run extract-api", "pack": "pnpm pack 2>&1", - "test": "tsc -b --noEmit && npm run test:node && npm run test:browser", - "test:browser": "echo skipped", + "lint": "echo skipped", + "lint:fix": "echo skipped", + "build:samples": "tsc -p config/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", + "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" }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/apiManagementClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement", "//sampleConfiguration": { - "productName": "", + "productName": "@azure/arm-apimanagement", "productSlugs": [ "azure" ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview" - }, - "type": "module", - "browser": "./dist/browser/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "imports": { - "#platform/*": { - "browser": "./src/*-browser.mts", - "default": "./src/*.ts" - } } } diff --git a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-browser.api.diff.md b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-browser.api.diff.md index 3878d585e217..33681a590bed 100644 --- a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-browser.api.diff.md +++ b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-browser.api.diff.md @@ -7,48 +7,7 @@ For the complete API surface, see the corresponding -node.api.md file. =================================================================== --- NodeJS +++ browser -@@ -877,9 +877,9 @@ - backend: Backend; - beginPerformConnectivityCheckAsync(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: PerformConnectivityCheckAsyncOptionalParams): Promise, PerformConnectivityCheckAsyncResponse>>; - beginPerformConnectivityCheckAsyncAndWait(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: PerformConnectivityCheckAsyncOptionalParams): Promise; - // (undocumented) -- cache: Cache; -+ cache: Cache_2; - // (undocumented) - certificate: Certificate; - // (undocumented) - contentItem: ContentItem; -@@ -923,9 +923,9 @@ - namedValue: NamedValue; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) -- notification: Notification; -+ notification: Notification_2; - // (undocumented) - notificationRecipientEmail: NotificationRecipientEmail; - // (undocumented) - notificationRecipientUser: NotificationRecipientUser; -@@ -3295,16 +3295,17 @@ - bytes?: number; - } - - // @public --export interface Cache { -+interface Cache_2 { - createOrUpdate(resourceGroupName: string, serviceName: string, cacheId: string, parameters: CacheContract, options?: CacheCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, options?: CacheDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: CacheListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, parameters: CacheUpdateParameters, options?: CacheUpdateOptionalParams): Promise; - } -+export { Cache_2 as Cache } - - // @public - export interface CacheCollection { - count?: number; -@@ -4613,9 +4614,9 @@ +@@ -3478,9 +3478,9 @@ } // @public @@ -59,7 +18,7 @@ For the complete API surface, see the corresponding -node.api.md file. // @public export interface GatewayKeysContract { -@@ -4723,9 +4724,9 @@ +@@ -3572,9 +3572,9 @@ // @public export interface GatewayTokenRequestContract { @@ -69,8 +28,8 @@ For the complete API surface, see the corresponding -node.api.md file. } // @public - export interface GatewayUpdateHeaders { -@@ -5476,9 +5477,10 @@ + export interface GatewayUpdateOptionalParams extends OperationOptions { +@@ -4081,9 +4081,10 @@ userId?: string; } @@ -82,23 +41,14 @@ For the complete API surface, see the corresponding -node.api.md file. // @public export interface KeyVaultContractCreateProperties { identityClientId?: string; -@@ -6400,13 +6402,14 @@ - // @public - export type NetworkStatusListByServiceResponse = NetworkStatusContractByLocation[]; +@@ -7685,15 +7686,15 @@ // @public --export interface Notification { -+interface Notification_2 { - createOrUpdate(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: NotificationListByServiceOptionalParams): PagedAsyncIterableIterator; + export interface UserTokenParameterProperties { + expiry: Date; +- keyType: KeyType; ++ keyType: KeyType_2; } -+export { Notification_2 as Notification } - - // @public - export interface NotificationCollection { - count?: number; -@@ -10061,9 +10064,9 @@ // @public export interface UserTokenParameters { diff --git a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-node.api.md b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-node.api.md index f9cc93beffb1..e0df3701844d 100644 --- a/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-node.api.md +++ b/sdk/apimanagement/arm-apimanagement/review/arm-apimanagement-node.api.md @@ -4,27 +4,41 @@ ```ts -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { CancelOnProgress } from '@azure/core-lro'; +import { ClientOptions } from '@azure-rest/core-client'; +import { isRestError } from '@azure/core-rest-pipeline'; +import { OperationOptions } from '@azure-rest/core-client'; import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } 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 { RestError } from '@azure/core-rest-pipeline'; +import { TokenCredential } from '@azure/core-auth'; // @public export type AccessIdName = string; // @public -export interface AccessInformationCollection { - count?: number; - readonly nextLink?: string; - readonly value?: AccessInformationContract[]; +export interface AccessInformationContract extends ProxyResource { + enabled?: boolean; + idPropertiesId?: string; + principalId?: string; } // @public -export interface AccessInformationContract extends ProxyResource { +export interface AccessInformationContractProperties { enabled?: boolean; - idPropertiesId?: string; + id?: string; + principalId?: string; +} + +// @public +export interface AccessInformationCreateParameterProperties { + enabled?: boolean; + primaryKey?: string; principalId?: string; + secondaryKey?: string; } // @public @@ -44,6 +58,11 @@ export interface AccessInformationSecretsContract { secondaryKey?: string; } +// @public +export interface AccessInformationUpdateParameterProperties { + enabled?: boolean; +} + // @public export interface AccessInformationUpdateParameters { enabled?: boolean; @@ -68,17 +87,6 @@ export interface AdditionalLocation { zones?: string[]; } -// @public -export interface AllPolicies { - listByService(resourceGroupName: string, serviceName: string, options?: AllPoliciesListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AllPoliciesCollection { - nextLink?: string; - value?: AllPoliciesContract[]; -} - // @public export interface AllPoliciesContract extends ProxyResource { complianceState?: PolicyComplianceState; @@ -86,41 +94,22 @@ export interface AllPoliciesContract extends ProxyResource { } // @public -export interface AllPoliciesListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface AllPoliciesContractProperties { + complianceState?: PolicyComplianceState; + referencePolicyId?: string; } // @public -export type AllPoliciesListByServiceNextResponse = AllPoliciesCollection; - -// @public -export interface AllPoliciesListByServiceOptionalParams extends coreClient.OperationOptions { +export interface AllPoliciesListByServiceOptionalParams extends OperationOptions { } // @public -export type AllPoliciesListByServiceResponse = AllPoliciesCollection; - -// @public -export type AlwaysLog = string; - -// @public -export interface Api { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: ApiCreateOrUpdateOptionalParams): Promise, ApiCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: ApiCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiDeleteOptionalParams): Promise, ApiDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: ApiListByServiceOptionalParams): PagedAsyncIterableIterator; - listByTags(resourceGroupName: string, serviceName: string, options?: ApiListByTagsOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, parameters: ApiUpdateContract, options?: ApiUpdateOptionalParams): Promise; +export interface AllPoliciesOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: AllPoliciesListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ApiCollection { - count?: number; - readonly nextLink?: string; - readonly value?: ApiContract[]; -} +export type AlwaysLog = string; // @public export interface ApiContactInformation { @@ -145,6 +134,7 @@ export interface ApiContract extends ProxyResource { isCurrent?: boolean; readonly isOnline?: boolean; license?: ApiLicenseInformation; + mcpProperties?: McpProperties; path?: string; protocols?: Protocol[]; readonly provisioningState?: string; @@ -175,16 +165,8 @@ export interface ApiContractUpdateProperties extends ApiEntityBaseContract { } // @public -export interface ApiCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; -} - -// @public -export interface ApiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; - resumeFrom?: string; updateIntervalInMs?: number; } @@ -205,6 +187,7 @@ export interface ApiCreateOrUpdateParameter { isCurrent?: boolean; readonly isOnline?: boolean; license?: ApiLicenseInformation; + mcpProperties?: McpProperties; path?: string; protocols?: Protocol[]; readonly provisioningState?: string; @@ -235,104 +218,49 @@ export interface ApiCreateOrUpdatePropertiesWsdlSelector { } // @public -export type ApiCreateOrUpdateResponse = ApiCreateOrUpdateHeaders & ApiContract; - -// @public -export interface ApiDeleteHeaders { - azureAsyncOperation?: string; - location?: string; -} - -// @public -export interface ApiDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiDeleteOptionalParams extends OperationOptions { deleteRevisions?: boolean; - resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ApiDeleteResponse = ApiDeleteHeaders; - -// @public -export interface ApiDiagnostic { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, parameters: DiagnosticContract, options?: ApiDiagnosticCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, ifMatch: string, options?: ApiDiagnosticDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, options?: ApiDiagnosticGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, options?: ApiDiagnosticGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiDiagnosticListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticContract, options?: ApiDiagnosticUpdateOptionalParams): Promise; -} - -// @public -export interface ApiDiagnosticCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiDiagnosticCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type ApiDiagnosticCreateOrUpdateResponse = ApiDiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -// @public -export interface ApiDiagnosticDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiDiagnosticGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiDiagnosticGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiDiagnosticGetEntityTagResponse = ApiDiagnosticGetEntityTagHeaders; - -// @public -export interface ApiDiagnosticGetHeaders { - eTag?: string; +export interface ApiDiagnosticDeleteOptionalParams extends OperationOptions { } // @public -export interface ApiDiagnosticGetOptionalParams extends coreClient.OperationOptions { +export interface ApiDiagnosticGetEntityTagOptionalParams extends OperationOptions { } // @public -export type ApiDiagnosticGetResponse = ApiDiagnosticGetHeaders & DiagnosticContract; - -// @public -export interface ApiDiagnosticListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiDiagnosticGetOptionalParams extends OperationOptions { } // @public -export type ApiDiagnosticListByServiceNextResponse = DiagnosticCollection; - -// @public -export interface ApiDiagnosticListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ApiDiagnosticListByServiceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type ApiDiagnosticListByServiceResponse = DiagnosticCollection; - -// @public -export interface ApiDiagnosticUpdateHeaders { - eTag?: string; +export interface ApiDiagnosticOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, parameters: DiagnosticContract, options?: ApiDiagnosticCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, ifMatch: string, options?: ApiDiagnosticDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, options?: ApiDiagnosticGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, options?: ApiDiagnosticGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiDiagnosticListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticContract, options?: ApiDiagnosticUpdateOptionalParams) => Promise; } // @public -export interface ApiDiagnosticUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiDiagnosticUpdateOptionalParams extends OperationOptions { } -// @public -export type ApiDiagnosticUpdateResponse = ApiDiagnosticUpdateHeaders & DiagnosticContract; - // @public export interface ApiEntityBaseContract { apiRevision?: string; @@ -347,23 +275,21 @@ export interface ApiEntityBaseContract { isCurrent?: boolean; readonly isOnline?: boolean; license?: ApiLicenseInformation; + mcpProperties?: McpProperties; subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; subscriptionRequired?: boolean; termsOfServiceUrl?: string; } // @public -export interface ApiExport { - get(resourceGroupName: string, serviceName: string, apiId: string, format: ExportFormat, exportParam: ExportApi, options?: ApiExportGetOptionalParams): Promise; +export interface ApiExportGetOptionalParams extends OperationOptions { } // @public -export interface ApiExportGetOptionalParams extends coreClient.OperationOptions { +export interface ApiExportOperations { + get: (resourceGroupName: string, serviceName: string, apiId: string, format: ExportFormat, exportParam: ExportApi, options?: ApiExportGetOptionalParams) => Promise; } -// @public -export type ApiExportGetResponse = ApiExportResult; - // @public export interface ApiExportResult { exportResultFormat?: ExportResultFormat; @@ -377,11978 +303,8614 @@ export interface ApiExportResultValue { } // @public -export interface ApiGateway { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayResource, options?: ApiGatewayCreateOrUpdateOptionalParams): Promise, ApiGatewayCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayResource, options?: ApiGatewayCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, options?: ApiGatewayDeleteOptionalParams): Promise, ApiGatewayDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, options?: ApiGatewayDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayUpdateParameters, options?: ApiGatewayUpdateOptionalParams): Promise, ApiGatewayUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayUpdateParameters, options?: ApiGatewayUpdateOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, options?: ApiGatewayGetOptionalParams): Promise; - list(options?: ApiGatewayListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ApiGatewayListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +export interface ApiGatewayConfigConnectionCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ApiGatewayConfigConnection { - beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, configConnectionName: string, parameters: ApiManagementGatewayConfigConnectionResource, options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams): Promise, ApiGatewayConfigConnectionCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, gatewayName: string, configConnectionName: string, parameters: ApiManagementGatewayConfigConnectionResource, options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, gatewayName: string, configConnectionName: string, ifMatch: string, options?: ApiGatewayConfigConnectionDeleteOptionalParams): Promise, ApiGatewayConfigConnectionDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, gatewayName: string, configConnectionName: string, ifMatch: string, options?: ApiGatewayConfigConnectionDeleteOptionalParams): Promise; - get(resourceGroupName: string, gatewayName: string, configConnectionName: string, options?: ApiGatewayConfigConnectionGetOptionalParams): Promise; - listByGateway(resourceGroupName: string, gatewayName: string, options?: ApiGatewayConfigConnectionListByGatewayOptionalParams): PagedAsyncIterableIterator; +export interface ApiGatewayConfigConnectionDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ApiGatewayConfigConnectionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ApiGatewayConfigConnectionGetOptionalParams extends OperationOptions { } // @public -export type ApiGatewayConfigConnectionCreateOrUpdateResponse = ApiManagementGatewayConfigConnectionResource; +export interface ApiGatewayConfigConnectionListByGatewayOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} // @public -export interface ApiGatewayConfigConnectionDeleteHeaders { - location?: string; +export interface ApiGatewayConfigConnectionOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, gatewayName: string, configConnectionName: string, parameters: ApiManagementGatewayConfigConnectionResource, options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams) => Promise, ApiManagementGatewayConfigConnectionResource>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, gatewayName: string, configConnectionName: string, parameters: ApiManagementGatewayConfigConnectionResource, options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, gatewayName: string, configConnectionName: string, ifMatch: string, options?: ApiGatewayConfigConnectionDeleteOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, gatewayName: string, configConnectionName: string, ifMatch: string, options?: ApiGatewayConfigConnectionDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, gatewayName: string, configConnectionName: string, parameters: ApiManagementGatewayConfigConnectionResource, options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams) => PollerLike, ApiManagementGatewayConfigConnectionResource>; + delete: (resourceGroupName: string, gatewayName: string, configConnectionName: string, ifMatch: string, options?: ApiGatewayConfigConnectionDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, gatewayName: string, configConnectionName: string, options?: ApiGatewayConfigConnectionGetOptionalParams) => Promise; + listByGateway: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayConfigConnectionListByGatewayOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ApiGatewayConfigConnectionDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApiGatewayCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApiGatewayConfigConnectionDeleteResponse = ApiGatewayConfigConnectionDeleteHeaders; - -// @public -export interface ApiGatewayConfigConnectionGetOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type ApiGatewayConfigConnectionGetResponse = ApiManagementGatewayConfigConnectionResource; - -// @public -export interface ApiGatewayConfigConnectionListByGatewayNextOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayGetOptionalParams extends OperationOptions { } // @public -export type ApiGatewayConfigConnectionListByGatewayNextResponse = ApiManagementGatewayConfigConnectionListResult; - -// @public -export interface ApiGatewayConfigConnectionListByGatewayOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayHostnameBindingCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type ApiGatewayConfigConnectionListByGatewayResponse = ApiManagementGatewayConfigConnectionListResult; - -// @public -export interface ApiGatewayCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface ApiGatewayHostnameBindingDeleteOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type ApiGatewayCreateOrUpdateResponse = ApiManagementGatewayResource; - -// @public -export interface ApiGatewayDeleteHeaders { - location?: string; +export interface ApiGatewayHostnameBindingGetOptionalParams extends OperationOptions { } // @public -export interface ApiGatewayDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ApiGatewayHostnameBindingListByGatewayOptionalParams extends OperationOptions { } // @public -export type ApiGatewayDeleteResponse = ApiGatewayDeleteHeaders & ApiManagementGatewayResource; - -// @public -export interface ApiGatewayGetOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayHostnameBindingOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, parameters: GatewayHostnameBindingResource, options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams) => Promise, GatewayHostnameBindingResource>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, parameters: GatewayHostnameBindingResource, options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, ifMatch: string, options?: ApiGatewayHostnameBindingDeleteOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, ifMatch: string, options?: ApiGatewayHostnameBindingDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginRefreshSecret: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginRefreshSecretAndWait: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, parameters: GatewayHostnameBindingResource, options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams) => PollerLike, GatewayHostnameBindingResource>; + delete: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, ifMatch: string, options?: ApiGatewayHostnameBindingDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, options?: ApiGatewayHostnameBindingGetOptionalParams) => Promise; + listByGateway: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayHostnameBindingListByGatewayOptionalParams) => PagedAsyncIterableIterator; + refreshSecret: (resourceGroupName: string, gatewayName: string, hostnameBindingName: string, options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams) => PollerLike, void>; } // @public -export type ApiGatewayGetResponse = ApiManagementGatewayResource; - -// @public -export interface ApiGatewayListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayHostnameBindingRefreshSecretOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type ApiGatewayListByResourceGroupNextResponse = ApiManagementGatewayListResult; - -// @public -export interface ApiGatewayListByResourceGroupOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export type ApiGatewayListByResourceGroupResponse = ApiManagementGatewayListResult; +export interface ApiGatewayListOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; +} // @public -export interface ApiGatewayListNextOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayResource, options?: ApiGatewayCreateOrUpdateOptionalParams) => Promise, ApiManagementGatewayResource>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayResource, options?: ApiGatewayCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayDeleteOptionalParams) => Promise, ApiManagementGatewayResource>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayUpdateParameters, options?: ApiGatewayUpdateOptionalParams) => Promise, ApiManagementGatewayResource>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayUpdateParameters, options?: ApiGatewayUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayResource, options?: ApiGatewayCreateOrUpdateOptionalParams) => PollerLike, ApiManagementGatewayResource>; + delete: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayDeleteOptionalParams) => PollerLike, ApiManagementGatewayResource>; + get: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayGetOptionalParams) => Promise; + list: (options?: ApiGatewayListOptionalParams) => PagedAsyncIterableIterator; + listByResourceGroup: (resourceGroupName: string, options?: ApiGatewayListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, gatewayName: string, parameters: ApiManagementGatewayUpdateParameters, options?: ApiGatewayUpdateOptionalParams) => PollerLike, ApiManagementGatewayResource>; } // @public -export type ApiGatewayListNextResponse = ApiManagementGatewayListResult; +export type ApiGatewaySkuType = string; // @public -export interface ApiGatewayListOptionalParams extends coreClient.OperationOptions { +export interface ApiGatewayUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type ApiGatewayListResponse = ApiManagementGatewayListResult; +export interface ApiGetEntityTagOptionalParams extends OperationOptions { +} // @public -export type ApiGatewaySkuType = string; +export interface ApiGetOptionalParams extends OperationOptions { +} // @public -export interface ApiGatewayUpdateHeaders { - location?: string; +export interface ApiIssueAttachmentCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface ApiGatewayUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ApiIssueAttachmentDeleteOptionalParams extends OperationOptions { } // @public -export type ApiGatewayUpdateResponse = ApiManagementGatewayResource; +export interface ApiIssueAttachmentGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface ApiGetEntityTagHeaders { - eTag?: string; +export interface ApiIssueAttachmentGetOptionalParams extends OperationOptions { } // @public -export interface ApiGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueAttachmentListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type ApiGetEntityTagResponse = ApiGetEntityTagHeaders; +export interface ApiIssueAttachmentOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, parameters: IssueAttachmentContract, options?: ApiIssueAttachmentCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, ifMatch: string, options?: ApiIssueAttachmentDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: ApiIssueAttachmentGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: ApiIssueAttachmentGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueAttachmentListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface ApiGetHeaders { - eTag?: string; +export interface ApiIssueCommentCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface ApiGetOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueCommentDeleteOptionalParams extends OperationOptions { } // @public -export type ApiGetResponse = ApiGetHeaders & ApiContract; +export interface ApiIssueCommentGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface ApiIssue { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: IssueContract, options?: ApiIssueCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, ifMatch: string, options?: ApiIssueDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiIssueListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, ifMatch: string, parameters: IssueUpdateContract, options?: ApiIssueUpdateOptionalParams): Promise; +export interface ApiIssueCommentGetOptionalParams extends OperationOptions { } // @public -export interface ApiIssueAttachment { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, parameters: IssueAttachmentContract, options?: ApiIssueAttachmentCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, ifMatch: string, options?: ApiIssueAttachmentDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: ApiIssueAttachmentGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: ApiIssueAttachmentGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueAttachmentListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface ApiIssueCommentListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface ApiIssueAttachmentCreateOrUpdateHeaders { - eTag?: string; +export interface ApiIssueCommentOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, parameters: IssueCommentContract, options?: ApiIssueCommentCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, ifMatch: string, options?: ApiIssueCommentDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: ApiIssueCommentGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: ApiIssueCommentGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueCommentListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ApiIssueAttachmentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type ApiIssueAttachmentCreateOrUpdateResponse = ApiIssueAttachmentCreateOrUpdateHeaders & IssueAttachmentContract; - -// @public -export interface ApiIssueAttachmentDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueDeleteOptionalParams extends OperationOptions { } // @public -export interface ApiIssueAttachmentGetEntityTagHeaders { - eTag?: string; +export interface ApiIssueGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface ApiIssueAttachmentGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueGetOptionalParams extends OperationOptions { + expandCommentsAttachments?: boolean; } // @public -export type ApiIssueAttachmentGetEntityTagResponse = ApiIssueAttachmentGetEntityTagHeaders; - -// @public -export interface ApiIssueAttachmentGetHeaders { - eTag?: string; +export interface ApiIssueListByServiceOptionalParams extends OperationOptions { + expandCommentsAttachments?: boolean; + filter?: string; + skip?: number; + top?: number; } // @public -export interface ApiIssueAttachmentGetOptionalParams extends coreClient.OperationOptions { +export interface ApiIssueOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, parameters: IssueContract, options?: ApiIssueCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, ifMatch: string, options?: ApiIssueDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiIssueListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, issueId: string, ifMatch: string, parameters: IssueUpdateContract, options?: ApiIssueUpdateOptionalParams) => Promise; } // @public -export type ApiIssueAttachmentGetResponse = ApiIssueAttachmentGetHeaders & IssueAttachmentContract; +export interface ApiIssueUpdateOptionalParams extends OperationOptions { +} // @public -export interface ApiIssueAttachmentListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiLicenseInformation { + name?: string; + url?: string; } // @public -export type ApiIssueAttachmentListByServiceNextResponse = IssueAttachmentCollection; +export interface ApiListByServiceOptionalParams extends OperationOptions { + expandApiVersionSet?: boolean; + filter?: string; + skip?: number; + tags?: string; + top?: number; +} // @public -export interface ApiIssueAttachmentListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ApiListByTagsOptionalParams extends OperationOptions { filter?: string; + includeNotTaggedApis?: boolean; skip?: number; top?: number; } -// @public -export type ApiIssueAttachmentListByServiceResponse = IssueAttachmentCollection; +// @public (undocumented) +export class ApiManagementClient { + constructor(credential: TokenCredential, options?: ApiManagementClientOptionalParams); + constructor(credential: TokenCredential, subscriptionId: string, options?: ApiManagementClientOptionalParams); + readonly allPolicies: AllPoliciesOperations; + readonly api: ApiOperations; + readonly apiDiagnostic: ApiDiagnosticOperations; + readonly apiExport: ApiExportOperations; + readonly apiGateway: ApiGatewayOperations; + readonly apiGatewayConfigConnection: ApiGatewayConfigConnectionOperations; + readonly apiGatewayHostnameBinding: ApiGatewayHostnameBindingOperations; + readonly apiIssue: ApiIssueOperations; + readonly apiIssueAttachment: ApiIssueAttachmentOperations; + readonly apiIssueComment: ApiIssueCommentOperations; + readonly apiManagementGatewaySkus: ApiManagementGatewaySkusOperations; + readonly apiManagementOperations: ApiManagementOperationsOperations; + readonly apiManagementService: ApiManagementServiceOperations; + readonly apiManagementServiceResources: ApiManagementServiceResourcesOperations; + readonly apiManagementServiceSkus: ApiManagementServiceSkusOperations; + readonly apiManagementSkus: ApiManagementSkusOperations; + readonly apiManagementWorkspaceLink: ApiManagementWorkspaceLinkOperations; + readonly apiManagementWorkspaceLinks: ApiManagementWorkspaceLinksOperations; + readonly apiOperation: ApiOperationOperations; + readonly apiOperationPolicy: ApiOperationPolicyOperations; + readonly apiPolicy: ApiPolicyOperations; + readonly apiProduct: ApiProductOperations; + readonly apiRelease: ApiReleaseOperations; + readonly apiRevision: ApiRevisionOperations; + readonly apiSchema: ApiSchemaOperations; + readonly apiTagDescription: ApiTagDescriptionOperations; + readonly apiTool: ApiToolOperations; + readonly apiVersionSet: ApiVersionSetOperations; + readonly apiWiki: ApiWikiOperations; + readonly apiWikis: ApiWikisOperations; + readonly authorization: AuthorizationOperations; + readonly authorizationAccessPolicy: AuthorizationAccessPolicyOperations; + readonly authorizationLoginLinks: AuthorizationLoginLinksOperations; + readonly authorizationProvider: AuthorizationProviderOperations; + readonly authorizationServer: AuthorizationServerOperations; + readonly backend: BackendOperations; + readonly cache: CacheOperations; + readonly certificate: CertificateOperations; + readonly clientApplication: ClientApplicationOperations; + readonly clientApplicationProductLink: ClientApplicationProductLinkOperations; + readonly contentItem: ContentItemOperations; + readonly contentType: ContentTypeOperations; + readonly delegationSettings: DelegationSettingsOperations; + readonly deletedServices: DeletedServicesOperations; + readonly diagnostic: DiagnosticOperations; + readonly documentation: DocumentationOperations; + readonly emailTemplate: EmailTemplateOperations; + readonly gateway: GatewayOperations; + readonly gatewayApi: GatewayApiOperations; + readonly gatewayCertificateAuthority: GatewayCertificateAuthorityOperations; + readonly gatewayHostnameConfiguration: GatewayHostnameConfigurationOperations; + readonly globalSchema: GlobalSchemaOperations; + readonly graphQLApiResolver: GraphQLApiResolverOperations; + readonly graphQLApiResolverPolicy: GraphQLApiResolverPolicyOperations; + readonly group: GroupOperations; + readonly groupUser: GroupUserOperations; + readonly identityProvider: IdentityProviderOperations; + readonly issue: IssueOperations; + readonly logger: LoggerOperations; + readonly namedValue: NamedValueOperations; + readonly networkStatus: NetworkStatusOperations; + readonly notification: NotificationOperations; + readonly notificationRecipientEmail: NotificationRecipientEmailOperations; + readonly notificationRecipientUser: NotificationRecipientUserOperations; + readonly openIdConnectProvider: OpenIdConnectProviderOperations; + readonly operation: OperationOperations; + readonly operationsResults: OperationsResultsOperations; + readonly operationStatus: OperationStatusOperations; + readonly outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpointsOperations; + readonly pipeline: Pipeline; + readonly policy: PolicyOperations; + readonly policyDescription: PolicyDescriptionOperations; + readonly policyFragment: PolicyFragmentOperations; + readonly policyRestriction: PolicyRestrictionOperations; + readonly policyRestrictionValidations: PolicyRestrictionValidationsOperations; + readonly portalConfig: PortalConfigOperations; + readonly portalRevision: PortalRevisionOperations; + readonly portalSettings: PortalSettingsOperations; + readonly privateEndpointConnection: PrivateEndpointConnectionOperations; + readonly product: ProductOperations; + readonly productApi: ProductApiOperations; + readonly productApiLink: ProductApiLinkOperations; + readonly productGroup: ProductGroupOperations; + readonly productGroupLink: ProductGroupLinkOperations; + readonly productPolicy: ProductPolicyOperations; + readonly productSubscriptions: ProductSubscriptionsOperations; + readonly productWiki: ProductWikiOperations; + readonly productWikis: ProductWikisOperations; + readonly quotaByCounterKeys: QuotaByCounterKeysOperations; + readonly quotaByPeriodKeys: QuotaByPeriodKeysOperations; + readonly region: RegionOperations; + readonly reports: ReportsOperations; + readonly signInSettings: SignInSettingsOperations; + readonly signUpSettings: SignUpSettingsOperations; + readonly subscription: SubscriptionOperations; + readonly tag: TagOperations; + readonly tagApiLink: TagApiLinkOperations; + readonly tagOperationLink: TagOperationLinkOperations; + readonly tagProductLink: TagProductLinkOperations; + readonly tagResource: TagResourceOperations; + readonly tenantAccess: TenantAccessOperations; + readonly tenantAccessGit: TenantAccessGitOperations; + readonly tenantConfiguration: TenantConfigurationOperations; + readonly tenantSettings: TenantSettingsOperations; + readonly user: UserOperations; + readonly userConfirmationPassword: UserConfirmationPasswordOperations; + readonly userGroup: UserGroupOperations; + readonly userIdentities: UserIdentitiesOperations; + readonly userSubscription: UserSubscriptionOperations; + readonly workspace: WorkspaceOperations; + readonly workspaceApi: WorkspaceApiOperations; + readonly workspaceApiDiagnostic: WorkspaceApiDiagnosticOperations; + readonly workspaceApiExport: WorkspaceApiExportOperations; + readonly workspaceApiOperation: WorkspaceApiOperationOperations; + readonly workspaceApiOperationPolicy: WorkspaceApiOperationPolicyOperations; + readonly workspaceApiPolicy: WorkspaceApiPolicyOperations; + readonly workspaceApiRelease: WorkspaceApiReleaseOperations; + readonly workspaceApiRevision: WorkspaceApiRevisionOperations; + readonly workspaceApiSchema: WorkspaceApiSchemaOperations; + readonly workspaceApiVersionSet: WorkspaceApiVersionSetOperations; + readonly workspaceBackend: WorkspaceBackendOperations; + readonly workspaceCertificate: WorkspaceCertificateOperations; + readonly workspaceDiagnostic: WorkspaceDiagnosticOperations; + readonly workspaceGlobalSchema: WorkspaceGlobalSchemaOperations; + readonly workspaceGroup: WorkspaceGroupOperations; + readonly workspaceGroupUser: WorkspaceGroupUserOperations; + readonly workspaceLogger: WorkspaceLoggerOperations; + readonly workspaceNamedValue: WorkspaceNamedValueOperations; + readonly workspaceNotification: WorkspaceNotificationOperations; + readonly workspaceNotificationRecipientEmail: WorkspaceNotificationRecipientEmailOperations; + readonly workspaceNotificationRecipientUser: WorkspaceNotificationRecipientUserOperations; + readonly workspacePolicy: WorkspacePolicyOperations; + readonly workspacePolicyFragment: WorkspacePolicyFragmentOperations; + readonly workspaceProduct: WorkspaceProductOperations; + readonly workspaceProductApiLink: WorkspaceProductApiLinkOperations; + readonly workspaceProductGroupLink: WorkspaceProductGroupLinkOperations; + readonly workspaceProductPolicy: WorkspaceProductPolicyOperations; + readonly workspaceSubscription: WorkspaceSubscriptionOperations; + readonly workspaceTag: WorkspaceTagOperations; + readonly workspaceTagApiLink: WorkspaceTagApiLinkOperations; + readonly workspaceTagOperationLink: WorkspaceTagOperationLinkOperations; + readonly workspaceTagProductLink: WorkspaceTagProductLinkOperations; +} + +// @public +export interface ApiManagementClientOptionalParams extends ClientOptions { + apiVersion?: string; + cloudSetting?: AzureSupportedClouds; +} // @public -export interface ApiIssueComment { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, parameters: IssueCommentContract, options?: ApiIssueCommentCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, ifMatch: string, options?: ApiIssueCommentDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: ApiIssueCommentGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: ApiIssueCommentGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: ApiIssueCommentListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface ApiManagementGatewayBaseProperties { + backend?: BackendConfiguration; + configurationApi?: GatewayConfigurationApi; + readonly createdAtUtc?: Date; + frontend?: FrontendConfiguration; + readonly provisioningState?: string; + readonly targetProvisioningState?: string; + virtualNetworkType?: VirtualNetworkType; } // @public -export interface ApiIssueCommentCreateOrUpdateHeaders { - eTag?: string; +export interface ApiManagementGatewayConfigConnectionResource extends ProxyResource { + readonly defaultHostname?: string; + readonly etag?: string; + hostnames?: string[]; + readonly provisioningState?: string; + sourceId?: string; } // @public -export interface ApiIssueCommentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface ApiManagementGatewayProperties extends ApiManagementGatewayBaseProperties { } // @public -export type ApiIssueCommentCreateOrUpdateResponse = ApiIssueCommentCreateOrUpdateHeaders & IssueCommentContract; +export interface ApiManagementGatewayResource extends TrackedResource { + backend?: BackendConfiguration; + configurationApi?: GatewayConfigurationApi; + readonly createdAtUtc?: Date; + readonly etag?: string; + frontend?: FrontendConfiguration; + readonly provisioningState?: string; + sku: ApiManagementGatewaySkuProperties; + readonly targetProvisioningState?: string; + virtualNetworkType?: VirtualNetworkType; +} // @public -export interface ApiIssueCommentDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementGatewaySkuProperties { + capacity?: number; + name: ApiGatewaySkuType; } // @public -export interface ApiIssueCommentGetEntityTagHeaders { - eTag?: string; +export interface ApiManagementGatewaySkuPropertiesForPatch { + capacity?: number; + name?: ApiGatewaySkuType; } // @public -export interface ApiIssueCommentGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementGatewaySkusListAvailableSkusOptionalParams extends OperationOptions { } // @public -export type ApiIssueCommentGetEntityTagResponse = ApiIssueCommentGetEntityTagHeaders; +export interface ApiManagementGatewaySkusOperations { + listAvailableSkus: (resourceGroupName: string, gatewayName: string, options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface ApiIssueCommentGetHeaders { - eTag?: string; +export interface ApiManagementGatewayUpdateParameters extends ApimResource { + backend?: BackendConfiguration; + configurationApi?: GatewayConfigurationApi; + readonly createdAtUtc?: Date; + readonly etag?: string; + frontend?: FrontendConfiguration; + readonly provisioningState?: string; + sku?: ApiManagementGatewaySkuPropertiesForPatch; + readonly targetProvisioningState?: string; + virtualNetworkType?: VirtualNetworkType; } // @public -export interface ApiIssueCommentGetOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementGatewayUpdateProperties extends ApiManagementGatewayBaseProperties { } // @public -export type ApiIssueCommentGetResponse = ApiIssueCommentGetHeaders & IssueCommentContract; +export interface ApiManagementOperationsListOptionalParams extends OperationOptions { +} // @public -export interface ApiIssueCommentListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementOperationsOperations { + list: (options?: ApiManagementOperationsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export type ApiIssueCommentListByServiceNextResponse = IssueCommentCollection; +export interface ApiManagementServiceApplyNetworkConfigurationParameters { + location?: string; +} // @public -export interface ApiIssueCommentListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams extends OperationOptions { + parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; + updateIntervalInMs?: number; } // @public -export type ApiIssueCommentListByServiceResponse = IssueCommentCollection; +export interface ApiManagementServiceBackupOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface ApiIssueCreateOrUpdateHeaders { - eTag?: string; +export interface ApiManagementServiceBackupRestoreParameters { + accessKey?: string; + accessType?: AccessType; + backupName: string; + clientId?: string; + containerName: string; + storageAccount: string; } // @public -export interface ApiIssueCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface ApiManagementServiceBaseProperties { + additionalLocations?: AdditionalLocation[]; + apiVersionConstraint?: ApiVersionConstraint; + certificates?: CertificateConfiguration[]; + configurationApi?: ConfigurationApi; + readonly createdAtUtc?: Date; + customProperties?: Record; + developerPortalStatus?: DeveloperPortalStatus; + readonly developerPortalUrl?: string; + disableGateway?: boolean; + enableClientCertificate?: boolean; + readonly gatewayRegionalUrl?: string; + readonly gatewayUrl?: string; + hostnameConfigurations?: HostnameConfiguration[]; + legacyPortalStatus?: LegacyPortalStatus; + readonly managementApiUrl?: string; + natGatewayState?: NatGatewayState; + notificationSenderEmail?: string; + readonly outboundPublicIPAddresses?: string[]; + readonly platformVersion?: PlatformVersion; + readonly portalUrl?: string; + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + readonly privateIPAddresses?: string[]; + readonly provisioningState?: string; + readonly publicIPAddresses?: string[]; + publicIpAddressId?: string; + publicNetworkAccess?: PublicNetworkAccess; + releaseChannel?: ReleaseChannel; + restore?: boolean; + readonly scmUrl?: string; + readonly targetProvisioningState?: string; + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + virtualNetworkType?: VirtualNetworkType; + zoneRedundant?: boolean; } // @public -export type ApiIssueCreateOrUpdateResponse = ApiIssueCreateOrUpdateHeaders & IssueContract; +export interface ApiManagementServiceCheckNameAvailabilityOptionalParams extends OperationOptions { +} // @public -export interface ApiIssueDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementServiceCheckNameAvailabilityParameters { + name: string; } // @public -export interface ApiIssueGetEntityTagHeaders { - eTag?: string; +export interface ApiManagementServiceCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ApiIssueGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementServiceDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type ApiIssueGetEntityTagResponse = ApiIssueGetEntityTagHeaders; +export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams extends OperationOptions { +} // @public -export interface ApiIssueGetHeaders { - eTag?: string; +export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { + readonly domainOwnershipIdentifier?: string; } // @public -export interface ApiIssueGetOptionalParams extends coreClient.OperationOptions { - expandCommentsAttachments?: boolean; -} - -// @public -export type ApiIssueGetResponse = ApiIssueGetHeaders & IssueContract; - -// @public -export interface ApiIssueListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiIssueListByServiceNextResponse = IssueCollection; - -// @public -export interface ApiIssueListByServiceOptionalParams extends coreClient.OperationOptions { - expandCommentsAttachments?: boolean; - filter?: string; - skip?: number; - top?: number; +export interface ApiManagementServiceGetOptionalParams extends OperationOptions { } // @public -export type ApiIssueListByServiceResponse = IssueCollection; - -// @public -export interface ApiIssueUpdateHeaders { - eTag?: string; +export interface ApiManagementServiceGetSsoTokenOptionalParams extends OperationOptions { } // @public -export interface ApiIssueUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementServiceGetSsoTokenResult { + redirectUri?: string; } // @public -export type ApiIssueUpdateResponse = ApiIssueUpdateHeaders & IssueContract; - -// @public -export interface ApiLicenseInformation { - name?: string; - url?: string; +export interface ApiManagementServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ApimIdentityType; + userAssignedIdentities?: Record; } // @public -export interface ApiListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementServiceListByResourceGroupOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export type ApiListByServiceNextResponse = ApiCollection; - -// @public -export interface ApiListByServiceOptionalParams extends coreClient.OperationOptions { - expandApiVersionSet?: boolean; - filter?: string; - skip?: number; - tags?: string; +export interface ApiManagementServiceListOptionalParams extends OperationOptions { + skipToken?: string; top?: number; } // @public -export type ApiListByServiceResponse = ApiCollection; - -// @public -export interface ApiListByTagsNextOptionalParams extends coreClient.OperationOptions { +export interface ApiManagementServiceMigrateToStv2OptionalParams extends OperationOptions { + parameters?: MigrateToStv2Contract; + updateIntervalInMs?: number; } // @public -export type ApiListByTagsNextResponse = TagResourceCollection; - -// @public -export interface ApiListByTagsOptionalParams extends coreClient.OperationOptions { - filter?: string; - includeNotTaggedApis?: boolean; - skip?: number; - top?: number; +export interface ApiManagementServiceNameAvailabilityResult { + readonly message?: string; + readonly nameAvailable?: boolean; + reason?: NameAvailabilityReason; } // @public -export type ApiListByTagsResponse = TagResourceCollection; - -// @public (undocumented) -export class ApiManagementClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ApiManagementClientOptionalParams); - constructor(credentials: coreAuth.TokenCredential, options?: ApiManagementClientOptionalParams); - // (undocumented) - allPolicies: AllPolicies; - // (undocumented) - api: Api; - // (undocumented) - apiDiagnostic: ApiDiagnostic; - // (undocumented) - apiExport: ApiExport; - // (undocumented) - apiGateway: ApiGateway; - // (undocumented) - apiGatewayConfigConnection: ApiGatewayConfigConnection; - // (undocumented) - apiIssue: ApiIssue; - // (undocumented) - apiIssueAttachment: ApiIssueAttachment; - // (undocumented) - apiIssueComment: ApiIssueComment; - // (undocumented) - apiManagementGatewaySkus: ApiManagementGatewaySkus; - // (undocumented) - apiManagementOperations: ApiManagementOperations; - // (undocumented) - apiManagementService: ApiManagementService; - // (undocumented) - apiManagementServiceSkus: ApiManagementServiceSkus; - // (undocumented) - apiManagementSkus: ApiManagementSkus; - // (undocumented) - apiManagementWorkspaceLink: ApiManagementWorkspaceLink; - // (undocumented) - apiManagementWorkspaceLinks: ApiManagementWorkspaceLinks; - // (undocumented) - apiOperation: ApiOperation; - // (undocumented) - apiOperationPolicy: ApiOperationPolicy; - // (undocumented) - apiPolicy: ApiPolicy; - // (undocumented) - apiProduct: ApiProduct; - // (undocumented) - apiRelease: ApiRelease; - // (undocumented) - apiRevision: ApiRevision; - // (undocumented) - apiSchema: ApiSchema; - // (undocumented) - apiTagDescription: ApiTagDescription; - // (undocumented) - apiVersion: string; - // (undocumented) - apiVersionSet: ApiVersionSet; - // (undocumented) - apiWiki: ApiWiki; - // (undocumented) - apiWikis: ApiWikis; - // (undocumented) - authorization: Authorization; - // (undocumented) - authorizationAccessPolicy: AuthorizationAccessPolicy; - // (undocumented) - authorizationLoginLinks: AuthorizationLoginLinks; - // (undocumented) - authorizationProvider: AuthorizationProvider; - // (undocumented) - authorizationServer: AuthorizationServer; - // (undocumented) - backend: Backend; - beginPerformConnectivityCheckAsync(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: PerformConnectivityCheckAsyncOptionalParams): Promise, PerformConnectivityCheckAsyncResponse>>; - beginPerformConnectivityCheckAsyncAndWait(resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: PerformConnectivityCheckAsyncOptionalParams): Promise; - // (undocumented) - cache: Cache; - // (undocumented) - certificate: Certificate; - // (undocumented) - contentItem: ContentItem; - // (undocumented) - contentType: ContentType; - // (undocumented) - delegationSettings: DelegationSettings; - // (undocumented) - deletedServices: DeletedServices; - // (undocumented) - diagnostic: Diagnostic; - // (undocumented) - documentation: Documentation; - // (undocumented) - emailTemplate: EmailTemplate; - // (undocumented) - gateway: Gateway; - // (undocumented) - gatewayApi: GatewayApi; - // (undocumented) - gatewayCertificateAuthority: GatewayCertificateAuthority; - // (undocumented) - gatewayHostnameConfiguration: GatewayHostnameConfiguration; - // (undocumented) - globalSchema: GlobalSchema; - // (undocumented) - graphQLApiResolver: GraphQLApiResolver; - // (undocumented) - graphQLApiResolverPolicy: GraphQLApiResolverPolicy; - // (undocumented) - group: Group; - // (undocumented) - groupUser: GroupUser; - // (undocumented) - identityProvider: IdentityProvider; - // (undocumented) - issue: Issue; - // (undocumented) - logger: Logger; - // (undocumented) - namedValue: NamedValue; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - notification: Notification; - // (undocumented) - notificationRecipientEmail: NotificationRecipientEmail; - // (undocumented) - notificationRecipientUser: NotificationRecipientUser; - // (undocumented) - openIdConnectProvider: OpenIdConnectProvider; - // (undocumented) - operationOperations: OperationOperations; - // (undocumented) - operationsResults: OperationsResults; - // (undocumented) - operationStatus: OperationStatus; - // (undocumented) - outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; - // (undocumented) - policy: Policy; - // (undocumented) - policyDescription: PolicyDescription; - // (undocumented) - policyFragment: PolicyFragment; - // (undocumented) - policyRestriction: PolicyRestriction; - // (undocumented) - policyRestrictionValidations: PolicyRestrictionValidations; - // (undocumented) - portalConfig: PortalConfig; - // (undocumented) - portalRevision: PortalRevision; - // (undocumented) - portalSettings: PortalSettings; - // (undocumented) - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - // (undocumented) - product: Product; - // (undocumented) - productApi: ProductApi; - // (undocumented) - productApiLink: ProductApiLink; - // (undocumented) - productGroup: ProductGroup; - // (undocumented) - productGroupLink: ProductGroupLink; - // (undocumented) - productPolicy: ProductPolicy; - // (undocumented) - productSubscriptions: ProductSubscriptions; - // (undocumented) - productWiki: ProductWiki; - // (undocumented) - productWikis: ProductWikis; - // (undocumented) - quotaByCounterKeys: QuotaByCounterKeys; - // (undocumented) - quotaByPeriodKeys: QuotaByPeriodKeys; - // (undocumented) - region: Region; - // (undocumented) - reports: Reports; - // (undocumented) - signInSettings: SignInSettings; - // (undocumented) - signUpSettings: SignUpSettings; - // (undocumented) - subscription: Subscription; - // (undocumented) - subscriptionId?: string; - // (undocumented) - tag: Tag; - // (undocumented) - tagApiLink: TagApiLink; - // (undocumented) - tagOperationLink: TagOperationLink; - // (undocumented) - tagProductLink: TagProductLink; - // (undocumented) - tagResource: TagResource; - // (undocumented) - tenantAccess: TenantAccess; - // (undocumented) - tenantAccessGit: TenantAccessGit; - // (undocumented) - tenantConfiguration: TenantConfiguration; - // (undocumented) - tenantSettings: TenantSettings; - // (undocumented) - user: User; - // (undocumented) - userConfirmationPassword: UserConfirmationPassword; - // (undocumented) - userGroup: UserGroup; - // (undocumented) - userIdentities: UserIdentities; - // (undocumented) - userSubscription: UserSubscription; - // (undocumented) - workspace: Workspace; - // (undocumented) - workspaceApi: WorkspaceApi; - // (undocumented) - workspaceApiDiagnostic: WorkspaceApiDiagnostic; - // (undocumented) - workspaceApiExport: WorkspaceApiExport; - // (undocumented) - workspaceApiOperation: WorkspaceApiOperation; - // (undocumented) - workspaceApiOperationPolicy: WorkspaceApiOperationPolicy; - // (undocumented) - workspaceApiPolicy: WorkspaceApiPolicy; - // (undocumented) - workspaceApiRelease: WorkspaceApiRelease; - // (undocumented) - workspaceApiRevision: WorkspaceApiRevision; - // (undocumented) - workspaceApiSchema: WorkspaceApiSchema; - // (undocumented) - workspaceApiVersionSet: WorkspaceApiVersionSet; - // (undocumented) - workspaceBackend: WorkspaceBackend; - // (undocumented) - workspaceCertificate: WorkspaceCertificate; - // (undocumented) - workspaceDiagnostic: WorkspaceDiagnostic; - // (undocumented) - workspaceGlobalSchema: WorkspaceGlobalSchema; - // (undocumented) - workspaceGroup: WorkspaceGroup; - // (undocumented) - workspaceGroupUser: WorkspaceGroupUser; - // (undocumented) - workspaceLogger: WorkspaceLogger; - // (undocumented) - workspaceNamedValue: WorkspaceNamedValue; - // (undocumented) - workspaceNotification: WorkspaceNotification; - // (undocumented) - workspaceNotificationRecipientEmail: WorkspaceNotificationRecipientEmail; - // (undocumented) - workspaceNotificationRecipientUser: WorkspaceNotificationRecipientUser; - // (undocumented) - workspacePolicy: WorkspacePolicy; - // (undocumented) - workspacePolicyFragment: WorkspacePolicyFragment; - // (undocumented) - workspaceProduct: WorkspaceProduct; - // (undocumented) - workspaceProductApiLink: WorkspaceProductApiLink; - // (undocumented) - workspaceProductGroupLink: WorkspaceProductGroupLink; - // (undocumented) - workspaceProductPolicy: WorkspaceProductPolicy; - // (undocumented) - workspaceSubscription: WorkspaceSubscription; - // (undocumented) - workspaceTag: WorkspaceTag; - // (undocumented) - workspaceTagApiLink: WorkspaceTagApiLink; - // (undocumented) - workspaceTagOperationLink: WorkspaceTagOperationLink; - // (undocumented) - workspaceTagProductLink: WorkspaceTagProductLink; +export interface ApiManagementServiceOperations { + applyNetworkConfigurationUpdates: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams) => PollerLike, ApiManagementServiceResource>; + backup: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceBackupOptionalParams) => PollerLike, ApiManagementServiceResource>; + // @deprecated (undocumented) + beginApplyNetworkConfigurationUpdates: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginApplyNetworkConfigurationUpdatesAndWait: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams) => Promise; + // @deprecated (undocumented) + beginBackup: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceBackupOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginBackupAndWait: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceBackupOptionalParams) => Promise; + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceResource, options?: ApiManagementServiceCreateOrUpdateOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceResource, options?: ApiManagementServiceCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceDeleteOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceDeleteOptionalParams) => Promise; + // @deprecated (undocumented) + beginMigrateToStv2: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceMigrateToStv2OptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginMigrateToStv2AndWait: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceMigrateToStv2OptionalParams) => Promise; + // @deprecated (undocumented) + beginRefreshHostnames: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceRefreshHostnamesOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginRefreshHostnamesAndWait: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceRefreshHostnamesOptionalParams) => Promise; + // @deprecated (undocumented) + beginRestore: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceRestoreOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginRestoreAndWait: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceRestoreOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceUpdateParameters, options?: ApiManagementServiceUpdateOptionalParams) => Promise, ApiManagementServiceResource>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceUpdateParameters, options?: ApiManagementServiceUpdateOptionalParams) => Promise; + checkNameAvailability: (parameters: ApiManagementServiceCheckNameAvailabilityParameters, options?: ApiManagementServiceCheckNameAvailabilityOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceResource, options?: ApiManagementServiceCreateOrUpdateOptionalParams) => PollerLike, ApiManagementServiceResource>; + delete: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceDeleteOptionalParams) => PollerLike, ApiManagementServiceResource>; + get: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceGetOptionalParams) => Promise; + getDomainOwnershipIdentifier: (options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams) => Promise; + getSsoToken: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceGetSsoTokenOptionalParams) => Promise; + list: (options?: ApiManagementServiceListOptionalParams) => PagedAsyncIterableIterator; + listByResourceGroup: (resourceGroupName: string, options?: ApiManagementServiceListByResourceGroupOptionalParams) => PagedAsyncIterableIterator; + migrateToStv2: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceMigrateToStv2OptionalParams) => PollerLike, ApiManagementServiceResource>; + refreshHostnames: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceRefreshHostnamesOptionalParams) => PollerLike, ApiManagementServiceResource>; + restore: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceRestoreOptionalParams) => PollerLike, ApiManagementServiceResource>; + update: (resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceUpdateParameters, options?: ApiManagementServiceUpdateOptionalParams) => PollerLike, ApiManagementServiceResource>; } // @public -export interface ApiManagementClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; +export interface ApiManagementServiceProperties extends ApiManagementServiceBaseProperties { + publisherEmail: string; + publisherName: string; } // @public -export interface ApiManagementClientPerformConnectivityCheckAsyncHeaders { - // (undocumented) - location?: string; +export interface ApiManagementServiceRefreshHostnamesOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface ApiManagementGatewayBaseProperties { - backend?: BackendConfiguration; - configurationApi?: GatewayConfigurationApi; +export interface ApiManagementServiceResource extends TrackedResource { + additionalLocations?: AdditionalLocation[]; + apiVersionConstraint?: ApiVersionConstraint; + certificates?: CertificateConfiguration[]; + configurationApi?: ConfigurationApi; readonly createdAtUtc?: Date; - frontend?: FrontendConfiguration; + customProperties?: Record; + developerPortalStatus?: DeveloperPortalStatus; + readonly developerPortalUrl?: string; + disableGateway?: boolean; + enableClientCertificate?: boolean; + readonly etag?: string; + readonly gatewayRegionalUrl?: string; + readonly gatewayUrl?: string; + hostnameConfigurations?: HostnameConfiguration[]; + identity?: ApiManagementServiceIdentity; + legacyPortalStatus?: LegacyPortalStatus; + readonly managementApiUrl?: string; + natGatewayState?: NatGatewayState; + notificationSenderEmail?: string; + readonly outboundPublicIPAddresses?: string[]; + readonly platformVersion?: PlatformVersion; + readonly portalUrl?: string; + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + readonly privateIPAddresses?: string[]; readonly provisioningState?: string; + readonly publicIPAddresses?: string[]; + publicIpAddressId?: string; + publicNetworkAccess?: PublicNetworkAccess; + publisherEmail: string; + publisherName: string; + releaseChannel?: ReleaseChannel; + restore?: boolean; + readonly scmUrl?: string; + sku: ApiManagementServiceSkuProperties; readonly targetProvisioningState?: string; + virtualNetworkConfiguration?: VirtualNetworkConfiguration; virtualNetworkType?: VirtualNetworkType; + zoneRedundant?: boolean; + zones?: string[]; } // @public -export interface ApiManagementGatewayConfigConnectionListResult { - nextLink?: string; - value: ApiManagementGatewayConfigConnectionResource[]; -} - -// @public -export interface ApiManagementGatewayConfigConnectionResource extends ProxyResource { - readonly defaultHostname?: string; - readonly etag?: string; - hostnames?: string[]; - readonly provisioningState?: string; - sourceId?: string; -} - -// @public -export interface ApiManagementGatewayListResult { - nextLink?: string; - value: ApiManagementGatewayResource[]; -} - -// @public -export interface ApiManagementGatewayProperties extends ApiManagementGatewayBaseProperties { +export interface ApiManagementServiceResourcesOperations { + // @deprecated (undocumented) + beginPerformConnectivityCheckAsync: (resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams) => Promise, ConnectivityCheckResponse>>; + // @deprecated (undocumented) + beginPerformConnectivityCheckAsyncAndWait: (resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams) => Promise; + performConnectivityCheckAsync: (resourceGroupName: string, serviceName: string, connectivityCheckRequestParams: ConnectivityCheckRequest, options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams) => PollerLike, ConnectivityCheckResponse>; } // @public -export interface ApiManagementGatewayResource extends ApimResource { - backend?: BackendConfiguration; - configurationApi?: GatewayConfigurationApi; - readonly createdAtUtc?: Date; - readonly etag?: string; - frontend?: FrontendConfiguration; - location: string; - readonly provisioningState?: string; - sku: ApiManagementGatewaySkuProperties; - readonly systemData?: SystemData; - readonly targetProvisioningState?: string; - virtualNetworkType?: VirtualNetworkType; -} - -// @public -export interface ApiManagementGatewaySkuProperties { - capacity?: number; - name: ApiGatewaySkuType; -} - -// @public -export interface ApiManagementGatewaySkuPropertiesForPatch { - capacity?: number; - name?: ApiGatewaySkuType; -} - -// @public -export interface ApiManagementGatewaySkus { - listAvailableSkus(resourceGroupName: string, gatewayName: string, options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementGatewaySkusListAvailableSkusNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementGatewaySkusListAvailableSkusNextResponse = GatewayResourceSkuResults; - -// @public -export interface ApiManagementGatewaySkusListAvailableSkusOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementGatewaySkusListAvailableSkusResponse = GatewayResourceSkuResults; - -// @public -export interface ApiManagementGatewayUpdateParameters extends ApimResource { - backend?: BackendConfiguration; - configurationApi?: GatewayConfigurationApi; - readonly createdAtUtc?: Date; - readonly etag?: string; - frontend?: FrontendConfiguration; - readonly provisioningState?: string; - sku?: ApiManagementGatewaySkuPropertiesForPatch; - readonly targetProvisioningState?: string; - virtualNetworkType?: VirtualNetworkType; -} - -// @public -export interface ApiManagementGatewayUpdateProperties extends ApiManagementGatewayBaseProperties { -} - -// @public -export interface ApiManagementOperations { - list(options?: ApiManagementOperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementOperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementOperationsListNextResponse = OperationListResult; - -// @public -export interface ApiManagementOperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementOperationsListResponse = OperationListResult; - -// @public -export interface ApiManagementService { - beginApplyNetworkConfigurationUpdates(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams): Promise, ApiManagementServiceApplyNetworkConfigurationUpdatesResponse>>; - beginApplyNetworkConfigurationUpdatesAndWait(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams): Promise; - beginBackup(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceBackupOptionalParams): Promise, ApiManagementServiceBackupResponse>>; - beginBackupAndWait(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceBackupOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceResource, options?: ApiManagementServiceCreateOrUpdateOptionalParams): Promise, ApiManagementServiceCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceResource, options?: ApiManagementServiceCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceDeleteOptionalParams): Promise; - beginMigrateToStv2(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceMigrateToStv2OptionalParams): Promise, ApiManagementServiceMigrateToStv2Response>>; - beginMigrateToStv2AndWait(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceMigrateToStv2OptionalParams): Promise; - beginRestore(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceRestoreOptionalParams): Promise, ApiManagementServiceRestoreResponse>>; - beginRestoreAndWait(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceBackupRestoreParameters, options?: ApiManagementServiceRestoreOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceUpdateParameters, options?: ApiManagementServiceUpdateOptionalParams): Promise, ApiManagementServiceUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, serviceName: string, parameters: ApiManagementServiceUpdateParameters, options?: ApiManagementServiceUpdateOptionalParams): Promise; - checkNameAvailability(parameters: ApiManagementServiceCheckNameAvailabilityParameters, options?: ApiManagementServiceCheckNameAvailabilityOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceGetOptionalParams): Promise; - getDomainOwnershipIdentifier(options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams): Promise; - getSsoToken(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceGetSsoTokenOptionalParams): Promise; - list(options?: ApiManagementServiceListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ApiManagementServiceListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementServiceApplyNetworkConfigurationParameters { - location?: string; -} - -// @public -export interface ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams extends coreClient.OperationOptions { - parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiManagementServiceApplyNetworkConfigurationUpdatesResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceBackupHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface ApiManagementServiceBackupOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiManagementServiceBackupResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceBackupRestoreParameters { - accessKey?: string; - accessType?: AccessType; - backupName: string; - clientId?: string; - containerName: string; - storageAccount: string; -} - -// @public -export interface ApiManagementServiceBaseProperties { - additionalLocations?: AdditionalLocation[]; - apiVersionConstraint?: ApiVersionConstraint; - certificates?: CertificateConfiguration[]; - configurationApi?: ConfigurationApi; - readonly createdAtUtc?: Date; - customProperties?: { - [propertyName: string]: string; - }; - developerPortalStatus?: DeveloperPortalStatus; - readonly developerPortalUrl?: string; - disableGateway?: boolean; - enableClientCertificate?: boolean; - readonly gatewayRegionalUrl?: string; - readonly gatewayUrl?: string; - hostnameConfigurations?: HostnameConfiguration[]; - legacyPortalStatus?: LegacyPortalStatus; - readonly managementApiUrl?: string; - natGatewayState?: NatGatewayState; - notificationSenderEmail?: string; - readonly outboundPublicIPAddresses?: string[]; - readonly platformVersion?: PlatformVersion; - readonly portalUrl?: string; - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - readonly privateIPAddresses?: string[]; - readonly provisioningState?: string; - readonly publicIPAddresses?: string[]; - publicIpAddressId?: string; - publicNetworkAccess?: PublicNetworkAccess; - restore?: boolean; - readonly scmUrl?: string; - readonly targetProvisioningState?: string; - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - virtualNetworkType?: VirtualNetworkType; -} - -// @public -export interface ApiManagementServiceCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiManagementServiceCheckNameAvailabilityParameters { - name: string; -} - -// @public -export type ApiManagementServiceCheckNameAvailabilityResponse = ApiManagementServiceNameAvailabilityResult; - -// @public -export interface ApiManagementServiceCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiManagementServiceCreateOrUpdateResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceDeleteHeaders { - location?: string; -} - -// @public -export interface ApiManagementServiceDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceGetDomainOwnershipIdentifierResponse = ApiManagementServiceGetDomainOwnershipIdentifierResult; - -// @public -export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { - readonly domainOwnershipIdentifier?: string; -} - -// @public -export interface ApiManagementServiceGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceGetResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceGetSsoTokenOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceGetSsoTokenResponse = ApiManagementServiceGetSsoTokenResult; - -// @public -export interface ApiManagementServiceGetSsoTokenResult { - redirectUri?: string; -} - -// @public -export interface ApiManagementServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ApimIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserIdentityProperties; - }; -} - -// @public -export interface ApiManagementServiceListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceListByResourceGroupNextResponse = ApiManagementServiceListResult; - -// @public -export interface ApiManagementServiceListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceListByResourceGroupResponse = ApiManagementServiceListResult; - -// @public -export interface ApiManagementServiceListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceListNextResponse = ApiManagementServiceListResult; - -// @public -export interface ApiManagementServiceListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceListResponse = ApiManagementServiceListResult; - -// @public -export interface ApiManagementServiceListResult { - nextLink?: string; - value: ApiManagementServiceResource[]; -} - -// @public -export interface ApiManagementServiceMigrateToStv2Headers { - // (undocumented) - location?: string; -} - -// @public -export interface ApiManagementServiceMigrateToStv2OptionalParams extends coreClient.OperationOptions { - parameters?: MigrateToStv2Contract; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiManagementServiceMigrateToStv2Response = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceNameAvailabilityResult { - readonly message?: string; - readonly nameAvailable?: boolean; - reason?: NameAvailabilityReason; -} - -// @public -export interface ApiManagementServiceProperties extends ApiManagementServiceBaseProperties { - publisherEmail: string; - publisherName: string; -} - -// @public -export interface ApiManagementServiceResource extends ApimResource { - additionalLocations?: AdditionalLocation[]; - apiVersionConstraint?: ApiVersionConstraint; - certificates?: CertificateConfiguration[]; - configurationApi?: ConfigurationApi; - readonly createdAtUtc?: Date; - customProperties?: { - [propertyName: string]: string; - }; - developerPortalStatus?: DeveloperPortalStatus; - readonly developerPortalUrl?: string; - disableGateway?: boolean; - enableClientCertificate?: boolean; - readonly etag?: string; - readonly gatewayRegionalUrl?: string; - readonly gatewayUrl?: string; - hostnameConfigurations?: HostnameConfiguration[]; - identity?: ApiManagementServiceIdentity; - legacyPortalStatus?: LegacyPortalStatus; - location: string; - readonly managementApiUrl?: string; - natGatewayState?: NatGatewayState; - notificationSenderEmail?: string; - readonly outboundPublicIPAddresses?: string[]; - readonly platformVersion?: PlatformVersion; - readonly portalUrl?: string; - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - readonly privateIPAddresses?: string[]; - readonly provisioningState?: string; - readonly publicIPAddresses?: string[]; - publicIpAddressId?: string; - publicNetworkAccess?: PublicNetworkAccess; - publisherEmail: string; - publisherName: string; - restore?: boolean; - readonly scmUrl?: string; - sku: ApiManagementServiceSkuProperties; - readonly systemData?: SystemData; - readonly targetProvisioningState?: string; - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - virtualNetworkType?: VirtualNetworkType; - zones?: string[]; -} - -// @public -export interface ApiManagementServiceRestoreHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface ApiManagementServiceRestoreOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiManagementServiceRestoreResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementServiceSkuProperties { - capacity: number; - name: SkuType; -} - -// @public -export interface ApiManagementServiceSkus { - listAvailableServiceSkus(resourceGroupName: string, serviceName: string, options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceSkusListAvailableServiceSkusNextResponse = ResourceSkuResults; - -// @public -export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementServiceSkusListAvailableServiceSkusResponse = ResourceSkuResults; - -// @public -export interface ApiManagementServiceUpdateHeaders { - location?: string; -} - -// @public -export interface ApiManagementServiceUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ApiManagementServiceUpdateParameters extends ApimResource { - additionalLocations?: AdditionalLocation[]; - apiVersionConstraint?: ApiVersionConstraint; - certificates?: CertificateConfiguration[]; - configurationApi?: ConfigurationApi; - readonly createdAtUtc?: Date; - customProperties?: { - [propertyName: string]: string; - }; - developerPortalStatus?: DeveloperPortalStatus; - readonly developerPortalUrl?: string; - disableGateway?: boolean; - enableClientCertificate?: boolean; - readonly etag?: string; - readonly gatewayRegionalUrl?: string; - readonly gatewayUrl?: string; - hostnameConfigurations?: HostnameConfiguration[]; - identity?: ApiManagementServiceIdentity; - legacyPortalStatus?: LegacyPortalStatus; - readonly managementApiUrl?: string; - natGatewayState?: NatGatewayState; - notificationSenderEmail?: string; - readonly outboundPublicIPAddresses?: string[]; - readonly platformVersion?: PlatformVersion; - readonly portalUrl?: string; - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - readonly privateIPAddresses?: string[]; - readonly provisioningState?: string; - readonly publicIPAddresses?: string[]; - publicIpAddressId?: string; - publicNetworkAccess?: PublicNetworkAccess; - publisherEmail?: string; - publisherName?: string; - restore?: boolean; - readonly scmUrl?: string; - sku?: ApiManagementServiceSkuProperties; - readonly targetProvisioningState?: string; - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - virtualNetworkType?: VirtualNetworkType; - zones?: string[]; -} - -// @public -export interface ApiManagementServiceUpdateProperties extends ApiManagementServiceBaseProperties { - publisherEmail?: string; - publisherName?: string; -} - -// @public -export type ApiManagementServiceUpdateResponse = ApiManagementServiceResource; - -// @public -export interface ApiManagementSku { - readonly apiVersions?: string[]; - readonly capabilities?: ApiManagementSkuCapabilities[]; - readonly capacity?: ApiManagementSkuCapacity; - readonly costs?: ApiManagementSkuCosts[]; - readonly family?: string; - readonly kind?: string; - readonly locationInfo?: ApiManagementSkuLocationInfo[]; - readonly locations?: string[]; - readonly name?: string; - readonly resourceType?: string; - readonly restrictions?: ApiManagementSkuRestrictions[]; - readonly size?: string; - readonly tier?: string; -} - -// @public -export interface ApiManagementSkuCapabilities { - readonly name?: string; - readonly value?: string; -} - -// @public -export interface ApiManagementSkuCapacity { - readonly default?: number; - readonly maximum?: number; - readonly minimum?: number; - readonly scaleType?: ApiManagementSkuCapacityScaleType; -} - -// @public -export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; - -// @public -export interface ApiManagementSkuCosts { - readonly extendedUnit?: string; - readonly meterID?: string; - readonly quantity?: number; -} - -// @public (undocumented) -export interface ApiManagementSkuLocationInfo { - readonly location?: string; - readonly zoneDetails?: ApiManagementSkuZoneDetails[]; - readonly zones?: string[]; -} - -// @public (undocumented) -export interface ApiManagementSkuRestrictionInfo { - readonly locations?: string[]; - readonly zones?: string[]; -} - -// @public -export interface ApiManagementSkuRestrictions { - readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; - readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; - readonly type?: ApiManagementSkuRestrictionsType; - readonly values?: string[]; -} - -// @public -export type ApiManagementSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; - -// @public -export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; - -// @public -export interface ApiManagementSkus { - list(options?: ApiManagementSkusListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementSkusListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementSkusListNextResponse = ApiManagementSkusResult; - -// @public -export interface ApiManagementSkusListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementSkusListResponse = ApiManagementSkusResult; - -// @public -export interface ApiManagementSkusResult { - readonly nextLink?: string; - value: ApiManagementSku[]; -} - -// @public -export interface ApiManagementSkuZoneDetails { - readonly capabilities?: ApiManagementSkuCapabilities[]; - readonly name?: string[]; -} - -// @public -export interface ApiManagementWorkspaceLink { - get(resourceGroupName: string, serviceName: string, workspaceId: string, options?: ApiManagementWorkspaceLinkGetOptionalParams): Promise; -} - -// @public -export interface ApiManagementWorkspaceLinkGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementWorkspaceLinkGetResponse = ApiManagementWorkspaceLinksResource; - -// @public -export interface ApiManagementWorkspaceLinks { - listByService(resourceGroupName: string, serviceName: string, options?: ApiManagementWorkspaceLinksListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiManagementWorkspaceLinksListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementWorkspaceLinksListByServiceNextResponse = ApiManagementWorkspaceLinksListResult; - -// @public -export interface ApiManagementWorkspaceLinksListByServiceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiManagementWorkspaceLinksListByServiceResponse = ApiManagementWorkspaceLinksListResult; - -// @public -export interface ApiManagementWorkspaceLinksListResult { - nextLink?: string; - value: ApiManagementWorkspaceLinksResource[]; -} - -// @public -export interface ApiManagementWorkspaceLinksProperties extends WorkspaceLinksBaseProperties { -} - -// @public -export interface ApiManagementWorkspaceLinksResource extends ProxyResource { - readonly etag?: string; - gateways?: WorkspaceLinksGateway[]; - workspaceId?: string; -} - -// @public -export type ApimIdentityType = string; - -// @public -export interface ApimResource { - readonly id?: string; - readonly name?: string; - tags?: { - [propertyName: string]: string; - }; - readonly type?: string; -} - -// @public -export interface ApiOperation { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, parameters: OperationContract, options?: ApiOperationCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, ifMatch: string, options?: ApiOperationDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiOperationListByApiOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, ifMatch: string, parameters: OperationUpdateContract, options?: ApiOperationUpdateOptionalParams): Promise; -} - -// @public -export interface ApiOperationCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiOperationCreateOrUpdateResponse = ApiOperationCreateOrUpdateHeaders & OperationContract; - -// @public -export interface ApiOperationDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiOperationGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationGetEntityTagResponse = ApiOperationGetEntityTagHeaders; - -// @public -export interface ApiOperationGetHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationGetResponse = ApiOperationGetHeaders & OperationContract; - -// @public -export interface ApiOperationListByApiNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationListByApiNextResponse = OperationCollection; - -// @public -export interface ApiOperationListByApiOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - tags?: string; - top?: number; -} - -// @public -export type ApiOperationListByApiResponse = OperationCollection; - -// @public -export interface ApiOperationPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ApiOperationPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, ifMatch: string, options?: ApiOperationPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: ApiOperationPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: ApiOperationPolicyGetEntityTagOptionalParams): Promise; - listByOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationPolicyListByOperationOptionalParams): Promise; -} - -// @public -export interface ApiOperationPolicyCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiOperationPolicyCreateOrUpdateResponse = ApiOperationPolicyCreateOrUpdateHeaders & PolicyContract; - -// @public -export interface ApiOperationPolicyDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiOperationPolicyGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationPolicyGetEntityTagResponse = ApiOperationPolicyGetEntityTagHeaders; - -// @public -export interface ApiOperationPolicyGetHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; -} - -// @public -export type ApiOperationPolicyGetResponse = ApiOperationPolicyGetHeaders & PolicyContract; - -// @public -export interface ApiOperationPolicyListByOperationOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationPolicyListByOperationResponse = PolicyCollection; - -// @public -export interface ApiOperationUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiOperationUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiOperationUpdateResponse = ApiOperationUpdateHeaders & OperationContract; - -// @public -export interface ApiPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ApiPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, ifMatch: string, options?: ApiPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, options?: ApiPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, options?: ApiPolicyGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiPolicyListByApiOptionalParams): Promise; -} - -// @public -export interface ApiPolicyCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiPolicyCreateOrUpdateResponse = ApiPolicyCreateOrUpdateHeaders & PolicyContract; - -// @public -export interface ApiPolicyDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiPolicyGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiPolicyGetEntityTagResponse = ApiPolicyGetEntityTagHeaders; - -// @public -export interface ApiPolicyGetHeaders { - eTag?: string; -} - -// @public -export interface ApiPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; -} - -// @public -export type ApiPolicyGetResponse = ApiPolicyGetHeaders & PolicyContract; - -// @public -export interface ApiPolicyListByApiOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiPolicyListByApiResponse = PolicyCollection; - -// @public -export interface ApiProduct { - listByApis(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiProductListByApisOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiProductListByApisNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiProductListByApisNextResponse = ProductCollection; - -// @public -export interface ApiProductListByApisOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiProductListByApisResponse = ProductCollection; - -// @public -export interface ApiRelease { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, parameters: ApiReleaseContract, options?: ApiReleaseCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, ifMatch: string, options?: ApiReleaseDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, options?: ApiReleaseGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, options?: ApiReleaseGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiReleaseListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, ifMatch: string, parameters: ApiReleaseContract, options?: ApiReleaseUpdateOptionalParams): Promise; -} - -// @public -export interface ApiReleaseCollection { - count?: number; - readonly nextLink?: string; - readonly value?: ApiReleaseContract[]; -} - -// @public -export interface ApiReleaseContract extends ProxyResource { - apiId?: string; - readonly createdDateTime?: Date; - notes?: string; - readonly updatedDateTime?: Date; -} - -// @public -export interface ApiReleaseCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiReleaseCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiReleaseCreateOrUpdateResponse = ApiReleaseCreateOrUpdateHeaders & ApiReleaseContract; - -// @public -export interface ApiReleaseDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiReleaseGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiReleaseGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiReleaseGetEntityTagResponse = ApiReleaseGetEntityTagHeaders; - -// @public -export interface ApiReleaseGetHeaders { - eTag?: string; -} - -// @public -export interface ApiReleaseGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiReleaseGetResponse = ApiReleaseGetHeaders & ApiReleaseContract; - -// @public -export interface ApiReleaseListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiReleaseListByServiceNextResponse = ApiReleaseCollection; - -// @public -export interface ApiReleaseListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiReleaseListByServiceResponse = ApiReleaseCollection; - -// @public -export interface ApiReleaseUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiReleaseUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiReleaseUpdateResponse = ApiReleaseUpdateHeaders & ApiReleaseContract; - -// @public -export interface ApiRevision { - listByService(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiRevisionListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiRevisionCollection { - count?: number; - readonly nextLink?: string; - readonly value?: ApiRevisionContract[]; -} - -// @public -export interface ApiRevisionContract { - readonly apiId?: string; - readonly apiRevision?: string; - readonly createdDateTime?: Date; - readonly description?: string; - readonly isCurrent?: boolean; - readonly isOnline?: boolean; - readonly privateUrl?: string; - readonly updatedDateTime?: Date; -} - -// @public -export interface ApiRevisionInfoContract { - apiRevisionDescription?: string; - apiVersionName?: string; - apiVersionSet?: ApiVersionSetContractDetails; - sourceApiId?: string; -} - -// @public -export interface ApiRevisionListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiRevisionListByServiceNextResponse = ApiRevisionCollection; - -// @public -export interface ApiRevisionListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiRevisionListByServiceResponse = ApiRevisionCollection; - -// @public -export interface ApiSchema { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: ApiSchemaCreateOrUpdateOptionalParams): Promise, ApiSchemaCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: ApiSchemaCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, ifMatch: string, options?: ApiSchemaDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, options?: ApiSchemaGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, options?: ApiSchemaGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiSchemaListByApiOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiSchemaCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; -} - -// @public -export interface ApiSchemaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ApiSchemaCreateOrUpdateResponse = ApiSchemaCreateOrUpdateHeaders & SchemaContract; - -// @public -export interface ApiSchemaDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; -} - -// @public -export interface ApiSchemaGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiSchemaGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiSchemaGetEntityTagResponse = ApiSchemaGetEntityTagHeaders; - -// @public -export interface ApiSchemaGetHeaders { - eTag?: string; -} - -// @public -export interface ApiSchemaGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiSchemaGetResponse = ApiSchemaGetHeaders & SchemaContract; - -// @public -export interface ApiSchemaListByApiNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiSchemaListByApiNextResponse = SchemaCollection; - -// @public -export interface ApiSchemaListByApiOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiSchemaListByApiResponse = SchemaCollection; - -// @public -export interface ApiTagDescription { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, parameters: TagDescriptionCreateParameters, options?: ApiTagDescriptionCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, ifMatch: string, options?: ApiTagDescriptionDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, options?: ApiTagDescriptionGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, options?: ApiTagDescriptionGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiTagDescriptionListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiTagDescriptionCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiTagDescriptionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiTagDescriptionCreateOrUpdateResponse = ApiTagDescriptionCreateOrUpdateHeaders & TagDescriptionContract; - -// @public -export interface ApiTagDescriptionDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiTagDescriptionGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiTagDescriptionGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiTagDescriptionGetEntityTagResponse = ApiTagDescriptionGetEntityTagHeaders; - -// @public -export interface ApiTagDescriptionGetHeaders { - eTag?: string; -} - -// @public -export interface ApiTagDescriptionGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiTagDescriptionGetResponse = ApiTagDescriptionGetHeaders & TagDescriptionContract; - -// @public -export interface ApiTagDescriptionListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiTagDescriptionListByServiceNextResponse = TagDescriptionCollection; - -// @public -export interface ApiTagDescriptionListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiTagDescriptionListByServiceResponse = TagDescriptionCollection; - -// @public -export interface ApiTagResourceContractProperties extends ApiEntityBaseContract { - id?: string; - name?: string; - path?: string; - protocols?: Protocol[]; - serviceUrl?: string; -} - -// @public -export type ApiType = string; - -// @public -export interface ApiUpdateContract { - apiRevision?: string; - apiRevisionDescription?: string; - apiType?: ApiType; - apiVersion?: string; - apiVersionDescription?: string; - apiVersionSetId?: string; - authenticationSettings?: AuthenticationSettingsContract; - contact?: ApiContactInformation; - description?: string; - displayName?: string; - isCurrent?: boolean; - readonly isOnline?: boolean; - license?: ApiLicenseInformation; - path?: string; - protocols?: Protocol[]; - serviceUrl?: string; - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - subscriptionRequired?: boolean; - termsOfServiceUrl?: string; -} - -// @public -export interface ApiUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiUpdateResponse = ApiUpdateHeaders & ApiContract; - -// @public -export interface ApiVersionConstraint { - minApiVersion?: string; -} - -// @public -export interface ApiVersionSet { - createOrUpdate(resourceGroupName: string, serviceName: string, versionSetId: string, parameters: ApiVersionSetContract, options?: ApiVersionSetCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, versionSetId: string, ifMatch: string, options?: ApiVersionSetDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, versionSetId: string, options?: ApiVersionSetGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, versionSetId: string, options?: ApiVersionSetGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: ApiVersionSetListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, versionSetId: string, ifMatch: string, parameters: ApiVersionSetUpdateParameters, options?: ApiVersionSetUpdateOptionalParams): Promise; -} - -// @public -export interface ApiVersionSetCollection { - count?: number; - nextLink?: string; - value?: ApiVersionSetContract[]; -} - -// @public -export interface ApiVersionSetContract extends ProxyResource { - description?: string; - displayName?: string; - versionHeaderName?: string; - versioningScheme?: VersioningScheme; - versionQueryName?: string; -} - -// @public -export interface ApiVersionSetContractDetails { - description?: string; - id?: string; - name?: string; - versionHeaderName?: string; - versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; - versionQueryName?: string; -} - -// @public -export type ApiVersionSetContractDetailsVersioningScheme = string; - -// @public -export interface ApiVersionSetContractProperties extends ApiVersionSetEntityBase { - displayName: string; - versioningScheme: VersioningScheme; -} - -// @public -export interface ApiVersionSetCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiVersionSetCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiVersionSetCreateOrUpdateResponse = ApiVersionSetCreateOrUpdateHeaders & ApiVersionSetContract; - -// @public -export interface ApiVersionSetDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiVersionSetEntityBase { - description?: string; - versionHeaderName?: string; - versionQueryName?: string; -} - -// @public -export interface ApiVersionSetGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiVersionSetGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiVersionSetGetEntityTagResponse = ApiVersionSetGetEntityTagHeaders; - -// @public -export interface ApiVersionSetGetHeaders { - eTag?: string; -} - -// @public -export interface ApiVersionSetGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiVersionSetGetResponse = ApiVersionSetGetHeaders & ApiVersionSetContract; - -// @public -export interface ApiVersionSetListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiVersionSetListByServiceNextResponse = ApiVersionSetCollection; - -// @public -export interface ApiVersionSetListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiVersionSetListByServiceResponse = ApiVersionSetCollection; - -// @public -export interface ApiVersionSetUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiVersionSetUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiVersionSetUpdateParameters { - description?: string; - displayName?: string; - versionHeaderName?: string; - versioningScheme?: VersioningScheme; - versionQueryName?: string; -} - -// @public -export interface ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { - displayName?: string; - versioningScheme?: VersioningScheme; -} - -// @public -export type ApiVersionSetUpdateResponse = ApiVersionSetUpdateHeaders & ApiVersionSetContract; - -// @public -export interface ApiWiki { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, parameters: WikiContract, options?: ApiWikiCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiWikiDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikiGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikiGetEntityTagOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, parameters: WikiUpdateContract, options?: ApiWikiUpdateOptionalParams): Promise; -} - -// @public -export interface ApiWikiCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiWikiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ApiWikiCreateOrUpdateResponse = ApiWikiCreateOrUpdateHeaders & WikiContract; - -// @public -export interface ApiWikiDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ApiWikiGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ApiWikiGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiWikiGetEntityTagResponse = ApiWikiGetEntityTagHeaders; - -// @public -export interface ApiWikiGetHeaders { - eTag?: string; -} - -// @public -export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiWikiGetResponse = ApiWikiGetHeaders & WikiContract; - -// @public -export interface ApiWikis { - list(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikisListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ApiWikisListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiWikisListNextResponse = WikiCollection; - -// @public -export interface ApiWikisListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type ApiWikisListResponse = WikiCollection; - -// @public -export interface ApiWikiUpdateHeaders { - eTag?: string; -} - -// @public -export interface ApiWikiUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ApiWikiUpdateResponse = ApiWikiUpdateHeaders & WikiContract; - -// @public -export type AppType = string; - -// @public -export interface ArmIdWrapper { - readonly id?: string; -} - -// @public -export interface AssociationContract extends ProxyResource { - provisioningState?: "created"; -} - -// @public -export type AsyncOperationStatus = "Started" | "InProgress" | "Succeeded" | "Failed"; - -// @public -export type AsyncResolverStatus = "Started" | "InProgress" | "Succeeded" | "Failed"; - -// @public -export interface AuthenticationSettingsContract { - oAuth2?: OAuth2AuthenticationSettingsContract; - oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; - openid?: OpenIdAuthenticationSettingsContract; - openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; -} - -// @public -export interface Authorization { - confirmConsentCode(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationConfirmConsentCodeRequestContract, options?: AuthorizationConfirmConsentCodeOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationContract, options?: AuthorizationCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, ifMatch: string, options?: AuthorizationDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, options?: AuthorizationGetOptionalParams): Promise; - listByAuthorizationProvider(resourceGroupName: string, serviceName: string, authorizationProviderId: string, options?: AuthorizationListByAuthorizationProviderOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AuthorizationAccessPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, parameters: AuthorizationAccessPolicyContract, options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, ifMatch: string, options?: AuthorizationAccessPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, options?: AuthorizationAccessPolicyGetOptionalParams): Promise; - listByAuthorization(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AuthorizationAccessPolicyCollection { - count?: number; - nextLink?: string; - value?: AuthorizationAccessPolicyContract[]; -} - -// @public -export interface AuthorizationAccessPolicyContract extends ProxyResource { - appIds?: string[]; - objectId?: string; - tenantId?: string; -} - -// @public -export interface AuthorizationAccessPolicyCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type AuthorizationAccessPolicyCreateOrUpdateResponse = AuthorizationAccessPolicyCreateOrUpdateHeaders & AuthorizationAccessPolicyContract; - -// @public -export interface AuthorizationAccessPolicyDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AuthorizationAccessPolicyGetHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationAccessPolicyGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationAccessPolicyGetResponse = AuthorizationAccessPolicyGetHeaders & AuthorizationAccessPolicyContract; - -// @public -export interface AuthorizationAccessPolicyListByAuthorizationNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationAccessPolicyListByAuthorizationNextResponse = AuthorizationAccessPolicyCollection; - -// @public -export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type AuthorizationAccessPolicyListByAuthorizationResponse = AuthorizationAccessPolicyCollection; - -// @public -export interface AuthorizationCollection { - count?: number; - nextLink?: string; - value?: AuthorizationContract[]; -} - -// @public -export interface AuthorizationConfirmConsentCodeHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationConfirmConsentCodeOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AuthorizationConfirmConsentCodeRequestContract { - consentCode?: string; -} - -// @public -export type AuthorizationConfirmConsentCodeResponse = AuthorizationConfirmConsentCodeHeaders; - -// @public -export interface AuthorizationContract extends ProxyResource { - authorizationType?: AuthorizationType; - error?: AuthorizationError; - oAuth2GrantType?: OAuth2GrantType; - parameters?: { - [propertyName: string]: string; - }; - status?: string; -} - -// @public -export interface AuthorizationCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type AuthorizationCreateOrUpdateResponse = AuthorizationCreateOrUpdateHeaders & AuthorizationContract; - -// @public -export interface AuthorizationDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AuthorizationError { - code?: string; - message?: string; -} - -// @public -export interface AuthorizationGetHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationGetResponse = AuthorizationGetHeaders & AuthorizationContract; - -// @public -export interface AuthorizationListByAuthorizationProviderNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationListByAuthorizationProviderNextResponse = AuthorizationCollection; - -// @public -export interface AuthorizationListByAuthorizationProviderOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type AuthorizationListByAuthorizationProviderResponse = AuthorizationCollection; - -// @public -export interface AuthorizationLoginLinks { - post(resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationLoginRequestContract, options?: AuthorizationLoginLinksPostOptionalParams): Promise; -} - -// @public -export interface AuthorizationLoginLinksPostHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationLoginLinksPostOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationLoginLinksPostResponse = AuthorizationLoginLinksPostHeaders & AuthorizationLoginResponseContract; - -// @public -export interface AuthorizationLoginRequestContract { - postLoginRedirectUrl?: string; -} - -// @public -export interface AuthorizationLoginResponseContract { - loginLink?: string; -} - -// @public -export type AuthorizationMethod = "HEAD" | "OPTIONS" | "TRACE" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; - -// @public -export interface AuthorizationProvider { - createOrUpdate(resourceGroupName: string, serviceName: string, authorizationProviderId: string, parameters: AuthorizationProviderContract, options?: AuthorizationProviderCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, authorizationProviderId: string, ifMatch: string, options?: AuthorizationProviderDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, authorizationProviderId: string, options?: AuthorizationProviderGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: AuthorizationProviderListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface AuthorizationProviderCollection { - nextLink?: string; - value?: AuthorizationProviderContract[]; -} - -// @public -export interface AuthorizationProviderContract extends ProxyResource { - displayName?: string; - identityProvider?: string; - oauth2?: AuthorizationProviderOAuth2Settings; -} - -// @public -export interface AuthorizationProviderCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationProviderCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type AuthorizationProviderCreateOrUpdateResponse = AuthorizationProviderCreateOrUpdateHeaders & AuthorizationProviderContract; - -// @public -export interface AuthorizationProviderDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AuthorizationProviderGetHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationProviderGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationProviderGetResponse = AuthorizationProviderGetHeaders & AuthorizationProviderContract; - -// @public -export interface AuthorizationProviderListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationProviderListByServiceNextResponse = AuthorizationProviderCollection; - -// @public -export interface AuthorizationProviderListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type AuthorizationProviderListByServiceResponse = AuthorizationProviderCollection; - -// @public -export interface AuthorizationProviderOAuth2GrantTypes { - authorizationCode?: { - [propertyName: string]: string; - }; - clientCredentials?: { - [propertyName: string]: string; - }; -} - -// @public -export interface AuthorizationProviderOAuth2Settings { - grantTypes?: AuthorizationProviderOAuth2GrantTypes; - redirectUrl?: string; -} - -// @public -export interface AuthorizationServer { - createOrUpdate(resourceGroupName: string, serviceName: string, authsid: string, parameters: AuthorizationServerContract, options?: AuthorizationServerCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, authsid: string, ifMatch: string, options?: AuthorizationServerDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: AuthorizationServerListByServiceOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerListSecretsOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, authsid: string, ifMatch: string, parameters: AuthorizationServerUpdateContract, options?: AuthorizationServerUpdateOptionalParams): Promise; -} - -// @public -export interface AuthorizationServerCollection { - count?: number; - nextLink?: string; - value?: AuthorizationServerContract[]; -} - -// @public -export interface AuthorizationServerContract extends ProxyResource { - authorizationEndpoint?: string; - authorizationMethods?: AuthorizationMethod[]; - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - clientId?: string; - clientRegistrationEndpoint?: string; - clientSecret?: string; - defaultScope?: string; - description?: string; - displayName?: string; - grantTypes?: GrantType[]; - resourceOwnerPassword?: string; - resourceOwnerUsername?: string; - supportState?: boolean; - tokenBodyParameters?: TokenBodyParameterContract[]; - tokenEndpoint?: string; - useInApiDocumentation?: boolean; - useInTestConsole?: boolean; -} - -// @public -export interface AuthorizationServerContractBaseProperties { - authorizationMethods?: AuthorizationMethod[]; - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - defaultScope?: string; - description?: string; - resourceOwnerPassword?: string; - resourceOwnerUsername?: string; - supportState?: boolean; - tokenBodyParameters?: TokenBodyParameterContract[]; - tokenEndpoint?: string; -} - -// @public -export interface AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { - authorizationEndpoint: string; - clientId: string; - clientRegistrationEndpoint: string; - clientSecret?: string; - displayName: string; - grantTypes: GrantType[]; - useInApiDocumentation?: boolean; - useInTestConsole?: boolean; -} - -// @public -export interface AuthorizationServerCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationServerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type AuthorizationServerCreateOrUpdateResponse = AuthorizationServerCreateOrUpdateHeaders & AuthorizationServerContract; - -// @public -export interface AuthorizationServerDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface AuthorizationServerGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationServerGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationServerGetEntityTagResponse = AuthorizationServerGetEntityTagHeaders; - -// @public -export interface AuthorizationServerGetHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationServerGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationServerGetResponse = AuthorizationServerGetHeaders & AuthorizationServerContract; - -// @public -export interface AuthorizationServerListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationServerListByServiceNextResponse = AuthorizationServerCollection; - -// @public -export interface AuthorizationServerListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type AuthorizationServerListByServiceResponse = AuthorizationServerCollection; - -// @public -export interface AuthorizationServerListSecretsHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationServerListSecretsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationServerListSecretsResponse = AuthorizationServerListSecretsHeaders & AuthorizationServerSecretsContract; - -// @public -export interface AuthorizationServerSecretsContract { - clientSecret?: string; - resourceOwnerPassword?: string; - resourceOwnerUsername?: string; -} - -// @public -export interface AuthorizationServerUpdateContract extends ProxyResource { - authorizationEndpoint?: string; - authorizationMethods?: AuthorizationMethod[]; - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - clientId?: string; - clientRegistrationEndpoint?: string; - clientSecret?: string; - defaultScope?: string; - description?: string; - displayName?: string; - grantTypes?: GrantType[]; - resourceOwnerPassword?: string; - resourceOwnerUsername?: string; - supportState?: boolean; - tokenBodyParameters?: TokenBodyParameterContract[]; - tokenEndpoint?: string; - useInApiDocumentation?: boolean; - useInTestConsole?: boolean; -} - -// @public -export interface AuthorizationServerUpdateContractProperties extends AuthorizationServerContractBaseProperties { - authorizationEndpoint?: string; - clientId?: string; - clientRegistrationEndpoint?: string; - clientSecret?: string; - displayName?: string; - grantTypes?: GrantType[]; - useInApiDocumentation?: boolean; - useInTestConsole?: boolean; -} - -// @public -export interface AuthorizationServerUpdateHeaders { - eTag?: string; -} - -// @public -export interface AuthorizationServerUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AuthorizationServerUpdateResponse = AuthorizationServerUpdateHeaders & AuthorizationServerContract; - -// @public -export type AuthorizationType = string; - -// @public -export interface Backend { - createOrUpdate(resourceGroupName: string, serviceName: string, backendId: string, parameters: BackendContract, options?: BackendCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, backendId: string, ifMatch: string, options?: BackendDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, backendId: string, options?: BackendGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, backendId: string, options?: BackendGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: BackendListByServiceOptionalParams): PagedAsyncIterableIterator; - reconnect(resourceGroupName: string, serviceName: string, backendId: string, options?: BackendReconnectOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, backendId: string, ifMatch: string, parameters: BackendUpdateParameters, options?: BackendUpdateOptionalParams): Promise; -} - -// @public -export interface BackendAuthorizationHeaderCredentials { - parameter: string; - scheme: string; -} - -// @public -export interface BackendBaseParameters { - circuitBreaker?: BackendCircuitBreaker; - credentials?: BackendCredentialsContract; - description?: string; - // (undocumented) - pool?: BackendBaseParametersPool; - properties?: BackendProperties; - proxy?: BackendProxyContract; - resourceId?: string; - title?: string; - tls?: BackendTlsProperties; - type?: BackendType; -} - -// @public (undocumented) -export interface BackendBaseParametersPool extends BackendPool { -} - -// @public -export interface BackendCircuitBreaker { - rules?: CircuitBreakerRule[]; -} - -// @public -export interface BackendCollection { - count?: number; - nextLink?: string; - value?: BackendContract[]; -} - -// @public -export interface BackendConfiguration { - subnet?: BackendSubnetConfiguration; -} - -// @public -export interface BackendContract extends ProxyResource { - circuitBreaker?: BackendCircuitBreaker; - credentials?: BackendCredentialsContract; - description?: string; - // (undocumented) - pool?: BackendBaseParametersPool; - properties?: BackendProperties; - protocol?: BackendProtocol; - proxy?: BackendProxyContract; - resourceId?: string; - title?: string; - tls?: BackendTlsProperties; - typePropertiesType?: BackendType; - url?: string; -} - -// @public -export interface BackendContractProperties extends BackendBaseParameters { - protocol: BackendProtocol; - url: string; -} - -// @public -export interface BackendCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface BackendCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type BackendCreateOrUpdateResponse = BackendCreateOrUpdateHeaders & BackendContract; - -// @public -export interface BackendCredentialsContract { - authorization?: BackendAuthorizationHeaderCredentials; - certificate?: string[]; - certificateIds?: string[]; - header?: { - [propertyName: string]: string[]; - }; - query?: { - [propertyName: string]: string[]; - }; -} - -// @public -export interface BackendDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface BackendGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface BackendGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BackendGetEntityTagResponse = BackendGetEntityTagHeaders; - -// @public -export interface BackendGetHeaders { - eTag?: string; -} - -// @public -export interface BackendGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BackendGetResponse = BackendGetHeaders & BackendContract; - -// @public -export interface BackendListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type BackendListByServiceNextResponse = BackendCollection; - -// @public -export interface BackendListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type BackendListByServiceResponse = BackendCollection; - -// @public -export interface BackendPool { - services?: BackendPoolItem[]; -} - -// @public -export interface BackendPoolItem { - id: string; - priority?: number; - weight?: number; -} - -// @public -export interface BackendProperties { - serviceFabricCluster?: BackendServiceFabricClusterProperties; -} - -// @public -export type BackendProtocol = string; - -// @public -export interface BackendProxyContract { - password?: string; - url: string; - username?: string; -} - -// @public -export interface BackendReconnectContract extends ProxyResource { - after?: string; -} - -// @public -export interface BackendReconnectOptionalParams extends coreClient.OperationOptions { - parameters?: BackendReconnectContract; -} - -// @public -export interface BackendServiceFabricClusterProperties { - clientCertificateId?: string; - clientCertificatethumbprint?: string; - managementEndpoints: string[]; - maxPartitionResolutionRetries?: number; - serverCertificateThumbprints?: string[]; - serverX509Names?: X509CertificateName[]; -} - -// @public -export interface BackendSubnetConfiguration { - id?: string; -} - -// @public -export interface BackendTlsProperties { - validateCertificateChain?: boolean; - validateCertificateName?: boolean; -} - -// @public -export type BackendType = string; - -// @public -export interface BackendUpdateHeaders { - eTag?: string; -} - -// @public -export interface BackendUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface BackendUpdateParameterProperties extends BackendBaseParameters { - protocol?: BackendProtocol; - url?: string; -} - -// @public -export interface BackendUpdateParameters { - circuitBreaker?: BackendCircuitBreaker; - credentials?: BackendCredentialsContract; - description?: string; - // (undocumented) - pool?: BackendBaseParametersPool; - properties?: BackendProperties; - protocol?: BackendProtocol; - proxy?: BackendProxyContract; - resourceId?: string; - title?: string; - tls?: BackendTlsProperties; - type?: BackendType; - url?: string; -} - -// @public -export type BackendUpdateResponse = BackendUpdateHeaders & BackendContract; - -// @public -export type BearerTokenSendingMethod = string; - -// @public -export type BearerTokenSendingMethods = string; - -// @public -export interface BodyDiagnosticSettings { - bytes?: number; -} - -// @public -export interface Cache { - createOrUpdate(resourceGroupName: string, serviceName: string, cacheId: string, parameters: CacheContract, options?: CacheCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, options?: CacheDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: CacheListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, parameters: CacheUpdateParameters, options?: CacheUpdateOptionalParams): Promise; -} - -// @public -export interface CacheCollection { - count?: number; - nextLink?: string; - value?: CacheContract[]; -} - -// @public -export interface CacheContract extends ProxyResource { - connectionString?: string; - description?: string; - resourceId?: string; - useFromLocation?: string; -} - -// @public -export interface CacheCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface CacheCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type CacheCreateOrUpdateResponse = CacheCreateOrUpdateHeaders & CacheContract; - -// @public -export interface CacheDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface CacheGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface CacheGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CacheGetEntityTagResponse = CacheGetEntityTagHeaders; - -// @public -export interface CacheGetHeaders { - eTag?: string; -} - -// @public -export interface CacheGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CacheGetResponse = CacheGetHeaders & CacheContract; - -// @public -export interface CacheListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CacheListByServiceNextResponse = CacheCollection; - -// @public -export interface CacheListByServiceOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; -} - -// @public -export type CacheListByServiceResponse = CacheCollection; - -// @public -export interface CacheUpdateHeaders { - eTag?: string; -} - -// @public -export interface CacheUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface CacheUpdateParameters { - connectionString?: string; - description?: string; - resourceId?: string; - useFromLocation?: string; -} - -// @public -export type CacheUpdateResponse = CacheUpdateHeaders & CacheContract; - -// @public -export interface Certificate { - createOrUpdate(resourceGroupName: string, serviceName: string, certificateId: string, parameters: CertificateCreateOrUpdateParameters, options?: CertificateCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, certificateId: string, ifMatch: string, options?: CertificateDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: CertificateListByServiceOptionalParams): PagedAsyncIterableIterator; - refreshSecret(resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateRefreshSecretOptionalParams): Promise; -} - -// @public -export interface CertificateCollection { - count?: number; - nextLink?: string; - value?: CertificateContract[]; -} - -// @public -export interface CertificateConfiguration { - certificate?: CertificateInformation; - certificatePassword?: string; - encodedCertificate?: string; - storeName: CertificateConfigurationStoreName; -} - -// @public -export type CertificateConfigurationStoreName = string; - -// @public -export interface CertificateContract extends ProxyResource { - expirationDate?: Date; - keyVault?: KeyVaultContractProperties; - subject?: string; - thumbprint?: string; -} - -// @public -export interface CertificateCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface CertificateCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export interface CertificateCreateOrUpdateParameters { - data?: string; - keyVault?: KeyVaultContractCreateProperties; - password?: string; -} - -// @public -export type CertificateCreateOrUpdateResponse = CertificateCreateOrUpdateHeaders & CertificateContract; - -// @public -export interface CertificateDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface CertificateGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface CertificateGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CertificateGetEntityTagResponse = CertificateGetEntityTagHeaders; - -// @public -export interface CertificateGetHeaders { - eTag?: string; -} - -// @public -export interface CertificateGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CertificateGetResponse = CertificateGetHeaders & CertificateContract; - -// @public -export interface CertificateInformation { - expiry: Date; - subject: string; - thumbprint: string; -} - -// @public -export interface CertificateListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CertificateListByServiceNextResponse = CertificateCollection; - -// @public -export interface CertificateListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - isKeyVaultRefreshFailed?: boolean; - skip?: number; - top?: number; -} - -// @public -export type CertificateListByServiceResponse = CertificateCollection; - -// @public -export interface CertificateRefreshSecretHeaders { - eTag?: string; -} - -// @public -export interface CertificateRefreshSecretOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type CertificateRefreshSecretResponse = CertificateRefreshSecretHeaders & CertificateContract; - -// @public -export type CertificateSource = string; - -// @public -export type CertificateStatus = string; - -// @public -export interface CircuitBreakerFailureCondition { - count?: number; - errorReasons?: string[]; - interval?: string; - percentage?: number; - statusCodeRanges?: FailureStatusCodeRange[]; -} - -// @public -export interface CircuitBreakerRule { - acceptRetryAfter?: boolean; - failureCondition?: CircuitBreakerFailureCondition; - name?: string; - tripDuration?: string; -} - -// @public -export type ClientAuthenticationMethod = string; - -// @public -export interface ClientSecretContract { - clientSecret?: string; -} - -// @public -export interface ConfigurationApi { - legacyApi?: LegacyApiState; -} - -// @public -export type ConfigurationIdName = string; - -// @public -export type Confirmation = string; - -// @public -export type ConnectionStatus = string; - -// @public -export type ConnectivityCheckProtocol = string; - -// @public -export interface ConnectivityCheckRequest { - destination: ConnectivityCheckRequestDestination; - preferredIPVersion?: PreferredIPVersion; - protocol?: ConnectivityCheckProtocol; - protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; - source: ConnectivityCheckRequestSource; -} - -// @public -export interface ConnectivityCheckRequestDestination { - address: string; - port: number; -} - -// @public -export interface ConnectivityCheckRequestProtocolConfiguration { - httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; -} - -// @public -export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { - headers?: HttpHeader[]; - method?: Method; - validStatusCodes?: number[]; -} - -// @public -export interface ConnectivityCheckRequestSource { - instance?: number; - region: string; -} - -// @public -export interface ConnectivityCheckResponse { - readonly avgLatencyInMs?: number; - readonly connectionStatus?: ConnectionStatus; - readonly hops?: ConnectivityHop[]; - readonly maxLatencyInMs?: number; - readonly minLatencyInMs?: number; - readonly probesFailed?: number; - readonly probesSent?: number; -} - -// @public -export interface ConnectivityHop { - readonly address?: string; - readonly id?: string; - readonly issues?: ConnectivityIssue[]; - readonly nextHopIds?: string[]; - readonly resourceId?: string; - readonly type?: string; -} - -// @public -export interface ConnectivityIssue { - readonly context?: { - [propertyName: string]: string; - }[]; - readonly origin?: Origin; - readonly severity?: Severity; - readonly type?: IssueType; -} - -// @public -export interface ConnectivityStatusContract { - error?: string; - isOptional: boolean; - lastStatusChange: Date; - lastUpdated: Date; - name: string; - resourceType: string; - status: ConnectivityStatusType; -} - -// @public -export type ConnectivityStatusType = string; - -// @public -export type ContentFormat = string; - -// @public -export interface ContentItem { - createOrUpdate(resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, parameters: ContentItemContract, options?: ContentItemCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, ifMatch: string, options?: ContentItemDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, options?: ContentItemGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, options?: ContentItemGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, contentTypeId: string, options?: ContentItemListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ContentItemCollection { - readonly nextLink?: string; - readonly value?: ContentItemContract[]; -} - -// @public -export interface ContentItemContract extends ProxyResource { - properties?: { - [propertyName: string]: any; - }; -} - -// @public -export interface ContentItemCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ContentItemCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ContentItemCreateOrUpdateResponse = ContentItemCreateOrUpdateHeaders & ContentItemContract; - -// @public -export interface ContentItemDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ContentItemGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface ContentItemGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentItemGetEntityTagResponse = ContentItemGetEntityTagHeaders; - -// @public -export interface ContentItemGetHeaders { - eTag?: string; -} - -// @public -export interface ContentItemGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentItemGetResponse = ContentItemGetHeaders & ContentItemContract; - -// @public -export interface ContentItemListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentItemListByServiceNextResponse = ContentItemCollection; - -// @public -export interface ContentItemListByServiceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentItemListByServiceResponse = ContentItemCollection; - -// @public -export interface ContentType { - createOrUpdate(resourceGroupName: string, serviceName: string, contentTypeId: string, parameters: ContentTypeContract, options?: ContentTypeCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, contentTypeId: string, ifMatch: string, options?: ContentTypeDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, contentTypeId: string, options?: ContentTypeGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: ContentTypeListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ContentTypeCollection { - readonly nextLink?: string; - readonly value?: ContentTypeContract[]; -} - -// @public -export interface ContentTypeContract extends ProxyResource { - description?: string; - idPropertiesId?: string; - namePropertiesName?: string; - schema?: Record; - version?: string; -} - -// @public -export interface ContentTypeCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface ContentTypeCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type ContentTypeCreateOrUpdateResponse = ContentTypeCreateOrUpdateHeaders & ContentTypeContract; - -// @public -export interface ContentTypeDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ContentTypeGetHeaders { - eTag?: string; -} - -// @public -export interface ContentTypeGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentTypeGetResponse = ContentTypeGetHeaders & ContentTypeContract; - -// @public -export interface ContentTypeListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentTypeListByServiceNextResponse = ContentTypeCollection; - -// @public -export interface ContentTypeListByServiceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ContentTypeListByServiceResponse = ContentTypeCollection; - -// @public -export type CreatedByType = string; - -// @public (undocumented) -export interface DataMasking { - headers?: DataMaskingEntity[]; - queryParams?: DataMaskingEntity[]; -} - -// @public (undocumented) -export interface DataMaskingEntity { - mode?: DataMaskingMode; - value?: string; -} - -// @public -export type DataMaskingMode = string; - -// @public -export interface DelegationSettings { - createOrUpdate(resourceGroupName: string, serviceName: string, parameters: PortalDelegationSettings, options?: DelegationSettingsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, options?: DelegationSettingsGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, options?: DelegationSettingsGetEntityTagOptionalParams): Promise; - listSecrets(resourceGroupName: string, serviceName: string, options?: DelegationSettingsListSecretsOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalDelegationSettings, options?: DelegationSettingsUpdateOptionalParams): Promise; -} - -// @public -export interface DelegationSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type DelegationSettingsCreateOrUpdateResponse = PortalDelegationSettings; - -// @public -export interface DelegationSettingsGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface DelegationSettingsGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DelegationSettingsGetEntityTagResponse = DelegationSettingsGetEntityTagHeaders; - -// @public -export interface DelegationSettingsGetHeaders { - eTag?: string; -} - -// @public -export interface DelegationSettingsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DelegationSettingsGetResponse = DelegationSettingsGetHeaders & PortalDelegationSettings; - -// @public -export interface DelegationSettingsListSecretsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DelegationSettingsListSecretsResponse = PortalSettingValidationKeyContract; - -// @public -export interface DelegationSettingsUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DeletedServiceContract extends ProxyResource { - deletionDate?: Date; - readonly location?: string; - scheduledPurgeDate?: Date; - serviceId?: string; -} - -// @public -export interface DeletedServices { - beginPurge(serviceName: string, location: string, options?: DeletedServicesPurgeOptionalParams): Promise, void>>; - beginPurgeAndWait(serviceName: string, location: string, options?: DeletedServicesPurgeOptionalParams): Promise; - getByName(serviceName: string, location: string, options?: DeletedServicesGetByNameOptionalParams): Promise; - listBySubscription(options?: DeletedServicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DeletedServicesCollection { - readonly nextLink?: string; - readonly value?: DeletedServiceContract[]; -} - -// @public -export interface DeletedServicesGetByNameOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DeletedServicesGetByNameResponse = DeletedServiceContract; - -// @public -export interface DeletedServicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DeletedServicesListBySubscriptionNextResponse = DeletedServicesCollection; - -// @public -export interface DeletedServicesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DeletedServicesListBySubscriptionResponse = DeletedServicesCollection; - -// @public -export interface DeletedServicesPurgeHeaders { - // (undocumented) - location?: string; -} - -// @public -export interface DeletedServicesPurgeOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface DeployConfigurationParameters { - branch?: string; - force?: boolean; -} - -// @public -export type DeveloperPortalStatus = string; - -// @public -export interface Diagnostic { - createOrUpdate(resourceGroupName: string, serviceName: string, diagnosticId: string, parameters: DiagnosticContract, options?: DiagnosticCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, diagnosticId: string, ifMatch: string, options?: DiagnosticDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, diagnosticId: string, options?: DiagnosticGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, diagnosticId: string, options?: DiagnosticGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: DiagnosticListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticContract, options?: DiagnosticUpdateOptionalParams): Promise; -} - -// @public -export interface DiagnosticCollection { - count?: number; - nextLink?: string; - value?: DiagnosticContract[]; -} - -// @public -export interface DiagnosticContract extends ProxyResource { - alwaysLog?: AlwaysLog; - backend?: PipelineDiagnosticSettings; - frontend?: PipelineDiagnosticSettings; - httpCorrelationProtocol?: HttpCorrelationProtocol; - logClientIp?: boolean; - loggerId?: string; - metrics?: boolean; - operationNameFormat?: OperationNameFormat; - sampling?: SamplingSettings; - verbosity?: Verbosity; -} - -// @public -export interface DiagnosticCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface DiagnosticCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type DiagnosticCreateOrUpdateResponse = DiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -// @public -export interface DiagnosticDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DiagnosticGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface DiagnosticGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticGetEntityTagResponse = DiagnosticGetEntityTagHeaders; - -// @public -export interface DiagnosticGetHeaders { - eTag?: string; -} - -// @public -export interface DiagnosticGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticGetResponse = DiagnosticGetHeaders & DiagnosticContract; - -// @public -export interface DiagnosticListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticListByServiceNextResponse = DiagnosticCollection; - -// @public -export interface DiagnosticListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type DiagnosticListByServiceResponse = DiagnosticCollection; - -// @public -export interface DiagnosticUpdateContract extends ProxyResource { - alwaysLog?: AlwaysLog; - backend?: PipelineDiagnosticSettings; - frontend?: PipelineDiagnosticSettings; - httpCorrelationProtocol?: HttpCorrelationProtocol; - logClientIp?: boolean; - loggerId?: string; - metrics?: boolean; - operationNameFormat?: OperationNameFormat; - sampling?: SamplingSettings; - verbosity?: Verbosity; -} - -// @public -export interface DiagnosticUpdateHeaders { - eTag?: string; -} - -// @public -export interface DiagnosticUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DiagnosticUpdateResponse = DiagnosticUpdateHeaders & DiagnosticContract; - -// @public -export interface Documentation { - createOrUpdate(resourceGroupName: string, serviceName: string, documentationId: string, parameters: DocumentationContract, options?: DocumentationCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, documentationId: string, ifMatch: string, options?: DocumentationDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, documentationId: string, options?: DocumentationGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, documentationId: string, options?: DocumentationGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: DocumentationListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, documentationId: string, ifMatch: string, parameters: DocumentationUpdateContract, options?: DocumentationUpdateOptionalParams): Promise; -} - -// @public -export interface DocumentationCollection { - readonly nextLink?: string; - readonly value?: DocumentationContract[]; -} - -// @public -export interface DocumentationContract extends ProxyResource { - content?: string; - title?: string; -} - -// @public -export interface DocumentationCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface DocumentationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type DocumentationCreateOrUpdateResponse = DocumentationCreateOrUpdateHeaders & DocumentationContract; - -// @public -export interface DocumentationDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DocumentationGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface DocumentationGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DocumentationGetEntityTagResponse = DocumentationGetEntityTagHeaders; - -// @public -export interface DocumentationGetHeaders { - eTag?: string; -} - -// @public -export interface DocumentationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DocumentationGetResponse = DocumentationGetHeaders & DocumentationContract; - -// @public -export interface DocumentationListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DocumentationListByServiceNextResponse = DocumentationCollection; - -// @public -export interface DocumentationListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type DocumentationListByServiceResponse = DocumentationCollection; - -// @public -export interface DocumentationUpdateContract { - content?: string; - title?: string; -} - -// @public -export interface DocumentationUpdateHeaders { - eTag?: string; -} - -// @public -export interface DocumentationUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DocumentationUpdateResponse = DocumentationUpdateHeaders & DocumentationContract; - -// @public -export interface EmailTemplate { - createOrUpdate(resourceGroupName: string, serviceName: string, templateName: TemplateName, parameters: EmailTemplateUpdateParameters, options?: EmailTemplateCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, templateName: TemplateName, ifMatch: string, options?: EmailTemplateDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, templateName: TemplateName, options?: EmailTemplateGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, templateName: TemplateName, options?: EmailTemplateGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: EmailTemplateListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, templateName: TemplateName, ifMatch: string, parameters: EmailTemplateUpdateParameters, options?: EmailTemplateUpdateOptionalParams): Promise; -} - -// @public -export interface EmailTemplateCollection { - count?: number; - nextLink?: string; - value?: EmailTemplateContract[]; -} - -// @public -export interface EmailTemplateContract extends ProxyResource { - body?: string; - description?: string; - readonly isDefault?: boolean; - parameters?: EmailTemplateParametersContractProperties[]; - subject?: string; - title?: string; -} - -// @public -export interface EmailTemplateCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type EmailTemplateCreateOrUpdateResponse = EmailTemplateContract; - -// @public -export interface EmailTemplateDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface EmailTemplateGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface EmailTemplateGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmailTemplateGetEntityTagResponse = EmailTemplateGetEntityTagHeaders; - -// @public -export interface EmailTemplateGetHeaders { - eTag?: string; -} - -// @public -export interface EmailTemplateGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmailTemplateGetResponse = EmailTemplateGetHeaders & EmailTemplateContract; - -// @public -export interface EmailTemplateListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type EmailTemplateListByServiceNextResponse = EmailTemplateCollection; - -// @public -export interface EmailTemplateListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type EmailTemplateListByServiceResponse = EmailTemplateCollection; - -// @public -export interface EmailTemplateParametersContractProperties { - description?: string; - name?: string; - title?: string; -} - -// @public -export interface EmailTemplateUpdateHeaders { - eTag?: string; -} - -// @public -export interface EmailTemplateUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface EmailTemplateUpdateParameters { - body?: string; - description?: string; - parameters?: EmailTemplateParametersContractProperties[]; - subject?: string; - title?: string; -} - -// @public -export type EmailTemplateUpdateResponse = EmailTemplateUpdateHeaders & EmailTemplateContract; - -// @public -export interface EndpointDependency { - domainName?: string; - endpointDetails?: EndpointDetail[]; -} - -// @public -export interface EndpointDetail { - port?: number; - region?: string; -} - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorFieldContract { - code?: string; - message?: string; - target?: string; -} - -// @public -export interface ErrorResponse { - error?: ErrorDetail; -} - -// @public -export interface ErrorResponseBody { - code?: string; - details?: ErrorFieldContract[]; - message?: string; -} - -// @public -export type ExportApi = string; - -// @public -export type ExportFormat = string; - -// @public -export type ExportResultFormat = string; - -// @public -export interface FailureStatusCodeRange { - max?: number; - min?: number; -} - -// @public -export interface FrontendConfiguration { - readonly defaultHostname?: string; -} - -// @public -export interface Gateway { - createOrUpdate(resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayContract, options?: GatewayCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, gatewayId: string, ifMatch: string, options?: GatewayDeleteOptionalParams): Promise; - generateToken(resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayTokenRequestContract, options?: GatewayGenerateTokenOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayGetEntityTagOptionalParams): Promise; - invalidateDebugCredentials(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayInvalidateDebugCredentialsOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: GatewayListByServiceOptionalParams): PagedAsyncIterableIterator; - listDebugCredentials(resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayListDebugCredentialsContract, options?: GatewayListDebugCredentialsOptionalParams): Promise; - listKeys(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayListKeysOptionalParams): Promise; - listTrace(resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayListTraceContract, options?: GatewayListTraceOptionalParams): Promise; - regenerateKey(resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayKeyRegenerationRequestContract, options?: GatewayRegenerateKeyOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, gatewayId: string, ifMatch: string, parameters: GatewayContract, options?: GatewayUpdateOptionalParams): Promise; -} - -// @public -export interface GatewayApi { - createOrUpdate(resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiDeleteOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayApiListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GatewayApiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - parameters?: AssociationContract; -} - -// @public -export type GatewayApiCreateOrUpdateResponse = ApiContract; - -// @public -export interface GatewayApiDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayApiGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GatewayApiGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayApiGetEntityTagResponse = GatewayApiGetEntityTagHeaders; - -// @public -export interface GatewayApiListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayApiListByServiceNextResponse = ApiCollection; - -// @public -export interface GatewayApiListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GatewayApiListByServiceResponse = ApiCollection; - -// @public -export interface GatewayCertificateAuthority { - createOrUpdate(resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, parameters: GatewayCertificateAuthorityContract, options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, ifMatch: string, options?: GatewayCertificateAuthorityDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, options?: GatewayCertificateAuthorityGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, options?: GatewayCertificateAuthorityGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayCertificateAuthorityListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GatewayCertificateAuthorityCollection { - readonly nextLink?: string; - readonly value?: GatewayCertificateAuthorityContract[]; -} - -// @public -export interface GatewayCertificateAuthorityContract extends ProxyResource { - isTrusted?: boolean; -} - -// @public -export interface GatewayCertificateAuthorityCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GatewayCertificateAuthorityCreateOrUpdateResponse = GatewayCertificateAuthorityCreateOrUpdateHeaders & GatewayCertificateAuthorityContract; - -// @public -export interface GatewayCertificateAuthorityDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayCertificateAuthorityGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GatewayCertificateAuthorityGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayCertificateAuthorityGetEntityTagResponse = GatewayCertificateAuthorityGetEntityTagHeaders; - -// @public -export interface GatewayCertificateAuthorityGetHeaders { - eTag?: string; -} - -// @public -export interface GatewayCertificateAuthorityGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayCertificateAuthorityGetResponse = GatewayCertificateAuthorityGetHeaders & GatewayCertificateAuthorityContract; - -// @public -export interface GatewayCertificateAuthorityListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayCertificateAuthorityListByServiceNextResponse = GatewayCertificateAuthorityCollection; - -// @public -export interface GatewayCertificateAuthorityListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GatewayCertificateAuthorityListByServiceResponse = GatewayCertificateAuthorityCollection; - -// @public -export interface GatewayCollection { - count?: number; - readonly nextLink?: string; - readonly value?: GatewayContract[]; -} - -// @public -export interface GatewayConfigurationApi { - readonly hostname?: string; -} - -// @public -export interface GatewayContract extends ProxyResource { - description?: string; - locationData?: ResourceLocationDataContract; -} - -// @public -export interface GatewayCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GatewayCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GatewayCreateOrUpdateResponse = GatewayCreateOrUpdateHeaders & GatewayContract; - -// @public -export interface GatewayDebugCredentialsContract { - token?: string; -} - -// @public -export interface GatewayDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayGenerateTokenOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayGenerateTokenResponse = GatewayTokenContract; - -// @public -export interface GatewayGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GatewayGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayGetEntityTagResponse = GatewayGetEntityTagHeaders; - -// @public -export interface GatewayGetHeaders { - eTag?: string; -} - -// @public -export interface GatewayGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayGetResponse = GatewayGetHeaders & GatewayContract; - -// @public -export interface GatewayHostnameConfiguration { - createOrUpdate(resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, parameters: GatewayHostnameConfigurationContract, options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, ifMatch: string, options?: GatewayHostnameConfigurationDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, options?: GatewayHostnameConfigurationGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, options?: GatewayHostnameConfigurationGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayHostnameConfigurationListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GatewayHostnameConfigurationCollection { - readonly nextLink?: string; - readonly value?: GatewayHostnameConfigurationContract[]; -} - -// @public -export interface GatewayHostnameConfigurationContract extends ProxyResource { - certificateId?: string; - hostname?: string; - http2Enabled?: boolean; - negotiateClientCertificate?: boolean; - tls10Enabled?: boolean; - tls11Enabled?: boolean; -} - -// @public -export interface GatewayHostnameConfigurationCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GatewayHostnameConfigurationCreateOrUpdateResponse = GatewayHostnameConfigurationCreateOrUpdateHeaders & GatewayHostnameConfigurationContract; - -// @public -export interface GatewayHostnameConfigurationDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayHostnameConfigurationGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GatewayHostnameConfigurationGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayHostnameConfigurationGetEntityTagResponse = GatewayHostnameConfigurationGetEntityTagHeaders; - -// @public -export interface GatewayHostnameConfigurationGetHeaders { - eTag?: string; -} - -// @public -export interface GatewayHostnameConfigurationGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayHostnameConfigurationGetResponse = GatewayHostnameConfigurationGetHeaders & GatewayHostnameConfigurationContract; - -// @public -export interface GatewayHostnameConfigurationListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayHostnameConfigurationListByServiceNextResponse = GatewayHostnameConfigurationCollection; - -// @public -export interface GatewayHostnameConfigurationListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GatewayHostnameConfigurationListByServiceResponse = GatewayHostnameConfigurationCollection; - -// @public -export interface GatewayInvalidateDebugCredentialsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayKeyRegenerationRequestContract { - keyType: KeyType; -} - -// @public -export interface GatewayKeysContract { - primary?: string; - secondary?: string; -} - -// @public -export interface GatewayListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayListByServiceNextResponse = GatewayCollection; - -// @public -export interface GatewayListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GatewayListByServiceResponse = GatewayCollection; - -// @public -export interface GatewayListDebugCredentialsContract { - apiId: string; - credentialsExpireAfter?: string; - purposes: GatewayListDebugCredentialsContractPurpose[]; -} - -// @public -export type GatewayListDebugCredentialsContractPurpose = string; - -// @public -export interface GatewayListDebugCredentialsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayListDebugCredentialsResponse = GatewayDebugCredentialsContract; - -// @public -export interface GatewayListKeysHeaders { - eTag?: string; -} - -// @public -export interface GatewayListKeysOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayListKeysResponse = GatewayListKeysHeaders & GatewayKeysContract; - -// @public -export interface GatewayListTraceContract { - traceId?: string; -} - -// @public -export interface GatewayListTraceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayListTraceResponse = { - [propertyName: string]: any; -}; - -// @public -export interface GatewayRegenerateKeyOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GatewayResourceSkuResult { - readonly capacity?: GatewaySkuCapacity; - readonly resourceType?: string; - readonly sku?: GatewaySku; -} - -// @public -export interface GatewayResourceSkuResults { - nextLink?: string; - value: GatewayResourceSkuResult[]; -} - -// @public -export interface GatewaySku { - name?: ApiGatewaySkuType; -} - -// @public -export interface GatewaySkuCapacity { - readonly default?: number; - readonly maximum?: number; - readonly minimum?: number; - readonly scaleType?: GatewaySkuCapacityScaleType; -} - -// @public -export type GatewaySkuCapacityScaleType = string; - -// @public -export interface GatewayTokenContract { - value?: string; -} - -// @public -export interface GatewayTokenRequestContract { - expiry: Date; - keyType: KeyType; -} - -// @public -export interface GatewayUpdateHeaders { - eTag?: string; -} - -// @public -export interface GatewayUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GatewayUpdateResponse = GatewayUpdateHeaders & GatewayContract; - -// @public -export interface GenerateSsoUrlResult { - value?: string; -} - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface GlobalSchema { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams): Promise, GlobalSchemaCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, schemaId: string, ifMatch: string, options?: GlobalSchemaDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: GlobalSchemaListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GlobalSchemaCollection { - count?: number; - readonly nextLink?: string; - readonly value?: GlobalSchemaContract[]; -} - -// @public -export interface GlobalSchemaContract extends ProxyResource { - description?: string; - document?: Record; - readonly provisioningState?: string; - schemaType?: SchemaType; - value?: any; -} - -// @public -export interface GlobalSchemaCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; -} - -// @public -export interface GlobalSchemaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type GlobalSchemaCreateOrUpdateResponse = GlobalSchemaCreateOrUpdateHeaders & GlobalSchemaContract; - -// @public -export interface GlobalSchemaDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GlobalSchemaGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GlobalSchemaGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; - -// @public -export interface GlobalSchemaGetHeaders { - eTag?: string; -} - -// @public -export interface GlobalSchemaGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & GlobalSchemaContract; - -// @public -export interface GlobalSchemaListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; - -// @public -export interface GlobalSchemaListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; - -// @public -export type GrantType = string; - -// @public -export interface GraphQLApiResolver { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, parameters: ResolverContract, options?: GraphQLApiResolverCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, ifMatch: string, options?: GraphQLApiResolverDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: GraphQLApiResolverListByApiOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, ifMatch: string, parameters: ResolverUpdateContract, options?: GraphQLApiResolverUpdateOptionalParams): Promise; -} - -// @public -export interface GraphQLApiResolverCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GraphQLApiResolverCreateOrUpdateResponse = GraphQLApiResolverCreateOrUpdateHeaders & ResolverContract; - -// @public -export interface GraphQLApiResolverDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GraphQLApiResolverGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverGetEntityTagResponse = GraphQLApiResolverGetEntityTagHeaders; - -// @public -export interface GraphQLApiResolverGetHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverGetResponse = GraphQLApiResolverGetHeaders & ResolverContract; - -// @public -export interface GraphQLApiResolverListByApiNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverListByApiNextResponse = ResolverCollection; - -// @public -export interface GraphQLApiResolverListByApiOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GraphQLApiResolverListByApiResponse = ResolverCollection; - -// @public -export interface GraphQLApiResolverPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, ifMatch: string, options?: GraphQLApiResolverPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, options?: GraphQLApiResolverPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams): Promise; - listByResolver(resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverPolicyListByResolverOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GraphQLApiResolverPolicyCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GraphQLApiResolverPolicyCreateOrUpdateResponse = GraphQLApiResolverPolicyCreateOrUpdateHeaders & PolicyContract; - -// @public -export interface GraphQLApiResolverPolicyDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GraphQLApiResolverPolicyGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverPolicyGetEntityTagResponse = GraphQLApiResolverPolicyGetEntityTagHeaders; - -// @public -export interface GraphQLApiResolverPolicyGetHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; -} - -// @public -export type GraphQLApiResolverPolicyGetResponse = GraphQLApiResolverPolicyGetHeaders & PolicyContract; - -// @public -export interface GraphQLApiResolverPolicyListByResolverNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverPolicyListByResolverNextResponse = PolicyCollection; - -// @public -export interface GraphQLApiResolverPolicyListByResolverOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverPolicyListByResolverResponse = PolicyCollection; - -// @public -export interface GraphQLApiResolverUpdateHeaders { - eTag?: string; -} - -// @public -export interface GraphQLApiResolverUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GraphQLApiResolverUpdateResponse = GraphQLApiResolverUpdateHeaders & ResolverContract; - -// @public -export interface Group { - createOrUpdate(resourceGroupName: string, serviceName: string, groupId: string, parameters: GroupCreateParameters, options?: GroupCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, groupId: string, ifMatch: string, options?: GroupDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, groupId: string, options?: GroupGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, groupId: string, options?: GroupGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: GroupListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, groupId: string, ifMatch: string, parameters: GroupUpdateParameters, options?: GroupUpdateOptionalParams): Promise; -} - -// @public -export interface GroupCollection { - count?: number; - nextLink?: string; - value?: GroupContract[]; -} - -// @public -export interface GroupContract extends ProxyResource { - readonly builtIn?: boolean; - description?: string; - displayName?: string; - externalId?: string; - typePropertiesType?: GroupType; -} - -// @public -export interface GroupContractProperties { - readonly builtIn?: boolean; - description?: string; - displayName: string; - externalId?: string; - type?: GroupType; -} - -// @public -export interface GroupCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface GroupCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type GroupCreateOrUpdateResponse = GroupCreateOrUpdateHeaders & GroupContract; - -// @public -export interface GroupCreateParameters { - description?: string; - displayName?: string; - externalId?: string; - type?: GroupType; -} - -// @public -export interface GroupDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GroupGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface GroupGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupGetEntityTagResponse = GroupGetEntityTagHeaders; - -// @public -export interface GroupGetHeaders { - eTag?: string; -} - -// @public -export interface GroupGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupGetResponse = GroupGetHeaders & GroupContract; - -// @public -export interface GroupListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupListByServiceNextResponse = GroupCollection; - -// @public -export interface GroupListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GroupListByServiceResponse = GroupCollection; - -// @public -export type GroupType = "custom" | "system" | "external"; - -// @public -export interface GroupUpdateHeaders { - eTag?: string; -} - -// @public -export interface GroupUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GroupUpdateParameters { - description?: string; - displayName?: string; - externalId?: string; - type?: GroupType; -} - -// @public -export type GroupUpdateResponse = GroupUpdateHeaders & GroupContract; - -// @public -export interface GroupUser { - checkEntityExists(resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserCheckEntityExistsOptionalParams): Promise; - create(resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserCreateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserDeleteOptionalParams): Promise; - list(resourceGroupName: string, serviceName: string, groupId: string, options?: GroupUserListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface GroupUserCheckEntityExistsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupUserCheckEntityExistsResponse = { - body: boolean; -}; - -// @public -export interface GroupUserCreateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupUserCreateResponse = UserContract; - -// @public -export interface GroupUserDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface GroupUserListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type GroupUserListNextResponse = UserCollection; - -// @public -export interface GroupUserListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type GroupUserListResponse = UserCollection; - -// @public -export interface HostnameConfiguration { - certificate?: CertificateInformation; - certificatePassword?: string; - certificateSource?: CertificateSource; - certificateStatus?: CertificateStatus; - defaultSslBinding?: boolean; - encodedCertificate?: string; - hostName: string; - identityClientId?: string; - keyVaultId?: string; - negotiateClientCertificate?: boolean; - type: HostnameType; -} - -// @public -export type HostnameType = string; - -// @public -export type HttpCorrelationProtocol = string; - -// @public -export interface HttpHeader { - name: string; - value: string; -} - -// @public -export interface HttpMessageDiagnostic { - body?: BodyDiagnosticSettings; - dataMasking?: DataMasking; - headers?: string[]; -} - -// @public -export interface IdentityProvider { - createOrUpdate(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, parameters: IdentityProviderCreateContract, options?: IdentityProviderCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, ifMatch: string, options?: IdentityProviderDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: IdentityProviderListByServiceOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderListSecretsOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, ifMatch: string, parameters: IdentityProviderUpdateParameters, options?: IdentityProviderUpdateOptionalParams): Promise; -} - -// @public -export interface IdentityProviderBaseParameters { - allowedTenants?: string[]; - authority?: string; - clientLibrary?: string; - passwordResetPolicyName?: string; - profileEditingPolicyName?: string; - signinPolicyName?: string; - signinTenant?: string; - signupPolicyName?: string; - type?: IdentityProviderType; -} - -// @public -export interface IdentityProviderContract extends ProxyResource { - allowedTenants?: string[]; - authority?: string; - clientId?: string; - clientLibrary?: string; - clientSecret?: string; - passwordResetPolicyName?: string; - profileEditingPolicyName?: string; - signinPolicyName?: string; - signinTenant?: string; - signupPolicyName?: string; - typePropertiesType?: IdentityProviderType; -} - -// @public -export interface IdentityProviderContractProperties extends IdentityProviderBaseParameters { - clientId: string; - clientSecret?: string; -} - -// @public -export interface IdentityProviderCreateContract extends ProxyResource { - allowedTenants?: string[]; - authority?: string; - clientId?: string; - clientLibrary?: string; - clientSecret?: string; - passwordResetPolicyName?: string; - profileEditingPolicyName?: string; - signinPolicyName?: string; - signinTenant?: string; - signupPolicyName?: string; - typePropertiesType?: IdentityProviderType; -} - -// @public -export interface IdentityProviderCreateContractProperties extends IdentityProviderBaseParameters { - clientId: string; - clientSecret: string; -} - -// @public -export interface IdentityProviderCreateOrUpdateHeaders { - eTag?: string; -} - -// @public -export interface IdentityProviderCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} - -// @public -export type IdentityProviderCreateOrUpdateResponse = IdentityProviderCreateOrUpdateHeaders & IdentityProviderContract; - -// @public -export interface IdentityProviderDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface IdentityProviderGetEntityTagHeaders { - eTag?: string; -} - -// @public -export interface IdentityProviderGetEntityTagOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IdentityProviderGetEntityTagResponse = IdentityProviderGetEntityTagHeaders; - -// @public -export interface IdentityProviderGetHeaders { - eTag?: string; -} - -// @public -export interface IdentityProviderGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IdentityProviderGetResponse = IdentityProviderGetHeaders & IdentityProviderContract; - -// @public -export interface IdentityProviderList { - count?: number; - nextLink?: string; - value?: IdentityProviderContract[]; -} - -// @public -export interface IdentityProviderListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IdentityProviderListByServiceNextResponse = IdentityProviderList; - -// @public -export interface IdentityProviderListByServiceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IdentityProviderListByServiceResponse = IdentityProviderList; - -// @public -export interface IdentityProviderListSecretsHeaders { - eTag?: string; -} - -// @public -export interface IdentityProviderListSecretsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IdentityProviderListSecretsResponse = IdentityProviderListSecretsHeaders & ClientSecretContract; - -// @public -export type IdentityProviderType = string; - -// @public -export interface IdentityProviderUpdateHeaders { - eTag?: string; -} - -// @public -export interface IdentityProviderUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface IdentityProviderUpdateParameters { - allowedTenants?: string[]; - authority?: string; - clientId?: string; - clientLibrary?: string; - clientSecret?: string; - passwordResetPolicyName?: string; - profileEditingPolicyName?: string; - signinPolicyName?: string; - signinTenant?: string; - signupPolicyName?: string; - type?: IdentityProviderType; -} - -// @public -export interface IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { - clientId?: string; - clientSecret?: string; -} - -// @public -export type IdentityProviderUpdateResponse = IdentityProviderUpdateHeaders & IdentityProviderContract; - -// @public -export interface Issue { - get(resourceGroupName: string, serviceName: string, issueId: string, options?: IssueGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: IssueListByServiceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface IssueAttachmentCollection { - count?: number; - readonly nextLink?: string; - readonly value?: IssueAttachmentContract[]; -} - -// @public -export interface IssueAttachmentContract extends ProxyResource { - content?: string; - contentFormat?: string; - title?: string; -} - -// @public -export interface IssueCollection { - count?: number; - readonly nextLink?: string; - readonly value?: IssueContract[]; -} - -// @public -export interface IssueCommentCollection { - count?: number; - readonly nextLink?: string; - readonly value?: IssueCommentContract[]; -} - -// @public -export interface IssueCommentContract extends ProxyResource { - createdDate?: Date; - text?: string; - userId?: string; -} - -// @public -export interface IssueContract extends ProxyResource { - apiId?: string; - createdDate?: Date; - description?: string; - state?: State; - title?: string; - userId?: string; -} - -// @public -export interface IssueContractBaseProperties { - apiId?: string; - createdDate?: Date; - state?: State; -} - -// @public -export interface IssueContractProperties extends IssueContractBaseProperties { - description: string; - title: string; - userId: string; -} - -// @public -export interface IssueGetHeaders { - eTag?: string; -} - -// @public -export interface IssueGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IssueGetResponse = IssueGetHeaders & IssueContract; - -// @public -export interface IssueListByServiceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IssueListByServiceNextResponse = IssueCollection; - -// @public -export interface IssueListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} - -// @public -export type IssueListByServiceResponse = IssueCollection; - -// @public -export type IssueType = string; - -// @public -export interface IssueUpdateContract { - apiId?: string; - createdDate?: Date; - description?: string; - state?: State; - title?: string; - userId?: string; -} - -// @public -export interface IssueUpdateContractProperties extends IssueContractBaseProperties { - description?: string; - title?: string; - userId?: string; -} - -// @public -export type KeyType = "primary" | "secondary"; - -// @public -export interface KeyVaultContractCreateProperties { - identityClientId?: string; - secretIdentifier?: string; -} - -// @public -export interface KeyVaultContractProperties extends KeyVaultContractCreateProperties { - lastStatus?: KeyVaultLastAccessStatusContractProperties; -} - -// @public -export interface KeyVaultLastAccessStatusContractProperties { - code?: string; - message?: string; - timeStampUtc?: Date; -} - -// @public -export type KeyVaultRefreshState = string; - -// @public -export enum KnownAccessIdName { - Access = "access", - GitAccess = "gitAccess" -} - -// @public -export enum KnownAccessType { - AccessKey = "AccessKey", - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - UserAssignedManagedIdentity = "UserAssignedManagedIdentity" -} - -// @public -export enum KnownAlwaysLog { - AllErrors = "allErrors" -} - -// @public -export enum KnownApiGatewaySkuType { - Standard = "Standard", - WorkspaceGatewayPremium = "WorkspaceGatewayPremium", - WorkspaceGatewayStandard = "WorkspaceGatewayStandard" -} - -// @public -export enum KnownApimIdentityType { - None = "None", - SystemAssigned = "SystemAssigned", - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", - UserAssigned = "UserAssigned" -} - -// @public -export enum KnownApiType { - Graphql = "graphql", - Grpc = "grpc", - Http = "http", - Odata = "odata", - Soap = "soap", - Websocket = "websocket" -} - -// @public -export enum KnownApiVersionSetContractDetailsVersioningScheme { - Header = "Header", - Query = "Query", - Segment = "Segment" -} - -// @public -export enum KnownAppType { - DeveloperPortal = "developerPortal", - Portal = "portal" -} - -// @public -export enum KnownAuthorizationType { - OAuth2 = "OAuth2" -} - -// @public -export enum KnownBackendProtocol { - Http = "http", - Soap = "soap" -} - -// @public -export enum KnownBackendType { - Pool = "Pool", - Single = "Single" -} - -// @public -export enum KnownBearerTokenSendingMethod { - AuthorizationHeader = "authorizationHeader", - Query = "query" -} - -// @public -export enum KnownBearerTokenSendingMethods { - AuthorizationHeader = "authorizationHeader", - Query = "query" -} - -// @public -export enum KnownCertificateConfigurationStoreName { - CertificateAuthority = "CertificateAuthority", - Root = "Root" -} - -// @public -export enum KnownCertificateSource { - BuiltIn = "BuiltIn", - Custom = "Custom", - KeyVault = "KeyVault", - Managed = "Managed" -} - -// @public -export enum KnownCertificateStatus { - Completed = "Completed", - Failed = "Failed", - InProgress = "InProgress" -} - -// @public -export enum KnownClientAuthenticationMethod { - Basic = "Basic", - Body = "Body" -} - -// @public -export enum KnownConfigurationIdName { - Configuration = "configuration" -} - -// @public -export enum KnownConfirmation { - Invite = "invite", - Signup = "signup" -} - -// @public -export enum KnownConnectionStatus { - Connected = "Connected", - Degraded = "Degraded", - Disconnected = "Disconnected", - Unknown = "Unknown" -} - -// @public -export enum KnownConnectivityCheckProtocol { - Http = "HTTP", - Https = "HTTPS", - TCP = "TCP" -} - -// @public -export enum KnownConnectivityStatusType { - Failure = "failure", - Initializing = "initializing", - Success = "success" -} - -// @public -export enum KnownContentFormat { - GraphqlLink = "graphql-link", - Grpc = "grpc", - GrpcLink = "grpc-link", - Odata = "odata", - OdataLink = "odata-link", - Openapi = "openapi", - OpenapiJson = "openapi+json", - OpenapiJsonLink = "openapi+json-link", - OpenapiLink = "openapi-link", - SwaggerJson = "swagger-json", - SwaggerLinkJson = "swagger-link-json", - WadlLinkJson = "wadl-link-json", - WadlXml = "wadl-xml", - Wsdl = "wsdl", - WsdlLink = "wsdl-link" +export interface ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" +export interface ApiManagementServiceRestoreOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export enum KnownDataMaskingMode { - Hide = "Hide", - Mask = "Mask" +export interface ApiManagementServiceSkuProperties { + capacity: number; + name: SkuType; } // @public -export enum KnownDeveloperPortalStatus { - Disabled = "Disabled", - Enabled = "Enabled" +export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams extends OperationOptions { } // @public -export enum KnownExportApi { - True = "true" +export interface ApiManagementServiceSkusOperations { + listAvailableServiceSkus: (resourceGroupName: string, serviceName: string, options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams) => PagedAsyncIterableIterator; } // @public -export enum KnownExportFormat { - Openapi = "openapi-link", - OpenapiJson = "openapi+json-link", - Swagger = "swagger-link", - Wadl = "wadl-link", - Wsdl = "wsdl-link" +export interface ApiManagementServiceUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export enum KnownExportResultFormat { - OpenApi = "openapi-link", - Swagger = "swagger-link-json", - Wadl = "wadl-link-json", - Wsdl = "wsdl-link+xml" +export interface ApiManagementServiceUpdateParameters extends ApimResource { + additionalLocations?: AdditionalLocation[]; + apiVersionConstraint?: ApiVersionConstraint; + certificates?: CertificateConfiguration[]; + configurationApi?: ConfigurationApi; + readonly createdAtUtc?: Date; + customProperties?: Record; + developerPortalStatus?: DeveloperPortalStatus; + readonly developerPortalUrl?: string; + disableGateway?: boolean; + enableClientCertificate?: boolean; + readonly etag?: string; + readonly gatewayRegionalUrl?: string; + readonly gatewayUrl?: string; + hostnameConfigurations?: HostnameConfiguration[]; + identity?: ApiManagementServiceIdentity; + legacyPortalStatus?: LegacyPortalStatus; + readonly managementApiUrl?: string; + natGatewayState?: NatGatewayState; + notificationSenderEmail?: string; + readonly outboundPublicIPAddresses?: string[]; + readonly platformVersion?: PlatformVersion; + readonly portalUrl?: string; + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + readonly privateIPAddresses?: string[]; + readonly provisioningState?: string; + readonly publicIPAddresses?: string[]; + publicIpAddressId?: string; + publicNetworkAccess?: PublicNetworkAccess; + publisherEmail?: string; + publisherName?: string; + releaseChannel?: ReleaseChannel; + restore?: boolean; + readonly scmUrl?: string; + sku?: ApiManagementServiceSkuProperties; + readonly targetProvisioningState?: string; + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + virtualNetworkType?: VirtualNetworkType; + zoneRedundant?: boolean; + zones?: string[]; } // @public -export enum KnownGatewayListDebugCredentialsContractPurpose { - Tracing = "tracing" +export interface ApiManagementServiceUpdateProperties extends ApiManagementServiceBaseProperties { + publisherEmail?: string; + publisherName?: string; } // @public -export enum KnownGatewaySkuCapacityScaleType { - Automatic = "Automatic", - Manual = "Manual", - None = "None" +export interface ApiManagementSku { + readonly apiVersions?: string[]; + readonly capabilities?: ApiManagementSkuCapabilities[]; + readonly capacity?: ApiManagementSkuCapacity; + readonly costs?: ApiManagementSkuCosts[]; + readonly family?: string; + readonly kind?: string; + readonly locationInfo?: ApiManagementSkuLocationInfo[]; + readonly locations?: string[]; + readonly name?: string; + readonly resourceType?: string; + readonly restrictions?: ApiManagementSkuRestrictions[]; + readonly size?: string; + readonly tier?: string; } // @public -export enum KnownGrantType { - AuthorizationCode = "authorizationCode", - ClientCredentials = "clientCredentials", - Implicit = "implicit", - ResourceOwnerPassword = "resourceOwnerPassword" +export interface ApiManagementSkuCapabilities { + readonly name?: string; + readonly value?: string; } // @public -export enum KnownHostnameType { - ConfigurationApi = "ConfigurationApi", - DeveloperPortal = "DeveloperPortal", - Management = "Management", - Portal = "Portal", - Proxy = "Proxy", - Scm = "Scm" +export interface ApiManagementSkuCapacity { + readonly default?: number; + readonly maximum?: number; + readonly minimum?: number; + readonly scaleType?: ApiManagementSkuCapacityScaleType; } // @public -export enum KnownHttpCorrelationProtocol { - Legacy = "Legacy", - None = "None", - W3C = "W3C" +export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; + +// @public +export interface ApiManagementSkuCosts { + readonly extendedUnit?: string; + readonly meterID?: string; + readonly quantity?: number; } // @public -export enum KnownIdentityProviderType { - Aad = "aad", - AadB2C = "aadB2C", - Facebook = "facebook", - Google = "google", - Microsoft = "microsoft", - Twitter = "twitter" +export interface ApiManagementSkuLocationInfo { + readonly location?: string; + readonly zoneDetails?: ApiManagementSkuZoneDetails[]; + readonly zones?: string[]; } // @public -export enum KnownIssueType { - AgentStopped = "AgentStopped", - DnsResolution = "DnsResolution", - GuestFirewall = "GuestFirewall", - NetworkSecurityRule = "NetworkSecurityRule", - Platform = "Platform", - PortThrottled = "PortThrottled", - SocketBind = "SocketBind", - Unknown = "Unknown", - UserDefinedRoute = "UserDefinedRoute" +export interface ApiManagementSkuRestrictionInfo { + readonly locations?: string[]; + readonly zones?: string[]; } // @public -export enum KnownKeyVaultRefreshState { - False = "false", - True = "true" +export interface ApiManagementSkuRestrictions { + readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; + readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; + readonly type?: ApiManagementSkuRestrictionsType; + readonly values?: string[]; } // @public -export enum KnownLegacyApiState { - Disabled = "Disabled", - Enabled = "Enabled" +export type ApiManagementSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; + +// @public +export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; + +// @public +export interface ApiManagementSkusListOptionalParams extends OperationOptions { } // @public -export enum KnownLegacyPortalStatus { - Disabled = "Disabled", - Enabled = "Enabled" +export interface ApiManagementSkusOperations { + list: (options?: ApiManagementSkusListOptionalParams) => PagedAsyncIterableIterator; } // @public -export enum KnownLoggerType { - ApplicationInsights = "applicationInsights", - AzureEventHub = "azureEventHub", - AzureMonitor = "azureMonitor" +export interface ApiManagementSkuZoneDetails { + readonly capabilities?: ApiManagementSkuCapabilities[]; + readonly name?: string[]; } // @public -export enum KnownMethod { - GET = "GET", - Post = "POST" +export interface ApiManagementWorkspaceLinkGetOptionalParams extends OperationOptions { } // @public -export enum KnownMigrateToStv2Mode { - NewIP = "NewIP", - PreserveIp = "PreserveIp" +export interface ApiManagementWorkspaceLinkOperations { + get: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: ApiManagementWorkspaceLinkGetOptionalParams) => Promise; } // @public -export enum KnownNatGatewayState { - Disabled = "Disabled", - Enabled = "Enabled" +export interface ApiManagementWorkspaceLinksListByServiceOptionalParams extends OperationOptions { + skipToken?: string; + top?: number; } // @public -export enum KnownNotificationName { - AccountClosedPublisher = "AccountClosedPublisher", - BCC = "BCC", - NewApplicationNotificationMessage = "NewApplicationNotificationMessage", - NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", - PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", - QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage", - RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage" +export interface ApiManagementWorkspaceLinksOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: ApiManagementWorkspaceLinksListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export enum KnownOAuth2GrantType { - AuthorizationCode = "AuthorizationCode", - ClientCredentials = "ClientCredentials" +export interface ApiManagementWorkspaceLinksProperties extends WorkspaceLinksBaseProperties { } // @public -export enum KnownOperationNameFormat { - Name = "Name", - Url = "Url" +export interface ApiManagementWorkspaceLinksResource extends ProxyResource { + readonly etag?: string; + gateways?: WorkspaceLinksGateway[]; + workspaceId?: string; } // @public -export enum KnownOrigin { - Inbound = "Inbound", - Local = "Local", - Outbound = "Outbound" +export type ApimIdentityType = string; + +// @public +export interface ApimResource { + readonly id?: string; + readonly name?: string; + tags?: Record; + readonly type?: string; } // @public -export enum KnownPlatformVersion { - Mtv1 = "mtv1", - Stv1 = "stv1", - Stv2 = "stv2", - Stv21 = "stv2.1", - Undetermined = "undetermined" +export interface ApiOperationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export enum KnownPolicyComplianceState { - Compliant = "Compliant", - NonCompliant = "NonCompliant", - Pending = "Pending" +export interface ApiOperationDeleteOptionalParams extends OperationOptions { } // @public -export enum KnownPolicyContentFormat { - Rawxml = "rawxml", - RawxmlLink = "rawxml-link", - Xml = "xml", - XmlLink = "xml-link" +export interface ApiOperationGetEntityTagOptionalParams extends OperationOptions { } // @public -export enum KnownPolicyExportFormat { - Rawxml = "rawxml", - Xml = "xml" +export interface ApiOperationGetOptionalParams extends OperationOptions { } // @public -export enum KnownPolicyFragmentContentFormat { - Rawxml = "rawxml", - Xml = "xml" +export interface ApiOperationListByApiOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + tags?: string; + top?: number; } // @public -export enum KnownPolicyIdName { - Policy = "policy" +export interface ApiOperationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, parameters: OperationContract, options?: ApiOperationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, ifMatch: string, options?: ApiOperationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiOperationListByApiOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, ifMatch: string, parameters: OperationUpdateContract, options?: ApiOperationUpdateOptionalParams) => Promise; } // @public -export enum KnownPolicyRestrictionRequireBase { - False = "false", - True = "true" +export interface ApiOperationPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export enum KnownPortalRevisionStatus { - Completed = "completed", - Failed = "failed", - Pending = "pending", - Publishing = "publishing" +export interface ApiOperationPolicyDeleteOptionalParams extends OperationOptions { } // @public -export enum KnownPortalSettingsCspMode { - Disabled = "disabled", - Enabled = "enabled", - ReportOnly = "reportOnly" +export interface ApiOperationPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export enum KnownPreferredIPVersion { - IPv4 = "IPv4" +export interface ApiOperationPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export enum KnownPrivateEndpointConnectionProvisioningState { - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded" +export interface ApiOperationPolicyListByOperationOptionalParams extends OperationOptions { } // @public -export enum KnownPrivateEndpointServiceConnectionStatus { - Approved = "Approved", - Pending = "Pending", - Rejected = "Rejected" +export interface ApiOperationPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ApiOperationPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, ifMatch: string, options?: ApiOperationPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: ApiOperationPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: ApiOperationPolicyGetEntityTagOptionalParams) => Promise; + listByOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: ApiOperationPolicyListByOperationOptionalParams) => Promise; } // @public -export enum KnownProtocol { - Http = "http", - Https = "https", - Ws = "ws", - Wss = "wss" +export interface ApiOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: ApiCreateOrUpdateOptionalParams) => Promise, ApiContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: ApiCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiDeleteOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: ApiCreateOrUpdateOptionalParams) => PollerLike, ApiContract>; + delete: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiDeleteOptionalParams) => PollerLike, void>; + get: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: ApiListByServiceOptionalParams) => PagedAsyncIterableIterator; + listByTags: (resourceGroupName: string, serviceName: string, options?: ApiListByTagsOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, parameters: ApiUpdateContract, options?: ApiUpdateOptionalParams) => Promise; } // @public -export enum KnownPublicNetworkAccess { - Disabled = "Disabled", - Enabled = "Enabled" +export interface ApiOperationUpdateOptionalParams extends OperationOptions { } // @public -export enum KnownResourceSkuCapacityScaleType { - Automatic = "automatic", - Manual = "manual", - None = "none" +export interface ApiPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export enum KnownSamplingType { - Fixed = "fixed" +export interface ApiPolicyDeleteOptionalParams extends OperationOptions { } // @public -export enum KnownSchemaType { - Json = "json", - Xml = "xml" +export interface ApiPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export enum KnownSettingsTypeName { - Public = "public" +export interface ApiPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export enum KnownSeverity { - Error = "Error", - Warning = "Warning" +export interface ApiPolicyListByApiOptionalParams extends OperationOptions { } // @public -export enum KnownSkuType { - Basic = "Basic", - BasicV2 = "BasicV2", - Consumption = "Consumption", - Developer = "Developer", - Isolated = "Isolated", - Premium = "Premium", - Standard = "Standard", - StandardV2 = "StandardV2" +export interface ApiPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ApiPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, ifMatch: string, options?: ApiPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, options?: ApiPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, policyId: PolicyIdName, options?: ApiPolicyGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiPolicyListByApiOptionalParams) => Promise; } // @public -export enum KnownSoapApiType { - GraphQL = "graphql", - GRPC = "grpc", - OData = "odata", - SoapPassThrough = "soap", - SoapToRest = "http", - WebSocket = "websocket" +export interface ApiProductListByApisOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export enum KnownState { - Closed = "closed", - Open = "open", - Proposed = "proposed", - Removed = "removed", - Resolved = "resolved" +export interface ApiProductOperations { + listByApis: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiProductListByApisOptionalParams) => PagedAsyncIterableIterator; } // @public -export enum KnownTemplateName { - AccountClosedDeveloper = "accountClosedDeveloper", - ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", - ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", - EmailChangeIdentityDefault = "emailChangeIdentityDefault", - InviteUserNotificationMessage = "inviteUserNotificationMessage", - NewCommentNotificationMessage = "newCommentNotificationMessage", - NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", - NewIssueNotificationMessage = "newIssueNotificationMessage", - PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", - PasswordResetIdentityDefault = "passwordResetIdentityDefault", - PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", - QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", - RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", - RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" +export interface ApiReleaseContract extends ProxyResource { + apiId?: string; + readonly createdDateTime?: Date; + notes?: string; + readonly updatedDateTime?: Date; } // @public -export enum KnownTranslateRequiredQueryParametersConduct { - Query = "query", - Template = "template" +export interface ApiReleaseContractProperties { + apiId?: string; + readonly createdDateTime?: Date; + notes?: string; + readonly updatedDateTime?: Date; } // @public -export enum KnownUserState { - Active = "active", - Blocked = "blocked", - Deleted = "deleted", - Pending = "pending" +export interface ApiReleaseCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export enum KnownVerbosity { - Error = "error", - Information = "information", - Verbose = "verbose" +export interface ApiReleaseDeleteOptionalParams extends OperationOptions { } // @public -export enum KnownVersioningScheme { - Header = "Header", - Query = "Query", - Segment = "Segment" +export interface ApiReleaseGetEntityTagOptionalParams extends OperationOptions { } // @public -export enum KnownVirtualNetworkType { - External = "External", - Internal = "Internal", - None = "None" +export interface ApiReleaseGetOptionalParams extends OperationOptions { } // @public -export type LegacyApiState = string; +export interface ApiReleaseListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export type LegacyPortalStatus = string; +export interface ApiReleaseOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, parameters: ApiReleaseContract, options?: ApiReleaseCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, ifMatch: string, options?: ApiReleaseDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, options?: ApiReleaseGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, options?: ApiReleaseGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiReleaseListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, releaseId: string, ifMatch: string, parameters: ApiReleaseContract, options?: ApiReleaseUpdateOptionalParams) => Promise; +} // @public -export interface Logger { - createOrUpdate(resourceGroupName: string, serviceName: string, loggerId: string, parameters: LoggerContract, options?: LoggerCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, loggerId: string, ifMatch: string, options?: LoggerDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, loggerId: string, options?: LoggerGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, loggerId: string, options?: LoggerGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: LoggerListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, loggerId: string, ifMatch: string, parameters: LoggerUpdateContract, options?: LoggerUpdateOptionalParams): Promise; +export interface ApiReleaseUpdateOptionalParams extends OperationOptions { } // @public -export interface LoggerCollection { - count?: number; - nextLink?: string; - value?: LoggerContract[]; +export interface ApiRevisionContract { + readonly apiId?: string; + readonly apiRevision?: string; + readonly createdDateTime?: Date; + readonly description?: string; + readonly isCurrent?: boolean; + readonly isOnline?: boolean; + readonly privateUrl?: string; + readonly updatedDateTime?: Date; } // @public -export interface LoggerContract extends ProxyResource { - credentials?: { - [propertyName: string]: string; - }; - description?: string; - isBuffered?: boolean; - loggerType?: LoggerType; - resourceId?: string; +export interface ApiRevisionListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface LoggerCreateOrUpdateHeaders { - eTag?: string; +export interface ApiRevisionOperations { + listByService: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiRevisionListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface LoggerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiSchemaCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type LoggerCreateOrUpdateResponse = LoggerCreateOrUpdateHeaders & LoggerContract; - -// @public -export interface LoggerDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiSchemaDeleteOptionalParams extends OperationOptions { + force?: boolean; } // @public -export interface LoggerGetEntityTagHeaders { - eTag?: string; +export interface ApiSchemaGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface LoggerGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiSchemaGetOptionalParams extends OperationOptions { } // @public -export type LoggerGetEntityTagResponse = LoggerGetEntityTagHeaders; +export interface ApiSchemaListByApiOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface LoggerGetHeaders { - eTag?: string; +export interface ApiSchemaOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: ApiSchemaCreateOrUpdateOptionalParams) => Promise, SchemaContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: ApiSchemaCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: ApiSchemaCreateOrUpdateOptionalParams) => PollerLike, SchemaContract>; + delete: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, ifMatch: string, options?: ApiSchemaDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, options?: ApiSchemaGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, schemaId: string, options?: ApiSchemaGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiSchemaListByApiOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface LoggerGetOptionalParams extends coreClient.OperationOptions { +export interface ApiTagDescriptionCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type LoggerGetResponse = LoggerGetHeaders & LoggerContract; +export interface ApiTagDescriptionDeleteOptionalParams extends OperationOptions { +} // @public -export interface LoggerListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiTagDescriptionGetEntityTagOptionalParams extends OperationOptions { } // @public -export type LoggerListByServiceNextResponse = LoggerCollection; +export interface ApiTagDescriptionGetOptionalParams extends OperationOptions { +} // @public -export interface LoggerListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ApiTagDescriptionListByServiceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type LoggerListByServiceResponse = LoggerCollection; +export interface ApiTagDescriptionOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, parameters: TagDescriptionCreateParameters, options?: ApiTagDescriptionCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, ifMatch: string, options?: ApiTagDescriptionDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, options?: ApiTagDescriptionGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, tagDescriptionId: string, options?: ApiTagDescriptionGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiTagDescriptionListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export type LoggerType = string; +export interface ApiTagResourceContractProperties extends ApiEntityBaseContract { + id?: string; + name?: string; + path?: string; + protocols?: Protocol[]; + serviceUrl?: string; +} // @public -export interface LoggerUpdateContract { - credentials?: { - [propertyName: string]: string; - }; - description?: string; - isBuffered?: boolean; - loggerType?: LoggerType; +export interface ApiToolCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface LoggerUpdateHeaders { - eTag?: string; +export interface ApiToolDeleteOptionalParams extends OperationOptions { } // @public -export interface LoggerUpdateOptionalParams extends coreClient.OperationOptions { +export interface ApiToolGetEntityTagOptionalParams extends OperationOptions { } // @public -export type LoggerUpdateResponse = LoggerUpdateHeaders & LoggerContract; +export interface ApiToolGetOptionalParams extends OperationOptions { +} // @public -export type Method = string; +export interface ApiToolListByApiOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface MigrateToStv2Contract { - mode?: MigrateToStv2Mode; +export interface ApiToolOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, toolId: string, parameters: ToolContract, options?: ApiToolCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, toolId: string, options?: ApiToolDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, toolId: string, options?: ApiToolGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, toolId: string, options?: ApiToolGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiToolListByApiOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, toolId: string, parameters: ToolContract, options?: ApiToolUpdateOptionalParams) => Promise; } // @public -export type MigrateToStv2Mode = string; +export interface ApiToolUpdateOptionalParams extends OperationOptions { +} // @public -export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; +export type ApiType = string; // @public -export interface NamedValue { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, namedValueId: string, parameters: NamedValueCreateContract, options?: NamedValueCreateOrUpdateOptionalParams): Promise, NamedValueCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, namedValueId: string, parameters: NamedValueCreateContract, options?: NamedValueCreateOrUpdateOptionalParams): Promise; - beginRefreshSecret(resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueRefreshSecretOptionalParams): Promise, NamedValueRefreshSecretResponse>>; - beginRefreshSecretAndWait(resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueRefreshSecretOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: NamedValueUpdateOptionalParams): Promise, NamedValueUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: NamedValueUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, options?: NamedValueDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: NamedValueListByServiceOptionalParams): PagedAsyncIterableIterator; - listValue(resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueListValueOptionalParams): Promise; +export interface ApiUpdateContract { + apiRevision?: string; + apiRevisionDescription?: string; + apiType?: ApiType; + apiVersion?: string; + apiVersionDescription?: string; + apiVersionSetId?: string; + authenticationSettings?: AuthenticationSettingsContract; + contact?: ApiContactInformation; + description?: string; + displayName?: string; + isCurrent?: boolean; + readonly isOnline?: boolean; + license?: ApiLicenseInformation; + mcpProperties?: McpProperties; + path?: string; + protocols?: Protocol[]; + serviceUrl?: string; + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + subscriptionRequired?: boolean; + termsOfServiceUrl?: string; } // @public -export interface NamedValueCollection { - count?: number; - nextLink?: string; - value?: NamedValueContract[]; +export interface ApiUpdateOptionalParams extends OperationOptions { } // @public -export interface NamedValueContract extends ProxyResource { +export interface ApiVersionConstraint { + minApiVersion?: string; +} + +// @public +export interface ApiVersionSetContract extends ProxyResource { + description?: string; displayName?: string; - keyVault?: KeyVaultContractProperties; - readonly provisioningState?: string; - secret?: boolean; - tags?: string[]; - value?: string; + versionHeaderName?: string; + versioningScheme?: VersioningScheme; + versionQueryName?: string; } // @public -export interface NamedValueContractProperties extends NamedValueEntityBaseParameters { +export interface ApiVersionSetContractDetails { + description?: string; + id?: string; + name?: string; + versionHeaderName?: string; + versioningScheme?: VersioningScheme; + versionQueryName?: string; +} + +// @public +export interface ApiVersionSetContractProperties extends ApiVersionSetEntityBase { displayName: string; - keyVault?: KeyVaultContractProperties; - readonly provisioningState?: string; - value?: string; + versioningScheme: VersioningScheme; } // @public -export interface NamedValueCreateContract extends ProxyResource { - displayName?: string; - keyVault?: KeyVaultContractCreateProperties; - secret?: boolean; - tags?: string[]; - value?: string; +export interface ApiVersionSetCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface NamedValueCreateContractProperties extends NamedValueEntityBaseParameters { - displayName: string; - keyVault?: KeyVaultContractCreateProperties; - value?: string; +export interface ApiVersionSetDeleteOptionalParams extends OperationOptions { } // @public -export interface NamedValueCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface ApiVersionSetEntityBase { + description?: string; + versionHeaderName?: string; + versionQueryName?: string; } // @public -export interface NamedValueCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ApiVersionSetGetEntityTagOptionalParams extends OperationOptions { +} + +// @public +export interface ApiVersionSetGetOptionalParams extends OperationOptions { } // @public -export type NamedValueCreateOrUpdateResponse = NamedValueCreateOrUpdateHeaders & NamedValueContract; +export interface ApiVersionSetListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface NamedValueDeleteOptionalParams extends coreClient.OperationOptions { +export interface ApiVersionSetOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, versionSetId: string, parameters: ApiVersionSetContract, options?: ApiVersionSetCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, versionSetId: string, ifMatch: string, options?: ApiVersionSetDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, versionSetId: string, options?: ApiVersionSetGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, versionSetId: string, options?: ApiVersionSetGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: ApiVersionSetListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, versionSetId: string, ifMatch: string, parameters: ApiVersionSetUpdateParameters, options?: ApiVersionSetUpdateOptionalParams) => Promise; } // @public -export interface NamedValueEntityBaseParameters { - secret?: boolean; - tags?: string[]; +export interface ApiVersionSetUpdateOptionalParams extends OperationOptions { +} + +// @public +export interface ApiVersionSetUpdateParameters { + description?: string; + displayName?: string; + versionHeaderName?: string; + versioningScheme?: VersioningScheme; + versionQueryName?: string; } // @public -export interface NamedValueGetEntityTagHeaders { - eTag?: string; +export interface ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { + displayName?: string; + versioningScheme?: VersioningScheme; } // @public -export interface NamedValueGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ApiWikiCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type NamedValueGetEntityTagResponse = NamedValueGetEntityTagHeaders; - -// @public -export interface NamedValueGetHeaders { - eTag?: string; +export interface ApiWikiDeleteOptionalParams extends OperationOptions { } // @public -export interface NamedValueGetOptionalParams extends coreClient.OperationOptions { +export interface ApiWikiGetEntityTagOptionalParams extends OperationOptions { } // @public -export type NamedValueGetResponse = NamedValueGetHeaders & NamedValueContract; - -// @public -export interface NamedValueListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ApiWikiGetOptionalParams extends OperationOptions { } // @public -export type NamedValueListByServiceNextResponse = NamedValueCollection; +export interface ApiWikiOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, parameters: WikiContract, options?: ApiWikiCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, options?: ApiWikiDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikiGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikiGetEntityTagOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, apiId: string, ifMatch: string, parameters: WikiUpdateContract, options?: ApiWikiUpdateOptionalParams) => Promise; +} // @public -export interface NamedValueListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ApiWikisListOptionalParams extends OperationOptions { filter?: string; - isKeyVaultRefreshFailed?: boolean; skip?: number; top?: number; } // @public -export type NamedValueListByServiceResponse = NamedValueCollection; - -// @public -export interface NamedValueListValueHeaders { - eTag?: string; +export interface ApiWikisOperations { + list: (resourceGroupName: string, serviceName: string, apiId: string, options?: ApiWikisListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface NamedValueListValueOptionalParams extends coreClient.OperationOptions { +export interface ApiWikiUpdateOptionalParams extends OperationOptions { } // @public -export type NamedValueListValueResponse = NamedValueListValueHeaders & NamedValueSecretContract; +export type AppType = string; // @public -export interface NamedValueRefreshSecretHeaders { - eTag?: string; +export interface ArmIdWrapper { + // (undocumented) + readonly id?: string; } // @public -export interface NamedValueRefreshSecretOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AssociationContract extends ProxyResource { + provisioningState?: "created"; } // @public -export type NamedValueRefreshSecretResponse = NamedValueRefreshSecretHeaders & NamedValueContract; - -// @public -export interface NamedValueSecretContract { - value?: string; +export interface AssociationContractProperties { + provisioningState?: "created"; } // @public -export interface NamedValueUpdateHeaders { - eTag?: string; -} +export type AsyncOperationStatus = "Started" | "InProgress" | "Succeeded" | "Failed"; // @public -export interface NamedValueUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface AuthenticationSettingsContract { + oAuth2?: OAuth2AuthenticationSettingsContract; + oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; + openid?: OpenIdAuthenticationSettingsContract; + openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; } // @public -export interface NamedValueUpdateParameterProperties extends NamedValueEntityBaseParameters { - displayName?: string; - keyVault?: KeyVaultContractCreateProperties; - value?: string; +export interface AuthorizationAccessPolicyContract extends ProxyResource { + appIds?: string[]; + objectId?: string; + tenantId?: string; } // @public -export interface NamedValueUpdateParameters { - displayName?: string; - keyVault?: KeyVaultContractCreateProperties; - secret?: boolean; - tags?: string[]; - value?: string; +export interface AuthorizationAccessPolicyContractProperties { + appIds?: string[]; + objectId?: string; + tenantId?: string; } // @public -export type NamedValueUpdateResponse = NamedValueUpdateHeaders & NamedValueContract; - -// @public -export type NatGatewayState = string; - -// @public -export interface NetworkStatus { - listByLocation(resourceGroupName: string, serviceName: string, locationName: string, options?: NetworkStatusListByLocationOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: NetworkStatusListByServiceOptionalParams): Promise; +export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface NetworkStatusContract { - connectivityStatus: ConnectivityStatusContract[]; - dnsServers: string[]; +export interface AuthorizationAccessPolicyDeleteOptionalParams extends OperationOptions { } // @public -export interface NetworkStatusContractByLocation { - location?: string; - networkStatus?: NetworkStatusContract; +export interface AuthorizationAccessPolicyGetOptionalParams extends OperationOptions { } // @public -export interface NetworkStatusListByLocationOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type NetworkStatusListByLocationResponse = NetworkStatusContract; - -// @public -export interface NetworkStatusListByServiceOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationAccessPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, parameters: AuthorizationAccessPolicyContract, options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, ifMatch: string, options?: AuthorizationAccessPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, authorizationAccessPolicyId: string, options?: AuthorizationAccessPolicyGetOptionalParams) => Promise; + listByAuthorization: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams) => PagedAsyncIterableIterator; } // @public -export type NetworkStatusListByServiceResponse = NetworkStatusContractByLocation[]; +export interface AuthorizationConfirmConsentCodeOptionalParams extends OperationOptions { +} // @public -export interface Notification { - createOrUpdate(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: NotificationListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface AuthorizationConfirmConsentCodeRequestContract { + consentCode?: string; } // @public -export interface NotificationCollection { - count?: number; - nextLink?: string; - value?: NotificationContract[]; +export interface AuthorizationContract extends ProxyResource { + authorizationType?: AuthorizationType; + error?: AuthorizationError; + oAuth2GrantType?: OAuth2GrantType; + parameters?: Record; + status?: string; } // @public -export interface NotificationContract extends ProxyResource { - description?: string; - recipients?: RecipientsContractProperties; - title?: string; +export interface AuthorizationContractProperties { + authorizationType?: AuthorizationType; + error?: AuthorizationError; + oAuth2GrantType?: OAuth2GrantType; + parameters?: Record; + status?: string; } // @public -export interface NotificationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type NotificationCreateOrUpdateResponse = NotificationContract; - -// @public -export interface NotificationGetOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationDeleteOptionalParams extends OperationOptions { } // @public -export type NotificationGetResponse = NotificationContract; - -// @public -export interface NotificationListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationError { + code?: string; + message?: string; } // @public -export type NotificationListByServiceNextResponse = NotificationCollection; +export interface AuthorizationGetOptionalParams extends OperationOptions { +} // @public -export interface NotificationListByServiceOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationListByAuthorizationProviderOptionalParams extends OperationOptions { + filter?: string; skip?: number; top?: number; } // @public -export type NotificationListByServiceResponse = NotificationCollection; - -// @public -export type NotificationName = string; - -// @public -export interface NotificationRecipientEmail { - checkEntityExists(resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailDeleteOptionalParams): Promise; - listByNotification(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationRecipientEmailListByNotificationOptionalParams): Promise; +export interface AuthorizationLoginLinksOperations { + post: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationLoginRequestContract, options?: AuthorizationLoginLinksPostOptionalParams) => Promise; } // @public -export interface NotificationRecipientEmailCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationLoginLinksPostOptionalParams extends OperationOptions { } // @public -export type NotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; -}; +export interface AuthorizationLoginRequestContract { + postLoginRedirectUrl?: string; +} // @public -export interface NotificationRecipientEmailCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationLoginResponseContract { + loginLink?: string; } // @public -export type NotificationRecipientEmailCreateOrUpdateResponse = RecipientEmailContract; +export type AuthorizationMethod = "HEAD" | "OPTIONS" | "TRACE" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; // @public -export interface NotificationRecipientEmailDeleteOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationOperations { + confirmConsentCode: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationConfirmConsentCodeRequestContract, options?: AuthorizationConfirmConsentCodeOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, parameters: AuthorizationContract, options?: AuthorizationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, ifMatch: string, options?: AuthorizationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, authorizationId: string, options?: AuthorizationGetOptionalParams) => Promise; + listByAuthorizationProvider: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, options?: AuthorizationListByAuthorizationProviderOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface NotificationRecipientEmailListByNotificationOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationProviderContract extends ProxyResource { + displayName?: string; + identityProvider?: string; + oauth2?: AuthorizationProviderOAuth2Settings; } // @public -export type NotificationRecipientEmailListByNotificationResponse = RecipientEmailCollection; - -// @public -export interface NotificationRecipientUser { - checkEntityExists(resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserDeleteOptionalParams): Promise; - listByNotification(resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationRecipientUserListByNotificationOptionalParams): Promise; +export interface AuthorizationProviderContractProperties { + displayName?: string; + identityProvider?: string; + oauth2?: AuthorizationProviderOAuth2Settings; } // @public -export interface NotificationRecipientUserCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationProviderCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type NotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; -}; +export interface AuthorizationProviderDeleteOptionalParams extends OperationOptions { +} // @public -export interface NotificationRecipientUserCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationProviderFederatedIdentityCredentialsProperties { + readonly audience?: string; + readonly issuer?: string; + readonly subject?: string; } // @public -export type NotificationRecipientUserCreateOrUpdateResponse = RecipientUserContract; +export interface AuthorizationProviderGetOptionalParams extends OperationOptions { +} // @public -export interface NotificationRecipientUserDeleteOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationProviderKeyVaultContract extends AuthorizationProviderKeyVaultCreateProperties { + readonly lastStatus?: KeyVaultLastAccessStatusContractProperties; + readonly updated?: Date; } // @public -export interface NotificationRecipientUserListByNotificationOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationProviderKeyVaultCreateProperties { + secretIdentifier?: string; } // @public -export type NotificationRecipientUserListByNotificationResponse = RecipientUserCollection; +export interface AuthorizationProviderListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface OAuth2AuthenticationSettingsContract { - authorizationServerId?: string; - scope?: string; +export interface AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType { + readonly clientAssertionType?: string; + clientId?: string; + resourceUri?: string; + tenantId?: string; } // @public -export type OAuth2GrantType = string; +export interface AuthorizationProviderOAuth2GrantTypes { + authorizationCode?: Record; + authorizationCodeWithFederatedIdentityCredentials?: AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType; + clientCredentials?: Record; +} // @public -export interface OpenIdAuthenticationSettingsContract { - bearerTokenSendingMethods?: BearerTokenSendingMethods[]; - openidProviderId?: string; +export interface AuthorizationProviderOAuth2Settings { + readonly federatedIdentityCredentialsProperties?: AuthorizationProviderFederatedIdentityCredentialsProperties; + grantTypes?: AuthorizationProviderOAuth2GrantTypes; + keyVault?: AuthorizationProviderKeyVaultContract; + redirectUrl?: string; } // @public -export interface OpenIdConnectProvider { - createOrUpdate(resourceGroupName: string, serviceName: string, opid: string, parameters: OpenidConnectProviderContract, options?: OpenIdConnectProviderCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, opid: string, ifMatch: string, options?: OpenIdConnectProviderDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: OpenIdConnectProviderListByServiceOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderListSecretsOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, opid: string, ifMatch: string, parameters: OpenidConnectProviderUpdateContract, options?: OpenIdConnectProviderUpdateOptionalParams): Promise; +export interface AuthorizationProviderOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, parameters: AuthorizationProviderContract, options?: AuthorizationProviderCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, ifMatch: string, options?: AuthorizationProviderDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, options?: AuthorizationProviderGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: AuthorizationProviderListByServiceOptionalParams) => PagedAsyncIterableIterator; + refreshSecret: (resourceGroupName: string, serviceName: string, authorizationProviderId: string, options?: AuthorizationProviderRefreshSecretOptionalParams) => Promise; } // @public -export interface OpenIdConnectProviderCollection { - count?: number; - nextLink?: string; - value?: OpenidConnectProviderContract[]; +export interface AuthorizationProviderRefreshSecretOptionalParams extends OperationOptions { } // @public -export interface OpenidConnectProviderContract extends ProxyResource { +export interface AuthorizationServerContract extends ProxyResource { + authorizationEndpoint?: string; + authorizationMethods?: AuthorizationMethod[]; + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + clientAuthenticationMethod?: ClientAuthenticationMethod[]; clientId?: string; + clientRegistrationEndpoint?: string; clientSecret?: string; + defaultScope?: string; description?: string; displayName?: string; - metadataEndpoint?: string; + grantTypes?: GrantType[]; + resourceOwnerPassword?: string; + resourceOwnerUsername?: string; + supportState?: boolean; + tokenBodyParameters?: TokenBodyParameterContract[]; + tokenEndpoint?: string; useInApiDocumentation?: boolean; useInTestConsole?: boolean; } // @public -export interface OpenIdConnectProviderCreateOrUpdateHeaders { - eTag?: string; +export interface AuthorizationServerContractBaseProperties { + authorizationMethods?: AuthorizationMethod[]; + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + defaultScope?: string; + description?: string; + resourceOwnerPassword?: string; + resourceOwnerUsername?: string; + supportState?: boolean; + tokenBodyParameters?: TokenBodyParameterContract[]; + tokenEndpoint?: string; +} + +// @public +export interface AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { + authorizationEndpoint: string; + clientId: string; + clientRegistrationEndpoint: string; + clientSecret?: string; + displayName: string; + grantTypes: GrantType[]; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; } // @public -export interface OpenIdConnectProviderCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationServerCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type OpenIdConnectProviderCreateOrUpdateResponse = OpenIdConnectProviderCreateOrUpdateHeaders & OpenidConnectProviderContract; +export interface AuthorizationServerDeleteOptionalParams extends OperationOptions { +} + +// @public +export interface AuthorizationServerGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface OpenIdConnectProviderDeleteOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationServerGetOptionalParams extends OperationOptions { } // @public -export interface OpenIdConnectProviderGetEntityTagHeaders { - eTag?: string; +export interface AuthorizationServerListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface OpenIdConnectProviderGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationServerListSecretsOptionalParams extends OperationOptions { } // @public -export type OpenIdConnectProviderGetEntityTagResponse = OpenIdConnectProviderGetEntityTagHeaders; +export interface AuthorizationServerOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, authsid: string, parameters: AuthorizationServerContract, options?: AuthorizationServerCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, authsid: string, ifMatch: string, options?: AuthorizationServerDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: AuthorizationServerListByServiceOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, authsid: string, options?: AuthorizationServerListSecretsOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, authsid: string, ifMatch: string, parameters: AuthorizationServerUpdateContract, options?: AuthorizationServerUpdateOptionalParams) => Promise; +} // @public -export interface OpenIdConnectProviderGetHeaders { - eTag?: string; +export interface AuthorizationServerSecretsContract { + clientSecret?: string; + resourceOwnerPassword?: string; + resourceOwnerUsername?: string; } // @public -export interface OpenIdConnectProviderGetOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationServerUpdateContract extends ProxyResource { + authorizationEndpoint?: string; + authorizationMethods?: AuthorizationMethod[]; + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + clientId?: string; + clientRegistrationEndpoint?: string; + clientSecret?: string; + defaultScope?: string; + description?: string; + displayName?: string; + grantTypes?: GrantType[]; + resourceOwnerPassword?: string; + resourceOwnerUsername?: string; + supportState?: boolean; + tokenBodyParameters?: TokenBodyParameterContract[]; + tokenEndpoint?: string; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; } // @public -export type OpenIdConnectProviderGetResponse = OpenIdConnectProviderGetHeaders & OpenidConnectProviderContract; +export interface AuthorizationServerUpdateContractProperties extends AuthorizationServerContractBaseProperties { + authorizationEndpoint?: string; + clientId?: string; + clientRegistrationEndpoint?: string; + clientSecret?: string; + displayName?: string; + grantTypes?: GrantType[]; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; +} // @public -export interface OpenIdConnectProviderListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface AuthorizationServerUpdateOptionalParams extends OperationOptions { } // @public -export type OpenIdConnectProviderListByServiceNextResponse = OpenIdConnectProviderCollection; +export type AuthorizationType = string; // @public -export interface OpenIdConnectProviderListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export enum AzureClouds { + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" } // @public -export type OpenIdConnectProviderListByServiceResponse = OpenIdConnectProviderCollection; +export type AzureSupportedClouds = `${AzureClouds}`; // @public -export interface OpenIdConnectProviderListSecretsHeaders { - eTag?: string; +export interface BackendAuthorizationHeaderCredentials { + parameter: string; + scheme: string; } // @public -export interface OpenIdConnectProviderListSecretsOptionalParams extends coreClient.OperationOptions { +export interface BackendBaseParameters { + azureRegion?: string; + circuitBreaker?: BackendCircuitBreaker; + credentials?: BackendCredentialsContract; + description?: string; + pool?: BackendBaseParametersPool; + properties?: BackendProperties; + proxy?: BackendProxyContract; + resourceId?: string; + title?: string; + tls?: BackendTlsProperties; + type?: BackendType; } // @public -export type OpenIdConnectProviderListSecretsResponse = OpenIdConnectProviderListSecretsHeaders & ClientSecretContract; +export interface BackendBaseParametersPool extends BackendPool { +} // @public -export interface OpenidConnectProviderUpdateContract { - clientId?: string; - clientSecret?: string; - description?: string; - displayName?: string; - metadataEndpoint?: string; - useInApiDocumentation?: boolean; - useInTestConsole?: boolean; +export interface BackendCircuitBreaker { + rules?: CircuitBreakerRule[]; } // @public -export interface OpenIdConnectProviderUpdateHeaders { - eTag?: string; +export interface BackendConfiguration { + subnet?: BackendSubnetConfiguration; } // @public -export interface OpenIdConnectProviderUpdateOptionalParams extends coreClient.OperationOptions { +export interface BackendContract extends ProxyResource { + azureRegion?: string; + circuitBreaker?: BackendCircuitBreaker; + credentials?: BackendCredentialsContract; + description?: string; + pool?: BackendBaseParametersPool; + properties?: BackendProperties; + protocol?: BackendProtocol; + proxy?: BackendProxyContract; + resourceId?: string; + title?: string; + tls?: BackendTlsProperties; + typePropertiesType?: BackendType; + url?: string; } // @public -export type OpenIdConnectProviderUpdateResponse = OpenIdConnectProviderUpdateHeaders & OpenidConnectProviderContract; - -// @public -export interface Operation { - display?: OperationDisplay; - name?: string; - origin?: string; - properties?: Record; +export interface BackendContractProperties extends BackendBaseParameters { + protocol?: BackendProtocol; + url?: string; } // @public -export interface OperationCollection { - count?: number; - readonly nextLink?: string; - readonly value?: OperationContract[]; +export interface BackendCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface OperationContract extends ProxyResource { - description?: string; - displayName?: string; - method?: string; - policies?: string; - request?: RequestContract; - responses?: ResponseContract[]; - templateParameters?: ParameterContract[]; - urlTemplate?: string; +export interface BackendCredentialsContract { + authorization?: BackendAuthorizationHeaderCredentials; + certificate?: string[]; + certificateIds?: string[]; + header?: Record; + query?: Record; } // @public -export interface OperationContractProperties extends OperationEntityBaseContract { - displayName: string; - method: string; - urlTemplate: string; +export interface BackendDeleteOptionalParams extends OperationOptions { } // @public -export interface OperationDisplay { - description?: string; - operation?: string; - provider?: string; - resource?: string; +export interface BackendFailureResponse { + statusCode?: number; } // @public -export interface OperationEntityBaseContract { - description?: string; - policies?: string; - request?: RequestContract; - responses?: ResponseContract[]; - templateParameters?: ParameterContract[]; +export interface BackendGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface OperationListByTagsNextOptionalParams extends coreClient.OperationOptions { +export interface BackendGetOptionalParams extends OperationOptions { } // @public -export type OperationListByTagsNextResponse = TagResourceCollection; - -// @public -export interface OperationListByTagsOptionalParams extends coreClient.OperationOptions { +export interface BackendListByServiceOptionalParams extends OperationOptions { filter?: string; - includeNotTaggedOperations?: boolean; skip?: number; top?: number; } // @public -export type OperationListByTagsResponse = TagResourceCollection; +export interface BackendOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, backendId: string, parameters: BackendContract, options?: BackendCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, backendId: string, ifMatch: string, options?: BackendDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, backendId: string, options?: BackendGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, backendId: string, options?: BackendGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: BackendListByServiceOptionalParams) => PagedAsyncIterableIterator; + reconnect: (resourceGroupName: string, serviceName: string, backendId: string, options?: BackendReconnectOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, backendId: string, ifMatch: string, parameters: BackendUpdateParameters, options?: BackendUpdateOptionalParams) => Promise; +} // @public -export interface OperationListResult { - nextLink?: string; - value?: Operation[]; +export interface BackendPool { + failureResponse?: BackendFailureResponse; + services?: BackendPoolItem[]; + sessionAffinity?: BackendSessionAffinity; } // @public -export type OperationNameFormat = string; +export interface BackendPoolItem { + id: string; + preferredCarbonEmission?: CarbonEmissionCategory; + priority?: number; + weight?: number; +} // @public -export interface OperationOperations { - listByTags(resourceGroupName: string, serviceName: string, apiId: string, options?: OperationListByTagsOptionalParams): PagedAsyncIterableIterator; +export interface BackendProperties { + serviceFabricCluster?: BackendServiceFabricClusterProperties; } // @public -export interface OperationResultContract extends ProxyResource { - readonly actionLog?: OperationResultLogItemContract[]; - error?: ErrorResponseBody; - idPropertiesId?: string; - resultInfo?: string; - started?: Date; - status?: AsyncOperationStatus; - updated?: Date; -} +export type BackendProtocol = string; // @public -export interface OperationResultLogItemContract { - action?: string; - objectKey?: string; - objectType?: string; +export interface BackendProxyContract { + password?: string; + url: string; + username?: string; } // @public -export interface OperationsResults { - get(location: string, operationId: string, options?: OperationsResultsGetOptionalParams): Promise; +export interface BackendReconnectContract extends ProxyResource { + after?: string; } // @public -export interface OperationsResultsGetHeaders { - location?: string; +export interface BackendReconnectOptionalParams extends OperationOptions { + parameters?: BackendReconnectContract; } // @public -export interface OperationsResultsGetOptionalParams extends coreClient.OperationOptions { +export interface BackendReconnectProperties { + after?: string; } // @public -export type OperationsResultsGetResponse = OperationsResultsGetHeaders; +export interface BackendServiceFabricClusterProperties { + clientCertificateId?: string; + clientCertificatethumbprint?: string; + managementEndpoints: string[]; + maxPartitionResolutionRetries?: number; + serverCertificateThumbprints?: string[]; + serverX509Names?: X509CertificateName[]; +} // @public -export interface OperationStatus { - get(location: string, operationId: string, options?: OperationStatusGetOptionalParams): Promise; +export interface BackendSessionAffinity { + sessionId?: BackendSessionId; } // @public -export interface OperationStatusGetOptionalParams extends coreClient.OperationOptions { +export interface BackendSessionId { + name?: string; + source?: BackendSessionIdSource; } // @public -export type OperationStatusGetResponse = OperationStatusResult; +export type BackendSessionIdSource = string; // @public -export interface OperationStatusResult { - endTime?: Date; - error?: ErrorDetail; +export interface BackendSubnetConfiguration { id?: string; - name?: string; - operations?: OperationStatusResult[]; - percentComplete?: number; - readonly resourceId?: string; - startTime?: Date; - status: string; } // @public -export interface OperationTagResourceContractProperties { - readonly apiName?: string; - readonly apiRevision?: string; - readonly apiVersion?: string; - readonly description?: string; - id?: string; - readonly method?: string; - readonly name?: string; - readonly urlTemplate?: string; +export interface BackendTlsProperties { + serverCertificateThumbprints?: string[]; + serverX509Names?: X509CertificateName[]; + validateCertificateChain?: boolean; + validateCertificateName?: boolean; } // @public -export interface OperationUpdateContract { - description?: string; - displayName?: string; - method?: string; - policies?: string; - request?: RequestContract; - responses?: ResponseContract[]; - templateParameters?: ParameterContract[]; - urlTemplate?: string; -} +export type BackendType = string; // @public -export interface OperationUpdateContractProperties extends OperationEntityBaseContract { - displayName?: string; - method?: string; - urlTemplate?: string; +export interface BackendUpdateOptionalParams extends OperationOptions { } // @public -export type Origin = string; - -// @public -export interface OutboundEnvironmentEndpoint { - category?: string; - endpoints?: EndpointDependency[]; +export interface BackendUpdateParameterProperties extends BackendBaseParameters { + protocol?: BackendProtocol; + url?: string; } // @public -export interface OutboundEnvironmentEndpointList { - readonly nextLink?: string; - value: OutboundEnvironmentEndpoint[]; +export interface BackendUpdateParameters { + azureRegion?: string; + circuitBreaker?: BackendCircuitBreaker; + credentials?: BackendCredentialsContract; + description?: string; + pool?: BackendBaseParametersPool; + properties?: BackendProperties; + protocol?: BackendProtocol; + proxy?: BackendProxyContract; + resourceId?: string; + title?: string; + tls?: BackendTlsProperties; + type?: BackendType; + url?: string; } // @public -export interface OutboundNetworkDependenciesEndpoints { - listByService(resourceGroupName: string, serviceName: string, options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams): Promise; -} +export type BearerTokenSendingMethod = string; // @public -export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams extends coreClient.OperationOptions { -} +export type BearerTokenSendingMethods = string; // @public -export type OutboundNetworkDependenciesEndpointsListByServiceResponse = OutboundEnvironmentEndpointList; +export interface BodyDiagnosticSettings { + bytes?: number; +} // @public -export interface ParameterContract { - defaultValue?: string; +export interface CacheContract extends ProxyResource { + connectionString?: string; description?: string; - examples?: { - [propertyName: string]: ParameterExampleContract; - }; - name: string; - required?: boolean; - schemaId?: string; - type: string; - typeName?: string; - values?: string[]; + resourceId?: string; + useFromLocation?: string; } // @public -export interface ParameterExampleContract { +export interface CacheContractProperties { + connectionString: string; description?: string; - externalValue?: string; - summary?: string; - value?: any; + resourceId?: string; + useFromLocation: string; } // @public -export interface PerformConnectivityCheckAsyncOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface CacheCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type PerformConnectivityCheckAsyncResponse = ConnectivityCheckResponse; +export interface CacheDeleteOptionalParams extends OperationOptions { +} // @public -export interface PipelineDiagnosticSettings { - request?: HttpMessageDiagnostic; - response?: HttpMessageDiagnostic; +export interface CacheGetEntityTagOptionalParams extends OperationOptions { } // @public -export type PlatformVersion = string; +export interface CacheGetOptionalParams extends OperationOptions { +} // @public -export interface Policy { - createOrUpdate(resourceGroupName: string, serviceName: string, policyId: PolicyIdName, parameters: PolicyContract, options?: PolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, policyId: PolicyIdName, ifMatch: string, options?: PolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, policyId: PolicyIdName, options?: PolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, policyId: PolicyIdName, options?: PolicyGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PolicyListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface CacheListByServiceOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export interface PolicyCollection { - count?: number; - nextLink?: string; - value?: PolicyContract[]; +export interface CacheOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, cacheId: string, parameters: CacheContract, options?: CacheCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, options?: CacheDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, cacheId: string, options?: CacheGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: CacheListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, cacheId: string, ifMatch: string, parameters: CacheUpdateParameters, options?: CacheUpdateOptionalParams) => Promise; } // @public -export type PolicyComplianceState = string; +export interface CacheUpdateOptionalParams extends OperationOptions { +} // @public -export type PolicyContentFormat = string; +export interface CacheUpdateParameters { + connectionString?: string; + description?: string; + resourceId?: string; + useFromLocation?: string; +} // @public -export interface PolicyContract extends ProxyResource { - format?: PolicyContentFormat; - value?: string; +export interface CacheUpdateProperties { + connectionString?: string; + description?: string; + resourceId?: string; + useFromLocation?: string; } // @public -export interface PolicyCreateOrUpdateHeaders { - eTag?: string; -} +export type CarbonEmissionCategory = string; // @public -export interface PolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface CertificateConfiguration { + certificate?: CertificateInformation; + certificatePassword?: string; + encodedCertificate?: string; + storeName: CertificateConfigurationStoreName; } // @public -export type PolicyCreateOrUpdateResponse = PolicyCreateOrUpdateHeaders & PolicyContract; +export type CertificateConfigurationStoreName = string; // @public -export interface PolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface CertificateContract extends ProxyResource { + expirationDate?: Date; + keyVault?: KeyVaultContractProperties; + subject?: string; + thumbprint?: string; } // @public -export interface PolicyDescription { - listByService(resourceGroupName: string, serviceName: string, options?: PolicyDescriptionListByServiceOptionalParams): Promise; +export interface CertificateContractProperties { + expirationDate: Date; + keyVault?: KeyVaultContractProperties; + subject: string; + thumbprint: string; } // @public -export interface PolicyDescriptionCollection { - count?: number; - value?: PolicyDescriptionContract[]; +export interface CertificateCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface PolicyDescriptionContract extends ProxyResource { - readonly description?: string; - readonly scope?: number; +export interface CertificateCreateOrUpdateParameters { + data?: string; + keyVault?: KeyVaultContractCreateProperties; + password?: string; } // @public -export interface PolicyDescriptionListByServiceOptionalParams extends coreClient.OperationOptions { - scope?: PolicyScopeContract; +export interface CertificateCreateOrUpdateProperties { + data?: string; + keyVault?: KeyVaultContractCreateProperties; + password?: string; } // @public -export type PolicyDescriptionListByServiceResponse = PolicyDescriptionCollection; - -// @public -export type PolicyExportFormat = string; +export interface CertificateDeleteOptionalParams extends OperationOptions { +} // @public -export interface PolicyFragment { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, id: string, parameters: PolicyFragmentContract, options?: PolicyFragmentCreateOrUpdateOptionalParams): Promise, PolicyFragmentCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, id: string, parameters: PolicyFragmentContract, options?: PolicyFragmentCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, id: string, ifMatch: string, options?: PolicyFragmentDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PolicyFragmentListByServiceOptionalParams): PagedAsyncIterableIterator; - listReferences(resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentListReferencesOptionalParams): Promise; +export interface CertificateGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface PolicyFragmentCollection { - count?: number; - nextLink?: string; - value?: PolicyFragmentContract[]; +export interface CertificateGetOptionalParams extends OperationOptions { } // @public -export type PolicyFragmentContentFormat = string; +export interface CertificateInformation { + expiry: Date; + subject: string; + thumbprint: string; +} // @public -export interface PolicyFragmentContract extends ProxyResource { - description?: string; - format?: PolicyFragmentContentFormat; - readonly provisioningState?: string; - value?: string; +export interface CertificateListByServiceOptionalParams extends OperationOptions { + filter?: string; + isKeyVaultRefreshFailed?: boolean; + skip?: number; + top?: number; } // @public -export interface PolicyFragmentCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface CertificateOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, certificateId: string, parameters: CertificateCreateOrUpdateParameters, options?: CertificateCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, certificateId: string, ifMatch: string, options?: CertificateDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: CertificateListByServiceOptionalParams) => PagedAsyncIterableIterator; + refreshSecret: (resourceGroupName: string, serviceName: string, certificateId: string, options?: CertificateRefreshSecretOptionalParams) => Promise; } // @public -export interface PolicyFragmentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface CertificateRefreshSecretOptionalParams extends OperationOptions { } // @public -export type PolicyFragmentCreateOrUpdateResponse = PolicyFragmentCreateOrUpdateHeaders & PolicyFragmentContract; +export type CertificateSource = string; // @public -export interface PolicyFragmentDeleteOptionalParams extends coreClient.OperationOptions { -} +export type CertificateStatus = string; // @public -export interface PolicyFragmentGetEntityTagHeaders { - eTag?: string; +export interface CircuitBreakerFailureCondition { + count?: number; + errorReasons?: string[]; + interval?: string; + percentage?: number; + statusCodeRanges?: FailureStatusCodeRange[]; } // @public -export interface PolicyFragmentGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface CircuitBreakerRule { + acceptRetryAfter?: boolean; + failureCondition?: CircuitBreakerFailureCondition; + failureResponse?: BackendFailureResponse; + name?: string; + tripDuration?: string; } // @public -export type PolicyFragmentGetEntityTagResponse = PolicyFragmentGetEntityTagHeaders; +export interface ClientApplicationContract extends ProxyResource { + description?: string; + displayName?: string; + readonly entraApplicationId?: string; + readonly entraTenantId?: string; + ownerId?: string; + readonly state?: ClientApplicationState; +} // @public -export interface PolicyFragmentGetHeaders { - eTag?: string; +export interface ClientApplicationContractProperties { + description?: string; + displayName: string; + readonly entraApplicationId?: string; + readonly entraTenantId?: string; + ownerId: string; + readonly state?: ClientApplicationState; } // @public -export interface PolicyFragmentGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyFragmentContentFormat; +export interface ClientApplicationCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type PolicyFragmentGetResponse = PolicyFragmentGetHeaders & PolicyFragmentContract; +export interface ClientApplicationDeleteOptionalParams extends OperationOptions { +} // @public -export interface PolicyFragmentListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ClientApplicationGetEntityTagOptionalParams extends OperationOptions { } // @public -export type PolicyFragmentListByServiceNextResponse = PolicyFragmentCollection; +export interface ClientApplicationGetOptionalParams extends OperationOptions { +} // @public -export interface PolicyFragmentListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ClientApplicationListByServiceOptionalParams extends OperationOptions { filter?: string; - orderby?: string; skip?: number; top?: number; } // @public -export type PolicyFragmentListByServiceResponse = PolicyFragmentCollection; - -// @public -export interface PolicyFragmentListReferencesOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; +export interface ClientApplicationListSecretsOptionalParams extends OperationOptions { } // @public -export type PolicyFragmentListReferencesResponse = ResourceCollection; - -// @public -export interface PolicyGetEntityTagHeaders { - eTag?: string; +export interface ClientApplicationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, clientApplicationId: string, parameters: ClientApplicationContract, options?: ClientApplicationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, clientApplicationId: string, options?: ClientApplicationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, clientApplicationId: string, options?: ClientApplicationGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, clientApplicationId: string, options?: ClientApplicationGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: ClientApplicationListByServiceOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, clientApplicationId: string, options?: ClientApplicationListSecretsOptionalParams) => Promise; } // @public -export interface PolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ClientApplicationProductLinkContract extends ProxyResource { + productId?: string; } // @public -export type PolicyGetEntityTagResponse = PolicyGetEntityTagHeaders; +export interface ClientApplicationProductLinkContractProperties { + productId: string; +} // @public -export interface PolicyGetHeaders { - eTag?: string; +export interface ClientApplicationProductLinkCreateOptionalParams extends OperationOptions { } // @public -export interface PolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface ClientApplicationProductLinkDeleteOptionalParams extends OperationOptions { } // @public -export type PolicyGetResponse = PolicyGetHeaders & PolicyContract; +export interface ClientApplicationProductLinkGetOptionalParams extends OperationOptions { +} // @public -export type PolicyIdName = string; +export interface ClientApplicationProductLinkListByClientApplicationsOptionalParams extends OperationOptions { + skip?: number; + top?: number; +} // @public -export interface PolicyListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ClientApplicationProductLinkOperations { + create: (resourceGroupName: string, serviceName: string, clientApplicationId: string, clientApplicationProductLinkId: string, parameters: ClientApplicationProductLinkContract, options?: ClientApplicationProductLinkCreateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, clientApplicationId: string, clientApplicationProductLinkId: string, options?: ClientApplicationProductLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, clientApplicationId: string, clientApplicationProductLinkId: string, options?: ClientApplicationProductLinkGetOptionalParams) => Promise; + listByClientApplications: (resourceGroupName: string, serviceName: string, clientApplicationId: string, options?: ClientApplicationProductLinkListByClientApplicationsOptionalParams) => PagedAsyncIterableIterator; } // @public -export type PolicyListByServiceNextResponse = PolicyCollection; +export interface ClientApplicationSecretsContract { + entra?: ClientApplicationSecretsContractEntra; +} // @public -export interface PolicyListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ClientApplicationSecretsContractEntra { + clientSecret?: string; + readonly expiresAt?: Date; } // @public -export type PolicyListByServiceResponse = PolicyCollection; +export type ClientApplicationState = string; // @public -export interface PolicyRestriction { - createOrUpdate(resourceGroupName: string, serviceName: string, policyRestrictionId: string, parameters: PolicyRestrictionContract, options?: PolicyRestrictionCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PolicyRestrictionListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, policyRestrictionId: string, ifMatch: string, parameters: PolicyRestrictionUpdateContract, options?: PolicyRestrictionUpdateOptionalParams): Promise; -} +export type ClientAuthenticationMethod = string; // @public -export interface PolicyRestrictionCollection { - nextLink?: string; - // (undocumented) - value?: PolicyRestrictionContract[]; +export interface ClientSecretContract { + clientSecret?: string; } // @public -export interface PolicyRestrictionContract extends ProxyResource { - requireBase?: PolicyRestrictionRequireBase; - scope?: string; +export interface ConfigurationApi { + legacyApi?: LegacyApiState; } // @public -export interface PolicyRestrictionCreateOrUpdateHeaders { - eTag?: string; -} +export type ConfigurationIdName = string; // @public -export interface PolicyRestrictionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} +export type Confirmation = string; // @public -export type PolicyRestrictionCreateOrUpdateResponse = PolicyRestrictionCreateOrUpdateHeaders & PolicyRestrictionContract; +export type ConnectionStatus = string; // @public -export interface PolicyRestrictionDeleteOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} +export type ConnectivityCheckProtocol = string; // @public -export interface PolicyRestrictionGetEntityTagHeaders { - eTag?: string; +export interface ConnectivityCheckRequest { + destination: ConnectivityCheckRequestDestination; + preferredIPVersion?: PreferredIPVersion; + protocol?: ConnectivityCheckProtocol; + protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; + source: ConnectivityCheckRequestSource; } // @public -export interface PolicyRestrictionGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ConnectivityCheckRequestDestination { + address: string; + port: number; } // @public -export type PolicyRestrictionGetEntityTagResponse = PolicyRestrictionGetEntityTagHeaders; +export interface ConnectivityCheckRequestProtocolConfiguration { + httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; +} // @public -export interface PolicyRestrictionGetHeaders { - eTag?: string; +export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { + headers?: HttpHeader[]; + method?: Method; + validStatusCodes?: number[]; } // @public -export interface PolicyRestrictionGetOptionalParams extends coreClient.OperationOptions { +export interface ConnectivityCheckRequestSource { + instance?: number; + region: string; } // @public -export type PolicyRestrictionGetResponse = PolicyRestrictionGetHeaders & PolicyRestrictionContract; +export interface ConnectivityCheckResponse { + readonly avgLatencyInMs?: number; + readonly connectionStatus?: ConnectionStatus; + readonly hops?: ConnectivityHop[]; + readonly maxLatencyInMs?: number; + readonly minLatencyInMs?: number; + readonly probesFailed?: number; + readonly probesSent?: number; +} // @public -export interface PolicyRestrictionListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ConnectivityHop { + readonly address?: string; + readonly id?: string; + readonly issues?: ConnectivityIssue[]; + readonly nextHopIds?: string[]; + readonly resourceId?: string; + readonly type?: string; } // @public -export type PolicyRestrictionListByServiceNextResponse = PolicyRestrictionCollection; +export interface ConnectivityIssue { + readonly context?: Record[]; + readonly origin?: Origin; + readonly severity?: Severity; + readonly type?: IssueType; +} // @public -export interface PolicyRestrictionListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ConnectivityStatusContract { + error?: string; + isOptional: boolean; + lastStatusChange: Date; + lastUpdated: Date; + name: string; + resourceType: string; + status: ConnectivityStatusType; } // @public -export type PolicyRestrictionListByServiceResponse = PolicyRestrictionCollection; +export type ConnectivityStatusType = string; // @public -export type PolicyRestrictionRequireBase = string; +export type ContentFormat = string; // @public -export interface PolicyRestrictionUpdateContract { - requireBase?: PolicyRestrictionRequireBase; - scope?: string; +export interface ContentItemContract extends ProxyResource { + properties?: Record; } // @public -export interface PolicyRestrictionUpdateHeaders { - eTag?: string; +export interface ContentItemCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface PolicyRestrictionUpdateOptionalParams extends coreClient.OperationOptions { +export interface ContentItemDeleteOptionalParams extends OperationOptions { } // @public -export type PolicyRestrictionUpdateResponse = PolicyRestrictionUpdateHeaders & PolicyRestrictionContract; - -// @public -export interface PolicyRestrictionValidations { - beginByService(resourceGroupName: string, serviceName: string, options?: PolicyRestrictionValidationsByServiceOptionalParams): Promise, PolicyRestrictionValidationsByServiceResponse>>; - beginByServiceAndWait(resourceGroupName: string, serviceName: string, options?: PolicyRestrictionValidationsByServiceOptionalParams): Promise; +export interface ContentItemGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface PolicyRestrictionValidationsByServiceHeaders { - location?: string; +export interface ContentItemGetOptionalParams extends OperationOptions { } // @public -export interface PolicyRestrictionValidationsByServiceOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ContentItemListByServiceOptionalParams extends OperationOptions { } // @public -export type PolicyRestrictionValidationsByServiceResponse = OperationResultContract; +export interface ContentItemOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, parameters: ContentItemContract, options?: ContentItemCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, ifMatch: string, options?: ContentItemDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, options?: ContentItemGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, contentTypeId: string, contentItemId: string, options?: ContentItemGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, contentTypeId: string, options?: ContentItemListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export type PolicyScopeContract = "Tenant" | "Product" | "Api" | "Operation" | "All"; +export interface ContentTypeContract extends ProxyResource { + description?: string; + idPropertiesId?: string; + namePropertiesName?: string; + schema?: any; + version?: string; +} // @public -export interface PolicyWithComplianceCollection { - nextLink?: string; - value?: PolicyWithComplianceContract[]; +export interface ContentTypeContractProperties { + description?: string; + id?: string; + name?: string; + schema?: any; + version?: string; } // @public -export interface PolicyWithComplianceContract extends ProxyResource { - complianceState?: PolicyComplianceState; - referencePolicyId?: string; +export interface ContentTypeCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface PortalConfig { - createOrUpdate(resourceGroupName: string, serviceName: string, portalConfigId: string, ifMatch: string, parameters: PortalConfigContract, options?: PortalConfigCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, portalConfigId: string, options?: PortalConfigGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, portalConfigId: string, options?: PortalConfigGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PortalConfigListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, portalConfigId: string, ifMatch: string, parameters: PortalConfigContract, options?: PortalConfigUpdateOptionalParams): Promise; +export interface ContentTypeDeleteOptionalParams extends OperationOptions { } // @public -export interface PortalConfigCollection { - readonly nextLink?: string; - value?: PortalConfigContract[]; +export interface ContentTypeGetOptionalParams extends OperationOptions { } // @public -export interface PortalConfigContract extends ProxyResource { - cors?: PortalConfigCorsProperties; - csp?: PortalConfigCspProperties; - delegation?: PortalConfigDelegationProperties; - enableBasicAuth?: boolean; - // (undocumented) - signin?: PortalConfigPropertiesSignin; - // (undocumented) - signup?: PortalConfigPropertiesSignup; +export interface ContentTypeListByServiceOptionalParams extends OperationOptions { } // @public -export interface PortalConfigCorsProperties { - allowedOrigins?: string[]; +export interface ContentTypeOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, contentTypeId: string, parameters: ContentTypeContract, options?: ContentTypeCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, contentTypeId: string, ifMatch: string, options?: ContentTypeDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, contentTypeId: string, options?: ContentTypeGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: ContentTypeListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface PortalConfigCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} +export type ContinuablePage = TPage & { + continuationToken?: string; +}; // @public -export type PortalConfigCreateOrUpdateResponse = PortalConfigContract; +export type CreatedByType = string; // @public -export interface PortalConfigCspProperties { - allowedSources?: string[]; - mode?: PortalSettingsCspMode; - reportUri?: string[]; +export interface DataMasking { + headers?: DataMaskingEntity[]; + queryParams?: DataMaskingEntity[]; } -// @public (undocumented) -export interface PortalConfigDelegationProperties { - delegateRegistration?: boolean; - delegateSubscription?: boolean; - delegationUrl?: string; - validationKey?: string; +// @public +export interface DataMaskingEntity { + mode?: DataMaskingMode; + value?: string; } // @public -export interface PortalConfigGetEntityTagHeaders { - eTag?: string; -} +export type DataMaskingMode = string; // @public -export interface PortalConfigGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface DelegationSettingsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type PortalConfigGetEntityTagResponse = PortalConfigGetEntityTagHeaders; +export interface DelegationSettingsGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface PortalConfigGetHeaders { - eTag?: string; +export interface DelegationSettingsGetOptionalParams extends OperationOptions { } // @public -export interface PortalConfigGetOptionalParams extends coreClient.OperationOptions { +export interface DelegationSettingsListSecretsOptionalParams extends OperationOptions { } // @public -export type PortalConfigGetResponse = PortalConfigGetHeaders & PortalConfigContract; +export interface DelegationSettingsOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, parameters: PortalDelegationSettings, options?: DelegationSettingsCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, options?: DelegationSettingsGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, options?: DelegationSettingsGetEntityTagOptionalParams) => Promise; + listSecrets: (resourceGroupName: string, serviceName: string, options?: DelegationSettingsListSecretsOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalDelegationSettings, options?: DelegationSettingsUpdateOptionalParams) => Promise; +} // @public -export interface PortalConfigListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface DelegationSettingsUpdateOptionalParams extends OperationOptions { } // @public -export type PortalConfigListByServiceNextResponse = PortalConfigCollection; +export interface DeletedServiceContract extends ProxyResource { + deletionDate?: Date; + readonly location?: string; + scheduledPurgeDate?: Date; + serviceId?: string; +} // @public -export interface PortalConfigListByServiceOptionalParams extends coreClient.OperationOptions { +export interface DeletedServiceContractProperties { + deletionDate?: Date; + scheduledPurgeDate?: Date; + serviceId?: string; } // @public -export type PortalConfigListByServiceResponse = PortalConfigCollection; - -// @public (undocumented) -export interface PortalConfigPropertiesSignin { - require?: boolean; +export interface DeletedServicesGetByNameOptionalParams extends OperationOptions { } -// @public (undocumented) -export interface PortalConfigPropertiesSignup { - termsOfService?: PortalConfigTermsOfServiceProperties; +// @public +export interface DeletedServicesListBySubscriptionOptionalParams extends OperationOptions { } // @public -export interface PortalConfigTermsOfServiceProperties { - requireConsent?: boolean; - text?: string; +export interface DeletedServicesOperations { + // @deprecated (undocumented) + beginPurge: (location: string, serviceName: string, options?: DeletedServicesPurgeOptionalParams) => Promise, DeletedServiceContract>>; + // @deprecated (undocumented) + beginPurgeAndWait: (location: string, serviceName: string, options?: DeletedServicesPurgeOptionalParams) => Promise; + getByName: (location: string, serviceName: string, options?: DeletedServicesGetByNameOptionalParams) => Promise; + listBySubscription: (options?: DeletedServicesListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + purge: (location: string, serviceName: string, options?: DeletedServicesPurgeOptionalParams) => PollerLike, DeletedServiceContract>; } // @public -export interface PortalConfigUpdateOptionalParams extends coreClient.OperationOptions { +export interface DeletedServicesPurgeOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type PortalConfigUpdateResponse = PortalConfigContract; +export interface DeployConfigurationParameterProperties { + branch: string; + force?: boolean; +} // @public -export interface PortalDelegationSettings extends ProxyResource { - subscriptions?: SubscriptionsDelegationSettingsProperties; - url?: string; - userRegistration?: RegistrationDelegationSettingsProperties; - validationKey?: string; +export interface DeployConfigurationParameters { + branch?: string; + force?: boolean; } // @public -export interface PortalRevision { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, portalRevisionId: string, parameters: PortalRevisionContract, options?: PortalRevisionCreateOrUpdateOptionalParams): Promise, PortalRevisionCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, portalRevisionId: string, parameters: PortalRevisionContract, options?: PortalRevisionCreateOrUpdateOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, portalRevisionId: string, ifMatch: string, parameters: PortalRevisionContract, options?: PortalRevisionUpdateOptionalParams): Promise, PortalRevisionUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, serviceName: string, portalRevisionId: string, ifMatch: string, parameters: PortalRevisionContract, options?: PortalRevisionUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, portalRevisionId: string, options?: PortalRevisionGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, portalRevisionId: string, options?: PortalRevisionGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PortalRevisionListByServiceOptionalParams): PagedAsyncIterableIterator; +export type DeveloperPortalStatus = string; + +// @public +export interface DiagnosticContract extends ProxyResource { + alwaysLog?: AlwaysLog; + backend?: PipelineDiagnosticSettings; + frontend?: PipelineDiagnosticSettings; + httpCorrelationProtocol?: HttpCorrelationProtocol; + largeLanguageModel?: LLMDiagnosticSettings; + logClientIp?: boolean; + loggerId?: string; + metrics?: boolean; + operationNameFormat?: OperationNameFormat; + sampling?: SamplingSettings; + verbosity?: Verbosity; } // @public -export interface PortalRevisionCollection { - readonly nextLink?: string; - readonly value?: PortalRevisionContract[]; +export interface DiagnosticContractProperties { + alwaysLog?: AlwaysLog; + backend?: PipelineDiagnosticSettings; + frontend?: PipelineDiagnosticSettings; + httpCorrelationProtocol?: HttpCorrelationProtocol; + largeLanguageModel?: LLMDiagnosticSettings; + logClientIp?: boolean; + loggerId: string; + metrics?: boolean; + operationNameFormat?: OperationNameFormat; + sampling?: SamplingSettings; + verbosity?: Verbosity; } // @public -export interface PortalRevisionContract extends ProxyResource { - readonly createdDateTime?: Date; - description?: string; - isCurrent?: boolean; - readonly provisioningState?: string; - readonly status?: PortalRevisionStatus; - readonly statusDetails?: string; - readonly updatedDateTime?: Date; +export interface DiagnosticContractUpdateProperties { + alwaysLog?: AlwaysLog; + backend?: PipelineDiagnosticSettings; + frontend?: PipelineDiagnosticSettings; + httpCorrelationProtocol?: HttpCorrelationProtocol; + logClientIp?: boolean; + loggerId?: string; + metrics?: boolean; + operationNameFormat?: OperationNameFormat; + sampling?: SamplingSettings; + verbosity?: Verbosity; } // @public -export interface PortalRevisionCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface DiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface PortalRevisionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface DiagnosticDeleteOptionalParams extends OperationOptions { } // @public -export type PortalRevisionCreateOrUpdateResponse = PortalRevisionCreateOrUpdateHeaders & PortalRevisionContract; - -// @public -export interface PortalRevisionGetEntityTagHeaders { - eTag?: string; +export interface DiagnosticGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface PortalRevisionGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface DiagnosticGetOptionalParams extends OperationOptions { } // @public -export type PortalRevisionGetEntityTagResponse = PortalRevisionGetEntityTagHeaders; - -// @public -export interface PortalRevisionGetHeaders { - eTag?: string; +export interface DiagnosticListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface PortalRevisionGetOptionalParams extends coreClient.OperationOptions { +export interface DiagnosticOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, diagnosticId: string, parameters: DiagnosticContract, options?: DiagnosticCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, diagnosticId: string, ifMatch: string, options?: DiagnosticDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, diagnosticId: string, options?: DiagnosticGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, diagnosticId: string, options?: DiagnosticGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: DiagnosticListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticContract, options?: DiagnosticUpdateOptionalParams) => Promise; } // @public -export type PortalRevisionGetResponse = PortalRevisionGetHeaders & PortalRevisionContract; +export interface DiagnosticUpdateContract extends ProxyResource { + alwaysLog?: AlwaysLog; + backend?: PipelineDiagnosticSettings; + frontend?: PipelineDiagnosticSettings; + httpCorrelationProtocol?: HttpCorrelationProtocol; + logClientIp?: boolean; + loggerId?: string; + metrics?: boolean; + operationNameFormat?: OperationNameFormat; + sampling?: SamplingSettings; + verbosity?: Verbosity; +} // @public -export interface PortalRevisionListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface DiagnosticUpdateOptionalParams extends OperationOptions { } // @public -export type PortalRevisionListByServiceNextResponse = PortalRevisionCollection; +export interface DocumentationContract extends ProxyResource { + content?: string; + title?: string; +} // @public -export interface PortalRevisionListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface DocumentationContractProperties { + content?: string; + title?: string; } // @public -export type PortalRevisionListByServiceResponse = PortalRevisionCollection; +export interface DocumentationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export type PortalRevisionStatus = string; +export interface DocumentationDeleteOptionalParams extends OperationOptions { +} // @public -export interface PortalRevisionUpdateHeaders { - eTag?: string; +export interface DocumentationGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface PortalRevisionUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface DocumentationGetOptionalParams extends OperationOptions { } // @public -export type PortalRevisionUpdateResponse = PortalRevisionUpdateHeaders & PortalRevisionContract; +export interface DocumentationListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface PortalSettings { - listByService(resourceGroupName: string, serviceName: string, options?: PortalSettingsListByServiceOptionalParams): Promise; +export interface DocumentationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, documentationId: string, parameters: DocumentationContract, options?: DocumentationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, documentationId: string, ifMatch: string, options?: DocumentationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, documentationId: string, options?: DocumentationGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, documentationId: string, options?: DocumentationGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: DocumentationListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, documentationId: string, ifMatch: string, parameters: DocumentationUpdateContract, options?: DocumentationUpdateOptionalParams) => Promise; } // @public -export interface PortalSettingsCollection { - count?: number; - value?: PortalSettingsContract[]; +export interface DocumentationUpdateContract { + content?: string; + title?: string; } // @public -export interface PortalSettingsContract extends ProxyResource { - enabled?: boolean; - subscriptions?: SubscriptionsDelegationSettingsProperties; - termsOfService?: TermsOfServiceProperties; - url?: string; - userRegistration?: RegistrationDelegationSettingsProperties; - validationKey?: string; +export interface DocumentationUpdateOptionalParams extends OperationOptions { } // @public -export type PortalSettingsCspMode = string; +export interface EmailTemplateContract extends ProxyResource { + body?: string; + description?: string; + readonly isDefault?: boolean; + parameters?: EmailTemplateParametersContractProperties[]; + subject?: string; + title?: string; +} // @public -export interface PortalSettingsListByServiceOptionalParams extends coreClient.OperationOptions { +export interface EmailTemplateContractProperties { + body: string; + description?: string; + readonly isDefault?: boolean; + parameters?: EmailTemplateParametersContractProperties[]; + subject: string; + title?: string; } // @public -export type PortalSettingsListByServiceResponse = PortalSettingsCollection; +export interface EmailTemplateCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface PortalSettingValidationKeyContract { - validationKey?: string; +export interface EmailTemplateDeleteOptionalParams extends OperationOptions { } // @public -export interface PortalSigninSettings extends ProxyResource { - enabled?: boolean; +export interface EmailTemplateGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface PortalSignupSettings extends ProxyResource { - enabled?: boolean; - termsOfService?: TermsOfServiceProperties; +export interface EmailTemplateGetOptionalParams extends OperationOptions { } // @public -export type PreferredIPVersion = string; +export interface EmailTemplateListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface PrivateEndpoint { - readonly id?: string; +export interface EmailTemplateOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, templateName: TemplateName, parameters: EmailTemplateUpdateParameters, options?: EmailTemplateCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, templateName: TemplateName, ifMatch: string, options?: EmailTemplateDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, templateName: TemplateName, options?: EmailTemplateGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, templateName: TemplateName, options?: EmailTemplateGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: EmailTemplateListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, templateName: TemplateName, ifMatch: string, parameters: EmailTemplateUpdateParameters, options?: EmailTemplateUpdateOptionalParams) => Promise; } // @public -export interface PrivateEndpointConnection extends Resource { - privateEndpoint?: PrivateEndpoint; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +export interface EmailTemplateParametersContractProperties { + description?: string; + name?: string; + title?: string; } // @public -export interface PrivateEndpointConnectionCreateOrUpdateHeaders { - location?: string; +export interface EmailTemplateUpdateOptionalParams extends OperationOptions { } // @public -export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface EmailTemplateUpdateParameterProperties { + body?: string; + description?: string; + parameters?: EmailTemplateParametersContractProperties[]; + subject?: string; + title?: string; } // @public -export type PrivateEndpointConnectionCreateOrUpdateResponse = PrivateEndpointConnection; +export interface EmailTemplateUpdateParameters { + body?: string; + description?: string; + parameters?: EmailTemplateParametersContractProperties[]; + subject?: string; + title?: string; +} // @public -export interface PrivateEndpointConnectionDeleteHeaders { - location?: string; +export interface EndpointDependency { + domainName?: string; + endpointDetails?: EndpointDetail[]; } // @public -export interface PrivateEndpointConnectionDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface EndpointDetail { + port?: number; + region?: string; } // @public -export interface PrivateEndpointConnectionGetByNameOptionalParams extends coreClient.OperationOptions { +export interface ErrorAdditionalInfo { + readonly info?: any; + readonly type?: string; } // @public -export type PrivateEndpointConnectionGetByNameResponse = PrivateEndpointConnection; +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} // @public -export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams extends coreClient.OperationOptions { +export interface ErrorFieldContract { + code?: string; + message?: string; + target?: string; } // @public -export type PrivateEndpointConnectionGetPrivateLinkResourceResponse = PrivateLinkResource; +export interface ErrorResponse { + error?: ErrorDetail; +} // @public -export interface PrivateEndpointConnectionListByServiceOptionalParams extends coreClient.OperationOptions { +export interface ErrorResponseBody { + code?: string; + details?: ErrorFieldContract[]; + message?: string; } // @public -export type PrivateEndpointConnectionListByServiceResponse = PrivateEndpointConnectionListResult; +export type ExportApi = string; // @public -export interface PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams extends coreClient.OperationOptions { -} +export type ExportFormat = string; // @public -export type PrivateEndpointConnectionListPrivateLinkResourcesResponse = PrivateLinkResourceListResult; +export type ExportResultFormat = string; // @public -export interface PrivateEndpointConnectionListResult { - value?: PrivateEndpointConnection[]; +export interface FailureStatusCodeRange { + max?: number; + min?: number; } // @public -export interface PrivateEndpointConnectionOperations { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise; - getByName(resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionGetByNameOptionalParams): Promise; - getPrivateLinkResource(resourceGroupName: string, serviceName: string, privateLinkSubResourceName: string, options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: PrivateEndpointConnectionListByServiceOptionalParams): PagedAsyncIterableIterator; - listPrivateLinkResources(resourceGroupName: string, serviceName: string, options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams): Promise; +export interface FrontendConfiguration { + readonly defaultHostname?: string; } // @public -export type PrivateEndpointConnectionProvisioningState = string; +export interface GatewayApiCreateOrUpdateOptionalParams extends OperationOptions { + // (undocumented) + parameters?: AssociationContract; +} // @public -export interface PrivateEndpointConnectionRequest { - id?: string; - properties?: PrivateEndpointConnectionRequestProperties; +export interface GatewayApiDeleteOptionalParams extends OperationOptions { } // @public -export interface PrivateEndpointConnectionRequestProperties { - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +export interface GatewayApiGetEntityTagOptionalParams extends OperationOptions { } // @public -export type PrivateEndpointServiceConnectionStatus = string; +export interface GatewayApiListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface PrivateLinkResource extends Resource { - readonly groupId?: string; - readonly requiredMembers?: string[]; - requiredZoneNames?: string[]; +export interface GatewayApiOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiDeleteOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, gatewayId: string, apiId: string, options?: GatewayApiGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayApiListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface PrivateLinkResourceListResult { - value?: PrivateLinkResource[]; +export interface GatewayCertificateAuthorityContract extends ProxyResource { + isTrusted?: boolean; } // @public -export interface PrivateLinkServiceConnectionState { - actionsRequired?: string; - description?: string; - status?: PrivateEndpointServiceConnectionStatus; +export interface GatewayCertificateAuthorityContractProperties { + isTrusted?: boolean; } // @public -export interface Product { - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, parameters: ProductContract, options?: ProductCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, options?: ProductDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, productId: string, options?: ProductGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, productId: string, options?: ProductGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: ProductListByServiceOptionalParams): PagedAsyncIterableIterator; - listByTags(resourceGroupName: string, serviceName: string, options?: ProductListByTagsOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, parameters: ProductUpdateParameters, options?: ProductUpdateOptionalParams): Promise; +export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface ProductApi { - checkEntityExists(resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiDeleteOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: ProductApiListByProductOptionalParams): PagedAsyncIterableIterator; +export interface GatewayCertificateAuthorityDeleteOptionalParams extends OperationOptions { } // @public -export interface ProductApiCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface GatewayCertificateAuthorityGetEntityTagOptionalParams extends OperationOptions { } // @public -export type ProductApiCheckEntityExistsResponse = { - body: boolean; -}; +export interface GatewayCertificateAuthorityGetOptionalParams extends OperationOptions { +} // @public -export interface ProductApiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface GatewayCertificateAuthorityListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type ProductApiCreateOrUpdateResponse = ApiContract; +export interface GatewayCertificateAuthorityOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, parameters: GatewayCertificateAuthorityContract, options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, ifMatch: string, options?: GatewayCertificateAuthorityDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, options?: GatewayCertificateAuthorityGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, gatewayId: string, certificateId: string, options?: GatewayCertificateAuthorityGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayCertificateAuthorityListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface ProductApiDeleteOptionalParams extends coreClient.OperationOptions { +export interface GatewayConfigConnectionBaseProperties { + readonly defaultHostname?: string; + hostnames?: string[]; + readonly provisioningState?: string; + sourceId?: string; } // @public -export interface ProductApiLink { - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, parameters: ProductApiLinkContract, options?: ProductApiLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, options?: ProductApiLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, options?: ProductApiLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: ProductApiLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface GatewayConfigurationApi { + readonly hostname?: string; } // @public -export interface ProductApiLinkCollection { - count?: number; - nextLink?: string; - value?: ProductApiLinkContract[]; +export interface GatewayContract extends ProxyResource { + description?: string; + identity?: ManagedServiceIdentity; + locationData?: ResourceLocationDataContract; } // @public -export interface ProductApiLinkContract extends ProxyResource { - apiId?: string; +export interface GatewayContractProperties { + description?: string; + locationData?: ResourceLocationDataContract; } // @public -export interface ProductApiLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface GatewayCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type ProductApiLinkCreateOrUpdateResponse = ProductApiLinkContract; +export interface GatewayDebugCredentialsContract { + token?: string; +} // @public -export interface ProductApiLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface GatewayDeleteOptionalParams extends OperationOptions { } // @public -export interface ProductApiLinkGetHeaders { - eTag?: string; +export interface GatewayGenerateTokenOptionalParams extends OperationOptions { } // @public -export interface ProductApiLinkGetOptionalParams extends coreClient.OperationOptions { +export interface GatewayGetEntityTagOptionalParams extends OperationOptions { } // @public -export type ProductApiLinkGetResponse = ProductApiLinkGetHeaders & ProductApiLinkContract; +export interface GatewayGetOptionalParams extends OperationOptions { +} // @public -export interface ProductApiLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface GatewayHostnameBindingBaseProperties { + readonly certificate?: GatewayHostnameBindingCertificate; + hostname: string; + keyVault: GatewayHostnameBindingKeyVault; + readonly provisioningState?: string; } // @public -export type ProductApiLinkListByProductNextResponse = ProductApiLinkCollection; +export interface GatewayHostnameBindingCertificate { + readonly expiry?: Date; + readonly subject?: string; + readonly thumbprint?: string; +} // @public -export interface ProductApiLinkListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface GatewayHostnameBindingKeyVault { + identityClientId?: string; + lastStatus?: GatewayHostnameBindingKeyVaultLastStatus; + secretId: string; } // @public -export type ProductApiLinkListByProductResponse = ProductApiLinkCollection; +export interface GatewayHostnameBindingKeyVaultLastStatus { + readonly code?: KeyVaultFetchCode; + readonly lastSuccessTimeStampUtc?: Date; + readonly timeStampUtc?: Date; +} // @public -export interface ProductApiListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface GatewayHostnameBindingResource extends ProxyResource { + readonly certificate?: GatewayHostnameBindingCertificate; + readonly eTag?: string; + hostname: string; + keyVault: GatewayHostnameBindingKeyVault; + readonly provisioningState?: string; } // @public -export type ProductApiListByProductNextResponse = ApiCollection; +export interface GatewayHostnameConfigurationContract extends ProxyResource { + certificateId?: string; + hostname?: string; + http2Enabled?: boolean; + negotiateClientCertificate?: boolean; + tls10Enabled?: boolean; + tls11Enabled?: boolean; +} // @public -export interface ProductApiListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface GatewayHostnameConfigurationContractProperties { + certificateId?: string; + hostname?: string; + http2Enabled?: boolean; + negotiateClientCertificate?: boolean; + tls10Enabled?: boolean; + tls11Enabled?: boolean; } // @public -export type ProductApiListByProductResponse = ApiCollection; +export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface ProductCollection { - count?: number; - nextLink?: string; - value?: ProductContract[]; +export interface GatewayHostnameConfigurationDeleteOptionalParams extends OperationOptions { } // @public -export interface ProductContract extends ProxyResource { - approvalRequired?: boolean; - description?: string; - displayName?: string; - state?: ProductState; - subscriptionRequired?: boolean; - subscriptionsLimit?: number; - terms?: string; +export interface GatewayHostnameConfigurationGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface ProductContractProperties extends ProductEntityBaseParameters { - displayName: string; +export interface GatewayHostnameConfigurationGetOptionalParams extends OperationOptions { } // @public -export interface ProductCreateOrUpdateHeaders { - eTag?: string; +export interface GatewayHostnameConfigurationListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface ProductCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface GatewayHostnameConfigurationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, parameters: GatewayHostnameConfigurationContract, options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, ifMatch: string, options?: GatewayHostnameConfigurationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, options?: GatewayHostnameConfigurationGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, gatewayId: string, hcId: string, options?: GatewayHostnameConfigurationGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayHostnameConfigurationListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export type ProductCreateOrUpdateResponse = ProductCreateOrUpdateHeaders & ProductContract; +export interface GatewayInvalidateDebugCredentialsOptionalParams extends OperationOptions { +} // @public -export interface ProductDeleteOptionalParams extends coreClient.OperationOptions { - deleteSubscriptions?: boolean; +export interface GatewayKeyRegenerationRequestContract { + keyType: KeyType; } // @public -export interface ProductEntityBaseParameters { - approvalRequired?: boolean; - description?: string; - state?: ProductState; - subscriptionRequired?: boolean; - subscriptionsLimit?: number; - terms?: string; +export interface GatewayKeysContract { + primary?: string; + secondary?: string; } // @public -export interface ProductGetEntityTagHeaders { - eTag?: string; +export interface GatewayListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface ProductGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface GatewayListDebugCredentialsContract { + apiId: string; + credentialsExpireAfter?: string; + purposes: GatewayListDebugCredentialsContractPurpose[]; } // @public -export type ProductGetEntityTagResponse = ProductGetEntityTagHeaders; +export type GatewayListDebugCredentialsContractPurpose = string; // @public -export interface ProductGetHeaders { - eTag?: string; +export interface GatewayListDebugCredentialsOptionalParams extends OperationOptions { } // @public -export interface ProductGetOptionalParams extends coreClient.OperationOptions { +export interface GatewayListKeysOptionalParams extends OperationOptions { } // @public -export type ProductGetResponse = ProductGetHeaders & ProductContract; +export interface GatewayListTraceContract { + traceId?: string; +} // @public -export interface ProductGroup { - checkEntityExists(resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupDeleteOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: ProductGroupListByProductOptionalParams): PagedAsyncIterableIterator; +export interface GatewayListTraceOptionalParams extends OperationOptions { } // @public -export interface ProductGroupCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface GatewayOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayContract, options?: GatewayCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, gatewayId: string, ifMatch: string, options?: GatewayDeleteOptionalParams) => Promise; + generateToken: (resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayTokenRequestContract, options?: GatewayGenerateTokenOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayGetEntityTagOptionalParams) => Promise; + invalidateDebugCredentials: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayInvalidateDebugCredentialsOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: GatewayListByServiceOptionalParams) => PagedAsyncIterableIterator; + listDebugCredentials: (resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayListDebugCredentialsContract, options?: GatewayListDebugCredentialsOptionalParams) => Promise; + listKeys: (resourceGroupName: string, serviceName: string, gatewayId: string, options?: GatewayListKeysOptionalParams) => Promise; + listTrace: (resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayListTraceContract, options?: GatewayListTraceOptionalParams) => Promise>; + regenerateKey: (resourceGroupName: string, serviceName: string, gatewayId: string, parameters: GatewayKeyRegenerationRequestContract, options?: GatewayRegenerateKeyOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, gatewayId: string, ifMatch: string, parameters: GatewayContract, options?: GatewayUpdateOptionalParams) => Promise; } // @public -export type ProductGroupCheckEntityExistsResponse = { - body: boolean; -}; +export interface GatewayRegenerateKeyOptionalParams extends OperationOptions { +} // @public -export interface ProductGroupCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface GatewayResourceSkuResult { + readonly capacity?: GatewaySkuCapacity; + readonly resourceType?: string; + readonly sku?: GatewaySku; } // @public -export type ProductGroupCreateOrUpdateResponse = GroupContract; +export interface GatewaySku { + name?: ApiGatewaySkuType; +} // @public -export interface ProductGroupDeleteOptionalParams extends coreClient.OperationOptions { +export interface GatewaySkuCapacity { + readonly default?: number; + readonly maximum?: number; + readonly minimum?: number; + readonly scaleType?: GatewaySkuCapacityScaleType; } // @public -export interface ProductGroupLink { - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, parameters: ProductGroupLinkContract, options?: ProductGroupLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, options?: ProductGroupLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, options?: ProductGroupLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: ProductGroupLinkListByProductOptionalParams): PagedAsyncIterableIterator; -} +export type GatewaySkuCapacityScaleType = string; // @public -export interface ProductGroupLinkCollection { - count?: number; - nextLink?: string; - value?: ProductGroupLinkContract[]; +export interface GatewayTokenContract { + value?: string; } // @public -export interface ProductGroupLinkContract extends ProxyResource { - groupId?: string; +export interface GatewayTokenRequestContract { + expiry: Date; + keyType: KeyType; } // @public -export interface ProductGroupLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface GatewayUpdateOptionalParams extends OperationOptions { } // @public -export type ProductGroupLinkCreateOrUpdateResponse = ProductGroupLinkContract; +export interface GenerateSsoUrlResult { + value?: string; +} // @public -export interface ProductGroupLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface GlobalSchemaContract extends ProxyResource { + description?: string; + document?: any; + readonly provisioningState?: string; + schemaType?: SchemaType; + value?: any; } // @public -export interface ProductGroupLinkGetHeaders { - eTag?: string; +export interface GlobalSchemaContractProperties { + description?: string; + document?: any; + readonly provisioningState?: string; + schemaType: SchemaType; + value?: any; } // @public -export interface ProductGroupLinkGetOptionalParams extends coreClient.OperationOptions { +export interface GlobalSchemaCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type ProductGroupLinkGetResponse = ProductGroupLinkGetHeaders & ProductGroupLinkContract; +export interface GlobalSchemaDeleteOptionalParams extends OperationOptions { +} // @public -export interface ProductGroupLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface GlobalSchemaGetEntityTagOptionalParams extends OperationOptions { } // @public -export type ProductGroupLinkListByProductNextResponse = ProductGroupLinkCollection; +export interface GlobalSchemaGetOptionalParams extends OperationOptions { +} // @public -export interface ProductGroupLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface GlobalSchemaListByServiceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type ProductGroupLinkListByProductResponse = ProductGroupLinkCollection; - -// @public -export interface ProductGroupListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface GlobalSchemaOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams) => Promise, GlobalSchemaContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, schemaId: string, parameters: GlobalSchemaContract, options?: GlobalSchemaCreateOrUpdateOptionalParams) => PollerLike, GlobalSchemaContract>; + delete: (resourceGroupName: string, serviceName: string, schemaId: string, ifMatch: string, options?: GlobalSchemaDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, schemaId: string, options?: GlobalSchemaGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: GlobalSchemaListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export type ProductGroupListByProductNextResponse = GroupCollection; +export type GrantType = string; // @public -export interface ProductGroupListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface GraphQLApiResolverCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type ProductGroupListByProductResponse = GroupCollection; +export interface GraphQLApiResolverDeleteOptionalParams extends OperationOptions { +} // @public -export interface ProductListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface GraphQLApiResolverGetEntityTagOptionalParams extends OperationOptions { } // @public -export type ProductListByServiceNextResponse = ProductCollection; +export interface GraphQLApiResolverGetOptionalParams extends OperationOptions { +} // @public -export interface ProductListByServiceOptionalParams extends coreClient.OperationOptions { - expandGroups?: boolean; +export interface GraphQLApiResolverListByApiOptionalParams extends OperationOptions { filter?: string; skip?: number; - tags?: string; top?: number; } // @public -export type ProductListByServiceResponse = ProductCollection; +export interface GraphQLApiResolverOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, parameters: ResolverContract, options?: GraphQLApiResolverCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, ifMatch: string, options?: GraphQLApiResolverDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: GraphQLApiResolverListByApiOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, ifMatch: string, parameters: ResolverUpdateContract, options?: GraphQLApiResolverUpdateOptionalParams) => Promise; +} + +// @public +export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface ProductListByTagsNextOptionalParams extends coreClient.OperationOptions { +export interface GraphQLApiResolverPolicyDeleteOptionalParams extends OperationOptions { } // @public -export type ProductListByTagsNextResponse = TagResourceCollection; +export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface ProductListByTagsOptionalParams extends coreClient.OperationOptions { - filter?: string; - includeNotTaggedProducts?: boolean; - skip?: number; - top?: number; +export interface GraphQLApiResolverPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export type ProductListByTagsResponse = TagResourceCollection; +export interface GraphQLApiResolverPolicyListByResolverOptionalParams extends OperationOptions { +} // @public -export interface ProductPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ProductPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, ifMatch: string, options?: ProductPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, options?: ProductPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, options?: ProductPolicyGetEntityTagOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: ProductPolicyListByProductOptionalParams): PagedAsyncIterableIterator; +export interface GraphQLApiResolverPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, ifMatch: string, options?: GraphQLApiResolverPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, options?: GraphQLApiResolverPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, policyId: PolicyIdName, options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams) => Promise; + listByResolver: (resourceGroupName: string, serviceName: string, apiId: string, resolverId: string, options?: GraphQLApiResolverPolicyListByResolverOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ProductPolicyCreateOrUpdateHeaders { - eTag?: string; +export interface GraphQLApiResolverUpdateOptionalParams extends OperationOptions { } // @public -export interface ProductPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface GroupContract extends ProxyResource { + readonly builtIn?: boolean; + description?: string; + displayName?: string; + externalId?: string; + typePropertiesType?: GroupType; } // @public -export type ProductPolicyCreateOrUpdateResponse = ProductPolicyCreateOrUpdateHeaders & PolicyContract; +export interface GroupContractProperties { + readonly builtIn?: boolean; + description?: string; + displayName: string; + externalId?: string; + type?: GroupType; +} // @public -export interface ProductPolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface GroupCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface ProductPolicyGetEntityTagHeaders { - eTag?: string; +export interface GroupCreateParameters { + description?: string; + displayName?: string; + externalId?: string; + type?: GroupType; } // @public -export interface ProductPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface GroupCreateParametersProperties { + description?: string; + displayName: string; + externalId?: string; + type?: GroupType; } // @public -export type ProductPolicyGetEntityTagResponse = ProductPolicyGetEntityTagHeaders; +export interface GroupDeleteOptionalParams extends OperationOptions { +} // @public -export interface ProductPolicyGetHeaders { - eTag?: string; +export interface GroupGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface ProductPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface GroupGetOptionalParams extends OperationOptions { } // @public -export type ProductPolicyGetResponse = ProductPolicyGetHeaders & PolicyContract; +export interface GroupListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface ProductPolicyListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface GroupOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, groupId: string, parameters: GroupCreateParameters, options?: GroupCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, groupId: string, ifMatch: string, options?: GroupDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, groupId: string, options?: GroupGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, groupId: string, options?: GroupGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: GroupListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, groupId: string, ifMatch: string, parameters: GroupUpdateParameters, options?: GroupUpdateOptionalParams) => Promise; } // @public -export type ProductPolicyListByProductNextResponse = PolicyCollection; +export type GroupType = "custom" | "system" | "external"; // @public -export interface ProductPolicyListByProductOptionalParams extends coreClient.OperationOptions { +export interface GroupUpdateOptionalParams extends OperationOptions { } // @public -export type ProductPolicyListByProductResponse = PolicyCollection; +export interface GroupUpdateParameters { + description?: string; + displayName?: string; + externalId?: string; + type?: GroupType; +} // @public -export type ProductState = "notPublished" | "published"; +export interface GroupUpdateParametersProperties { + description?: string; + displayName?: string; + externalId?: string; + type?: GroupType; +} // @public -export interface ProductSubscriptions { - list(resourceGroupName: string, serviceName: string, productId: string, options?: ProductSubscriptionsListOptionalParams): PagedAsyncIterableIterator; +export interface GroupUserCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export interface ProductSubscriptionsListNextOptionalParams extends coreClient.OperationOptions { +export interface GroupUserCreateOptionalParams extends OperationOptions { } // @public -export type ProductSubscriptionsListNextResponse = SubscriptionCollection; +export interface GroupUserDeleteOptionalParams extends OperationOptions { +} // @public -export interface ProductSubscriptionsListOptionalParams extends coreClient.OperationOptions { +export interface GroupUserListOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type ProductSubscriptionsListResponse = SubscriptionCollection; - -// @public -export interface ProductTagResourceContractProperties extends ProductEntityBaseParameters { - id?: string; - name: string; +export interface GroupUserOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserCheckEntityExistsOptionalParams) => Promise; + create: (resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserCreateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, groupId: string, userId: string, options?: GroupUserDeleteOptionalParams) => Promise; + list: (resourceGroupName: string, serviceName: string, groupId: string, options?: GroupUserListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface ProductUpdateHeaders { - eTag?: string; +export interface HostnameConfiguration { + certificate?: CertificateInformation; + certificatePassword?: string; + certificateSource?: CertificateSource; + certificateStatus?: CertificateStatus; + defaultSslBinding?: boolean; + encodedCertificate?: string; + hostName: string; + identityClientId?: string; + keyVaultId?: string; + negotiateClientCertificate?: boolean; + type: HostnameType; } // @public -export interface ProductUpdateOptionalParams extends coreClient.OperationOptions { -} +export type HostnameType = string; // @public -export interface ProductUpdateParameters { - approvalRequired?: boolean; - description?: string; - displayName?: string; - state?: ProductState; - subscriptionRequired?: boolean; - subscriptionsLimit?: number; - terms?: string; -} +export type HttpCorrelationProtocol = string; // @public -export interface ProductUpdateProperties extends ProductEntityBaseParameters { - displayName?: string; +export interface HttpHeader { + name: string; + value: string; } // @public -export type ProductUpdateResponse = ProductUpdateHeaders & ProductContract; - -// @public -export interface ProductWiki { - createOrUpdate(resourceGroupName: string, serviceName: string, productId: string, parameters: WikiContract, options?: ProductWikiCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, options?: ProductWikiDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikiGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikiGetEntityTagOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, parameters: WikiUpdateContract, options?: ProductWikiUpdateOptionalParams): Promise; +export interface HttpMessageDiagnostic { + body?: BodyDiagnosticSettings; + dataMasking?: DataMasking; + headers?: string[]; } // @public -export interface ProductWikiCreateOrUpdateHeaders { - eTag?: string; +export interface IdentityProviderBaseParameters { + allowedTenants?: string[]; + authority?: string; + clientLibrary?: string; + passwordResetPolicyName?: string; + profileEditingPolicyName?: string; + signinPolicyName?: string; + signinTenant?: string; + signupPolicyName?: string; + type?: IdentityProviderType; } // @public -export interface ProductWikiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface IdentityProviderContract extends ProxyResource { + allowedTenants?: string[]; + authority?: string; + certificateId?: string; + clientId?: string; + clientLibrary?: string; + clientSecret?: string; + passwordResetPolicyName?: string; + profileEditingPolicyName?: string; + signinPolicyName?: string; + signinTenant?: string; + signupPolicyName?: string; + typePropertiesType?: IdentityProviderType; } // @public -export type ProductWikiCreateOrUpdateResponse = ProductWikiCreateOrUpdateHeaders & WikiContract; +export interface IdentityProviderContractProperties extends IdentityProviderBaseParameters { + certificateId?: string; + clientId: string; + clientSecret?: string; +} // @public -export interface ProductWikiDeleteOptionalParams extends coreClient.OperationOptions { +export interface IdentityProviderCreateContract extends ProxyResource { + allowedTenants?: string[]; + authority?: string; + certificateId?: string; + clientId?: string; + clientLibrary?: string; + clientSecret?: string; + passwordResetPolicyName?: string; + profileEditingPolicyName?: string; + signinPolicyName?: string; + signinTenant?: string; + signupPolicyName?: string; + typePropertiesType?: IdentityProviderType; } // @public -export interface ProductWikiGetEntityTagHeaders { - eTag?: string; +export interface IdentityProviderCreateContractProperties extends IdentityProviderBaseParameters { + certificateId?: string; + clientId: string; + clientSecret: string; } // @public -export interface ProductWikiGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface IdentityProviderCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type ProductWikiGetEntityTagResponse = ProductWikiGetEntityTagHeaders; +export interface IdentityProviderDeleteOptionalParams extends OperationOptions { +} // @public -export interface ProductWikiGetHeaders { - eTag?: string; +export interface IdentityProviderGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface ProductWikiGetOptionalParams extends coreClient.OperationOptions { +export interface IdentityProviderGetOptionalParams extends OperationOptions { } // @public -export type ProductWikiGetResponse = ProductWikiGetHeaders & WikiContract; +export interface IdentityProviderListByServiceOptionalParams extends OperationOptions { +} // @public -export interface ProductWikis { - list(resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikisListOptionalParams): PagedAsyncIterableIterator; +export interface IdentityProviderListSecretsOptionalParams extends OperationOptions { } // @public -export interface ProductWikisListHeaders { - eTag?: string; +export interface IdentityProviderOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, parameters: IdentityProviderCreateContract, options?: IdentityProviderCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, ifMatch: string, options?: IdentityProviderDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: IdentityProviderListByServiceOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, options?: IdentityProviderListSecretsOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, identityProviderName: IdentityProviderType, ifMatch: string, parameters: IdentityProviderUpdateParameters, options?: IdentityProviderUpdateOptionalParams) => Promise; } // @public -export interface ProductWikisListNextHeaders { - eTag?: string; -} +export type IdentityProviderType = string; // @public -export interface ProductWikisListNextOptionalParams extends coreClient.OperationOptions { +export interface IdentityProviderUpdateOptionalParams extends OperationOptions { } // @public -export type ProductWikisListNextResponse = ProductWikisListNextHeaders & WikiCollection; +export interface IdentityProviderUpdateParameters { + allowedTenants?: string[]; + authority?: string; + certificateId?: string; + clientId?: string; + clientLibrary?: string; + clientSecret?: string; + passwordResetPolicyName?: string; + profileEditingPolicyName?: string; + signinPolicyName?: string; + signinTenant?: string; + signupPolicyName?: string; + type?: IdentityProviderType; +} // @public -export interface ProductWikisListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { + certificateId?: string; + clientId?: string; + clientSecret?: string; } -// @public -export type ProductWikisListResponse = ProductWikisListHeaders & WikiCollection; +export { isRestError } // @public -export interface ProductWikiUpdateHeaders { - eTag?: string; +export interface IssueAttachmentContract extends ProxyResource { + content?: string; + contentFormat?: string; + title?: string; } // @public -export interface ProductWikiUpdateOptionalParams extends coreClient.OperationOptions { +export interface IssueAttachmentContractProperties { + content: string; + contentFormat: string; + title: string; } // @public -export type ProductWikiUpdateResponse = ProductWikiUpdateHeaders & WikiContract; +export interface IssueCommentContract extends ProxyResource { + createdDate?: Date; + text?: string; + userId?: string; +} // @public -export type Protocol = string; +export interface IssueCommentContractProperties { + createdDate?: Date; + text: string; + userId: string; +} // @public -export interface ProxyResource extends Resource { +export interface IssueContract extends ProxyResource { + apiId?: string; + createdDate?: Date; + description?: string; + state?: State; + title?: string; + userId?: string; } // @public -export type PublicNetworkAccess = string; +export interface IssueContractBaseProperties { + apiId?: string; + createdDate?: Date; + state?: State; +} // @public -export interface QuotaByCounterKeys { - listByService(resourceGroupName: string, serviceName: string, quotaCounterKey: string, options?: QuotaByCounterKeysListByServiceOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, quotaCounterKey: string, parameters: QuotaCounterValueUpdateContract, options?: QuotaByCounterKeysUpdateOptionalParams): Promise; +export interface IssueContractProperties extends IssueContractBaseProperties { + description: string; + title: string; + userId: string; } // @public -export interface QuotaByCounterKeysListByServiceOptionalParams extends coreClient.OperationOptions { +export interface IssueGetOptionalParams extends OperationOptions { } // @public -export type QuotaByCounterKeysListByServiceResponse = QuotaCounterCollection; +export interface IssueListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface QuotaByCounterKeysUpdateOptionalParams extends coreClient.OperationOptions { +export interface IssueOperations { + get: (resourceGroupName: string, serviceName: string, issueId: string, options?: IssueGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: IssueListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export type QuotaByCounterKeysUpdateResponse = QuotaCounterCollection; +export type IssueType = string; // @public -export interface QuotaByPeriodKeys { - get(resourceGroupName: string, serviceName: string, quotaCounterKey: string, quotaPeriodKey: string, options?: QuotaByPeriodKeysGetOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, quotaCounterKey: string, quotaPeriodKey: string, parameters: QuotaCounterValueUpdateContract, options?: QuotaByPeriodKeysUpdateOptionalParams): Promise; +export interface IssueUpdateContract { + apiId?: string; + createdDate?: Date; + description?: string; + state?: State; + title?: string; + userId?: string; } // @public -export interface QuotaByPeriodKeysGetOptionalParams extends coreClient.OperationOptions { +export interface IssueUpdateContractProperties extends IssueContractBaseProperties { + description?: string; + title?: string; + userId?: string; } // @public -export type QuotaByPeriodKeysGetResponse = QuotaCounterContract; +export type KeyType = "primary" | "secondary"; // @public -export interface QuotaByPeriodKeysUpdateOptionalParams extends coreClient.OperationOptions { +export interface KeyVaultContractCreateProperties { + identityClientId?: string; + secretIdentifier?: string; } // @public -export type QuotaByPeriodKeysUpdateResponse = QuotaCounterContract; - -// @public -export interface QuotaCounterCollection { - count?: number; - nextLink?: string; - value?: QuotaCounterContract[]; +export interface KeyVaultContractProperties extends KeyVaultContractCreateProperties { + lastStatus?: KeyVaultLastAccessStatusContractProperties; } // @public -export interface QuotaCounterContract { - counterKey: string; - periodEndTime: Date; - periodKey: string; - periodStartTime: Date; - value?: QuotaCounterValueContractProperties; -} +export type KeyVaultFetchCode = "Success" | "Failed"; // @public -export interface QuotaCounterValueContract { - callsCount?: number; - kbTransferred?: number; +export interface KeyVaultLastAccessStatusContractProperties { + code?: string; + message?: string; + timeStampUtc?: Date; } // @public -export interface QuotaCounterValueContractProperties { - callsCount?: number; - kbTransferred?: number; -} +export type KeyVaultRefreshState = string; // @public -export interface QuotaCounterValueUpdateContract { - callsCount?: number; - kbTransferred?: number; +export enum KnownAccessIdName { + Access = "access", + GitAccess = "gitAccess" } // @public -export interface RecipientEmailCollection { - count?: number; - nextLink?: string; - value?: RecipientEmailContract[]; +export enum KnownAccessType { + AccessKey = "AccessKey", + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + UserAssignedManagedIdentity = "UserAssignedManagedIdentity" } // @public -export interface RecipientEmailContract extends ProxyResource { - email?: string; +export enum KnownAlwaysLog { + AllErrors = "allErrors" } // @public -export interface RecipientsContractProperties { - emails?: string[]; - users?: string[]; +export enum KnownApiGatewaySkuType { + Standard = "Standard", + WorkspaceGatewayPremium = "WorkspaceGatewayPremium", + WorkspaceGatewayStandard = "WorkspaceGatewayStandard" } // @public -export interface RecipientUserCollection { - count?: number; - nextLink?: string; - value?: RecipientUserContract[]; +export enum KnownApimIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + UserAssigned = "UserAssigned" } // @public -export interface RecipientUserContract extends ProxyResource { - userId?: string; +export enum KnownApiType { + Graphql = "graphql", + Grpc = "grpc", + Http = "http", + Mcp = "mcp", + Odata = "odata", + Soap = "soap", + Websocket = "websocket" } // @public -export interface Region { - listByService(resourceGroupName: string, serviceName: string, options?: RegionListByServiceOptionalParams): PagedAsyncIterableIterator; +export enum KnownAppType { + DeveloperPortal = "developerPortal", + Portal = "portal" } // @public -export interface RegionContract { - isDeleted?: boolean; - isMasterRegion?: boolean; - readonly name?: string; +export enum KnownAuthorizationType { + OAuth2 = "OAuth2" } // @public -export interface RegionListByServiceNextOptionalParams extends coreClient.OperationOptions { +export enum KnownBackendProtocol { + Http = "http", + Soap = "soap" } // @public -export type RegionListByServiceNextResponse = RegionListResult; - -// @public -export interface RegionListByServiceOptionalParams extends coreClient.OperationOptions { +export enum KnownBackendSessionIdSource { + Cookie = "cookie" } // @public -export type RegionListByServiceResponse = RegionListResult; - -// @public -export interface RegionListResult { - count?: number; - nextLink?: string; - value?: RegionContract[]; +export enum KnownBackendType { + Pool = "Pool", + Single = "Single" } // @public -export interface RegistrationDelegationSettingsProperties { - enabled?: boolean; +export enum KnownBearerTokenSendingMethod { + AuthorizationHeader = "authorizationHeader", + Query = "query" } // @public -export interface RemotePrivateEndpointConnectionWrapper { - readonly groupIds?: string[]; - id?: string; - name?: string; - privateEndpoint?: ArmIdWrapper; - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - readonly provisioningState?: string; - type?: string; +export enum KnownBearerTokenSendingMethods { + AuthorizationHeader = "authorizationHeader", + Query = "query" } // @public -export interface ReportCollection { - count?: number; - nextLink?: string; - value?: ReportRecordContract[]; +export enum KnownCarbonEmissionCategory { + High = "High", + Low = "Low", + Medium = "Medium", + VeryHigh = "VeryHigh", + VeryLow = "VeryLow" } // @public -export interface ReportRecordContract { - apiId?: string; - apiRegion?: string; - apiTimeAvg?: number; - apiTimeMax?: number; - apiTimeMin?: number; - bandwidth?: number; - cacheHitCount?: number; - cacheMissCount?: number; - callCountBlocked?: number; - callCountFailed?: number; - callCountOther?: number; - callCountSuccess?: number; - callCountTotal?: number; - country?: string; - interval?: string; - name?: string; - operationId?: string; - readonly productId?: string; - region?: string; - serviceTimeAvg?: number; - serviceTimeMax?: number; - serviceTimeMin?: number; - subscriptionId?: string; - timestamp?: Date; - readonly userId?: string; - zip?: string; +export enum KnownCertificateConfigurationStoreName { + CertificateAuthority = "CertificateAuthority", + Root = "Root" } // @public -export interface Reports { - listByApi(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByApiOptionalParams): PagedAsyncIterableIterator; - listByGeo(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByGeoOptionalParams): PagedAsyncIterableIterator; - listByOperation(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByOperationOptionalParams): PagedAsyncIterableIterator; - listByProduct(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByProductOptionalParams): PagedAsyncIterableIterator; - listByRequest(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByRequestOptionalParams): PagedAsyncIterableIterator; - listBySubscription(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; - listByTime(resourceGroupName: string, serviceName: string, filter: string, interval: string, options?: ReportsListByTimeOptionalParams): PagedAsyncIterableIterator; - listByUser(resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByUserOptionalParams): PagedAsyncIterableIterator; +export enum KnownCertificateSource { + BuiltIn = "BuiltIn", + Custom = "Custom", + KeyVault = "KeyVault", + Managed = "Managed" } // @public -export interface ReportsListByApiNextOptionalParams extends coreClient.OperationOptions { +export enum KnownCertificateStatus { + Completed = "Completed", + Failed = "Failed", + InProgress = "InProgress" } // @public -export type ReportsListByApiNextResponse = ReportCollection; - -// @public -export interface ReportsListByApiOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownClientApplicationState { + Active = "active", + Approved = "approved", + Pending = "pending", + Rejected = "rejected" } // @public -export type ReportsListByApiResponse = ReportCollection; - -// @public -export interface ReportsListByGeoNextOptionalParams extends coreClient.OperationOptions { +export enum KnownClientAuthenticationMethod { + Basic = "Basic", + Body = "Body" } // @public -export type ReportsListByGeoNextResponse = ReportCollection; - -// @public -export interface ReportsListByGeoOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; +export enum KnownConfigurationIdName { + Configuration = "configuration" } // @public -export type ReportsListByGeoResponse = ReportCollection; - -// @public -export interface ReportsListByOperationNextOptionalParams extends coreClient.OperationOptions { +export enum KnownConfirmation { + Invite = "invite", + Signup = "signup" } // @public -export type ReportsListByOperationNextResponse = ReportCollection; - -// @public -export interface ReportsListByOperationOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownConnectionStatus { + Connected = "Connected", + Degraded = "Degraded", + Disconnected = "Disconnected", + Unknown = "Unknown" } // @public -export type ReportsListByOperationResponse = ReportCollection; +export enum KnownConnectivityCheckProtocol { + Http = "HTTP", + Https = "HTTPS", + TCP = "TCP" +} // @public -export interface ReportsListByProductNextOptionalParams extends coreClient.OperationOptions { +export enum KnownConnectivityStatusType { + Failure = "failure", + Initializing = "initializing", + Success = "success" } // @public -export type ReportsListByProductNextResponse = ReportCollection; +export enum KnownContentFormat { + GraphqlLink = "graphql-link", + Grpc = "grpc", + GrpcLink = "grpc-link", + Odata = "odata", + OdataLink = "odata-link", + Openapi = "openapi", + OpenapiJson = "openapi+json", + OpenapiJsonLink = "openapi+json-link", + OpenapiLink = "openapi-link", + SwaggerJson = "swagger-json", + SwaggerLinkJson = "swagger-link-json", + WadlLinkJson = "wadl-link-json", + WadlXml = "wadl-xml", + Wsdl = "wsdl", + WsdlLink = "wsdl-link" +} // @public -export interface ReportsListByProductOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" } // @public -export type ReportsListByProductResponse = ReportCollection; +export enum KnownDataMaskingMode { + Hide = "Hide", + Mask = "Mask" +} // @public -export interface ReportsListByRequestOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; +export enum KnownDeveloperPortalStatus { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export type ReportsListByRequestResponse = RequestReportCollection; +export enum KnownExportApi { + True = "true" +} // @public -export interface ReportsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +export enum KnownExportFormat { + Openapi = "openapi-link", + OpenapiJson = "openapi+json-link", + Swagger = "swagger-link", + Wadl = "wadl-link", + Wsdl = "wsdl-link" } // @public -export type ReportsListBySubscriptionNextResponse = ReportCollection; - -// @public -export interface ReportsListBySubscriptionOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownExportResultFormat { + OpenApi = "openapi-link", + Swagger = "swagger-link-json", + Wadl = "wadl-link-json", + Wsdl = "wsdl-link+xml" } // @public -export type ReportsListBySubscriptionResponse = ReportCollection; +export enum KnownGatewayListDebugCredentialsContractPurpose { + Tracing = "tracing" +} // @public -export interface ReportsListByTimeNextOptionalParams extends coreClient.OperationOptions { +export enum KnownGatewaySkuCapacityScaleType { + Automatic = "Automatic", + Manual = "Manual", + None = "None" } // @public -export type ReportsListByTimeNextResponse = ReportCollection; +export enum KnownGrantType { + AuthorizationCode = "authorizationCode", + ClientCredentials = "clientCredentials", + Implicit = "implicit", + ResourceOwnerPassword = "resourceOwnerPassword" +} // @public -export interface ReportsListByTimeOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownHostnameType { + ConfigurationApi = "ConfigurationApi", + DeveloperPortal = "DeveloperPortal", + Management = "Management", + Portal = "Portal", + Proxy = "Proxy", + Scm = "Scm" } // @public -export type ReportsListByTimeResponse = ReportCollection; +export enum KnownHttpCorrelationProtocol { + Legacy = "Legacy", + None = "None", + W3C = "W3C" +} // @public -export interface ReportsListByUserNextOptionalParams extends coreClient.OperationOptions { +export enum KnownIdentityProviderType { + Aad = "aad", + AadB2C = "aadB2C", + Facebook = "facebook", + Google = "google", + Microsoft = "microsoft", + Twitter = "twitter" } // @public -export type ReportsListByUserNextResponse = ReportCollection; +export enum KnownIssueType { + AgentStopped = "AgentStopped", + DnsResolution = "DnsResolution", + GuestFirewall = "GuestFirewall", + NetworkSecurityRule = "NetworkSecurityRule", + Platform = "Platform", + PortThrottled = "PortThrottled", + SocketBind = "SocketBind", + Unknown = "Unknown", + UserDefinedRoute = "UserDefinedRoute" +} // @public -export interface ReportsListByUserOptionalParams extends coreClient.OperationOptions { - orderby?: string; - skip?: number; - top?: number; +export enum KnownKeyVaultRefreshState { + False = "false", + True = "true" } // @public -export type ReportsListByUserResponse = ReportCollection; +export enum KnownLegacyApiState { + Disabled = "Disabled", + Enabled = "Enabled" +} // @public -export interface RepresentationContract { - contentType: string; - examples?: { - [propertyName: string]: ParameterExampleContract; - }; - formParameters?: ParameterContract[]; - schemaId?: string; - typeName?: string; +export enum KnownLegacyPortalStatus { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export interface RequestContract { - description?: string; - headers?: ParameterContract[]; - queryParameters?: ParameterContract[]; - representations?: RepresentationContract[]; +export enum KnownLlmDiagnosticSettings { + Disabled = "disabled", + Enabled = "enabled" } // @public -export interface RequestReportCollection { - count?: number; - value?: RequestReportRecordContract[]; +export enum KnownLlmMessageLogTypes { + All = "all" } // @public -export interface RequestReportRecordContract { - apiId?: string; - apiRegion?: string; - apiTime?: number; - backendResponseCode?: string; - cache?: string; - ipAddress?: string; - method?: string; - operationId?: string; - readonly productId?: string; - requestId?: string; - requestSize?: number; - responseCode?: number; - responseSize?: number; - serviceTime?: number; - subscriptionId?: string; - timestamp?: Date; - url?: string; - readonly userId?: string; +export enum KnownLoggerType { + ApplicationInsights = "applicationInsights", + AzureEventHub = "azureEventHub", + AzureMonitor = "azureMonitor" } // @public -export interface ResolverCollection { - count?: number; - readonly nextLink?: string; - readonly value?: ResolverContract[]; +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + UserAssigned = "UserAssigned" } // @public -export interface ResolverContract extends ProxyResource { - description?: string; - displayName?: string; - path?: string; +export enum KnownMcpTransportType { + Sse = "sse", + Streamable = "streamable" } // @public -export interface ResolverResultContract extends ProxyResource { - readonly actionLog?: ResolverResultLogItemContract[]; - error?: ErrorResponseBody; - idPropertiesId?: string; - resultInfo?: string; - started?: Date; - status?: AsyncResolverStatus; - updated?: Date; +export enum KnownMethod { + GET = "GET", + Post = "POST" } // @public -export interface ResolverResultLogItemContract { - action?: string; - objectKey?: string; - objectType?: string; +export enum KnownMigrateToStv2Mode { + NewIP = "NewIP", + PreserveIp = "PreserveIp" } // @public -export interface ResolverUpdateContract { - description?: string; - displayName?: string; - path?: string; +export enum KnownNatGatewayState { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly type?: string; +export enum KnownNotificationName { + AccountClosedPublisher = "AccountClosedPublisher", + BCC = "BCC", + NewApplicationNotificationMessage = "NewApplicationNotificationMessage", + NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", + PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", + QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage", + RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage" } // @public -export interface ResourceCollection { - count?: number; - nextLink?: string; - value?: ResourceCollectionValueItem[]; +export enum KnownOAuth2GrantType { + AuthorizationCode = "AuthorizationCode", + ClientCredentials = "ClientCredentials" } -// @public (undocumented) -export interface ResourceCollectionValueItem extends ProxyResource { +// @public +export enum KnownOperationNameFormat { + Name = "Name", + Url = "Url" } // @public -export interface ResourceLocationDataContract { - city?: string; - countryOrRegion?: string; - district?: string; - name: string; +export enum KnownOrigin { + Inbound = "Inbound", + Local = "Local", + Outbound = "Outbound" } // @public -export interface ResourceSku { - name?: SkuType; +export enum KnownPlatformVersion { + Mtv1 = "mtv1", + Stv1 = "stv1", + Stv2 = "stv2", + Stv21 = "stv2.1", + Undetermined = "undetermined" } // @public -export interface ResourceSkuCapacity { - readonly default?: number; - readonly maximum?: number; - readonly minimum?: number; - readonly scaleType?: ResourceSkuCapacityScaleType; +export enum KnownPolicyComplianceState { + Compliant = "Compliant", + NonCompliant = "NonCompliant", + Pending = "Pending" } // @public -export type ResourceSkuCapacityScaleType = string; +export enum KnownPolicyContentFormat { + Rawxml = "rawxml", + RawxmlLink = "rawxml-link", + Xml = "xml", + XmlLink = "xml-link" +} // @public -export interface ResourceSkuResult { - readonly capacity?: ResourceSkuCapacity; - readonly resourceType?: string; - readonly sku?: ResourceSku; +export enum KnownPolicyExportFormat { + Rawxml = "rawxml", + Xml = "xml" } // @public -export interface ResourceSkuResults { - nextLink?: string; - value: ResourceSkuResult[]; +export enum KnownPolicyFragmentContentFormat { + Rawxml = "rawxml", + Xml = "xml" } // @public -export interface ResponseContract { - description?: string; - headers?: ParameterContract[]; - representations?: RepresentationContract[]; - statusCode: number; +export enum KnownPolicyIdName { + Policy = "policy" } // @public -export interface SamplingSettings { - percentage?: number; - samplingType?: SamplingType; +export enum KnownPolicyRestrictionRequireBase { + False = "false", + True = "true" } // @public -export type SamplingType = string; +export enum KnownPortalRevisionStatus { + Completed = "completed", + Failed = "failed", + Pending = "pending", + Publishing = "publishing" +} // @public -export interface SaveConfigurationParameter { - branch?: string; - force?: boolean; +export enum KnownPortalSettingsCspMode { + Disabled = "disabled", + Enabled = "enabled", + ReportOnly = "reportOnly" } // @public -export interface SchemaCollection { - count?: number; - readonly nextLink?: string; - readonly value?: SchemaContract[]; +export enum KnownPreferredIPVersion { + IPv4 = "IPv4" } // @public -export interface SchemaContract extends ProxyResource { - components?: Record; - contentType?: string; - definitions?: Record; - readonly provisioningState?: string; - value?: string; +export enum KnownPrivateEndpointConnectionProvisioningState { + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded" } // @public -export type SchemaType = string; +export enum KnownPrivateEndpointServiceConnectionStatus { + Approved = "Approved", + Pending = "Pending", + Rejected = "Rejected" +} // @public -export type SettingsTypeName = string; +export enum KnownProductAuthType { + ApplicationToken = "application-token", + SubscriptionKey = "subscription-key" +} // @public -export type Severity = string; +export enum KnownProtocol { + Http = "http", + Https = "https", + Ws = "ws", + Wss = "wss" +} // @public -export interface SignInSettings { - createOrUpdate(resourceGroupName: string, serviceName: string, parameters: PortalSigninSettings, options?: SignInSettingsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, options?: SignInSettingsGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, options?: SignInSettingsGetEntityTagOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalSigninSettings, options?: SignInSettingsUpdateOptionalParams): Promise; +export enum KnownPublicNetworkAccess { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export interface SignInSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export enum KnownReleaseChannel { + Default = "Default", + Preview = "Preview", + Stable = "Stable" } // @public -export type SignInSettingsCreateOrUpdateResponse = PortalSigninSettings; +export enum KnownResourceSkuCapacityScaleType { + Automatic = "automatic", + Manual = "manual", + None = "none" +} // @public -export interface SignInSettingsGetEntityTagHeaders { - eTag?: string; +export enum KnownSamplingType { + Fixed = "fixed" } // @public -export interface SignInSettingsGetEntityTagOptionalParams extends coreClient.OperationOptions { +export enum KnownSchemaType { + Json = "json", + Xml = "xml" } // @public -export type SignInSettingsGetEntityTagResponse = SignInSettingsGetEntityTagHeaders; +export enum KnownSettingsTypeName { + Public = "public" +} // @public -export interface SignInSettingsGetHeaders { - eTag?: string; +export enum KnownSeverity { + Error = "Error", + Warning = "Warning" } // @public -export interface SignInSettingsGetOptionalParams extends coreClient.OperationOptions { +export enum KnownSkuType { + Basic = "Basic", + BasicV2 = "BasicV2", + Consumption = "Consumption", + Developer = "Developer", + Isolated = "Isolated", + Premium = "Premium", + PremiumV2 = "PremiumV2", + Standard = "Standard", + StandardV2 = "StandardV2" } // @public -export type SignInSettingsGetResponse = SignInSettingsGetHeaders & PortalSigninSettings; +export enum KnownSoapApiType { + GraphQL = "graphql", + GRPC = "grpc", + MCP = "mcp", + OData = "odata", + SoapPassThrough = "soap", + SoapToRest = "http", + WebSocket = "websocket" +} // @public -export interface SignInSettingsUpdateOptionalParams extends coreClient.OperationOptions { +export enum KnownState { + Closed = "closed", + Open = "open", + Proposed = "proposed", + Removed = "removed", + Resolved = "resolved" } // @public -export interface SignUpSettings { - createOrUpdate(resourceGroupName: string, serviceName: string, parameters: PortalSignupSettings, options?: SignUpSettingsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, options?: SignUpSettingsGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, options?: SignUpSettingsGetEntityTagOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalSignupSettings, options?: SignUpSettingsUpdateOptionalParams): Promise; +export enum KnownTemplateName { + AccountClosedDeveloper = "accountClosedDeveloper", + ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", + ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", + EmailChangeIdentityDefault = "emailChangeIdentityDefault", + InviteUserNotificationMessage = "inviteUserNotificationMessage", + NewCommentNotificationMessage = "newCommentNotificationMessage", + NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", + NewIssueNotificationMessage = "newIssueNotificationMessage", + PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", + PasswordResetIdentityDefault = "passwordResetIdentityDefault", + PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", + QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", + RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", + RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage" } // @public -export interface SignUpSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export enum KnownTranslateRequiredQueryParametersConduct { + Query = "query", + Template = "template" } // @public -export type SignUpSettingsCreateOrUpdateResponse = PortalSignupSettings; +export enum KnownUserState { + Active = "active", + Blocked = "blocked", + Deleted = "deleted", + Pending = "pending" +} // @public -export interface SignUpSettingsGetEntityTagHeaders { - eTag?: string; +export enum KnownVerbosity { + Error = "error", + Information = "information", + Verbose = "verbose" } // @public -export interface SignUpSettingsGetEntityTagOptionalParams extends coreClient.OperationOptions { +export enum KnownVersioningScheme { + Header = "Header", + Query = "Query", + Segment = "Segment" } // @public -export type SignUpSettingsGetEntityTagResponse = SignUpSettingsGetEntityTagHeaders; +export enum KnownVersions { + V20250901Preview = "2025-09-01-preview" +} // @public -export interface SignUpSettingsGetHeaders { - eTag?: string; +export enum KnownVirtualNetworkType { + External = "External", + Internal = "Internal", + None = "None" } // @public -export interface SignUpSettingsGetOptionalParams extends coreClient.OperationOptions { -} +export type LegacyApiState = string; // @public -export type SignUpSettingsGetResponse = SignUpSettingsGetHeaders & PortalSignupSettings; +export type LegacyPortalStatus = string; // @public -export interface SignUpSettingsUpdateOptionalParams extends coreClient.OperationOptions { +export interface LLMDiagnosticSettings { + logs?: LlmDiagnosticSettings; + requests?: LLMMessageDiagnosticSettings; + responses?: LLMMessageDiagnosticSettings; } // @public -export type SkuType = string; +export type LlmDiagnosticSettings = string; // @public -export type SoapApiType = string; +export interface LLMMessageDiagnosticSettings { + maxSizeInBytes?: number; + messages?: LlmMessageLogTypes; +} // @public -export type State = string; +export type LlmMessageLogTypes = string; // @public -export interface Subscription { - createOrUpdate(resourceGroupName: string, serviceName: string, sid: string, parameters: SubscriptionCreateParameters, options?: SubscriptionCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, sid: string, ifMatch: string, options?: SubscriptionDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionGetEntityTagOptionalParams): Promise; - list(resourceGroupName: string, serviceName: string, options?: SubscriptionListOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionListSecretsOptionalParams): Promise; - regeneratePrimaryKey(resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionRegeneratePrimaryKeyOptionalParams): Promise; - regenerateSecondaryKey(resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionRegenerateSecondaryKeyOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, sid: string, ifMatch: string, parameters: SubscriptionUpdateParameters, options?: SubscriptionUpdateOptionalParams): Promise; +export interface LoggerContract extends ProxyResource { + credentials?: Record; + description?: string; + isBuffered?: boolean; + loggerType?: LoggerType; + resourceId?: string; } // @public -export interface SubscriptionCollection { - count?: number; - nextLink?: string; - value?: SubscriptionContract[]; +export interface LoggerContractProperties { + credentials?: Record; + description?: string; + isBuffered?: boolean; + loggerType: LoggerType; + resourceId?: string; } // @public -export interface SubscriptionContract extends ProxyResource { - allowTracing?: boolean; - readonly createdDate?: Date; - displayName?: string; - endDate?: Date; - expirationDate?: Date; - notificationDate?: Date; - ownerId?: string; - primaryKey?: string; - scope?: string; - secondaryKey?: string; - startDate?: Date; - state?: SubscriptionState; - stateComment?: string; +export interface LoggerCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface SubscriptionCreateOrUpdateHeaders { - eTag?: string; +export interface LoggerDeleteOptionalParams extends OperationOptions { } // @public -export interface SubscriptionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - appType?: AppType; - ifMatch?: string; - notify?: boolean; +export interface LoggerGetEntityTagOptionalParams extends OperationOptions { } // @public -export type SubscriptionCreateOrUpdateResponse = SubscriptionCreateOrUpdateHeaders & SubscriptionContract; +export interface LoggerGetOptionalParams extends OperationOptions { +} // @public -export interface SubscriptionCreateParameters { - allowTracing?: boolean; - displayName?: string; - ownerId?: string; - primaryKey?: string; - scope?: string; - secondaryKey?: string; - state?: SubscriptionState; +export interface LoggerListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface SubscriptionDeleteOptionalParams extends coreClient.OperationOptions { +export interface LoggerOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, loggerId: string, parameters: LoggerContract, options?: LoggerCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, loggerId: string, ifMatch: string, options?: LoggerDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, loggerId: string, options?: LoggerGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, loggerId: string, options?: LoggerGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: LoggerListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, loggerId: string, ifMatch: string, parameters: LoggerUpdateContract, options?: LoggerUpdateOptionalParams) => Promise; } // @public -export interface SubscriptionGetEntityTagHeaders { - eTag?: string; -} +export type LoggerType = string; // @public -export interface SubscriptionGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface LoggerUpdateContract { + credentials?: Record; + description?: string; + isBuffered?: boolean; + loggerType?: LoggerType; } // @public -export type SubscriptionGetEntityTagResponse = SubscriptionGetEntityTagHeaders; +export interface LoggerUpdateOptionalParams extends OperationOptions { +} // @public -export interface SubscriptionGetHeaders { - eTag?: string; +export interface LoggerUpdateParameters { + credentials?: Record; + description?: string; + isBuffered?: boolean; + loggerType?: LoggerType; } // @public -export interface SubscriptionGetOptionalParams extends coreClient.OperationOptions { +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: Record; } // @public -export type SubscriptionGetResponse = SubscriptionGetHeaders & SubscriptionContract; +export type ManagedServiceIdentityType = string; // @public -export interface SubscriptionKeyParameterNamesContract { - header?: string; - query?: string; +export interface McpEndpoint { + name: string; + uriTemplate?: string; } // @public -export interface SubscriptionKeysContract { - primaryKey?: string; - secondaryKey?: string; +export interface McpProperties { + endpoints?: McpEndpoint[]; + transportType?: McpTransportType; } // @public -export interface SubscriptionListNextOptionalParams extends coreClient.OperationOptions { -} +export type McpTransportType = string; // @public -export type SubscriptionListNextResponse = SubscriptionCollection; +export type Method = string; // @public -export interface SubscriptionListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface MigrateToStv2Contract { + mode?: MigrateToStv2Mode; } // @public -export type SubscriptionListResponse = SubscriptionCollection; +export type MigrateToStv2Mode = string; + +// @public +export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; // @public -export interface SubscriptionListSecretsHeaders { - eTag?: string; +export interface NamedValueContract extends ProxyResource { + displayName?: string; + keyVault?: KeyVaultContractProperties; + readonly provisioningState?: string; + secret?: boolean; + tags?: string[]; + value?: string; } // @public -export interface SubscriptionListSecretsOptionalParams extends coreClient.OperationOptions { +export interface NamedValueContractProperties extends NamedValueEntityBaseParameters { + displayName: string; + keyVault?: KeyVaultContractProperties; + readonly provisioningState?: string; + value?: string; } // @public -export type SubscriptionListSecretsResponse = SubscriptionListSecretsHeaders & SubscriptionKeysContract; +export interface NamedValueCreateContract extends ProxyResource { + displayName?: string; + keyVault?: KeyVaultContractCreateProperties; + secret?: boolean; + tags?: string[]; + value?: string; +} // @public -export interface SubscriptionRegeneratePrimaryKeyOptionalParams extends coreClient.OperationOptions { +export interface NamedValueCreateContractProperties extends NamedValueEntityBaseParameters { + displayName: string; + keyVault?: KeyVaultContractCreateProperties; + value?: string; } // @public -export interface SubscriptionRegenerateSecondaryKeyOptionalParams extends coreClient.OperationOptions { +export interface NamedValueCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export interface SubscriptionsDelegationSettingsProperties { - enabled?: boolean; +export interface NamedValueDeleteOptionalParams extends OperationOptions { } // @public -export type SubscriptionState = "suspended" | "active" | "expired" | "submitted" | "rejected" | "cancelled"; +export interface NamedValueEntityBaseParameters { + secret?: boolean; + tags?: string[]; +} // @public -export interface SubscriptionUpdateHeaders { - eTag?: string; +export interface NamedValueGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface SubscriptionUpdateOptionalParams extends coreClient.OperationOptions { - appType?: AppType; - notify?: boolean; +export interface NamedValueGetOptionalParams extends OperationOptions { } // @public -export interface SubscriptionUpdateParameters { - allowTracing?: boolean; - displayName?: string; - expirationDate?: Date; - ownerId?: string; - primaryKey?: string; - scope?: string; - secondaryKey?: string; - state?: SubscriptionState; - stateComment?: string; +export interface NamedValueListByServiceOptionalParams extends OperationOptions { + filter?: string; + isKeyVaultRefreshFailed?: boolean; + skip?: number; + top?: number; } // @public -export type SubscriptionUpdateResponse = SubscriptionUpdateHeaders & SubscriptionContract; +export interface NamedValueListValueOptionalParams extends OperationOptions { +} // @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; +export interface NamedValueOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, namedValueId: string, parameters: NamedValueCreateContract, options?: NamedValueCreateOrUpdateOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, namedValueId: string, parameters: NamedValueCreateContract, options?: NamedValueCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginRefreshSecret: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueRefreshSecretOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginRefreshSecretAndWait: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueRefreshSecretOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: NamedValueUpdateOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: NamedValueUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, namedValueId: string, parameters: NamedValueCreateContract, options?: NamedValueCreateOrUpdateOptionalParams) => PollerLike, NamedValueContract>; + delete: (resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, options?: NamedValueDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: NamedValueListByServiceOptionalParams) => PagedAsyncIterableIterator; + listValue: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueListValueOptionalParams) => Promise; + refreshSecret: (resourceGroupName: string, serviceName: string, namedValueId: string, options?: NamedValueRefreshSecretOptionalParams) => PollerLike, NamedValueContract>; + update: (resourceGroupName: string, serviceName: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: NamedValueUpdateOptionalParams) => PollerLike, NamedValueContract>; } // @public -export interface Tag { - assignToApi(resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagAssignToApiOptionalParams): Promise; - assignToOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagAssignToOperationOptionalParams): Promise; - assignToProduct(resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagAssignToProductOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, tagId: string, parameters: TagCreateUpdateParameters, options?: TagCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, tagId: string, ifMatch: string, options?: TagDeleteOptionalParams): Promise; - detachFromApi(resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagDetachFromApiOptionalParams): Promise; - detachFromOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagDetachFromOperationOptionalParams): Promise; - detachFromProduct(resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagDetachFromProductOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, tagId: string, options?: TagGetOptionalParams): Promise; - getByApi(resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagGetByApiOptionalParams): Promise; - getByOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagGetByOperationOptionalParams): Promise; - getByProduct(resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagGetByProductOptionalParams): Promise; - getEntityState(resourceGroupName: string, serviceName: string, tagId: string, options?: TagGetEntityStateOptionalParams): Promise; - getEntityStateByApi(resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagGetEntityStateByApiOptionalParams): Promise; - getEntityStateByOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagGetEntityStateByOperationOptionalParams): Promise; - getEntityStateByProduct(resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagGetEntityStateByProductOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: TagListByApiOptionalParams): PagedAsyncIterableIterator; - listByOperation(resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: TagListByOperationOptionalParams): PagedAsyncIterableIterator; - listByProduct(resourceGroupName: string, serviceName: string, productId: string, options?: TagListByProductOptionalParams): PagedAsyncIterableIterator; - listByService(resourceGroupName: string, serviceName: string, options?: TagListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, tagId: string, ifMatch: string, parameters: TagCreateUpdateParameters, options?: TagUpdateOptionalParams): Promise; +export interface NamedValueRefreshSecretOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface TagApiLink { - createOrUpdate(resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, parameters: TagApiLinkContract, options?: TagApiLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, options?: TagApiLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, options?: TagApiLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, tagId: string, options?: TagApiLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface NamedValueSecretContract { + value?: string; } // @public -export interface TagApiLinkCollection { - count?: number; - nextLink?: string; - value?: TagApiLinkContract[]; +export interface NamedValueUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface TagApiLinkContract extends ProxyResource { - apiId?: string; +export interface NamedValueUpdateParameterProperties extends NamedValueEntityBaseParameters { + displayName?: string; + keyVault?: KeyVaultContractCreateProperties; + value?: string; } // @public -export interface TagApiLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface NamedValueUpdateParameters { + displayName?: string; + keyVault?: KeyVaultContractCreateProperties; + secret?: boolean; + tags?: string[]; + value?: string; } // @public -export type TagApiLinkCreateOrUpdateResponse = TagApiLinkContract; +export type NatGatewayState = string; // @public -export interface TagApiLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface NetworkStatusContract { + connectivityStatus: ConnectivityStatusContract[]; + dnsServers: string[]; } // @public -export interface TagApiLinkGetHeaders { - eTag?: string; +export interface NetworkStatusContractByLocation { + location?: string; + networkStatus?: NetworkStatusContract; } // @public -export interface TagApiLinkGetOptionalParams extends coreClient.OperationOptions { +export interface NetworkStatusListByLocationOptionalParams extends OperationOptions { } // @public -export type TagApiLinkGetResponse = TagApiLinkGetHeaders & TagApiLinkContract; +export interface NetworkStatusListByServiceOptionalParams extends OperationOptions { +} // @public -export interface TagApiLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface NetworkStatusOperations { + listByLocation: (resourceGroupName: string, serviceName: string, locationName: string, options?: NetworkStatusListByLocationOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: NetworkStatusListByServiceOptionalParams) => Promise; } // @public -export type TagApiLinkListByProductNextResponse = TagApiLinkCollection; +export interface NotificationContract extends ProxyResource { + description?: string; + recipients?: RecipientsContractProperties; + title?: string; +} // @public -export interface TagApiLinkListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface NotificationContractProperties { + description?: string; + recipients?: RecipientsContractProperties; + title: string; } // @public -export type TagApiLinkListByProductResponse = TagApiLinkCollection; +export interface NotificationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface TagAssignToApiHeaders { - eTag?: string; +export interface NotificationGetOptionalParams extends OperationOptions { } // @public -export interface TagAssignToApiOptionalParams extends coreClient.OperationOptions { +export interface NotificationListByServiceOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export type TagAssignToApiResponse = TagAssignToApiHeaders & TagContract; +export type NotificationName = string; // @public -export interface TagAssignToOperationOptionalParams extends coreClient.OperationOptions { +export interface NotificationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: NotificationListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export type TagAssignToOperationResponse = TagContract; +export interface NotificationRecipientEmailCheckEntityExistsOptionalParams extends OperationOptions { +} // @public -export interface TagAssignToProductOptionalParams extends coreClient.OperationOptions { +export interface NotificationRecipientEmailCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type TagAssignToProductResponse = TagContract; +export interface NotificationRecipientEmailDeleteOptionalParams extends OperationOptions { +} // @public -export interface TagCollection { - count?: number; - nextLink?: string; - value?: TagContract[]; +export interface NotificationRecipientEmailListByNotificationOptionalParams extends OperationOptions { } // @public -export interface TagContract extends ProxyResource { - displayName?: string; +export interface NotificationRecipientEmailOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, email: string, options?: NotificationRecipientEmailDeleteOptionalParams) => Promise; + listByNotification: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationRecipientEmailListByNotificationOptionalParams) => Promise; } // @public -export interface TagCreateOrUpdateHeaders { - eTag?: string; +export interface NotificationRecipientUserCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export interface TagCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface NotificationRecipientUserCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type TagCreateOrUpdateResponse = TagCreateOrUpdateHeaders & TagContract; +export interface NotificationRecipientUserDeleteOptionalParams extends OperationOptions { +} // @public -export interface TagCreateUpdateParameters { - displayName?: string; +export interface NotificationRecipientUserListByNotificationOptionalParams extends OperationOptions { } // @public -export interface TagDeleteOptionalParams extends coreClient.OperationOptions { +export interface NotificationRecipientUserOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, userId: string, options?: NotificationRecipientUserDeleteOptionalParams) => Promise; + listByNotification: (resourceGroupName: string, serviceName: string, notificationName: NotificationName, options?: NotificationRecipientUserListByNotificationOptionalParams) => Promise; } // @public -export interface TagDescriptionBaseProperties { - description?: string; - externalDocsDescription?: string; - externalDocsUrl?: string; +export interface OAuth2AuthenticationSettingsContract { + authorizationServerId?: string; + scope?: string; } // @public -export interface TagDescriptionCollection { - count?: number; - nextLink?: string; - value?: TagDescriptionContract[]; -} +export type OAuth2GrantType = string; // @public -export interface TagDescriptionContract extends ProxyResource { - description?: string; - displayName?: string; - externalDocsDescription?: string; - externalDocsUrl?: string; - tagId?: string; +export interface OpenIdAuthenticationSettingsContract { + bearerTokenSendingMethods?: BearerTokenSendingMethods[]; + openidProviderId?: string; } // @public -export interface TagDescriptionContractProperties extends TagDescriptionBaseProperties { +export interface OpenidConnectProviderContract extends ProxyResource { + clientId?: string; + clientSecret?: string; + description?: string; displayName?: string; - tagId?: string; + metadataEndpoint?: string; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; } // @public -export interface TagDescriptionCreateParameters { +export interface OpenidConnectProviderContractProperties { + clientId: string; + clientSecret?: string; description?: string; - externalDocsDescription?: string; - externalDocsUrl?: string; + displayName: string; + metadataEndpoint: string; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; } // @public -export interface TagDetachFromApiOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface TagDetachFromOperationOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderDeleteOptionalParams extends OperationOptions { } // @public -export interface TagDetachFromProductOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface TagGetByApiHeaders { - eTag?: string; +export interface OpenIdConnectProviderGetOptionalParams extends OperationOptions { } // @public -export interface TagGetByApiOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type TagGetByApiResponse = TagGetByApiHeaders & TagContract; - -// @public -export interface TagGetByOperationHeaders { - eTag?: string; +export interface OpenIdConnectProviderListSecretsOptionalParams extends OperationOptions { } // @public -export interface TagGetByOperationOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, opid: string, parameters: OpenidConnectProviderContract, options?: OpenIdConnectProviderCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, opid: string, ifMatch: string, options?: OpenIdConnectProviderDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: OpenIdConnectProviderListByServiceOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, opid: string, options?: OpenIdConnectProviderListSecretsOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, opid: string, ifMatch: string, parameters: OpenidConnectProviderUpdateContract, options?: OpenIdConnectProviderUpdateOptionalParams) => Promise; } // @public -export type TagGetByOperationResponse = TagGetByOperationHeaders & TagContract; +export interface OpenidConnectProviderUpdateContract { + clientId?: string; + clientSecret?: string; + description?: string; + displayName?: string; + metadataEndpoint?: string; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; +} // @public -export interface TagGetByProductHeaders { - eTag?: string; +export interface OpenidConnectProviderUpdateContractProperties { + clientId?: string; + clientSecret?: string; + description?: string; + displayName?: string; + metadataEndpoint?: string; + useInApiDocumentation?: boolean; + useInTestConsole?: boolean; } // @public -export interface TagGetByProductOptionalParams extends coreClient.OperationOptions { +export interface OpenIdConnectProviderUpdateOptionalParams extends OperationOptions { } // @public -export type TagGetByProductResponse = TagGetByProductHeaders & TagContract; +export interface Operation { + display?: OperationDisplay; + name?: string; + origin?: string; + properties?: any; +} // @public -export interface TagGetEntityStateByApiHeaders { - eTag?: string; +export interface OperationContract extends ProxyResource { + description?: string; + displayName?: string; + method?: string; + policies?: string; + request?: RequestContract; + responses?: ResponseContract[]; + templateParameters?: ParameterContract[]; + urlTemplate?: string; } // @public -export interface TagGetEntityStateByApiOptionalParams extends coreClient.OperationOptions { +export interface OperationContractProperties extends OperationEntityBaseContract { + displayName: string; + method: string; + urlTemplate: string; } // @public -export type TagGetEntityStateByApiResponse = TagGetEntityStateByApiHeaders; +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} // @public -export interface TagGetEntityStateByOperationHeaders { - eTag?: string; +export interface OperationEntityBaseContract { + description?: string; + policies?: string; + request?: RequestContract; + responses?: ResponseContract[]; + templateParameters?: ParameterContract[]; } // @public -export interface TagGetEntityStateByOperationOptionalParams extends coreClient.OperationOptions { +export interface OperationListByTagsOptionalParams extends OperationOptions { + filter?: string; + includeNotTaggedOperations?: boolean; + skip?: number; + top?: number; } // @public -export type TagGetEntityStateByOperationResponse = TagGetEntityStateByOperationHeaders; +export type OperationNameFormat = string; // @public -export interface TagGetEntityStateByProductHeaders { - eTag?: string; +export interface OperationOperations { + listByTags: (resourceGroupName: string, serviceName: string, apiId: string, options?: OperationListByTagsOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface TagGetEntityStateByProductOptionalParams extends coreClient.OperationOptions { +export interface OperationResultContract extends ProxyResource { + readonly actionLog?: OperationResultLogItemContract[]; + error?: ErrorResponseBody; + idPropertiesId?: string; + resultInfo?: string; + started?: Date; + status?: AsyncOperationStatus; + updated?: Date; } // @public -export type TagGetEntityStateByProductResponse = TagGetEntityStateByProductHeaders; - -// @public -export interface TagGetEntityStateHeaders { - eTag?: string; +export interface OperationResultContractProperties { + readonly actionLog?: OperationResultLogItemContract[]; + error?: ErrorResponseBody; + id?: string; + resultInfo?: string; + started?: Date; + status?: AsyncOperationStatus; + updated?: Date; } // @public -export interface TagGetEntityStateOptionalParams extends coreClient.OperationOptions { +export interface OperationResultLogItemContract { + action?: string; + objectKey?: string; + objectType?: string; } // @public -export type TagGetEntityStateResponse = TagGetEntityStateHeaders; - -// @public -export interface TagGetHeaders { - eTag?: string; +export interface OperationsResultsGetOptionalParams extends OperationOptions { } // @public -export interface TagGetOptionalParams extends coreClient.OperationOptions { +export interface OperationsResultsOperations { + get: (location: string, operationId: string, options?: OperationsResultsGetOptionalParams) => Promise; } // @public -export type TagGetResponse = TagGetHeaders & TagContract; +export interface OperationStatusGetOptionalParams extends OperationOptions { +} // @public -export interface TagListByApiNextOptionalParams extends coreClient.OperationOptions { +export interface OperationStatusOperations { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => Promise; } // @public -export type TagListByApiNextResponse = TagCollection; +export interface OperationStatusResult { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name?: string; + operations?: OperationStatusResult[]; + percentComplete?: number; + readonly resourceId?: string; + startTime?: Date; + status: string; +} // @public -export interface TagListByApiOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface OperationTagResourceContractProperties { + readonly apiName?: string; + readonly apiRevision?: string; + readonly apiVersion?: string; + readonly description?: string; + id?: string; + readonly method?: string; + readonly name?: string; + readonly urlTemplate?: string; } // @public -export type TagListByApiResponse = TagCollection; +export interface OperationUpdateContract { + description?: string; + displayName?: string; + method?: string; + policies?: string; + request?: RequestContract; + responses?: ResponseContract[]; + templateParameters?: ParameterContract[]; + urlTemplate?: string; +} // @public -export interface TagListByOperationNextOptionalParams extends coreClient.OperationOptions { +export interface OperationUpdateContractProperties extends OperationEntityBaseContract { + displayName?: string; + method?: string; + urlTemplate?: string; } // @public -export type TagListByOperationNextResponse = TagCollection; +export type Origin = string; // @public -export interface TagListByOperationOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface OutboundEnvironmentEndpoint { + category?: string; + endpoints?: EndpointDependency[]; } // @public -export type TagListByOperationResponse = TagCollection; - -// @public -export interface TagListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface OutboundEnvironmentEndpointList { + readonly nextLink?: string; + value: OutboundEnvironmentEndpoint[]; } // @public -export type TagListByProductNextResponse = TagCollection; +export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams extends OperationOptions { +} // @public -export interface TagListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface OutboundNetworkDependenciesEndpointsOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams) => Promise; } // @public -export type TagListByProductResponse = TagCollection; +export interface PagedAsyncIterableIterator { + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; + next(): Promise>; +} // @public -export interface TagListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface PageSettings { + continuationToken?: string; } // @public -export type TagListByServiceNextResponse = TagCollection; +export interface ParameterContract { + defaultValue?: string; + description?: string; + examples?: Record; + name: string; + required?: boolean; + schemaId?: string; + type: string; + typeName?: string; + values?: string[]; +} // @public -export interface TagListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - scope?: string; - skip?: number; - top?: number; +export interface ParameterExampleContract { + description?: string; + externalValue?: string; + summary?: string; + value?: any; } // @public -export type TagListByServiceResponse = TagCollection; +export interface PipelineDiagnosticSettings { + request?: HttpMessageDiagnostic; + response?: HttpMessageDiagnostic; +} // @public -export interface TagOperationLink { - createOrUpdate(resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, parameters: TagOperationLinkContract, options?: TagOperationLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, options?: TagOperationLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, options?: TagOperationLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, tagId: string, options?: TagOperationLinkListByProductOptionalParams): PagedAsyncIterableIterator; -} +export type PlatformVersion = string; // @public -export interface TagOperationLinkCollection { +export interface PolicyCollection { count?: number; nextLink?: string; - value?: TagOperationLinkContract[]; -} - -// @public -export interface TagOperationLinkContract extends ProxyResource { - operationId?: string; + value?: PolicyContract[]; } // @public -export interface TagOperationLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} +export type PolicyComplianceState = string; // @public -export type TagOperationLinkCreateOrUpdateResponse = TagOperationLinkContract; +export type PolicyContentFormat = string; // @public -export interface TagOperationLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface PolicyContract extends ProxyResource { + format?: PolicyContentFormat; + value?: string; } // @public -export interface TagOperationLinkGetHeaders { - eTag?: string; +export interface PolicyContractProperties { + format?: PolicyContentFormat; + value: string; } // @public -export interface TagOperationLinkGetOptionalParams extends coreClient.OperationOptions { +export interface PolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type TagOperationLinkGetResponse = TagOperationLinkGetHeaders & TagOperationLinkContract; - -// @public -export interface TagOperationLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface PolicyDeleteOptionalParams extends OperationOptions { } // @public -export type TagOperationLinkListByProductNextResponse = TagOperationLinkCollection; - -// @public -export interface TagOperationLinkListByProductOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface PolicyDescriptionCollection { + count?: number; + value?: PolicyDescriptionContract[]; } // @public -export type TagOperationLinkListByProductResponse = TagOperationLinkCollection; +export interface PolicyDescriptionContract extends ProxyResource { + readonly description?: string; + readonly scope?: number; +} // @public -export interface TagProductLink { - createOrUpdate(resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, parameters: TagProductLinkContract, options?: TagProductLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, options?: TagProductLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, options?: TagProductLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, tagId: string, options?: TagProductLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface PolicyDescriptionContractProperties { + readonly description?: string; + readonly scope?: number; } // @public -export interface TagProductLinkCollection { - count?: number; - nextLink?: string; - value?: TagProductLinkContract[]; +export interface PolicyDescriptionListByServiceOptionalParams extends OperationOptions { + scope?: PolicyScopeContract; } // @public -export interface TagProductLinkContract extends ProxyResource { - productId?: string; +export interface PolicyDescriptionOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: PolicyDescriptionListByServiceOptionalParams) => Promise; } // @public -export interface TagProductLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} +export type PolicyExportFormat = string; // @public -export type TagProductLinkCreateOrUpdateResponse = TagProductLinkContract; +export type PolicyFragmentContentFormat = string; // @public -export interface TagProductLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface PolicyFragmentContract extends ProxyResource { + description?: string; + format?: PolicyFragmentContentFormat; + readonly provisioningState?: string; + value?: string; } // @public -export interface TagProductLinkGetHeaders { - eTag?: string; +export interface PolicyFragmentContractProperties { + description?: string; + format?: PolicyFragmentContentFormat; + readonly provisioningState?: string; + value: string; } // @public -export interface TagProductLinkGetOptionalParams extends coreClient.OperationOptions { +export interface PolicyFragmentCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type TagProductLinkGetResponse = TagProductLinkGetHeaders & TagProductLinkContract; +export interface PolicyFragmentDeleteOptionalParams extends OperationOptions { +} // @public -export interface TagProductLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface PolicyFragmentGetEntityTagOptionalParams extends OperationOptions { } // @public -export type TagProductLinkListByProductNextResponse = TagProductLinkCollection; +export interface PolicyFragmentGetOptionalParams extends OperationOptions { + format?: PolicyFragmentContentFormat; +} // @public -export interface TagProductLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface PolicyFragmentListByServiceOptionalParams extends OperationOptions { filter?: string; + orderby?: string; skip?: number; top?: number; } // @public -export type TagProductLinkListByProductResponse = TagProductLinkCollection; - -// @public -export interface TagResource { - listByService(resourceGroupName: string, serviceName: string, options?: TagResourceListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface PolicyFragmentListReferencesOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export interface TagResourceCollection { - count?: number; - nextLink?: string; - value?: TagResourceContract[]; +export interface PolicyFragmentOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, id: string, parameters: PolicyFragmentContract, options?: PolicyFragmentCreateOrUpdateOptionalParams) => Promise, PolicyFragmentContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, id: string, parameters: PolicyFragmentContract, options?: PolicyFragmentCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, id: string, parameters: PolicyFragmentContract, options?: PolicyFragmentCreateOrUpdateOptionalParams) => PollerLike, PolicyFragmentContract>; + delete: (resourceGroupName: string, serviceName: string, id: string, ifMatch: string, options?: PolicyFragmentDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PolicyFragmentListByServiceOptionalParams) => PagedAsyncIterableIterator; + listReferences: (resourceGroupName: string, serviceName: string, id: string, options?: PolicyFragmentListReferencesOptionalParams) => Promise; } // @public -export interface TagResourceContract { - api?: ApiTagResourceContractProperties; - operation?: OperationTagResourceContractProperties; - product?: ProductTagResourceContractProperties; - tag: TagResourceContractProperties; +export interface PolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface TagResourceContractProperties { - id?: string; - name?: string; +export interface PolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export interface TagResourceListByServiceNextOptionalParams extends coreClient.OperationOptions { -} +export type PolicyIdName = string; // @public -export type TagResourceListByServiceNextResponse = TagResourceCollection; +export interface PolicyListByServiceOptionalParams extends OperationOptions { +} // @public -export interface TagResourceListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface PolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, policyId: PolicyIdName, parameters: PolicyContract, options?: PolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, policyId: PolicyIdName, ifMatch: string, options?: PolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, policyId: PolicyIdName, options?: PolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, policyId: PolicyIdName, options?: PolicyGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PolicyListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export type TagResourceListByServiceResponse = TagResourceCollection; +export interface PolicyRestrictionContract extends ProxyResource { + requireBase?: PolicyRestrictionRequireBase; + scope?: string; +} // @public -export interface TagUpdateHeaders { - eTag?: string; +export interface PolicyRestrictionContractProperties { + requireBase?: PolicyRestrictionRequireBase; + scope?: string; } // @public -export interface TagUpdateOptionalParams extends coreClient.OperationOptions { +export interface PolicyRestrictionCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type TagUpdateResponse = TagUpdateHeaders & TagContract; +export interface PolicyRestrictionDeleteOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export type TemplateName = string; +export interface PolicyRestrictionGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface TenantAccess { - create(resourceGroupName: string, serviceName: string, accessName: AccessIdName, ifMatch: string, parameters: AccessInformationCreateParameters, options?: TenantAccessCreateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: TenantAccessListByServiceOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessListSecretsOptionalParams): Promise; - regeneratePrimaryKey(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessRegeneratePrimaryKeyOptionalParams): Promise; - regenerateSecondaryKey(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessRegenerateSecondaryKeyOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, accessName: AccessIdName, ifMatch: string, parameters: AccessInformationUpdateParameters, options?: TenantAccessUpdateOptionalParams): Promise; +export interface PolicyRestrictionGetOptionalParams extends OperationOptions { } // @public -export interface TenantAccessCreateHeaders { - eTag?: string; +export interface PolicyRestrictionListByServiceOptionalParams extends OperationOptions { } // @public -export interface TenantAccessCreateOptionalParams extends coreClient.OperationOptions { +export interface PolicyRestrictionOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, policyRestrictionId: string, parameters: PolicyRestrictionContract, options?: PolicyRestrictionCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, policyRestrictionId: string, options?: PolicyRestrictionGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PolicyRestrictionListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, policyRestrictionId: string, ifMatch: string, parameters: PolicyRestrictionUpdateContract, options?: PolicyRestrictionUpdateOptionalParams) => Promise; } // @public -export type TenantAccessCreateResponse = TenantAccessCreateHeaders & AccessInformationContract; +export type PolicyRestrictionRequireBase = string; // @public -export interface TenantAccessGetEntityTagHeaders { - eTag?: string; +export interface PolicyRestrictionUpdateContract { + requireBase?: PolicyRestrictionRequireBase; + scope?: string; } // @public -export interface TenantAccessGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface PolicyRestrictionUpdateOptionalParams extends OperationOptions { } // @public -export type TenantAccessGetEntityTagResponse = TenantAccessGetEntityTagHeaders; - -// @public -export interface TenantAccessGetHeaders { - eTag?: string; +export interface PolicyRestrictionValidationsByServiceOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface TenantAccessGetOptionalParams extends coreClient.OperationOptions { +export interface PolicyRestrictionValidationsOperations { + // @deprecated (undocumented) + beginByService: (resourceGroupName: string, serviceName: string, options?: PolicyRestrictionValidationsByServiceOptionalParams) => Promise, OperationResultContract>>; + // @deprecated (undocumented) + beginByServiceAndWait: (resourceGroupName: string, serviceName: string, options?: PolicyRestrictionValidationsByServiceOptionalParams) => Promise; + byService: (resourceGroupName: string, serviceName: string, options?: PolicyRestrictionValidationsByServiceOptionalParams) => PollerLike, OperationResultContract>; } // @public -export type TenantAccessGetResponse = TenantAccessGetHeaders & AccessInformationContract; +export type PolicyScopeContract = "Tenant" | "Product" | "Api" | "Operation" | "All"; // @public -export interface TenantAccessGit { - regeneratePrimaryKey(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams): Promise; - regenerateSecondaryKey(resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams): Promise; +export interface PortalConfigContract extends ProxyResource { + cors?: PortalConfigCorsProperties; + csp?: PortalConfigCspProperties; + delegation?: PortalConfigDelegationProperties; + enableBasicAuth?: boolean; + // (undocumented) + signin?: PortalConfigPropertiesSignin; + // (undocumented) + signup?: PortalConfigPropertiesSignup; } // @public -export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigCorsProperties { + allowedOrigins?: string[]; } // @public -export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface TenantAccessListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigCspProperties { + allowedSources?: string[]; + mode?: PortalSettingsCspMode; + reportUri?: string[]; } // @public -export type TenantAccessListByServiceNextResponse = AccessInformationCollection; - -// @public -export interface TenantAccessListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; +export interface PortalConfigDelegationProperties { + delegateRegistration?: boolean; + delegateSubscription?: boolean; + delegationUrl?: string; + validationKey?: string; } // @public -export type TenantAccessListByServiceResponse = AccessInformationCollection; - -// @public -export interface TenantAccessListSecretsHeaders { - eTag?: string; +export interface PortalConfigGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface TenantAccessListSecretsOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigGetOptionalParams extends OperationOptions { } // @public -export type TenantAccessListSecretsResponse = TenantAccessListSecretsHeaders & AccessInformationSecretsContract; - -// @public -export interface TenantAccessRegeneratePrimaryKeyOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigListByServiceOptionalParams extends OperationOptions { } // @public -export interface TenantAccessRegenerateSecondaryKeyOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, portalConfigId: string, ifMatch: string, parameters: PortalConfigContract, options?: PortalConfigCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, portalConfigId: string, options?: PortalConfigGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, portalConfigId: string, options?: PortalConfigGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PortalConfigListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, portalConfigId: string, ifMatch: string, parameters: PortalConfigContract, options?: PortalConfigUpdateOptionalParams) => Promise; } // @public -export interface TenantAccessUpdateHeaders { - eTag?: string; +export interface PortalConfigProperties { + cors?: PortalConfigCorsProperties; + csp?: PortalConfigCspProperties; + delegation?: PortalConfigDelegationProperties; + enableBasicAuth?: boolean; + // (undocumented) + signin?: PortalConfigPropertiesSignin; + // (undocumented) + signup?: PortalConfigPropertiesSignup; } // @public -export interface TenantAccessUpdateOptionalParams extends coreClient.OperationOptions { +export interface PortalConfigPropertiesSignin { + require?: boolean; } // @public -export type TenantAccessUpdateResponse = TenantAccessUpdateHeaders & AccessInformationContract; - -// @public -export interface TenantConfiguration { - beginDeploy(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationDeployOptionalParams): Promise, TenantConfigurationDeployResponse>>; - beginDeployAndWait(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationDeployOptionalParams): Promise; - beginSave(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: SaveConfigurationParameter, options?: TenantConfigurationSaveOptionalParams): Promise, TenantConfigurationSaveResponse>>; - beginSaveAndWait(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: SaveConfigurationParameter, options?: TenantConfigurationSaveOptionalParams): Promise; - beginValidate(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationValidateOptionalParams): Promise, TenantConfigurationValidateResponse>>; - beginValidateAndWait(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationValidateOptionalParams): Promise; - getSyncState(resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, options?: TenantConfigurationGetSyncStateOptionalParams): Promise; +export interface PortalConfigPropertiesSignup { + termsOfService?: PortalConfigTermsOfServiceProperties; } // @public -export interface TenantConfigurationDeployHeaders { - // (undocumented) - location?: string; +export interface PortalConfigTermsOfServiceProperties { + requireConsent?: boolean; + text?: string; } // @public -export interface TenantConfigurationDeployOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface PortalConfigUpdateOptionalParams extends OperationOptions { } // @public -export type TenantConfigurationDeployResponse = OperationResultContract; +export interface PortalDelegationSettings extends ProxyResource { + subscriptions?: SubscriptionsDelegationSettingsProperties; + url?: string; + userRegistration?: RegistrationDelegationSettingsProperties; + validationKey?: string; +} // @public -export interface TenantConfigurationGetSyncStateOptionalParams extends coreClient.OperationOptions { +export interface PortalDelegationSettingsProperties { + subscriptions?: SubscriptionsDelegationSettingsProperties; + url?: string; + userRegistration?: RegistrationDelegationSettingsProperties; + validationKey?: string; } // @public -export type TenantConfigurationGetSyncStateResponse = TenantConfigurationSyncStateContract; +export interface PortalRevisionContract extends ProxyResource { + readonly createdDateTime?: Date; + description?: string; + isCurrent?: boolean; + readonly provisioningState?: string; + readonly status?: PortalRevisionStatus; + readonly statusDetails?: string; + readonly updatedDateTime?: Date; +} // @public -export interface TenantConfigurationSaveHeaders { - // (undocumented) - location?: string; +export interface PortalRevisionContractProperties { + readonly createdDateTime?: Date; + description?: string; + isCurrent?: boolean; + readonly provisioningState?: string; + readonly status?: PortalRevisionStatus; + readonly statusDetails?: string; + readonly updatedDateTime?: Date; } // @public -export interface TenantConfigurationSaveOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; +export interface PortalRevisionCreateOrUpdateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type TenantConfigurationSaveResponse = OperationResultContract; +export interface PortalRevisionGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface TenantConfigurationSyncStateContract extends ProxyResource { - branch?: string; - commitId?: string; - configurationChangeDate?: Date; - isExport?: boolean; - isGitEnabled?: boolean; - isSynced?: boolean; - lastOperationId?: string; - syncDate?: Date; +export interface PortalRevisionGetOptionalParams extends OperationOptions { } // @public -export interface TenantConfigurationValidateHeaders { - // (undocumented) - location?: string; +export interface PortalRevisionListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface TenantConfigurationValidateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface PortalRevisionOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, portalRevisionId: string, parameters: PortalRevisionContract, options?: PortalRevisionCreateOrUpdateOptionalParams) => Promise, PortalRevisionContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, portalRevisionId: string, parameters: PortalRevisionContract, options?: PortalRevisionCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, serviceName: string, portalRevisionId: string, ifMatch: string, parameters: PortalRevisionContract, options?: PortalRevisionUpdateOptionalParams) => Promise, PortalRevisionContract>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, serviceName: string, portalRevisionId: string, ifMatch: string, parameters: PortalRevisionContract, options?: PortalRevisionUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, portalRevisionId: string, parameters: PortalRevisionContract, options?: PortalRevisionCreateOrUpdateOptionalParams) => PollerLike, PortalRevisionContract>; + get: (resourceGroupName: string, serviceName: string, portalRevisionId: string, options?: PortalRevisionGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, portalRevisionId: string, options?: PortalRevisionGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PortalRevisionListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, portalRevisionId: string, ifMatch: string, parameters: PortalRevisionContract, options?: PortalRevisionUpdateOptionalParams) => PollerLike, PortalRevisionContract>; } // @public -export type TenantConfigurationValidateResponse = OperationResultContract; +export type PortalRevisionStatus = string; // @public -export interface TenantSettings { - get(resourceGroupName: string, serviceName: string, settingsType: SettingsTypeName, options?: TenantSettingsGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: TenantSettingsListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface PortalRevisionUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface TenantSettingsCollection { - readonly nextLink?: string; - readonly value?: TenantSettingsContract[]; +export interface PortalSettingsCollection { + count?: number; + value?: PortalSettingsContract[]; } // @public -export interface TenantSettingsContract extends ProxyResource { - settings?: { - [propertyName: string]: string; - }; +export interface PortalSettingsContract extends ProxyResource { + enabled?: boolean; + subscriptions?: SubscriptionsDelegationSettingsProperties; + termsOfService?: TermsOfServiceProperties; + url?: string; + userRegistration?: RegistrationDelegationSettingsProperties; + validationKey?: string; } // @public -export interface TenantSettingsGetHeaders { - eTag?: string; +export interface PortalSettingsContractProperties { + enabled?: boolean; + subscriptions?: SubscriptionsDelegationSettingsProperties; + termsOfService?: TermsOfServiceProperties; + url?: string; + userRegistration?: RegistrationDelegationSettingsProperties; + validationKey?: string; } // @public -export interface TenantSettingsGetOptionalParams extends coreClient.OperationOptions { -} +export type PortalSettingsCspMode = string; // @public -export type TenantSettingsGetResponse = TenantSettingsGetHeaders & TenantSettingsContract; +export interface PortalSettingsListByServiceOptionalParams extends OperationOptions { +} // @public -export interface TenantSettingsListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface PortalSettingsOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: PortalSettingsListByServiceOptionalParams) => Promise; } // @public -export type TenantSettingsListByServiceNextResponse = TenantSettingsCollection; +export interface PortalSettingValidationKeyContract { + validationKey?: string; +} // @public -export interface TenantSettingsListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; +export interface PortalSigninSettingProperties { + enabled?: boolean; } // @public -export type TenantSettingsListByServiceResponse = TenantSettingsCollection; +export interface PortalSigninSettings extends ProxyResource { + enabled?: boolean; +} // @public -export interface TermsOfServiceProperties { - consentRequired?: boolean; +export interface PortalSignupSettings extends ProxyResource { enabled?: boolean; - text?: string; + termsOfService?: TermsOfServiceProperties; } // @public -export interface TokenBodyParameterContract { - name: string; - value: string; +export interface PortalSignupSettingsProperties { + enabled?: boolean; + termsOfService?: TermsOfServiceProperties; } // @public -export type TranslateRequiredQueryParametersConduct = string; +export type PreferredIPVersion = string; // @public -export interface User { - beginDelete(resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, options?: UserDeleteOptionalParams): Promise, UserDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, options?: UserDeleteOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, userId: string, parameters: UserCreateParameters, options?: UserCreateOrUpdateOptionalParams): Promise; - generateSsoUrl(resourceGroupName: string, serviceName: string, userId: string, options?: UserGenerateSsoUrlOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, userId: string, options?: UserGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, userId: string, options?: UserGetEntityTagOptionalParams): Promise; - getSharedAccessToken(resourceGroupName: string, serviceName: string, userId: string, parameters: UserTokenParameters, options?: UserGetSharedAccessTokenOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: UserListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, parameters: UserUpdateParameters, options?: UserUpdateOptionalParams): Promise; +export interface PrivateEndpoint { + readonly id?: string; } // @public -export interface UserCollection { - count?: number; - nextLink?: string; - value?: UserContract[]; +export interface PrivateEndpointConnection extends Resource { + readonly groupIds?: string[]; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } // @public -export interface UserConfirmationPassword { - send(resourceGroupName: string, serviceName: string, userId: string, options?: UserConfirmationPasswordSendOptionalParams): Promise; +export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface UserConfirmationPasswordSendOptionalParams extends coreClient.OperationOptions { - appType?: AppType; +export interface PrivateEndpointConnectionDeleteOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface UserContract extends ProxyResource { - email?: string; - firstName?: string; - readonly groups?: GroupContractProperties[]; - identities?: UserIdentityContract[]; - lastName?: string; - note?: string; - registrationDate?: Date; - state?: UserState; +export interface PrivateEndpointConnectionGetByNameOptionalParams extends OperationOptions { } // @public -export interface UserContractProperties extends UserEntityBaseParameters { - email?: string; - firstName?: string; - readonly groups?: GroupContractProperties[]; - lastName?: string; - registrationDate?: Date; +export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams extends OperationOptions { } // @public -export interface UserCreateOrUpdateHeaders { - eTag?: string; +export interface PrivateEndpointConnectionListByServiceOptionalParams extends OperationOptions { } // @public -export interface UserCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - notify?: boolean; +export interface PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams extends OperationOptions { } // @public -export type UserCreateOrUpdateResponse = UserCreateOrUpdateHeaders & UserContract; - -// @public -export interface UserCreateParameterProperties extends UserEntityBaseParameters { - appType?: AppType; - confirmation?: Confirmation; - email: string; - firstName: string; - lastName: string; - password?: string; +export interface PrivateEndpointConnectionOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams) => Promise, PrivateEndpointConnection>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams) => PollerLike, PrivateEndpointConnection>; + delete: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams) => PollerLike, void>; + getByName: (resourceGroupName: string, serviceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionGetByNameOptionalParams) => Promise; + getPrivateLinkResource: (resourceGroupName: string, serviceName: string, privateLinkSubResourceName: string, options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: PrivateEndpointConnectionListByServiceOptionalParams) => PagedAsyncIterableIterator; + listPrivateLinkResources: (resourceGroupName: string, serviceName: string, options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams) => Promise; +} + +// @public +export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } // @public -export interface UserCreateParameters { - appType?: AppType; - confirmation?: Confirmation; - email?: string; - firstName?: string; - identities?: UserIdentityContract[]; - lastName?: string; - note?: string; - password?: string; - state?: UserState; -} +export type PrivateEndpointConnectionProvisioningState = string; // @public -export interface UserDeleteHeaders { - azureAsyncOperation?: string; - location?: string; +export interface PrivateEndpointConnectionRequest { + id?: string; + properties?: PrivateEndpointConnectionRequestProperties; } // @public -export interface UserDeleteOptionalParams extends coreClient.OperationOptions { - appType?: AppType; - deleteSubscriptions?: boolean; - notify?: boolean; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface PrivateEndpointConnectionRequestProperties { + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } // @public -export type UserDeleteResponse = UserDeleteHeaders; - -// @public -export interface UserEntityBaseParameters { - identities?: UserIdentityContract[]; - note?: string; - state?: UserState; +export interface PrivateEndpointConnectionWrapperProperties { + readonly groupIds?: string[]; + privateEndpoint?: ArmIdWrapper; + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + readonly provisioningState?: string; } // @public -export interface UserGenerateSsoUrlOptionalParams extends coreClient.OperationOptions { -} +export type PrivateEndpointServiceConnectionStatus = string; // @public -export type UserGenerateSsoUrlResponse = GenerateSsoUrlResult; +export interface PrivateLinkResource extends Resource { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +} // @public -export interface UserGetEntityTagHeaders { - eTag?: string; +export interface PrivateLinkResourceListResult { + nextLink?: string; + value: PrivateLinkResource[]; } // @public -export interface UserGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface PrivateLinkResourceProperties { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; } // @public -export type UserGetEntityTagResponse = UserGetEntityTagHeaders; +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} // @public -export interface UserGetHeaders { - eTag?: string; +export interface ProductApiCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export interface UserGetOptionalParams extends coreClient.OperationOptions { +export interface ProductApiCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export type UserGetResponse = UserGetHeaders & UserContract; +export interface ProductApiDeleteOptionalParams extends OperationOptions { +} // @public -export interface UserGetSharedAccessTokenOptionalParams extends coreClient.OperationOptions { +export interface ProductApiLinkContract extends ProxyResource { + apiId?: string; } // @public -export type UserGetSharedAccessTokenResponse = UserTokenResult; +export interface ProductApiLinkContractProperties { + apiId: string; +} // @public -export interface UserGroup { - list(resourceGroupName: string, serviceName: string, userId: string, options?: UserGroupListOptionalParams): PagedAsyncIterableIterator; +export interface ProductApiLinkCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface UserGroupListNextOptionalParams extends coreClient.OperationOptions { +export interface ProductApiLinkDeleteOptionalParams extends OperationOptions { } // @public -export type UserGroupListNextResponse = GroupCollection; +export interface ProductApiLinkGetOptionalParams extends OperationOptions { +} // @public -export interface UserGroupListOptionalParams extends coreClient.OperationOptions { +export interface ProductApiLinkListByProductOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type UserGroupListResponse = GroupCollection; +export interface ProductApiLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, parameters: ProductApiLinkContract, options?: ProductApiLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, options?: ProductApiLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, productId: string, apiLinkId: string, options?: ProductApiLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductApiLinkListByProductOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface UserIdentities { - list(resourceGroupName: string, serviceName: string, userId: string, options?: UserIdentitiesListOptionalParams): PagedAsyncIterableIterator; +export interface ProductApiListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface UserIdentitiesListNextOptionalParams extends coreClient.OperationOptions { +export interface ProductApiOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, apiId: string, options?: ProductApiDeleteOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductApiListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export type UserIdentitiesListNextResponse = UserIdentityCollection; +export interface ProductApplicationContract { + entra?: ProductApplicationContractEntra; +} // @public -export interface UserIdentitiesListOptionalParams extends coreClient.OperationOptions { +export interface ProductApplicationContractEntra { + applicationId?: string; + audience?: string; } // @public -export type UserIdentitiesListResponse = UserIdentityCollection; +export type ProductAuthType = string; // @public -export interface UserIdentityCollection { - count?: number; - nextLink?: string; - value?: UserIdentityContract[]; +export interface ProductContract extends ProxyResource { + application?: ProductEntityBaseParametersApplication; + approvalRequired?: boolean; + authenticationType?: ProductAuthType[]; + description?: string; + displayName?: string; + state?: ProductState; + subscriptionRequired?: boolean; + subscriptionsLimit?: number; + terms?: string; } // @public -export interface UserIdentityContract { - id?: string; - provider?: string; -} - -// @public (undocumented) -export interface UserIdentityProperties { - clientId?: string; - principalId?: string; +export interface ProductContractProperties extends ProductEntityBaseParameters { + displayName: string; } // @public -export interface UserListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ProductCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type UserListByServiceNextResponse = UserCollection; - -// @public -export interface UserListByServiceOptionalParams extends coreClient.OperationOptions { - expandGroups?: boolean; - filter?: string; - skip?: number; - top?: number; +export interface ProductDeleteOptionalParams extends OperationOptions { + deleteSubscriptions?: boolean; } // @public -export type UserListByServiceResponse = UserCollection; - -// @public -export type UserState = string; - -// @public -export interface UserSubscription { - get(resourceGroupName: string, serviceName: string, userId: string, sid: string, options?: UserSubscriptionGetOptionalParams): Promise; - list(resourceGroupName: string, serviceName: string, userId: string, options?: UserSubscriptionListOptionalParams): PagedAsyncIterableIterator; +export interface ProductEntityBaseParameters { + application?: ProductEntityBaseParametersApplication; + approvalRequired?: boolean; + authenticationType?: ProductAuthType[]; + description?: string; + state?: ProductState; + subscriptionRequired?: boolean; + subscriptionsLimit?: number; + terms?: string; } // @public -export interface UserSubscriptionGetHeaders { - eTag?: string; +export interface ProductEntityBaseParametersApplication extends ProductApplicationContract { } // @public -export interface UserSubscriptionGetOptionalParams extends coreClient.OperationOptions { +export interface ProductGetEntityTagOptionalParams extends OperationOptions { } // @public -export type UserSubscriptionGetResponse = UserSubscriptionGetHeaders & SubscriptionContract; - -// @public -export interface UserSubscriptionListNextOptionalParams extends coreClient.OperationOptions { +export interface ProductGetOptionalParams extends OperationOptions { } // @public -export type UserSubscriptionListNextResponse = SubscriptionCollection; - -// @public -export interface UserSubscriptionListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface ProductGroupCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export type UserSubscriptionListResponse = SubscriptionCollection; +export interface ProductGroupCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface UserTokenParameters { - expiry?: Date; - keyType?: KeyType; +export interface ProductGroupDeleteOptionalParams extends OperationOptions { } // @public -export interface UserTokenResult { - value?: string; +export interface ProductGroupLinkContract extends ProxyResource { + groupId?: string; } // @public -export interface UserUpdateHeaders { - eTag?: string; +export interface ProductGroupLinkContractProperties { + groupId: string; } // @public -export interface UserUpdateOptionalParams extends coreClient.OperationOptions { +export interface ProductGroupLinkCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface UserUpdateParameters { - email?: string; - firstName?: string; - identities?: UserIdentityContract[]; - lastName?: string; - note?: string; - password?: string; - state?: UserState; +export interface ProductGroupLinkDeleteOptionalParams extends OperationOptions { } // @public -export interface UserUpdateParametersProperties extends UserEntityBaseParameters { - email?: string; - firstName?: string; - lastName?: string; - password?: string; +export interface ProductGroupLinkGetOptionalParams extends OperationOptions { } // @public -export type UserUpdateResponse = UserUpdateHeaders & UserContract; +export interface ProductGroupLinkListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export type Verbosity = string; +export interface ProductGroupLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, parameters: ProductGroupLinkContract, options?: ProductGroupLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, options?: ProductGroupLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, productId: string, groupLinkId: string, options?: ProductGroupLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductGroupLinkListByProductOptionalParams) => PagedAsyncIterableIterator; +} // @public -export type VersioningScheme = string; +export interface ProductGroupListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface VirtualNetworkConfiguration { - readonly subnetname?: string; - subnetResourceId?: string; - readonly vnetid?: string; +export interface ProductGroupOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, groupId: string, options?: ProductGroupDeleteOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductGroupListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export type VirtualNetworkType = string; +export interface ProductListByServiceOptionalParams extends OperationOptions { + expandGroups?: boolean; + filter?: string; + skip?: number; + tags?: string; + top?: number; +} // @public -export interface WikiCollection { - readonly nextLink?: string; - readonly value?: WikiContract[]; +export interface ProductListByTagsOptionalParams extends OperationOptions { + filter?: string; + includeNotTaggedProducts?: boolean; + skip?: number; + top?: number; } // @public -export interface WikiContract extends ProxyResource { - documents?: WikiDocumentationContract[]; +export interface ProductOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, parameters: ProductContract, options?: ProductCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, options?: ProductDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: ProductListByServiceOptionalParams) => PagedAsyncIterableIterator; + listByTags: (resourceGroupName: string, serviceName: string, options?: ProductListByTagsOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, parameters: ProductUpdateParameters, options?: ProductUpdateOptionalParams) => Promise; } // @public -export interface WikiDocumentationContract { - documentationId?: string; +export interface ProductPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface WikiUpdateContract { - documents?: WikiDocumentationContract[]; +export interface ProductPolicyDeleteOptionalParams extends OperationOptions { } // @public -export interface Workspace { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, parameters: WorkspaceContract, options?: WorkspaceCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, ifMatch: string, options?: WorkspaceDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, options?: WorkspaceListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, ifMatch: string, parameters: WorkspaceContract, options?: WorkspaceUpdateOptionalParams): Promise; +export interface ProductPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApi { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: WorkspaceApiCreateOrUpdateOptionalParams): Promise, WorkspaceApiCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: WorkspaceApiCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, ifMatch: string, options?: WorkspaceApiDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceApiListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, ifMatch: string, parameters: ApiUpdateContract, options?: WorkspaceApiUpdateOptionalParams): Promise; +export interface ProductPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export interface WorkspaceApiCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface ProductPolicyListByProductOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface ProductPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: ProductPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, ifMatch: string, options?: ProductPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, options?: ProductPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, productId: string, policyId: PolicyIdName, options?: ProductPolicyGetEntityTagOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductPolicyListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export type WorkspaceApiCreateOrUpdateResponse = WorkspaceApiCreateOrUpdateHeaders & ApiContract; +export type ProductState = "notPublished" | "published"; // @public -export interface WorkspaceApiDeleteOptionalParams extends coreClient.OperationOptions { - deleteRevisions?: boolean; +export interface ProductSubscriptionsListOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceApiDiagnostic { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, parameters: DiagnosticContract, options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, ifMatch: string, options?: WorkspaceApiDiagnosticDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, options?: WorkspaceApiDiagnosticGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticUpdateContract, options?: WorkspaceApiDiagnosticUpdateOptionalParams): Promise; +export interface ProductSubscriptionsOperations { + list: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductSubscriptionsListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceApiDiagnosticCreateOrUpdateHeaders { - eTag?: string; +export interface ProductTagResourceContractProperties extends ProductEntityBaseParameters { + id?: string; + name: string; } // @public -export interface WorkspaceApiDiagnosticCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface ProductUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiDiagnosticCreateOrUpdateResponse = WorkspaceApiDiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -// @public -export interface WorkspaceApiDiagnosticDeleteOptionalParams extends coreClient.OperationOptions { +export interface ProductUpdateParameters { + application?: ProductEntityBaseParametersApplication; + approvalRequired?: boolean; + authenticationType?: ProductAuthType[]; + description?: string; + displayName?: string; + state?: ProductState; + subscriptionRequired?: boolean; + subscriptionsLimit?: number; + terms?: string; } // @public -export interface WorkspaceApiDiagnosticGetEntityTagHeaders { - eTag?: string; +export interface ProductUpdateProperties extends ProductEntityBaseParameters { + displayName?: string; } // @public -export interface WorkspaceApiDiagnosticGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ProductWikiCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceApiDiagnosticGetEntityTagResponse = WorkspaceApiDiagnosticGetEntityTagHeaders; - -// @public -export interface WorkspaceApiDiagnosticGetHeaders { - eTag?: string; +export interface ProductWikiDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiDiagnosticGetOptionalParams extends coreClient.OperationOptions { +export interface ProductWikiGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiDiagnosticGetResponse = WorkspaceApiDiagnosticGetHeaders & DiagnosticContract; - -// @public -export interface WorkspaceApiDiagnosticListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +export interface ProductWikiGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiDiagnosticListByWorkspaceNextResponse = DiagnosticCollection; +export interface ProductWikiOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, productId: string, parameters: WikiContract, options?: ProductWikiCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, options?: ProductWikiDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikiGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikiGetEntityTagOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, productId: string, ifMatch: string, parameters: WikiUpdateContract, options?: ProductWikiUpdateOptionalParams) => Promise; +} // @public -export interface WorkspaceApiDiagnosticListByWorkspaceOptionalParams extends coreClient.OperationOptions { +export interface ProductWikisListOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceApiDiagnosticListByWorkspaceResponse = DiagnosticCollection; - -// @public -export interface WorkspaceApiDiagnosticUpdateHeaders { - eTag?: string; +export interface ProductWikisOperations { + list: (resourceGroupName: string, serviceName: string, productId: string, options?: ProductWikisListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceApiDiagnosticUpdateOptionalParams extends coreClient.OperationOptions { +export interface ProductWikiUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiDiagnosticUpdateResponse = WorkspaceApiDiagnosticUpdateHeaders & DiagnosticContract; +export type Protocol = string; // @public -export interface WorkspaceApiExport { - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, format: ExportFormat, exportParam: ExportApi, options?: WorkspaceApiExportGetOptionalParams): Promise; +export interface ProxyResource extends Resource { } // @public -export interface WorkspaceApiExportGetOptionalParams extends coreClient.OperationOptions { -} +export type PublicNetworkAccess = string; // @public -export type WorkspaceApiExportGetResponse = ApiExportResult; +export interface QuotaByCounterKeysListByServiceOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiGetEntityTagHeaders { - eTag?: string; +export interface QuotaByCounterKeysOperations { + listByService: (resourceGroupName: string, serviceName: string, quotaCounterKey: string, options?: QuotaByCounterKeysListByServiceOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, quotaCounterKey: string, parameters: QuotaCounterValueUpdateContract, options?: QuotaByCounterKeysUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceApiGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface QuotaByCounterKeysUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiGetEntityTagResponse = WorkspaceApiGetEntityTagHeaders; +export interface QuotaByPeriodKeysGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiGetHeaders { - eTag?: string; +export interface QuotaByPeriodKeysOperations { + get: (resourceGroupName: string, serviceName: string, quotaCounterKey: string, quotaPeriodKey: string, options?: QuotaByPeriodKeysGetOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, quotaCounterKey: string, quotaPeriodKey: string, parameters: QuotaCounterValueUpdateContract, options?: QuotaByPeriodKeysUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceApiGetOptionalParams extends coreClient.OperationOptions { +export interface QuotaByPeriodKeysUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiGetResponse = WorkspaceApiGetHeaders & ApiContract; +export interface QuotaCounterCollection { + count?: number; + nextLink?: string; + value?: QuotaCounterContract[]; +} // @public -export interface WorkspaceApiListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface QuotaCounterContract { + counterKey: string; + periodEndTime: Date; + periodKey: string; + periodStartTime: Date; + value?: QuotaCounterValueContractProperties; } // @public -export type WorkspaceApiListByServiceNextResponse = ApiCollection; +export interface QuotaCounterValueContractProperties { + callsCount?: number; + kbTransferred?: number; +} // @public -export interface WorkspaceApiListByServiceOptionalParams extends coreClient.OperationOptions { - expandApiVersionSet?: boolean; - filter?: string; - skip?: number; - tags?: string; - top?: number; +export interface QuotaCounterValueUpdateContract { + callsCount?: number; + kbTransferred?: number; } // @public -export type WorkspaceApiListByServiceResponse = ApiCollection; +export interface RecipientEmailCollection { + count?: number; + nextLink?: string; + value?: RecipientEmailContract[]; +} // @public -export interface WorkspaceApiOperation { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, parameters: OperationContract, options?: WorkspaceApiOperationCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, ifMatch: string, options?: WorkspaceApiOperationDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiOperationListByApiOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, ifMatch: string, parameters: OperationUpdateContract, options?: WorkspaceApiOperationUpdateOptionalParams): Promise; +export interface RecipientEmailContract extends ProxyResource { + email?: string; } // @public -export interface WorkspaceApiOperationCreateOrUpdateHeaders { - eTag?: string; +export interface RecipientEmailContractProperties { + email?: string; } // @public -export interface WorkspaceApiOperationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface RecipientsContractProperties { + emails?: string[]; + users?: string[]; } // @public -export type WorkspaceApiOperationCreateOrUpdateResponse = WorkspaceApiOperationCreateOrUpdateHeaders & OperationContract; +export interface RecipientUserCollection { + count?: number; + nextLink?: string; + value?: RecipientUserContract[]; +} // @public -export interface WorkspaceApiOperationDeleteOptionalParams extends coreClient.OperationOptions { +export interface RecipientUserContract extends ProxyResource { + userId?: string; } // @public -export interface WorkspaceApiOperationGetEntityTagHeaders { - eTag?: string; +export interface RecipientUsersContractProperties { + userId?: string; } // @public -export interface WorkspaceApiOperationGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface RegionContract { + isDeleted?: boolean; + isMasterRegion?: boolean; + readonly name?: string; } // @public -export type WorkspaceApiOperationGetEntityTagResponse = WorkspaceApiOperationGetEntityTagHeaders; +export interface RegionListByServiceOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiOperationGetHeaders { - eTag?: string; +export interface RegionOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: RegionListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceApiOperationGetOptionalParams extends coreClient.OperationOptions { +export interface RegistrationDelegationSettingsProperties { + enabled?: boolean; } // @public -export type WorkspaceApiOperationGetResponse = WorkspaceApiOperationGetHeaders & OperationContract; +export type ReleaseChannel = string; // @public -export interface WorkspaceApiOperationListByApiNextOptionalParams extends coreClient.OperationOptions { +export interface RemotePrivateEndpointConnectionWrapper { + readonly groupIds?: string[]; + id?: string; + name?: string; + privateEndpoint?: ArmIdWrapper; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: string; + type?: string; } // @public -export type WorkspaceApiOperationListByApiNextResponse = OperationCollection; +export interface ReportRecordContract { + apiId?: string; + apiRegion?: string; + apiTimeAvg?: number; + apiTimeMax?: number; + apiTimeMin?: number; + bandwidth?: number; + cacheHitCount?: number; + cacheMissCount?: number; + callCountBlocked?: number; + callCountFailed?: number; + callCountOther?: number; + callCountSuccess?: number; + callCountTotal?: number; + country?: string; + interval?: string; + name?: string; + operationId?: string; + readonly productId?: string; + region?: string; + serviceTimeAvg?: number; + serviceTimeMax?: number; + serviceTimeMin?: number; + subscriptionId?: string; + timestamp?: Date; + readonly userId?: string; + zip?: string; +} // @public -export interface WorkspaceApiOperationListByApiOptionalParams extends coreClient.OperationOptions { - filter?: string; +export interface ReportsListByApiOptionalParams extends OperationOptions { + orderby?: string; skip?: number; - tags?: string; top?: number; } // @public -export type WorkspaceApiOperationListByApiResponse = OperationCollection; - -// @public -export interface WorkspaceApiOperationPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceApiOperationPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: WorkspaceApiOperationPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams): Promise; - listByOperation(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationPolicyListByOperationOptionalParams): PagedAsyncIterableIterator; +export interface ReportsListByGeoOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export interface WorkspaceApiOperationPolicyCreateOrUpdateHeaders { - eTag?: string; +export interface ReportsListByOperationOptionalParams extends OperationOptions { + orderby?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface ReportsListByProductOptionalParams extends OperationOptions { + orderby?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceApiOperationPolicyCreateOrUpdateResponse = WorkspaceApiOperationPolicyCreateOrUpdateHeaders & PolicyContract; - -// @public -export interface WorkspaceApiOperationPolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface ReportsListByRequestOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export interface WorkspaceApiOperationPolicyGetEntityTagHeaders { - eTag?: string; +export interface ReportsListBySubscriptionOptionalParams extends OperationOptions { + orderby?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceApiOperationPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ReportsListByTimeOptionalParams extends OperationOptions { + orderby?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceApiOperationPolicyGetEntityTagResponse = WorkspaceApiOperationPolicyGetEntityTagHeaders; - -// @public -export interface WorkspaceApiOperationPolicyGetHeaders { - eTag?: string; +export interface ReportsListByUserOptionalParams extends OperationOptions { + orderby?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceApiOperationPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface ReportsOperations { + listByApi: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByApiOptionalParams) => PagedAsyncIterableIterator; + listByGeo: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByGeoOptionalParams) => PagedAsyncIterableIterator; + listByOperation: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByOperationOptionalParams) => PagedAsyncIterableIterator; + listByProduct: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByProductOptionalParams) => PagedAsyncIterableIterator; + listByRequest: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByRequestOptionalParams) => PagedAsyncIterableIterator; + listBySubscription: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListBySubscriptionOptionalParams) => PagedAsyncIterableIterator; + listByTime: (resourceGroupName: string, serviceName: string, filter: string, interval: string, options?: ReportsListByTimeOptionalParams) => PagedAsyncIterableIterator; + listByUser: (resourceGroupName: string, serviceName: string, filter: string, options?: ReportsListByUserOptionalParams) => PagedAsyncIterableIterator; } // @public -export type WorkspaceApiOperationPolicyGetResponse = WorkspaceApiOperationPolicyGetHeaders & PolicyContract; - -// @public -export interface WorkspaceApiOperationPolicyListByOperationNextOptionalParams extends coreClient.OperationOptions { +export interface RepresentationContract { + contentType: string; + examples?: Record; + formParameters?: ParameterContract[]; + schemaId?: string; + typeName?: string; } // @public -export type WorkspaceApiOperationPolicyListByOperationNextResponse = PolicyCollection; - -// @public -export interface WorkspaceApiOperationPolicyListByOperationOptionalParams extends coreClient.OperationOptions { +export interface RequestContract { + description?: string; + headers?: ParameterContract[]; + queryParameters?: ParameterContract[]; + representations?: RepresentationContract[]; } // @public -export type WorkspaceApiOperationPolicyListByOperationResponse = PolicyCollection; +export interface RequestReportRecordContract { + apiId?: string; + apiRegion?: string; + apiTime?: number; + backendResponseCode?: string; + cache?: string; + ipAddress?: string; + method?: string; + operationId?: string; + readonly productId?: string; + requestId?: string; + requestSize?: number; + responseCode?: number; + responseSize?: number; + serviceTime?: number; + subscriptionId?: string; + timestamp?: Date; + url?: string; + readonly userId?: string; +} // @public -export interface WorkspaceApiOperationUpdateHeaders { - eTag?: string; +export interface ResolverContract extends ProxyResource { + description?: string; + displayName?: string; + path?: string; } // @public -export interface WorkspaceApiOperationUpdateOptionalParams extends coreClient.OperationOptions { +export interface ResolverEntityBaseContract { + description?: string; + displayName?: string; + path?: string; } // @public -export type WorkspaceApiOperationUpdateResponse = WorkspaceApiOperationUpdateHeaders & OperationContract; +export interface ResolverUpdateContract { + description?: string; + displayName?: string; + path?: string; +} // @public -export interface WorkspaceApiPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceApiPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, options?: WorkspaceApiPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, options?: WorkspaceApiPolicyGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiPolicyListByApiOptionalParams): PagedAsyncIterableIterator; +export interface ResolverUpdateContractProperties { + description?: string; + displayName?: string; + path?: string; } // @public -export interface WorkspaceApiPolicyCreateOrUpdateHeaders { - eTag?: string; +export interface Resource { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; } // @public -export interface WorkspaceApiPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface ResourceCollection { + count?: number; + nextLink?: string; + value?: ResourceCollectionValueItem[]; } // @public -export type WorkspaceApiPolicyCreateOrUpdateResponse = WorkspaceApiPolicyCreateOrUpdateHeaders & PolicyContract; +export interface ResourceCollectionValueItem extends ProxyResource { +} // @public -export interface WorkspaceApiPolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface ResourceLocationDataContract { + city?: string; + countryOrRegion?: string; + district?: string; + name: string; } // @public -export interface WorkspaceApiPolicyGetEntityTagHeaders { - eTag?: string; +export interface ResourceSku { + name?: SkuType; } // @public -export interface WorkspaceApiPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface ResourceSkuCapacity { + readonly default?: number; + readonly maximum?: number; + readonly minimum?: number; + readonly scaleType?: ResourceSkuCapacityScaleType; } // @public -export type WorkspaceApiPolicyGetEntityTagResponse = WorkspaceApiPolicyGetEntityTagHeaders; +export type ResourceSkuCapacityScaleType = string; // @public -export interface WorkspaceApiPolicyGetHeaders { - eTag?: string; +export interface ResourceSkuResult { + readonly capacity?: ResourceSkuCapacity; + readonly resourceType?: string; + readonly sku?: ResourceSku; } // @public -export interface WorkspaceApiPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface ResponseContract { + description?: string; + headers?: ParameterContract[]; + representations?: RepresentationContract[]; + statusCode: number; } -// @public -export type WorkspaceApiPolicyGetResponse = WorkspaceApiPolicyGetHeaders & PolicyContract; +export { RestError } // @public -export interface WorkspaceApiPolicyListByApiNextOptionalParams extends coreClient.OperationOptions { -} +export function restorePoller(client: ApiManagementClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike, TResult>, options?: RestorePollerOptions): PollerLike, TResult>; -// @public -export type WorkspaceApiPolicyListByApiNextResponse = PolicyCollection; +// @public (undocumented) +export interface RestorePollerOptions extends OperationOptions { + abortSignal?: AbortSignalLike; + processResponseBody?: (result: TResponse) => Promise; + updateIntervalInMs?: number; +} // @public -export interface WorkspaceApiPolicyListByApiOptionalParams extends coreClient.OperationOptions { +export interface SamplingSettings { + percentage?: number; + samplingType?: SamplingType; } // @public -export type WorkspaceApiPolicyListByApiResponse = PolicyCollection; +export type SamplingType = string; // @public -export interface WorkspaceApiRelease { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, parameters: ApiReleaseContract, options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, ifMatch: string, options?: WorkspaceApiReleaseDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, options?: WorkspaceApiReleaseGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, options?: WorkspaceApiReleaseGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiReleaseListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, ifMatch: string, parameters: ApiReleaseContract, options?: WorkspaceApiReleaseUpdateOptionalParams): Promise; +export interface SaveConfigurationParameter { + branch?: string; + force?: boolean; } // @public -export interface WorkspaceApiReleaseCreateOrUpdateHeaders { - eTag?: string; +export interface SaveConfigurationParameterProperties { + branch: string; + force?: boolean; } // @public -export interface WorkspaceApiReleaseCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface SchemaContract extends ProxyResource { + contentType?: string; + document?: SchemaDocumentProperties; + readonly provisioningState?: string; } // @public -export type WorkspaceApiReleaseCreateOrUpdateResponse = WorkspaceApiReleaseCreateOrUpdateHeaders & ApiReleaseContract; - -// @public -export interface WorkspaceApiReleaseDeleteOptionalParams extends coreClient.OperationOptions { +export interface SchemaContractProperties { + components?: any; + contentType: string; + definitions?: any; + readonly provisioningState?: string; + value?: string; } // @public -export interface WorkspaceApiReleaseGetEntityTagHeaders { - eTag?: string; +export interface SchemaDocumentProperties { + components?: any; + definitions?: any; + value?: string; } // @public -export interface WorkspaceApiReleaseGetEntityTagOptionalParams extends coreClient.OperationOptions { -} +export type SchemaType = string; // @public -export type WorkspaceApiReleaseGetEntityTagResponse = WorkspaceApiReleaseGetEntityTagHeaders; +export type SettingsTypeName = string; // @public -export interface WorkspaceApiReleaseGetHeaders { - eTag?: string; -} +export type Severity = string; // @public -export interface WorkspaceApiReleaseGetOptionalParams extends coreClient.OperationOptions { +export interface SignInSettingsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceApiReleaseGetResponse = WorkspaceApiReleaseGetHeaders & ApiReleaseContract; +export interface SignInSettingsGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiReleaseListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface SignInSettingsGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiReleaseListByServiceNextResponse = ApiReleaseCollection; +export interface SignInSettingsOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, parameters: PortalSigninSettings, options?: SignInSettingsCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, options?: SignInSettingsGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, options?: SignInSettingsGetEntityTagOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalSigninSettings, options?: SignInSettingsUpdateOptionalParams) => Promise; +} // @public -export interface WorkspaceApiReleaseListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface SignInSettingsUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiReleaseListByServiceResponse = ApiReleaseCollection; +export interface SignUpSettingsCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface WorkspaceApiReleaseUpdateHeaders { - eTag?: string; +export interface SignUpSettingsGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiReleaseUpdateOptionalParams extends coreClient.OperationOptions { +export interface SignUpSettingsGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiReleaseUpdateResponse = WorkspaceApiReleaseUpdateHeaders & ApiReleaseContract; +export interface SignUpSettingsOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, parameters: PortalSignupSettings, options?: SignUpSettingsCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, options?: SignUpSettingsGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, options?: SignUpSettingsGetEntityTagOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, ifMatch: string, parameters: PortalSignupSettings, options?: SignUpSettingsUpdateOptionalParams) => Promise; +} // @public -export interface WorkspaceApiRevision { - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiRevisionListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface SignUpSettingsUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiRevisionListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface SimplePollerLike, TResult> { + getOperationState(): TState; + getResult(): TResult | undefined; + isDone(): boolean; + // @deprecated + isStopped(): boolean; + onProgress(callback: (state: TState) => void): CancelOnProgress; + poll(options?: { + abortSignal?: AbortSignalLike; + }): Promise; + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise; + serialize(): Promise; + // @deprecated + stopPolling(): void; + submitted(): Promise; + // @deprecated + toString(): string; } // @public -export type WorkspaceApiRevisionListByServiceNextResponse = ApiRevisionCollection; +export type SkuType = string; // @public -export interface WorkspaceApiRevisionListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} +export type SoapApiType = string; // @public -export type WorkspaceApiRevisionListByServiceResponse = ApiRevisionCollection; +export type State = string; // @public -export interface WorkspaceApiSchema { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams): Promise, WorkspaceApiSchemaCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, ifMatch: string, options?: WorkspaceApiSchemaDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, options?: WorkspaceApiSchemaGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, options?: WorkspaceApiSchemaGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiSchemaListByApiOptionalParams): PagedAsyncIterableIterator; +export interface SubscriptionContract extends ProxyResource { + allowTracing?: boolean; + readonly createdDate?: Date; + displayName?: string; + endDate?: Date; + expirationDate?: Date; + notificationDate?: Date; + ownerId?: string; + primaryKey?: string; + scope?: string; + secondaryKey?: string; + startDate?: Date; + state?: SubscriptionState; + stateComment?: string; } // @public -export interface WorkspaceApiSchemaCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface SubscriptionContractProperties { + allowTracing?: boolean; + readonly createdDate?: Date; + displayName?: string; + endDate?: Date; + expirationDate?: Date; + notificationDate?: Date; + ownerId?: string; + primaryKey?: string; + scope: string; + secondaryKey?: string; + startDate?: Date; + state: SubscriptionState; + stateComment?: string; } // @public -export interface WorkspaceApiSchemaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionCreateOrUpdateOptionalParams extends OperationOptions { + appType?: AppType; ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; + notify?: boolean; } // @public -export type WorkspaceApiSchemaCreateOrUpdateResponse = WorkspaceApiSchemaCreateOrUpdateHeaders & SchemaContract; - -// @public -export interface WorkspaceApiSchemaDeleteOptionalParams extends coreClient.OperationOptions { - force?: boolean; +export interface SubscriptionCreateParameterProperties { + allowTracing?: boolean; + displayName: string; + ownerId?: string; + primaryKey?: string; + scope: string; + secondaryKey?: string; + state?: SubscriptionState; } // @public -export interface WorkspaceApiSchemaGetEntityTagHeaders { - eTag?: string; +export interface SubscriptionCreateParameters { + allowTracing?: boolean; + displayName?: string; + ownerId?: string; + primaryKey?: string; + scope?: string; + secondaryKey?: string; + state?: SubscriptionState; } // @public -export interface WorkspaceApiSchemaGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiSchemaGetEntityTagResponse = WorkspaceApiSchemaGetEntityTagHeaders; - -// @public -export interface WorkspaceApiSchemaGetHeaders { - eTag?: string; +export interface SubscriptionGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiSchemaGetOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiSchemaGetResponse = WorkspaceApiSchemaGetHeaders & SchemaContract; - -// @public -export interface WorkspaceApiSchemaListByApiNextOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionKeyParameterNamesContract { + header?: string; + query?: string; } // @public -export type WorkspaceApiSchemaListByApiNextResponse = SchemaCollection; +export interface SubscriptionKeysContract { + primaryKey?: string; + secondaryKey?: string; +} // @public -export interface WorkspaceApiSchemaListByApiOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionListOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceApiSchemaListByApiResponse = SchemaCollection; - -// @public -export interface WorkspaceApiUpdateHeaders { - eTag?: string; +export interface SubscriptionListSecretsOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiUpdateOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, sid: string, parameters: SubscriptionCreateParameters, options?: SubscriptionCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, sid: string, ifMatch: string, options?: SubscriptionDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionGetEntityTagOptionalParams) => Promise; + list: (resourceGroupName: string, serviceName: string, options?: SubscriptionListOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionListSecretsOptionalParams) => Promise; + regeneratePrimaryKey: (resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionRegeneratePrimaryKeyOptionalParams) => Promise; + regenerateSecondaryKey: (resourceGroupName: string, serviceName: string, sid: string, options?: SubscriptionRegenerateSecondaryKeyOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, sid: string, ifMatch: string, parameters: SubscriptionUpdateParameters, options?: SubscriptionUpdateOptionalParams) => Promise; } // @public -export type WorkspaceApiUpdateResponse = WorkspaceApiUpdateHeaders & ApiContract; - -// @public -export interface WorkspaceApiVersionSet { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, parameters: ApiVersionSetContract, options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, ifMatch: string, options?: WorkspaceApiVersionSetDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, options?: WorkspaceApiVersionSetGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, options?: WorkspaceApiVersionSetGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceApiVersionSetListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, ifMatch: string, parameters: ApiVersionSetUpdateParameters, options?: WorkspaceApiVersionSetUpdateOptionalParams): Promise; +export interface SubscriptionRegeneratePrimaryKeyOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiVersionSetCreateOrUpdateHeaders { - eTag?: string; +export interface SubscriptionRegenerateSecondaryKeyOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiVersionSetCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface SubscriptionsDelegationSettingsProperties { + enabled?: boolean; } // @public -export type WorkspaceApiVersionSetCreateOrUpdateResponse = WorkspaceApiVersionSetCreateOrUpdateHeaders & ApiVersionSetContract; +export type SubscriptionState = "suspended" | "active" | "expired" | "submitted" | "rejected" | "cancelled"; // @public -export interface WorkspaceApiVersionSetDeleteOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionUpdateOptionalParams extends OperationOptions { + appType?: AppType; + notify?: boolean; } // @public -export interface WorkspaceApiVersionSetGetEntityTagHeaders { - eTag?: string; +export interface SubscriptionUpdateParameterProperties { + allowTracing?: boolean; + displayName?: string; + expirationDate?: Date; + ownerId?: string; + primaryKey?: string; + scope?: string; + secondaryKey?: string; + state?: SubscriptionState; + stateComment?: string; } // @public -export interface WorkspaceApiVersionSetGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface SubscriptionUpdateParameters { + allowTracing?: boolean; + displayName?: string; + expirationDate?: Date; + ownerId?: string; + primaryKey?: string; + scope?: string; + secondaryKey?: string; + state?: SubscriptionState; + stateComment?: string; } // @public -export type WorkspaceApiVersionSetGetEntityTagResponse = WorkspaceApiVersionSetGetEntityTagHeaders; +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} // @public -export interface WorkspaceApiVersionSetGetHeaders { - eTag?: string; +export interface TagApiLinkContract extends ProxyResource { + apiId?: string; } // @public -export interface WorkspaceApiVersionSetGetOptionalParams extends coreClient.OperationOptions { +export interface TagApiLinkContractProperties { + apiId: string; } // @public -export type WorkspaceApiVersionSetGetResponse = WorkspaceApiVersionSetGetHeaders & ApiVersionSetContract; +export interface TagApiLinkCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiVersionSetListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface TagApiLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiVersionSetListByServiceNextResponse = ApiVersionSetCollection; +export interface TagApiLinkGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceApiVersionSetListByServiceOptionalParams extends coreClient.OperationOptions { +export interface TagApiLinkListByProductOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceApiVersionSetListByServiceResponse = ApiVersionSetCollection; +export interface TagApiLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, parameters: TagApiLinkContract, options?: TagApiLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, options?: TagApiLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, tagId: string, apiLinkId: string, options?: TagApiLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, tagId: string, options?: TagApiLinkListByProductOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceApiVersionSetUpdateHeaders { - eTag?: string; +export interface TagAssignToApiOptionalParams extends OperationOptions { } // @public -export interface WorkspaceApiVersionSetUpdateOptionalParams extends coreClient.OperationOptions { +export interface TagAssignToOperationOptionalParams extends OperationOptions { } // @public -export type WorkspaceApiVersionSetUpdateResponse = WorkspaceApiVersionSetUpdateHeaders & ApiVersionSetContract; +export interface TagAssignToProductOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceBackend { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, parameters: BackendContract, options?: WorkspaceBackendCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, ifMatch: string, options?: WorkspaceBackendDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, options?: WorkspaceBackendGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, options?: WorkspaceBackendGetEntityTagOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceBackendListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, ifMatch: string, parameters: BackendUpdateParameters, options?: WorkspaceBackendUpdateOptionalParams): Promise; +export interface TagContract extends ProxyResource { + displayName?: string; } // @public -export interface WorkspaceBackendCreateOrUpdateHeaders { - eTag?: string; +export interface TagContractProperties { + displayName: string; } // @public -export interface WorkspaceBackendCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface TagCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type WorkspaceBackendCreateOrUpdateResponse = WorkspaceBackendCreateOrUpdateHeaders & BackendContract; - -// @public -export interface WorkspaceBackendDeleteOptionalParams extends coreClient.OperationOptions { +export interface TagCreateUpdateParameters { + displayName?: string; } // @public -export interface WorkspaceBackendGetEntityTagHeaders { - eTag?: string; +export interface TagDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceBackendGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface TagDescriptionBaseProperties { + description?: string; + externalDocsDescription?: string; + externalDocsUrl?: string; } // @public -export type WorkspaceBackendGetEntityTagResponse = WorkspaceBackendGetEntityTagHeaders; - -// @public -export interface WorkspaceBackendGetHeaders { - eTag?: string; +export interface TagDescriptionContract extends ProxyResource { + description?: string; + displayName?: string; + externalDocsDescription?: string; + externalDocsUrl?: string; + tagId?: string; } // @public -export interface WorkspaceBackendGetOptionalParams extends coreClient.OperationOptions { +export interface TagDescriptionContractProperties extends TagDescriptionBaseProperties { + displayName?: string; + tagId?: string; } // @public -export type WorkspaceBackendGetResponse = WorkspaceBackendGetHeaders & BackendContract; +export interface TagDescriptionCreateParameters { + description?: string; + externalDocsDescription?: string; + externalDocsUrl?: string; +} // @public -export interface WorkspaceBackendListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +export interface TagDetachFromApiOptionalParams extends OperationOptions { } // @public -export type WorkspaceBackendListByWorkspaceNextResponse = BackendCollection; +export interface TagDetachFromOperationOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceBackendListByWorkspaceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface TagDetachFromProductOptionalParams extends OperationOptions { } // @public -export type WorkspaceBackendListByWorkspaceResponse = BackendCollection; +export interface TagGetByApiOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceBackendUpdateHeaders { - eTag?: string; +export interface TagGetByOperationOptionalParams extends OperationOptions { } // @public -export interface WorkspaceBackendUpdateOptionalParams extends coreClient.OperationOptions { +export interface TagGetByProductOptionalParams extends OperationOptions { } // @public -export type WorkspaceBackendUpdateResponse = WorkspaceBackendUpdateHeaders & BackendContract; +export interface TagGetEntityStateByApiOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceCertificate { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, parameters: CertificateCreateOrUpdateParameters, options?: WorkspaceCertificateCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, ifMatch: string, options?: WorkspaceCertificateDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateGetEntityTagOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceCertificateListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - refreshSecret(resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateRefreshSecretOptionalParams): Promise; +export interface TagGetEntityStateByOperationOptionalParams extends OperationOptions { } // @public -export interface WorkspaceCertificateCreateOrUpdateHeaders { - eTag?: string; +export interface TagGetEntityStateByProductOptionalParams extends OperationOptions { } // @public -export interface WorkspaceCertificateCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface TagGetEntityStateOptionalParams extends OperationOptions { } // @public -export type WorkspaceCertificateCreateOrUpdateResponse = WorkspaceCertificateCreateOrUpdateHeaders & CertificateContract; +export interface TagGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceCertificateDeleteOptionalParams extends coreClient.OperationOptions { +export interface TagListByApiOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceCertificateGetEntityTagHeaders { - eTag?: string; +export interface TagListByOperationOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceCertificateGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface TagListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceCertificateGetEntityTagResponse = WorkspaceCertificateGetEntityTagHeaders; +export interface TagListByServiceOptionalParams extends OperationOptions { + filter?: string; + scope?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceCertificateGetHeaders { - eTag?: string; +export interface TagOperationLinkContract extends ProxyResource { + operationId?: string; } // @public -export interface WorkspaceCertificateGetOptionalParams extends coreClient.OperationOptions { +export interface TagOperationLinkContractProperties { + operationId: string; } // @public -export type WorkspaceCertificateGetResponse = WorkspaceCertificateGetHeaders & CertificateContract; +export interface TagOperationLinkCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceCertificateListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +export interface TagOperationLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceCertificateListByWorkspaceNextResponse = CertificateCollection; +export interface TagOperationLinkGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceCertificateListByWorkspaceOptionalParams extends coreClient.OperationOptions { +export interface TagOperationLinkListByProductOptionalParams extends OperationOptions { filter?: string; - isKeyVaultRefreshFailed?: boolean; skip?: number; top?: number; } // @public -export type WorkspaceCertificateListByWorkspaceResponse = CertificateCollection; - -// @public -export interface WorkspaceCertificateRefreshSecretHeaders { - eTag?: string; +export interface TagOperationLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, parameters: TagOperationLinkContract, options?: TagOperationLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, options?: TagOperationLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, tagId: string, operationLinkId: string, options?: TagOperationLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, tagId: string, options?: TagOperationLinkListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceCertificateRefreshSecretOptionalParams extends coreClient.OperationOptions { +export interface TagOperations { + assignToApi: (resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagAssignToApiOptionalParams) => Promise; + assignToOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagAssignToOperationOptionalParams) => Promise; + assignToProduct: (resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagAssignToProductOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, tagId: string, parameters: TagCreateUpdateParameters, options?: TagCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, tagId: string, ifMatch: string, options?: TagDeleteOptionalParams) => Promise; + detachFromApi: (resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagDetachFromApiOptionalParams) => Promise; + detachFromOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagDetachFromOperationOptionalParams) => Promise; + detachFromProduct: (resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagDetachFromProductOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, tagId: string, options?: TagGetOptionalParams) => Promise; + getByApi: (resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagGetByApiOptionalParams) => Promise; + getByOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagGetByOperationOptionalParams) => Promise; + getByProduct: (resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagGetByProductOptionalParams) => Promise; + getEntityState: (resourceGroupName: string, serviceName: string, tagId: string, options?: TagGetEntityStateOptionalParams) => Promise; + getEntityStateByApi: (resourceGroupName: string, serviceName: string, apiId: string, tagId: string, options?: TagGetEntityStateByApiOptionalParams) => Promise; + getEntityStateByOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, tagId: string, options?: TagGetEntityStateByOperationOptionalParams) => Promise; + getEntityStateByProduct: (resourceGroupName: string, serviceName: string, productId: string, tagId: string, options?: TagGetEntityStateByProductOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, apiId: string, options?: TagListByApiOptionalParams) => PagedAsyncIterableIterator; + listByOperation: (resourceGroupName: string, serviceName: string, apiId: string, operationId: string, options?: TagListByOperationOptionalParams) => PagedAsyncIterableIterator; + listByProduct: (resourceGroupName: string, serviceName: string, productId: string, options?: TagListByProductOptionalParams) => PagedAsyncIterableIterator; + listByService: (resourceGroupName: string, serviceName: string, options?: TagListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, tagId: string, ifMatch: string, parameters: TagCreateUpdateParameters, options?: TagUpdateOptionalParams) => Promise; } // @public -export type WorkspaceCertificateRefreshSecretResponse = WorkspaceCertificateRefreshSecretHeaders & CertificateContract; - -// @public -export interface WorkspaceCollection { - count?: number; - nextLink?: string; - value?: WorkspaceContract[]; +export interface TagProductLinkContract extends ProxyResource { + productId?: string; } // @public -export interface WorkspaceContract extends ProxyResource { - description?: string; - displayName?: string; +export interface TagProductLinkContractProperties { + productId: string; } // @public -export interface WorkspaceCreateOrUpdateHeaders { - eTag?: string; +export interface TagProductLinkCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface TagProductLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceCreateOrUpdateResponse = WorkspaceCreateOrUpdateHeaders & WorkspaceContract; - -// @public -export interface WorkspaceDeleteOptionalParams extends coreClient.OperationOptions { +export interface TagProductLinkGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceDiagnostic { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, parameters: DiagnosticContract, options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, ifMatch: string, options?: WorkspaceDiagnosticDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, options?: WorkspaceDiagnosticGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, options?: WorkspaceDiagnosticGetEntityTagOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceDiagnosticListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticUpdateContract, options?: WorkspaceDiagnosticUpdateOptionalParams): Promise; +export interface TagProductLinkListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceDiagnosticCreateOrUpdateHeaders { - eTag?: string; +export interface TagProductLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, parameters: TagProductLinkContract, options?: TagProductLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, options?: TagProductLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, tagId: string, productLinkId: string, options?: TagProductLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, tagId: string, options?: TagProductLinkListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceDiagnosticCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface TagResourceContract { + api?: ApiTagResourceContractProperties; + operation?: OperationTagResourceContractProperties; + product?: ProductTagResourceContractProperties; + tag: TagTagResourceContractProperties; } // @public -export type WorkspaceDiagnosticCreateOrUpdateResponse = WorkspaceDiagnosticCreateOrUpdateHeaders & DiagnosticContract; +export interface TagResourceListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceDiagnosticDeleteOptionalParams extends coreClient.OperationOptions { +export interface TagResourceOperations { + listByService: (resourceGroupName: string, serviceName: string, options?: TagResourceListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceDiagnosticGetEntityTagHeaders { - eTag?: string; +export interface TagTagResourceContractProperties { + id?: string; + name?: string; } // @public -export interface WorkspaceDiagnosticGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface TagUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceDiagnosticGetEntityTagResponse = WorkspaceDiagnosticGetEntityTagHeaders; +export type TemplateName = string; // @public -export interface WorkspaceDiagnosticGetHeaders { - eTag?: string; +export interface TenantAccessCreateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceDiagnosticGetOptionalParams extends coreClient.OperationOptions { +export interface TenantAccessGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceDiagnosticGetResponse = WorkspaceDiagnosticGetHeaders & DiagnosticContract; +export interface TenantAccessGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceDiagnosticListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +export interface TenantAccessGitOperations { + regeneratePrimaryKey: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams) => Promise; + regenerateSecondaryKey: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams) => Promise; } // @public -export type WorkspaceDiagnosticListByWorkspaceNextResponse = DiagnosticCollection; +export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceDiagnosticListByWorkspaceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams extends OperationOptions { } // @public -export type WorkspaceDiagnosticListByWorkspaceResponse = DiagnosticCollection; +export interface TenantAccessListByServiceOptionalParams extends OperationOptions { + filter?: string; +} // @public -export interface WorkspaceDiagnosticUpdateHeaders { - eTag?: string; +export interface TenantAccessListSecretsOptionalParams extends OperationOptions { } // @public -export interface WorkspaceDiagnosticUpdateOptionalParams extends coreClient.OperationOptions { +export interface TenantAccessOperations { + create: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, ifMatch: string, parameters: AccessInformationCreateParameters, options?: TenantAccessCreateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: TenantAccessListByServiceOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessListSecretsOptionalParams) => Promise; + regeneratePrimaryKey: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessRegeneratePrimaryKeyOptionalParams) => Promise; + regenerateSecondaryKey: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, options?: TenantAccessRegenerateSecondaryKeyOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, accessName: AccessIdName, ifMatch: string, parameters: AccessInformationUpdateParameters, options?: TenantAccessUpdateOptionalParams) => Promise; } // @public -export type WorkspaceDiagnosticUpdateResponse = WorkspaceDiagnosticUpdateHeaders & DiagnosticContract; +export interface TenantAccessRegeneratePrimaryKeyOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceGetEntityTagHeaders { - eTag?: string; +export interface TenantAccessRegenerateSecondaryKeyOptionalParams extends OperationOptions { } // @public -export interface WorkspaceGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface TenantAccessUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceGetEntityTagResponse = WorkspaceGetEntityTagHeaders; +export interface TenantConfigurationDeployOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface WorkspaceGetHeaders { - eTag?: string; +export interface TenantConfigurationGetSyncStateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceGetOptionalParams extends coreClient.OperationOptions { +export interface TenantConfigurationOperations { + // @deprecated (undocumented) + beginDeploy: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationDeployOptionalParams) => Promise, OperationResultContract>>; + // @deprecated (undocumented) + beginDeployAndWait: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationDeployOptionalParams) => Promise; + // @deprecated (undocumented) + beginSave: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: SaveConfigurationParameter, options?: TenantConfigurationSaveOptionalParams) => Promise, OperationResultContract>>; + // @deprecated (undocumented) + beginSaveAndWait: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: SaveConfigurationParameter, options?: TenantConfigurationSaveOptionalParams) => Promise; + // @deprecated (undocumented) + beginValidate: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationValidateOptionalParams) => Promise, OperationResultContract>>; + // @deprecated (undocumented) + beginValidateAndWait: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationValidateOptionalParams) => Promise; + deploy: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationDeployOptionalParams) => PollerLike, OperationResultContract>; + getSyncState: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, options?: TenantConfigurationGetSyncStateOptionalParams) => Promise; + save: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: SaveConfigurationParameter, options?: TenantConfigurationSaveOptionalParams) => PollerLike, OperationResultContract>; + validate: (resourceGroupName: string, serviceName: string, configurationName: ConfigurationIdName, parameters: DeployConfigurationParameters, options?: TenantConfigurationValidateOptionalParams) => PollerLike, OperationResultContract>; } // @public -export type WorkspaceGetResponse = WorkspaceGetHeaders & WorkspaceContract; +export interface TenantConfigurationSaveOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} // @public -export interface WorkspaceGlobalSchema { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, parameters: GlobalSchemaContract, options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams): Promise, WorkspaceGlobalSchemaCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, parameters: GlobalSchemaContract, options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, ifMatch: string, options?: WorkspaceGlobalSchemaDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, options?: WorkspaceGlobalSchemaGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGlobalSchemaListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface TenantConfigurationSyncStateContract extends ProxyResource { + branch?: string; + commitId?: string; + configurationChangeDate?: Date; + isExport?: boolean; + isGitEnabled?: boolean; + isSynced?: boolean; + lastOperationId?: string; + syncDate?: Date; } // @public -export interface WorkspaceGlobalSchemaCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface TenantConfigurationSyncStateContractProperties { + branch?: string; + commitId?: string; + configurationChangeDate?: Date; + isExport?: boolean; + isGitEnabled?: boolean; + isSynced?: boolean; + lastOperationId?: string; + syncDate?: Date; } // @public -export interface WorkspaceGlobalSchemaCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; +export interface TenantConfigurationValidateOptionalParams extends OperationOptions { updateIntervalInMs?: number; } // @public -export type WorkspaceGlobalSchemaCreateOrUpdateResponse = WorkspaceGlobalSchemaCreateOrUpdateHeaders & GlobalSchemaContract; +export interface TenantSettingsContract extends ProxyResource { + settings?: Record; +} // @public -export interface WorkspaceGlobalSchemaDeleteOptionalParams extends coreClient.OperationOptions { +export interface TenantSettingsContractProperties { + settings?: Record; } // @public -export interface WorkspaceGlobalSchemaGetEntityTagHeaders { - eTag?: string; +export interface TenantSettingsGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceGlobalSchemaGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface TenantSettingsListByServiceOptionalParams extends OperationOptions { + filter?: string; } // @public -export type WorkspaceGlobalSchemaGetEntityTagResponse = WorkspaceGlobalSchemaGetEntityTagHeaders; +export interface TenantSettingsOperations { + get: (resourceGroupName: string, serviceName: string, settingsType: SettingsTypeName, options?: TenantSettingsGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: TenantSettingsListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceGlobalSchemaGetHeaders { - eTag?: string; +export interface TermsOfServiceProperties { + consentRequired?: boolean; + enabled?: boolean; + text?: string; } // @public -export interface WorkspaceGlobalSchemaGetOptionalParams extends coreClient.OperationOptions { +export interface TokenBodyParameterContract { + name: string; + value: string; } // @public -export type WorkspaceGlobalSchemaGetResponse = WorkspaceGlobalSchemaGetHeaders & GlobalSchemaContract; +export interface ToolContract extends ProxyResource { + description?: string; + displayName?: string; + operationId?: string; +} // @public -export interface WorkspaceGlobalSchemaListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface ToolContractProperties { + description?: string; + displayName?: string; + operationId?: string; } // @public -export type WorkspaceGlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; +export interface TrackedResource extends Resource { + location: string; + tags?: Record; +} // @public -export interface WorkspaceGlobalSchemaListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; -} +export type TranslateRequiredQueryParametersConduct = string; // @public -export type WorkspaceGlobalSchemaListByServiceResponse = GlobalSchemaCollection; +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} // @public -export interface WorkspaceGroup { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, parameters: GroupCreateParameters, options?: WorkspaceGroupCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, ifMatch: string, options?: WorkspaceGroupDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGroupListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, ifMatch: string, parameters: GroupUpdateParameters, options?: WorkspaceGroupUpdateOptionalParams): Promise; +export interface UserConfirmationPasswordOperations { + send: (resourceGroupName: string, serviceName: string, userId: string, options?: UserConfirmationPasswordSendOptionalParams) => Promise; } // @public -export interface WorkspaceGroupCreateOrUpdateHeaders { - eTag?: string; +export interface UserConfirmationPasswordSendOptionalParams extends OperationOptions { + appType?: AppType; } // @public -export interface WorkspaceGroupCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface UserContract extends ProxyResource { + email?: string; + firstName?: string; + readonly groups?: GroupContractProperties[]; + identities?: UserIdentityContract[]; + lastName?: string; + note?: string; + registrationDate?: Date; + state?: UserState; } // @public -export type WorkspaceGroupCreateOrUpdateResponse = WorkspaceGroupCreateOrUpdateHeaders & GroupContract; +export interface UserContractProperties extends UserEntityBaseParameters { + email?: string; + firstName?: string; + readonly groups?: GroupContractProperties[]; + lastName?: string; + registrationDate?: Date; +} // @public -export interface WorkspaceGroupDeleteOptionalParams extends coreClient.OperationOptions { +export interface UserCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + notify?: boolean; } // @public -export interface WorkspaceGroupGetEntityTagHeaders { - eTag?: string; +export interface UserCreateParameterProperties extends UserEntityBaseParameters { + appType?: AppType; + confirmation?: Confirmation; + email: string; + firstName: string; + lastName: string; + password?: string; } // @public -export interface WorkspaceGroupGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface UserCreateParameters { + appType?: AppType; + confirmation?: Confirmation; + email?: string; + firstName?: string; + identities?: UserIdentityContract[]; + lastName?: string; + note?: string; + password?: string; + state?: UserState; } // @public -export type WorkspaceGroupGetEntityTagResponse = WorkspaceGroupGetEntityTagHeaders; +export interface UserDeleteOptionalParams extends OperationOptions { + appType?: AppType; + deleteSubscriptions?: boolean; + notify?: boolean; + updateIntervalInMs?: number; +} // @public -export interface WorkspaceGroupGetHeaders { - eTag?: string; +export interface UserEntityBaseParameters { + identities?: UserIdentityContract[]; + note?: string; + state?: UserState; } // @public -export interface WorkspaceGroupGetOptionalParams extends coreClient.OperationOptions { +export interface UserGenerateSsoUrlOptionalParams extends OperationOptions { } // @public -export type WorkspaceGroupGetResponse = WorkspaceGroupGetHeaders & GroupContract; +export interface UserGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceGroupListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface UserGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceGroupListByServiceNextResponse = GroupCollection; +export interface UserGetSharedAccessTokenOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceGroupListByServiceOptionalParams extends coreClient.OperationOptions { +export interface UserGroupListOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceGroupListByServiceResponse = GroupCollection; - -// @public -export interface WorkspaceGroupUpdateHeaders { - eTag?: string; +export interface UserGroupOperations { + list: (resourceGroupName: string, serviceName: string, userId: string, options?: UserGroupListOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceGroupUpdateOptionalParams extends coreClient.OperationOptions { +export interface UserIdentitiesListOptionalParams extends OperationOptions { } // @public -export type WorkspaceGroupUpdateResponse = WorkspaceGroupUpdateHeaders & GroupContract; +export interface UserIdentitiesOperations { + list: (resourceGroupName: string, serviceName: string, userId: string, options?: UserIdentitiesListOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceGroupUser { - checkEntityExists(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserCheckEntityExistsOptionalParams): Promise; - create(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserCreateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserDeleteOptionalParams): Promise; - list(resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupUserListOptionalParams): PagedAsyncIterableIterator; +export interface UserIdentityContract { + id?: string; + provider?: string; } // @public -export interface WorkspaceGroupUserCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface UserIdentityProperties { + clientId?: string; + principalId?: string; } // @public -export type WorkspaceGroupUserCheckEntityExistsResponse = { - body: boolean; -}; +export interface UserListByServiceOptionalParams extends OperationOptions { + expandGroups?: boolean; + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceGroupUserCreateOptionalParams extends coreClient.OperationOptions { +export interface UserOperations { + // @deprecated (undocumented) + beginDelete: (resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, options?: UserDeleteOptionalParams) => Promise, void>>; + // @deprecated (undocumented) + beginDeleteAndWait: (resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, options?: UserDeleteOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, userId: string, parameters: UserCreateParameters, options?: UserCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, options?: UserDeleteOptionalParams) => PollerLike, void>; + generateSsoUrl: (resourceGroupName: string, serviceName: string, userId: string, options?: UserGenerateSsoUrlOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, userId: string, options?: UserGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, userId: string, options?: UserGetEntityTagOptionalParams) => Promise; + getSharedAccessToken: (resourceGroupName: string, serviceName: string, userId: string, parameters: UserTokenParameters, options?: UserGetSharedAccessTokenOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: UserListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, userId: string, ifMatch: string, parameters: UserUpdateParameters, options?: UserUpdateOptionalParams) => Promise; } // @public -export type WorkspaceGroupUserCreateResponse = UserContract; +export type UserState = string; // @public -export interface WorkspaceGroupUserDeleteOptionalParams extends coreClient.OperationOptions { +export interface UserSubscriptionGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceGroupUserListNextOptionalParams extends coreClient.OperationOptions { +export interface UserSubscriptionListOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceGroupUserListNextResponse = UserCollection; +export interface UserSubscriptionOperations { + get: (resourceGroupName: string, serviceName: string, userId: string, sid: string, options?: UserSubscriptionGetOptionalParams) => Promise; + list: (resourceGroupName: string, serviceName: string, userId: string, options?: UserSubscriptionListOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceGroupUserListOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface UserTokenParameterProperties { + expiry: Date; + keyType: KeyType; } // @public -export type WorkspaceGroupUserListResponse = UserCollection; - -// @public (undocumented) -export interface WorkspaceLinksBaseProperties { - gateways?: WorkspaceLinksGateway[]; - workspaceId?: string; +export interface UserTokenParameters { + expiry?: Date; + keyType?: KeyType; } -// @public (undocumented) -export interface WorkspaceLinksGateway { - id?: string; +// @public +export interface UserTokenResult { + value?: string; } // @public -export interface WorkspaceListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface UserUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceListByServiceNextResponse = WorkspaceCollection; +export interface UserUpdateParameters { + email?: string; + firstName?: string; + identities?: UserIdentityContract[]; + lastName?: string; + note?: string; + password?: string; + state?: UserState; +} // @public -export interface WorkspaceListByServiceOptionalParams extends coreClient.OperationOptions { - filter?: string; - skip?: number; - top?: number; +export interface UserUpdateParametersProperties extends UserEntityBaseParameters { + email?: string; + firstName?: string; + lastName?: string; + password?: string; } // @public -export type WorkspaceListByServiceResponse = WorkspaceCollection; +export type Verbosity = string; // @public -export interface WorkspaceLogger { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, parameters: LoggerContract, options?: WorkspaceLoggerCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, ifMatch: string, options?: WorkspaceLoggerDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, options?: WorkspaceLoggerGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, options?: WorkspaceLoggerGetEntityTagOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceLoggerListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, ifMatch: string, parameters: LoggerUpdateContract, options?: WorkspaceLoggerUpdateOptionalParams): Promise; -} +export type VersioningScheme = string; // @public -export interface WorkspaceLoggerCreateOrUpdateHeaders { - eTag?: string; +export interface VirtualNetworkConfiguration { + readonly subnetname?: string; + subnetResourceId?: string; + readonly vnetid?: string; } // @public -export interface WorkspaceLoggerCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; -} +export type VirtualNetworkType = string; // @public -export type WorkspaceLoggerCreateOrUpdateResponse = WorkspaceLoggerCreateOrUpdateHeaders & LoggerContract; +export interface WikiContract extends ProxyResource { + documents?: WikiDocumentationContract[]; +} // @public -export interface WorkspaceLoggerDeleteOptionalParams extends coreClient.OperationOptions { +export interface WikiContractProperties { + documents?: WikiDocumentationContract[]; } // @public -export interface WorkspaceLoggerGetEntityTagHeaders { - eTag?: string; +export interface WikiDocumentationContract { + documentationId?: string; } // @public -export interface WorkspaceLoggerGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WikiUpdateContract { + documents?: WikiDocumentationContract[]; } // @public -export type WorkspaceLoggerGetEntityTagResponse = WorkspaceLoggerGetEntityTagHeaders; +export interface WorkspaceApiCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; +} // @public -export interface WorkspaceLoggerGetHeaders { - eTag?: string; +export interface WorkspaceApiDeleteOptionalParams extends OperationOptions { + deleteRevisions?: boolean; } // @public -export interface WorkspaceLoggerGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceLoggerGetResponse = WorkspaceLoggerGetHeaders & LoggerContract; +export interface WorkspaceApiDiagnosticDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceLoggerListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiDiagnosticGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceLoggerListByWorkspaceNextResponse = LoggerCollection; +export interface WorkspaceApiDiagnosticGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceLoggerListByWorkspaceOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiDiagnosticListByWorkspaceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceLoggerListByWorkspaceResponse = LoggerCollection; - -// @public -export interface WorkspaceLoggerUpdateHeaders { - eTag?: string; +export interface WorkspaceApiDiagnosticOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, parameters: DiagnosticContract, options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, ifMatch: string, options?: WorkspaceApiDiagnosticDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, options?: WorkspaceApiDiagnosticGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams) => Promise; + listByWorkspace: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticUpdateContract, options?: WorkspaceApiDiagnosticUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceLoggerUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiDiagnosticUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceLoggerUpdateResponse = WorkspaceLoggerUpdateHeaders & LoggerContract; - -// @public -export interface WorkspaceNamedValue { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, parameters: NamedValueCreateContract, options?: WorkspaceNamedValueCreateOrUpdateOptionalParams): Promise, WorkspaceNamedValueCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, parameters: NamedValueCreateContract, options?: WorkspaceNamedValueCreateOrUpdateOptionalParams): Promise; - beginRefreshSecret(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueRefreshSecretOptionalParams): Promise, WorkspaceNamedValueRefreshSecretResponse>>; - beginRefreshSecretAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueRefreshSecretOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: WorkspaceNamedValueUpdateOptionalParams): Promise, WorkspaceNamedValueUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: WorkspaceNamedValueUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, options?: WorkspaceNamedValueDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceNamedValueListByServiceOptionalParams): PagedAsyncIterableIterator; - listValue(resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueListValueOptionalParams): Promise; +export interface WorkspaceApiExportGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNamedValueCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface WorkspaceApiExportOperations { + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, format: ExportFormat, exportParam: ExportApi, options?: WorkspaceApiExportGetOptionalParams) => Promise; } // @public -export interface WorkspaceNamedValueCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; +export interface WorkspaceApiGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceNamedValueCreateOrUpdateResponse = WorkspaceNamedValueCreateOrUpdateHeaders & NamedValueContract; - -// @public -export interface WorkspaceNamedValueDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNamedValueGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceApiListByServiceOptionalParams extends OperationOptions { + expandApiVersionSet?: boolean; + filter?: string; + skip?: number; + tags?: string; + top?: number; } // @public -export interface WorkspaceNamedValueGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiOperationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceNamedValueGetEntityTagResponse = WorkspaceNamedValueGetEntityTagHeaders; - -// @public -export interface WorkspaceNamedValueGetHeaders { - eTag?: string; +export interface WorkspaceApiOperationDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNamedValueGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiOperationGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceNamedValueGetResponse = WorkspaceNamedValueGetHeaders & NamedValueContract; - -// @public -export interface WorkspaceNamedValueListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiOperationGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceNamedValueListByServiceNextResponse = NamedValueCollection; - -// @public -export interface WorkspaceNamedValueListByServiceOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiOperationListByApiOptionalParams extends OperationOptions { filter?: string; - isKeyVaultRefreshFailed?: KeyVaultRefreshState; skip?: number; + tags?: string; top?: number; } // @public -export type WorkspaceNamedValueListByServiceResponse = NamedValueCollection; - -// @public -export interface WorkspaceNamedValueListValueHeaders { - eTag?: string; +export interface WorkspaceApiOperationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, parameters: OperationContract, options?: WorkspaceApiOperationCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, ifMatch: string, options?: WorkspaceApiOperationDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiOperationListByApiOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, ifMatch: string, parameters: OperationUpdateContract, options?: WorkspaceApiOperationUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceNamedValueListValueOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceNamedValueListValueResponse = WorkspaceNamedValueListValueHeaders & NamedValueSecretContract; - -// @public -export interface WorkspaceNamedValueRefreshSecretHeaders { - eTag?: string; +export interface WorkspaceApiOperationPolicyDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNamedValueRefreshSecretOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface WorkspaceApiOperationPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceNamedValueRefreshSecretResponse = WorkspaceNamedValueRefreshSecretHeaders & NamedValueContract; +export interface WorkspaceApiOperationPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; +} // @public -export interface WorkspaceNamedValueUpdateHeaders { - eTag?: string; +export interface WorkspaceApiOperationPolicyListByOperationOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNamedValueUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; +export interface WorkspaceApiOperationPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceApiOperationPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: WorkspaceApiOperationPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, policyId: PolicyIdName, options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams) => Promise; + listByOperation: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, operationId: string, options?: WorkspaceApiOperationPolicyListByOperationOptionalParams) => PagedAsyncIterableIterator; } // @public -export type WorkspaceNamedValueUpdateResponse = WorkspaceNamedValueUpdateHeaders & NamedValueContract; +export interface WorkspaceApiOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: WorkspaceApiCreateOrUpdateOptionalParams) => Promise, ApiContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: WorkspaceApiCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, parameters: ApiCreateOrUpdateParameter, options?: WorkspaceApiCreateOrUpdateOptionalParams) => PollerLike, ApiContract>; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, ifMatch: string, options?: WorkspaceApiDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceApiListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, ifMatch: string, parameters: ApiUpdateContract, options?: WorkspaceApiUpdateOptionalParams) => Promise; +} // @public -export interface WorkspaceNotification { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationGetOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceNotificationListByServiceOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceApiOperationUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceNotificationCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiPolicyCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type WorkspaceNotificationCreateOrUpdateResponse = NotificationContract; - -// @public -export interface WorkspaceNotificationGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiPolicyDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationGetResponse = NotificationContract; - -// @public -export interface WorkspaceNotificationListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationListByServiceNextResponse = NotificationCollection; +export interface WorkspaceApiPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; +} // @public -export interface WorkspaceNotificationListByServiceOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; +export interface WorkspaceApiPolicyListByApiOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationListByServiceResponse = NotificationCollection; +export interface WorkspaceApiPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceApiPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, options?: WorkspaceApiPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, policyId: PolicyIdName, options?: WorkspaceApiPolicyGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiPolicyListByApiOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceNotificationRecipientEmail { - checkEntityExists(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams): Promise; - listByNotification(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams): Promise; +export interface WorkspaceApiReleaseCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiReleaseDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; -}; +export interface WorkspaceApiReleaseGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiReleaseGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationRecipientEmailCreateOrUpdateResponse = RecipientEmailContract; +export interface WorkspaceApiReleaseListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceNotificationRecipientEmailDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiReleaseOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, parameters: ApiReleaseContract, options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, ifMatch: string, options?: WorkspaceApiReleaseDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, options?: WorkspaceApiReleaseGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, options?: WorkspaceApiReleaseGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiReleaseListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, releaseId: string, ifMatch: string, parameters: ApiReleaseContract, options?: WorkspaceApiReleaseUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceNotificationRecipientEmailListByNotificationOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiReleaseUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationRecipientEmailListByNotificationResponse = RecipientEmailCollection; +export interface WorkspaceApiRevisionListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceNotificationRecipientUser { - checkEntityExists(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams): Promise; - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserDeleteOptionalParams): Promise; - listByNotification(resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams): Promise; +export interface WorkspaceApiRevisionOperations { + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiRevisionListByServiceOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiSchemaCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type WorkspaceNotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; -}; +export interface WorkspaceApiSchemaDeleteOptionalParams extends OperationOptions { + force?: boolean; +} // @public -export interface WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiSchemaGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceNotificationRecipientUserCreateOrUpdateResponse = RecipientUserContract; +export interface WorkspaceApiSchemaGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceNotificationRecipientUserDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiSchemaListByApiOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceNotificationRecipientUserListByNotificationOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiSchemaOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams) => Promise, SchemaContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, parameters: SchemaContract, options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams) => PollerLike, SchemaContract>; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, ifMatch: string, options?: WorkspaceApiSchemaDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, options?: WorkspaceApiSchemaGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, schemaId: string, options?: WorkspaceApiSchemaGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, workspaceId: string, apiId: string, options?: WorkspaceApiSchemaListByApiOptionalParams) => PagedAsyncIterableIterator; } // @public -export type WorkspaceNotificationRecipientUserListByNotificationResponse = RecipientUserCollection; +export interface WorkspaceApiUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspacePolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspacePolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspacePolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, options?: WorkspacePolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, options?: WorkspacePolicyGetEntityTagOptionalParams): Promise; - listByApi(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspacePolicyListByApiOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceApiVersionSetCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface WorkspacePolicyCreateOrUpdateHeaders { - eTag?: string; +export interface WorkspaceApiVersionSetDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface WorkspaceApiVersionSetGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspacePolicyCreateOrUpdateResponse = WorkspacePolicyCreateOrUpdateHeaders & PolicyContract; +export interface WorkspaceApiVersionSetGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspacePolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceApiVersionSetListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspacePolicyFragment { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams): Promise, WorkspacePolicyFragmentCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, ifMatch: string, options?: WorkspacePolicyFragmentDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspacePolicyFragmentListByServiceOptionalParams): PagedAsyncIterableIterator; - listReferences(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentListReferencesOptionalParams): Promise; +export interface WorkspaceApiVersionSetOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, parameters: ApiVersionSetContract, options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, ifMatch: string, options?: WorkspaceApiVersionSetDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, options?: WorkspaceApiVersionSetGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, options?: WorkspaceApiVersionSetGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceApiVersionSetListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, versionSetId: string, ifMatch: string, parameters: ApiVersionSetUpdateParameters, options?: WorkspaceApiVersionSetUpdateOptionalParams) => Promise; } // @public -export interface WorkspacePolicyFragmentCreateOrUpdateHeaders { - azureAsyncOperation?: string; - eTag?: string; - location?: string; +export interface WorkspaceApiVersionSetUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyFragmentCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceBackendCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; - resumeFrom?: string; - updateIntervalInMs?: number; } // @public -export type WorkspacePolicyFragmentCreateOrUpdateResponse = WorkspacePolicyFragmentCreateOrUpdateHeaders & PolicyFragmentContract; +export interface WorkspaceBackendDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspacePolicyFragmentDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceBackendGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyFragmentGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceBackendGetOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyFragmentGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceBackendListByWorkspaceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type WorkspacePolicyFragmentGetEntityTagResponse = WorkspacePolicyFragmentGetEntityTagHeaders; +export interface WorkspaceBackendOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, parameters: BackendContract, options?: WorkspaceBackendCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, ifMatch: string, options?: WorkspaceBackendDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, options?: WorkspaceBackendGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, options?: WorkspaceBackendGetEntityTagOptionalParams) => Promise; + listByWorkspace: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceBackendListByWorkspaceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, backendId: string, ifMatch: string, parameters: BackendUpdateParameters, options?: WorkspaceBackendUpdateOptionalParams) => Promise; +} // @public -export interface WorkspacePolicyFragmentGetHeaders { - eTag?: string; +export interface WorkspaceBackendUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyFragmentGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyFragmentContentFormat; +export interface WorkspaceCertificateCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspacePolicyFragmentGetResponse = WorkspacePolicyFragmentGetHeaders & PolicyFragmentContract; +export interface WorkspaceCertificateDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspacePolicyFragmentListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceCertificateGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspacePolicyFragmentListByServiceNextResponse = PolicyFragmentCollection; +export interface WorkspaceCertificateGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspacePolicyFragmentListByServiceOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceCertificateListByWorkspaceOptionalParams extends OperationOptions { filter?: string; - orderby?: string; + isKeyVaultRefreshFailed?: boolean; skip?: number; top?: number; } // @public -export type WorkspacePolicyFragmentListByServiceResponse = PolicyFragmentCollection; - -// @public -export interface WorkspacePolicyFragmentListReferencesOptionalParams extends coreClient.OperationOptions { - skip?: number; - top?: number; +export interface WorkspaceCertificateOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, parameters: CertificateCreateOrUpdateParameters, options?: WorkspaceCertificateCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, ifMatch: string, options?: WorkspaceCertificateDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateGetEntityTagOptionalParams) => Promise; + listByWorkspace: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceCertificateListByWorkspaceOptionalParams) => PagedAsyncIterableIterator; + refreshSecret: (resourceGroupName: string, serviceName: string, workspaceId: string, certificateId: string, options?: WorkspaceCertificateRefreshSecretOptionalParams) => Promise; } // @public -export type WorkspacePolicyFragmentListReferencesResponse = ResourceCollection; - -// @public -export interface WorkspacePolicyGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceCertificateRefreshSecretOptionalParams extends OperationOptions { } // @public -export interface WorkspacePolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceContract extends ProxyResource { + description?: string; + displayName?: string; } // @public -export type WorkspacePolicyGetEntityTagResponse = WorkspacePolicyGetEntityTagHeaders; - -// @public -export interface WorkspacePolicyGetHeaders { - eTag?: string; +export interface WorkspaceContractProperties { + description?: string; + displayName: string; } // @public -export interface WorkspacePolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface WorkspaceCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspacePolicyGetResponse = WorkspacePolicyGetHeaders & PolicyContract; - -// @public -export interface WorkspacePolicyListByApiNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspacePolicyListByApiNextResponse = PolicyCollection; +export interface WorkspaceDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface WorkspacePolicyListByApiOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceDiagnosticDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspacePolicyListByApiResponse = PolicyCollection; +export interface WorkspaceDiagnosticGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProduct { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, parameters: ProductContract, options?: WorkspaceProductCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, ifMatch: string, options?: WorkspaceProductDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGetEntityTagOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceProductListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, ifMatch: string, parameters: ProductUpdateParameters, options?: WorkspaceProductUpdateOptionalParams): Promise; +export interface WorkspaceDiagnosticGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductApiLink { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, parameters: ProductApiLinkContract, options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, options?: WorkspaceProductApiLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, options?: WorkspaceProductApiLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductApiLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceDiagnosticListByWorkspaceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceProductApiLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceDiagnosticOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, parameters: DiagnosticContract, options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, ifMatch: string, options?: WorkspaceDiagnosticDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, options?: WorkspaceDiagnosticGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, options?: WorkspaceDiagnosticGetEntityTagOptionalParams) => Promise; + listByWorkspace: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceDiagnosticListByWorkspaceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, diagnosticId: string, ifMatch: string, parameters: DiagnosticUpdateContract, options?: WorkspaceDiagnosticUpdateOptionalParams) => Promise; } // @public -export type WorkspaceProductApiLinkCreateOrUpdateResponse = ProductApiLinkContract; +export interface WorkspaceDiagnosticUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductApiLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductApiLinkGetHeaders { - eTag?: string; +export interface WorkspaceGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductApiLinkGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGlobalSchemaCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type WorkspaceProductApiLinkGetResponse = WorkspaceProductApiLinkGetHeaders & ProductApiLinkContract; +export interface WorkspaceGlobalSchemaDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductApiLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGlobalSchemaGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductApiLinkListByProductNextResponse = ProductApiLinkCollection; +export interface WorkspaceGlobalSchemaGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductApiLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGlobalSchemaListByServiceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceProductApiLinkListByProductResponse = ProductApiLinkCollection; +export interface WorkspaceGlobalSchemaOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, parameters: GlobalSchemaContract, options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams) => Promise, GlobalSchemaContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, parameters: GlobalSchemaContract, options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, parameters: GlobalSchemaContract, options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams) => PollerLike, GlobalSchemaContract>; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, ifMatch: string, options?: WorkspaceGlobalSchemaDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, options?: WorkspaceGlobalSchemaGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, schemaId: string, options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGlobalSchemaListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceProductCreateOrUpdateHeaders { - eTag?: string; +export interface WorkspaceGroupCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface WorkspaceProductCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface WorkspaceGroupDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductCreateOrUpdateResponse = WorkspaceProductCreateOrUpdateHeaders & ProductContract; +export interface WorkspaceGroupGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductDeleteOptionalParams extends coreClient.OperationOptions { - deleteSubscriptions?: boolean; +export interface WorkspaceGroupGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceGroupListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceProductGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGroupOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, parameters: GroupCreateParameters, options?: WorkspaceGroupCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, ifMatch: string, options?: WorkspaceGroupDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGroupListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, ifMatch: string, parameters: GroupUpdateParameters, options?: WorkspaceGroupUpdateOptionalParams) => Promise; } // @public -export type WorkspaceProductGetEntityTagResponse = WorkspaceProductGetEntityTagHeaders; +export interface WorkspaceGroupUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductGetHeaders { - eTag?: string; +export interface WorkspaceGroupUserCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGroupUserCreateOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductGetResponse = WorkspaceProductGetHeaders & ProductContract; +export interface WorkspaceGroupUserDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductGroupLink { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, parameters: ProductGroupLinkContract, options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, options?: WorkspaceProductGroupLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, options?: WorkspaceProductGroupLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGroupLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceGroupUserListOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceProductGroupLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceGroupUserOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserCheckEntityExistsOptionalParams) => Promise; + create: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserCreateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, userId: string, options?: WorkspaceGroupUserDeleteOptionalParams) => Promise; + list: (resourceGroupName: string, serviceName: string, workspaceId: string, groupId: string, options?: WorkspaceGroupUserListOptionalParams) => PagedAsyncIterableIterator; } // @public -export type WorkspaceProductGroupLinkCreateOrUpdateResponse = ProductGroupLinkContract; +export interface WorkspaceLinksBaseProperties { + gateways?: WorkspaceLinksGateway[]; + workspaceId?: string; +} // @public -export interface WorkspaceProductGroupLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceLinksGateway { + id?: string; } // @public -export interface WorkspaceProductGroupLinkGetHeaders { - eTag?: string; +export interface WorkspaceListByServiceOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export interface WorkspaceProductGroupLinkGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceLoggerCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceProductGroupLinkGetResponse = WorkspaceProductGroupLinkGetHeaders & ProductGroupLinkContract; +export interface WorkspaceLoggerDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductGroupLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceLoggerGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductGroupLinkListByProductNextResponse = ProductGroupLinkCollection; +export interface WorkspaceLoggerGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductGroupLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceLoggerListByWorkspaceOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceProductGroupLinkListByProductResponse = ProductGroupLinkCollection; - -// @public -export interface WorkspaceProductListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceLoggerOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, parameters: LoggerContract, options?: WorkspaceLoggerCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, ifMatch: string, options?: WorkspaceLoggerDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, options?: WorkspaceLoggerGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, options?: WorkspaceLoggerGetEntityTagOptionalParams) => Promise; + listByWorkspace: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceLoggerListByWorkspaceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, loggerId: string, ifMatch: string, parameters: LoggerUpdateContract, options?: WorkspaceLoggerUpdateOptionalParams) => Promise; } // @public -export type WorkspaceProductListByServiceNextResponse = ProductCollection; +export interface WorkspaceLoggerUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductListByServiceOptionalParams extends coreClient.OperationOptions { - expandGroups?: boolean; - filter?: string; - skip?: number; - tags?: string; - top?: number; +export interface WorkspaceNamedValueCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export type WorkspaceProductListByServiceResponse = ProductCollection; +export interface WorkspaceNamedValueDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductPolicy { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceProductPolicyDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, options?: WorkspaceProductPolicyGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, options?: WorkspaceProductPolicyGetEntityTagOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductPolicyListByProductOptionalParams): Promise; +export interface WorkspaceNamedValueGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductPolicyCreateOrUpdateHeaders { - eTag?: string; +export interface WorkspaceNamedValueGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductPolicyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - ifMatch?: string; +export interface WorkspaceNamedValueListByServiceOptionalParams extends OperationOptions { + filter?: string; + isKeyVaultRefreshFailed?: KeyVaultRefreshState; + skip?: number; + top?: number; } // @public -export type WorkspaceProductPolicyCreateOrUpdateResponse = WorkspaceProductPolicyCreateOrUpdateHeaders & PolicyContract; +export interface WorkspaceNamedValueListValueOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductPolicyDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceNamedValueOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, parameters: NamedValueCreateContract, options?: WorkspaceNamedValueCreateOrUpdateOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, parameters: NamedValueCreateContract, options?: WorkspaceNamedValueCreateOrUpdateOptionalParams) => Promise; + // @deprecated (undocumented) + beginRefreshSecret: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueRefreshSecretOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginRefreshSecretAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueRefreshSecretOptionalParams) => Promise; + // @deprecated (undocumented) + beginUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: WorkspaceNamedValueUpdateOptionalParams) => Promise, NamedValueContract>>; + // @deprecated (undocumented) + beginUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: WorkspaceNamedValueUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, parameters: NamedValueCreateContract, options?: WorkspaceNamedValueCreateOrUpdateOptionalParams) => PollerLike, NamedValueContract>; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, options?: WorkspaceNamedValueDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceNamedValueListByServiceOptionalParams) => PagedAsyncIterableIterator; + listValue: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueListValueOptionalParams) => Promise; + refreshSecret: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, options?: WorkspaceNamedValueRefreshSecretOptionalParams) => PollerLike, NamedValueContract>; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, namedValueId: string, ifMatch: string, parameters: NamedValueUpdateParameters, options?: WorkspaceNamedValueUpdateOptionalParams) => PollerLike, NamedValueContract>; } // @public -export interface WorkspaceProductPolicyGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceNamedValueRefreshSecretOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export interface WorkspaceProductPolicyGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceNamedValueUpdateOptionalParams extends OperationOptions { + updateIntervalInMs?: number; } // @public -export type WorkspaceProductPolicyGetEntityTagResponse = WorkspaceProductPolicyGetEntityTagHeaders; +export interface WorkspaceNotificationCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; +} // @public -export interface WorkspaceProductPolicyGetHeaders { - eTag?: string; +export interface WorkspaceNotificationGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductPolicyGetOptionalParams extends coreClient.OperationOptions { - format?: PolicyExportFormat; +export interface WorkspaceNotificationListByServiceOptionalParams extends OperationOptions { + skip?: number; + top?: number; } // @public -export type WorkspaceProductPolicyGetResponse = WorkspaceProductPolicyGetHeaders & PolicyContract; +export interface WorkspaceNotificationOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationCreateOrUpdateOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationGetOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceNotificationListByServiceOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceProductPolicyListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductPolicyListByProductResponse = PolicyCollection; +export interface WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceProductUpdateHeaders { - eTag?: string; +export interface WorkspaceNotificationRecipientEmailDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceProductUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceNotificationRecipientEmailListByNotificationOptionalParams extends OperationOptions { } // @public -export type WorkspaceProductUpdateResponse = WorkspaceProductUpdateHeaders & ProductContract; +export interface WorkspaceNotificationRecipientEmailOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, email: string, options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams) => Promise; + listByNotification: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams) => Promise; +} // @public -export interface WorkspaceSubscription { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, parameters: SubscriptionCreateParameters, options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, ifMatch: string, options?: WorkspaceSubscriptionDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionGetOptionalParams): Promise; - getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionGetEntityTagOptionalParams): Promise; - list(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceSubscriptionListOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionListSecretsOptionalParams): Promise; - regeneratePrimaryKey(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams): Promise; - regenerateSecondaryKey(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams): Promise; - update(resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, ifMatch: string, parameters: SubscriptionUpdateParameters, options?: WorkspaceSubscriptionUpdateOptionalParams): Promise; +export interface WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams extends OperationOptions { } // @public -export interface WorkspaceSubscriptionCreateOrUpdateHeaders { - eTag?: string; +export interface WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceSubscriptionCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - appType?: AppType; - ifMatch?: string; - notify?: boolean; +export interface WorkspaceNotificationRecipientUserDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceSubscriptionCreateOrUpdateResponse = WorkspaceSubscriptionCreateOrUpdateHeaders & SubscriptionContract; +export interface WorkspaceNotificationRecipientUserListByNotificationOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceSubscriptionDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceNotificationRecipientUserOperations { + checkEntityExists: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, userId: string, options?: WorkspaceNotificationRecipientUserDeleteOptionalParams) => Promise; + listByNotification: (resourceGroupName: string, serviceName: string, workspaceId: string, notificationName: NotificationName, options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams) => Promise; } // @public -export interface WorkspaceSubscriptionGetEntityTagHeaders { - eTag?: string; +export interface WorkspaceOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, parameters: WorkspaceContract, options?: WorkspaceCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, ifMatch: string, options?: WorkspaceDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, options?: WorkspaceListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, ifMatch: string, parameters: WorkspaceContract, options?: WorkspaceUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceSubscriptionGetEntityTagOptionalParams extends coreClient.OperationOptions { +export interface WorkspacePolicyCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceSubscriptionGetEntityTagResponse = WorkspaceSubscriptionGetEntityTagHeaders; +export interface WorkspacePolicyDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceSubscriptionGetHeaders { - eTag?: string; +export interface WorkspacePolicyFragmentCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; + updateIntervalInMs?: number; } // @public -export interface WorkspaceSubscriptionGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspacePolicyFragmentDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceSubscriptionGetResponse = WorkspaceSubscriptionGetHeaders & SubscriptionContract; +export interface WorkspacePolicyFragmentGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceSubscriptionListNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspacePolicyFragmentGetOptionalParams extends OperationOptions { + format?: PolicyFragmentContentFormat; } // @public -export type WorkspaceSubscriptionListNextResponse = SubscriptionCollection; +export interface WorkspacePolicyFragmentListByServiceOptionalParams extends OperationOptions { + filter?: string; + orderby?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceSubscriptionListOptionalParams extends coreClient.OperationOptions { - filter?: string; +export interface WorkspacePolicyFragmentListReferencesOptionalParams extends OperationOptions { skip?: number; top?: number; } // @public -export type WorkspaceSubscriptionListResponse = SubscriptionCollection; +export interface WorkspacePolicyFragmentOperations { + // @deprecated (undocumented) + beginCreateOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams) => Promise, PolicyFragmentContract>>; + // @deprecated (undocumented) + beginCreateOrUpdateAndWait: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams) => Promise; + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams) => PollerLike, PolicyFragmentContract>; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, ifMatch: string, options?: WorkspacePolicyFragmentDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspacePolicyFragmentListByServiceOptionalParams) => PagedAsyncIterableIterator; + listReferences: (resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentListReferencesOptionalParams) => Promise; +} // @public -export interface WorkspaceSubscriptionListSecretsHeaders { - eTag?: string; +export interface WorkspacePolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceSubscriptionListSecretsOptionalParams extends coreClient.OperationOptions { +export interface WorkspacePolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export type WorkspaceSubscriptionListSecretsResponse = WorkspaceSubscriptionListSecretsHeaders & SubscriptionKeysContract; +export interface WorkspacePolicyListByApiOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams extends coreClient.OperationOptions { +export interface WorkspacePolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspacePolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspacePolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, options?: WorkspacePolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, policyId: PolicyIdName, options?: WorkspacePolicyGetEntityTagOptionalParams) => Promise; + listByApi: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspacePolicyListByApiOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductApiLinkCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceSubscriptionUpdateHeaders { - eTag?: string; +export interface WorkspaceProductApiLinkDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceSubscriptionUpdateOptionalParams extends coreClient.OperationOptions { - appType?: AppType; - notify?: boolean; +export interface WorkspaceProductApiLinkGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceSubscriptionUpdateResponse = WorkspaceSubscriptionUpdateHeaders & SubscriptionContract; +export interface WorkspaceProductApiLinkListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceTag { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, parameters: TagCreateUpdateParameters, options?: WorkspaceTagCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, ifMatch: string, options?: WorkspaceTagDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagGetOptionalParams): Promise; - getEntityState(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagGetEntityStateOptionalParams): Promise; - listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceTagListByServiceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, ifMatch: string, parameters: TagCreateUpdateParameters, options?: WorkspaceTagUpdateOptionalParams): Promise; +export interface WorkspaceProductApiLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, parameters: ProductApiLinkContract, options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, options?: WorkspaceProductApiLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, apiLinkId: string, options?: WorkspaceProductApiLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductApiLinkListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceTagApiLink { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, parameters: TagApiLinkContract, options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, options?: WorkspaceTagApiLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, options?: WorkspaceTagApiLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagApiLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceProductCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export interface WorkspaceTagApiLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductDeleteOptionalParams extends OperationOptions { + deleteSubscriptions?: boolean; } // @public -export type WorkspaceTagApiLinkCreateOrUpdateResponse = TagApiLinkContract; +export interface WorkspaceProductGetEntityTagOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagApiLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagApiLinkGetHeaders { - eTag?: string; +export interface WorkspaceProductGroupLinkCreateOrUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagApiLinkGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductGroupLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagApiLinkGetResponse = WorkspaceTagApiLinkGetHeaders & TagApiLinkContract; +export interface WorkspaceProductGroupLinkGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagApiLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductGroupLinkListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceTagApiLinkListByProductNextResponse = TagApiLinkCollection; +export interface WorkspaceProductGroupLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, parameters: ProductGroupLinkContract, options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, options?: WorkspaceProductGroupLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, groupLinkId: string, options?: WorkspaceProductGroupLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGroupLinkListByProductOptionalParams) => PagedAsyncIterableIterator; +} // @public -export interface WorkspaceTagApiLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductListByServiceOptionalParams extends OperationOptions { + expandGroups?: boolean; filter?: string; skip?: number; + tags?: string; top?: number; } // @public -export type WorkspaceTagApiLinkListByProductResponse = TagApiLinkCollection; - -// @public -export interface WorkspaceTagCreateOrUpdateHeaders { - eTag?: string; +export interface WorkspaceProductOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, parameters: ProductContract, options?: WorkspaceProductCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, ifMatch: string, options?: WorkspaceProductDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductGetEntityTagOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceProductListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, ifMatch: string, parameters: ProductUpdateParameters, options?: WorkspaceProductUpdateOptionalParams) => Promise; } // @public -export interface WorkspaceTagCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductPolicyCreateOrUpdateOptionalParams extends OperationOptions { ifMatch?: string; } // @public -export type WorkspaceTagCreateOrUpdateResponse = WorkspaceTagCreateOrUpdateHeaders & TagContract; +export interface WorkspaceProductPolicyDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductPolicyGetEntityTagOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagGetEntityStateHeaders { - eTag?: string; +export interface WorkspaceProductPolicyGetOptionalParams extends OperationOptions { + format?: PolicyExportFormat; } // @public -export interface WorkspaceTagGetEntityStateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceProductPolicyListByProductOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagGetEntityStateResponse = WorkspaceTagGetEntityStateHeaders; +export interface WorkspaceProductPolicyOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, parameters: PolicyContract, options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, ifMatch: string, options?: WorkspaceProductPolicyDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, options?: WorkspaceProductPolicyGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, policyId: PolicyIdName, options?: WorkspaceProductPolicyGetEntityTagOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, productId: string, options?: WorkspaceProductPolicyListByProductOptionalParams) => Promise; +} // @public -export interface WorkspaceTagGetHeaders { - eTag?: string; +export interface WorkspaceProductUpdateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionCreateOrUpdateOptionalParams extends OperationOptions { + appType?: AppType; + ifMatch?: string; + notify?: boolean; } // @public -export type WorkspaceTagGetResponse = WorkspaceTagGetHeaders & TagContract; +export interface WorkspaceSubscriptionDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagListByServiceNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionGetEntityTagOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagListByServiceNextResponse = TagCollection; +export interface WorkspaceSubscriptionGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagListByServiceOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionListOptionalParams extends OperationOptions { filter?: string; - scope?: string; skip?: number; top?: number; } // @public -export type WorkspaceTagListByServiceResponse = TagCollection; - -// @public -export interface WorkspaceTagOperationLink { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, parameters: TagOperationLinkContract, options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, options?: WorkspaceTagOperationLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, options?: WorkspaceTagOperationLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagOperationLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceSubscriptionListSecretsOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagOperationLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, parameters: SubscriptionCreateParameters, options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, ifMatch: string, options?: WorkspaceSubscriptionDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionGetOptionalParams) => Promise; + getEntityTag: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionGetEntityTagOptionalParams) => Promise; + list: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceSubscriptionListOptionalParams) => PagedAsyncIterableIterator; + listSecrets: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionListSecretsOptionalParams) => Promise; + regeneratePrimaryKey: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams) => Promise; + regenerateSecondaryKey: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams) => Promise; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, sid: string, ifMatch: string, parameters: SubscriptionUpdateParameters, options?: WorkspaceSubscriptionUpdateOptionalParams) => Promise; } // @public -export type WorkspaceTagOperationLinkCreateOrUpdateResponse = TagOperationLinkContract; - -// @public -export interface WorkspaceTagOperationLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagOperationLinkGetHeaders { - eTag?: string; +export interface WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagOperationLinkGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceSubscriptionUpdateOptionalParams extends OperationOptions { + appType?: AppType; + notify?: boolean; } // @public -export type WorkspaceTagOperationLinkGetResponse = WorkspaceTagOperationLinkGetHeaders & TagOperationLinkContract; +export interface WorkspaceTagApiLinkCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagOperationLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagApiLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagOperationLinkListByProductNextResponse = TagOperationLinkCollection; +export interface WorkspaceTagApiLinkGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagOperationLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagApiLinkListByProductOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceTagOperationLinkListByProductResponse = TagOperationLinkCollection; - -// @public -export interface WorkspaceTagProductLink { - createOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, parameters: TagProductLinkContract, options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, options?: WorkspaceTagProductLinkDeleteOptionalParams): Promise; - get(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, options?: WorkspaceTagProductLinkGetOptionalParams): Promise; - listByProduct(resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagProductLinkListByProductOptionalParams): PagedAsyncIterableIterator; +export interface WorkspaceTagApiLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, parameters: TagApiLinkContract, options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, options?: WorkspaceTagApiLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, apiLinkId: string, options?: WorkspaceTagApiLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagApiLinkListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceTagProductLinkCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagCreateOrUpdateOptionalParams extends OperationOptions { + ifMatch?: string; } // @public -export type WorkspaceTagProductLinkCreateOrUpdateResponse = TagProductLinkContract; +export interface WorkspaceTagDeleteOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagProductLinkDeleteOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagGetEntityStateOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagProductLinkGetHeaders { - eTag?: string; +export interface WorkspaceTagGetOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagProductLinkGetOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagListByServiceOptionalParams extends OperationOptions { + filter?: string; + scope?: string; + skip?: number; + top?: number; } // @public -export type WorkspaceTagProductLinkGetResponse = WorkspaceTagProductLinkGetHeaders & TagProductLinkContract; +export interface WorkspaceTagOperationLinkCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagProductLinkListByProductNextOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagOperationLinkDeleteOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagProductLinkListByProductNextResponse = TagProductLinkCollection; +export interface WorkspaceTagOperationLinkGetOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagProductLinkListByProductOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagOperationLinkListByProductOptionalParams extends OperationOptions { filter?: string; skip?: number; top?: number; } // @public -export type WorkspaceTagProductLinkListByProductResponse = TagProductLinkCollection; +export interface WorkspaceTagOperationLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, parameters: TagOperationLinkContract, options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, options?: WorkspaceTagOperationLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, operationLinkId: string, options?: WorkspaceTagOperationLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagOperationLinkListByProductOptionalParams) => PagedAsyncIterableIterator; +} + +// @public +export interface WorkspaceTagOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, parameters: TagCreateUpdateParameters, options?: WorkspaceTagCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, ifMatch: string, options?: WorkspaceTagDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagGetOptionalParams) => Promise; + getEntityState: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagGetEntityStateOptionalParams) => Promise; + listByService: (resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspaceTagListByServiceOptionalParams) => PagedAsyncIterableIterator; + update: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, ifMatch: string, parameters: TagCreateUpdateParameters, options?: WorkspaceTagUpdateOptionalParams) => Promise; +} + +// @public +export interface WorkspaceTagProductLinkCreateOrUpdateOptionalParams extends OperationOptions { +} // @public -export interface WorkspaceTagUpdateHeaders { - eTag?: string; +export interface WorkspaceTagProductLinkDeleteOptionalParams extends OperationOptions { } // @public -export interface WorkspaceTagUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagProductLinkGetOptionalParams extends OperationOptions { } // @public -export type WorkspaceTagUpdateResponse = WorkspaceTagUpdateHeaders & TagContract; +export interface WorkspaceTagProductLinkListByProductOptionalParams extends OperationOptions { + filter?: string; + skip?: number; + top?: number; +} // @public -export interface WorkspaceUpdateHeaders { - eTag?: string; +export interface WorkspaceTagProductLinkOperations { + createOrUpdate: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, parameters: TagProductLinkContract, options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams) => Promise; + delete: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, options?: WorkspaceTagProductLinkDeleteOptionalParams) => Promise; + get: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, productLinkId: string, options?: WorkspaceTagProductLinkGetOptionalParams) => Promise; + listByProduct: (resourceGroupName: string, serviceName: string, workspaceId: string, tagId: string, options?: WorkspaceTagProductLinkListByProductOptionalParams) => PagedAsyncIterableIterator; } // @public -export interface WorkspaceUpdateOptionalParams extends coreClient.OperationOptions { +export interface WorkspaceTagUpdateOptionalParams extends OperationOptions { } // @public -export type WorkspaceUpdateResponse = WorkspaceUpdateHeaders & WorkspaceContract; +export interface WorkspaceUpdateOptionalParams extends OperationOptions { +} // @public export interface X509CertificateName { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/allPoliciesListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/allPoliciesListByServiceSample.ts index 422547e77ac9..14241d53087a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/allPoliciesListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/allPoliciesListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Status of all policies of API Management services. - * - * @summary Status of all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to status of all policies of API Management services. + * + * @summary status of all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAllPolicies.json + */ async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.allPolicies.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.allPolicies.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts index c1e953ddf344..8d723cd802c3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiCreateOrUpdateSample.ts @@ -1,68 +1,44 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApi.json */ - -import { - ApiCreateOrUpdateParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { path: "newapiPath", description: "apidescription5200", authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, }, displayName: "apiname1463", protocols: ["https", "http"], serviceUrl: "http://newechoapi.cloudapp.net/api", subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiClone.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiClone.json */ async function apiManagementCreateApiClone(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api2", { path: "echo2", description: "Copy of Existing Echo Api including Operations.", displayName: "Echo API2", @@ -72,33 +48,21 @@ async function apiManagementCreateApiClone(): Promise { sourceApiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiNewVersionUsingExistingApi.json */ async function apiManagementCreateApiNewVersionUsingExistingApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echoapiv3", { path: "echo2", description: "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", @@ -112,265 +76,163 @@ async function apiManagementCreateApiNewVersionUsingExistingApi(): Promise sourceApiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRevisionFromExistingApi.json */ async function apiManagementCreateApiRevisionFromExistingApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api;rev=3", { path: "echo", apiRevisionDescription: "Creating a Revision of an existing API", serviceUrl: "http://echoapi.cloudapp.net/apiv3", sourceApiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingImportOverrideServiceUrl.json */ async function apiManagementCreateApiUsingImportOverrideServiceUrl(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "apidocs", { format: "swagger-link", path: "petstoreapi123", serviceUrl: "http://petstore.swagger.wordnik.com/api", value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3Import.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3Import.json */ async function apiManagementCreateApiUsingOai3Import(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { format: "openapi-link", path: "petstore", value: "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json */ async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { format: "openapi-link", path: "petstore", translateRequiredQueryParametersConduct: "template", value: "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingSwaggerImport.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingSwaggerImport.json */ async function apiManagementCreateApiUsingSwaggerImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { format: "swagger-link-json", path: "petstore", value: "http://petstore.swagger.io/v2/swagger.json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingWadlImport.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingWadlImport.json */ async function apiManagementCreateApiUsingWadlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { format: "wadl-link-json", path: "collector", value: "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleAuthServers.json */ async function apiManagementCreateApiWithMultipleAuthServers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { path: "newapiPath", description: "apidescription5200", authenticationSettings: { oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581", - }, + { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + { authorizationServerId: "authorizationServerId2284", scope: "oauth2scope2581" }, ], }, displayName: "apiname1463", protocols: ["https", "http"], serviceUrl: "http://newechoapi.cloudapp.net/api", subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json */ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { path: "newapiPath", description: "apidescription5200", authenticationSettings: { @@ -389,33 +251,21 @@ async function apiManagementCreateApiWithMultipleOpenIdConnectProviders(): Promi protocols: ["https", "http"], serviceUrl: "http://newechoapi.cloudapp.net/api", subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithOpenIdConnect.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithOpenIdConnect.json */ async function apiManagementCreateApiWithOpenIdConnect(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { path: "petstore", description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", @@ -432,66 +282,42 @@ async function apiManagementCreateApiWithOpenIdConnect(): Promise { header: "Ocp-Apim-Subscription-Key", query: "subscription-key", }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApi.json */ -async function apiManagementCreateGraphQlApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { +async function apiManagementCreateGraphQLApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { apiType: "graphql", path: "graphql-api", description: "apidescription5200", displayName: "apiname1463", protocols: ["http", "https"], serviceUrl: "https://api.spacex.land/graphql", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGrpcApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGrpcApi.json */ async function apiManagementCreateGrpcApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { apiType: "grpc", format: "grpc-link", path: "grpc-api", @@ -501,33 +327,46 @@ async function apiManagementCreateGrpcApi(): Promise { serviceUrl: "https://your-api-hostname/samples", value: "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMcpApi.json + */ +async function apiManagementCreateMcpApi(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + const result = await client.api.createOrUpdate("rg1", "apimService1", "mcp-api", { + apiType: "mcp", + path: "mcp-api", + description: "MCP API for AI agent tool discovery and invocation", + displayName: "MCP API", + protocols: ["https"], + serviceUrl: "https://mcp-backend.contoso.com", + mcpProperties: { + transportType: "streamable", + endpoints: [{ name: "message", uriTemplate: "/mcp/messages" }], + }, + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateODataApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateODataApi.json */ async function apiManagementCreateODataApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { apiType: "odata", format: "odata-link", path: "odata-api", @@ -536,33 +375,21 @@ async function apiManagementCreateODataApi(): Promise { protocols: ["http", "https"], serviceUrl: "https://services.odata.org/TripPinWebApiService", value: "https://services.odata.org/TripPinWebApiService/$metadata", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json */ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { format: "wsdl-link", path: "currency", soapApiType: "soap", @@ -571,33 +398,21 @@ async function apiManagementCreateSoapPassThroughApiUsingWsdlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { format: "wsdl-link", path: "currency", value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", @@ -605,48 +420,28 @@ async function apiManagementCreateSoapToRestApiUsingWsdlImport(): Promise wsdlEndpointName: "CurrencyConvertorSoap", wsdlServiceName: "CurrencyConvertor", }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWebsocketApi.json + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWebsocketApi.json */ async function apiManagementCreateWebSocketApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { apiType: "websocket", path: "newapiPath", description: "apidescription5200", displayName: "apiname1463", protocols: ["wss", "ws"], serviceUrl: "wss://echo.websocket.org", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); + }); console.log(result); } @@ -663,8 +458,9 @@ async function main(): Promise { await apiManagementCreateApiWithMultipleAuthServers(); await apiManagementCreateApiWithMultipleOpenIdConnectProviders(); await apiManagementCreateApiWithOpenIdConnect(); - await apiManagementCreateGraphQlApi(); + await apiManagementCreateGraphQLApi(); await apiManagementCreateGrpcApi(); + await apiManagementCreateMcpApi(); await apiManagementCreateODataApi(); await apiManagementCreateSoapPassThroughApiUsingWsdlImport(); await apiManagementCreateSoapToRestApiUsingWsdlImport(); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts index 129b3692d663..4a1ed5959c3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API of the API Management service instance. - * - * @summary Deletes the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API of the API Management service instance. + * + * @summary deletes the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApi.json + */ async function apiManagementDeleteApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginDeleteAndWait( - resourceGroupName, - serviceName, - apiId, - ifMatch, - ); - console.log(result); + await client.api.delete("rg1", "apimService1", "echo-api", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts index ae6804e88a88..45e8175d7a71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticCreateOrUpdateSample.ts @@ -1,50 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts index 4a889b84e515..9199820d2feb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiDiagnostic.json + */ async function apiManagementDeleteApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, + await client.apiDiagnostic.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts index 3de746bd24fb..f98f76ed5ff7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiDiagnostic.json + */ async function apiManagementHeadApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId, + await client.apiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts index 6da03ecdbf13..0bfbc9d0c585 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiDiagnostic.json + */ async function apiManagementGetApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts index cf9b5fc3d126..3cfd0bbd0a5a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiDiagnostics.json + */ async function apiManagementListApiDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId, - )) { + for await (const item of client.apiDiagnostic.listByService("rg1", "apimService1", "echo-api")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts index 0e78d1b2df48..04ac432abb4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiDiagnosticUpdateSample.ts @@ -1,52 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, + "rg1", + "apimService1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts index 462773117c52..91c27f08162e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiExportGetSample.ts @@ -1,63 +1,45 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json + */ async function apiManagementGetApiExportInOpenApi2Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, + "rg1", + "apimService1", + "echo-api", + "swagger-link", + "true", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi3dot0.json */ async function apiManagementGetApiExportInOpenApi3Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, + "rg1", + "apimService1", + "aid9676", + "openapi-link", + "true", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionCreateOrUpdateSample.ts index ceca15212015..3229e72c5704 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json + * @summary creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayConfigConnection.json */ - -import { - ApiManagementGatewayConfigConnectionResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const parameters: ApiManagementGatewayConfigConnectionResource = { - sourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiGatewayConfigConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - parameters, - ); + const result = await client.apiGatewayConfigConnection.createOrUpdate( + "rg1", + "standard-gw-01", + "gcc-01", + { + sourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", + }, + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionDeleteSample.ts index 79b842cf186d..836a9b5e75a5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes an existing API Management gateway config connection. - * - * @summary Deletes an existing API Management gateway config connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes an existing API Management gateway config connection. + * + * @summary deletes an existing API Management gateway config connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayConfigConnection.json + */ async function apiManagementGatewayDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.beginDeleteAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - ifMatch, - ); - console.log(result); + await client.apiGatewayConfigConnection.delete("rg1", "standard-gw-01", "gcc-01", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionGetSample.ts index 811fd1fea22c..4bbadaa345e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets an API Management gateway config connection resource description. - * - * @summary Gets an API Management gateway config connection resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets an API Management gateway config connection resource description. + * + * @summary gets an API Management gateway config connection resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayConfigConnection.json + */ async function apiManagementGetGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.get( - resourceGroupName, - gatewayName, - configConnectionName, - ); + const result = await client.apiGatewayConfigConnection.get("rg1", "standard-gw-01", "gcc-01"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionListByGatewaySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionListByGatewaySample.ts index 1d541dd6487a..1685592f577a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionListByGatewaySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayConfigConnectionListByGatewaySample.ts @@ -1,33 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List all API Management gateway config connections within a gateway. - * - * @summary List all API Management gateway config connections within a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list all API Management gateway config connections within a gateway. + * + * @summary list all API Management gateway config connections within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayConfigConnection.json + */ async function apiManagementListGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiGatewayConfigConnection.listByGateway( - resourceGroupName, - gatewayName, + "rg1", + "standard-gw-1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayCreateOrUpdateSample.ts index abfa221fac7a..454178273704 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayCreateOrUpdateSample.ts @@ -1,78 +1,53 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateStandardGateway.json */ - -import { - ApiManagementGatewayResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateStandardGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", backend: { subnet: { id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", }, }, - location: "South Central US", sku: { name: "Standard", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); + tags: { Name: "Contoso", Test: "User" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePremiumGateway.json + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePremiumGateway.json */ async function apiManagementCreateWorkspacePremiumGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", backend: { subnet: { id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", }, }, - location: "South Central US", - sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, virtualNetworkType: "External", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); + sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayDeleteSample.ts index fb74e3ea89e9..601994fb289c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayDeleteSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes an existing API Management gateway. - * - * @summary Deletes an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes an existing API Management gateway. + * + * @summary deletes an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayDeleteGateway.json + */ async function apiManagementGatewayDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "example-gateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); + const result = await client.apiGateway.delete("rg1", "example-gateway"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayGetSample.ts index d22c538833d0..c3201734ade5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayGetSample.ts @@ -1,27 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets an API Management gateway resource description. - * - * @summary Gets an API Management gateway resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets an API Management gateway resource description. + * + * @summary gets an API Management gateway resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGetGateway.json + */ async function apiManagementGatewayGetGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.get(resourceGroupName, gatewayName); + const result = await client.apiGateway.get("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingCreateOrUpdateSample.ts new file mode 100644 index 000000000000..cc70c8a2f01f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameBinding.json + */ +async function apiManagementCreateGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.createOrUpdate( + "rg1", + "apimGateway1", + "hb-1", + { + hostname: "primary.cotoso.com", + keyVault: { + identityClientId: "00000000-0000-0000-0000-000000000000", + secretId: "https://myvault.keyvault.azure.net/secrets/contosoprimarycert", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingDeleteSample.ts new file mode 100644 index 000000000000..92177f6c1f9f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes an existing API Management gateway hostname binding. + * + * @summary deletes an existing API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameBinding.json + */ +async function apiManagementDeleteGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.delete("rg1", "standard-gw-01", "gcc-01", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingGetSample.ts new file mode 100644 index 000000000000..6de8b35876de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management gateway hostname binding resource description. + * + * @summary gets an API Management gateway hostname binding resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameBinding.json + */ +async function apiManagementGetGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.get("rg1", "standard-gw-1", "hb-1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingListByGatewaySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingListByGatewaySample.ts new file mode 100644 index 000000000000..bb28801e5434 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingListByGatewaySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management gateway hostname bindings within a gateway. + * + * @summary list all API Management gateway hostname bindings within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameBindings.json + */ +async function apiManagementListGatewayHostnameBindings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGatewayHostnameBinding.listByGateway("rg1", "standard-gw-1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayHostnameBindings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingRefreshSecretSample.ts new file mode 100644 index 000000000000..dcc8560c4841 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayHostnameBindingRefreshSecretSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refresh the secret for an API Management gateway hostname binding. + * + * @summary refresh the secret for an API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json + */ +async function apiManagementRefreshGatewayHostnameBindingSecret(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.refreshSecret("rg1", "standard-gw-01", "gcc-01"); +} + +async function main(): Promise { + await apiManagementRefreshGatewayHostnameBindingSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListByResourceGroupSample.ts index ce1e1b532b46..60c82375cdde 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListByResourceGroupSample.ts @@ -1,31 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List all API Management gateways within a resource group. - * - * @summary List all API Management gateways within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list all API Management gateways within a resource group. + * + * @summary list all API Management gateways within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json + */ async function apiManagementListGatewaysBySubscriptionAndResourceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiGateway.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.apiGateway.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListSample.ts index 5df7cdc788fb..16980df50d2b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayListSample.ts @@ -1,27 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List all API Management gateways within a subscription. - * - * @summary List all API Management gateways within a subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list all API Management gateways within a subscription. + * + * @summary list all API Management gateways within a subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscription.json + */ async function apiManagementListGatewaysBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiGateway.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayUpdateSample.ts index af1b1ec21853..8cd167f65770 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGatewayUpdateSample.ts @@ -1,38 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing API Management gateway. + * This sample demonstrates how to updates an existing API Management gateway. * - * @summary Updates an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json + * @summary updates an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateStandardGateway.json */ - -import { - ApiManagementGatewayUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateStandardGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayUpdateParameters = { - sku: { name: "Standard", capacity: 10 }, - tags: { name: "Contoso", test: "User" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); + const result = await client.apiGateway.update("rg1", "apimGateway1", { + sku: { name: "Standard", capacity: 10 }, + tags: { Name: "Contoso", Test: "User" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts index efa11e49e225..d8feffafddd1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApi.json + */ async function apiManagementHeadApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); + await client.api.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts index 9a81d2269af6..72d34cf026f8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiGetSample.ts @@ -1,48 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiContract.json + */ async function apiManagementGetApiContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); + const result = await client.api.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); console.log(result); } /** - * This sample demonstrates how to Gets the details of the API specified by its identifier. + * This sample demonstrates how to gets the details of the API specified by its identifier. * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRevision.json */ async function apiManagementGetApiRevisionContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); + const result = await client.api.get("rg1", "apimService1", "echo-api;rev=3"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts index e0c3c8bd1548..f05c20ad6c0d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentCreateOrUpdateSample.ts @@ -1,44 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. + * This sample demonstrates how to creates a new Attachment for the Issue in an API or updates an existing one. * - * @summary Creates a new Attachment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json + * @summary creates a new Attachment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueAttachment.json */ - -import { - IssueAttachmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment.", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + { content: "IEJhc2U2NA==", contentFormat: "image/jpeg", title: "Issue attachment." }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts index 01c1b3b75654..452e6ae4660c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueAttachment.json + */ async function apiManagementDeleteApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, + await client.apiIssueAttachment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts index 08a0b31003b7..68aaa4ca8f70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueAttachment.json + */ async function apiManagementHeadApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, + await client.apiIssueAttachment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts index 30ffd612f64c..7b220bb3e2dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the details of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the issue Attachment for an API specified by its identifier. + * + * @summary gets the details of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueAttachment.json + */ async function apiManagementGetApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts index c0049fed6c39..b8b268b28805 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueAttachmentListByServiceSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. - * - * @summary Lists all attachments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all attachments for the Issue associated with the specified API. + * + * @summary lists all attachments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueAttachments.json + */ async function apiManagementListApiIssueAttachments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts index 37fedb86e823..76bd02419d7c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentCreateOrUpdateSample.ts @@ -1,45 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. + * This sample demonstrates how to creates a new Comment for the Issue in an API or updates an existing one. * - * @summary Creates a new Comment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json + * @summary creates a new Comment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueComment.json */ - -import { - IssueCommentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts index 85b30ba0817c..c48b16f8b58a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueComment.json + */ async function apiManagementDeleteApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, + await client.apiIssueComment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts index 6d37598bbd75..74af39162ad5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueComment.json + */ async function apiManagementHeadApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, + await client.apiIssueComment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts index 849c17577e0a..a5ec242ab1d7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. - * - * @summary Gets the details of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the issue Comment for an API specified by its identifier. + * + * @summary gets the details of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueComment.json + */ async function apiManagementGetApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts index e4d9c631ab1d..f1a7fdf41e9e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCommentListByServiceSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. - * - * @summary Lists all comments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all comments for the Issue associated with the specified API. + * + * @summary lists all comments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueComments.json + */ async function apiManagementListApiIssueComments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts index 4a230ba95174..99c92de6f0f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueCreateOrUpdateSample.ts @@ -1,42 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. + * This sample demonstrates how to creates a new Issue for an API or updates an existing one. * - * @summary Creates a new Issue for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json + * @summary creates a new Issue for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssue.json */ - -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts index e7a77cd0c0ba..278d2f1893b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Issue from an API. - * - * @summary Deletes the specified Issue from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Issue from an API. + * + * @summary deletes the specified Issue from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssue.json + */ async function apiManagementDeleteApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, + await client.apiIssue.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts index 84c31c76175d..8401bab8d75a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssue.json + */ async function apiManagementHeadApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, + await client.apiIssue.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts index efbb2b92869a..cd607f7f1d70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. - * - * @summary Gets the details of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Issue for an API specified by its identifier. + * + * @summary gets the details of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssue.json + */ async function apiManagementGetApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts index b68c45dba402..b6449cd8cfcb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all issues associated with the specified API. - * - * @summary Lists all issues associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all issues associated with the specified API. + * + * @summary lists all issues associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssues.json + */ async function apiManagementListApiIssues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts index 14b8376653c7..75f3cf225ce8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiIssueUpdateSample.ts @@ -1,40 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing issue for an API. + * This sample demonstrates how to updates an existing issue for an API. * - * @summary Updates an existing issue for an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json + * @summary updates an existing issue for an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiIssue.json */ - -import { - IssueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", + { state: "closed" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts index 3fa53bd239f3..ec423a9c2058 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all APIs of the API Management service instance. - * - * @summary Lists all APIs of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all APIs of the API Management service instance. + * + * @summary lists all APIs of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApis.json + */ async function apiManagementListApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.api.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.api.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts index 3f4cc42ef870..cfddfbb5f608 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiListByTagsSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of apis associated with tags. - * - * @summary Lists a collection of apis associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of apis associated with tags. + * + * @summary lists a collection of apis associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApisByTags.json + */ async function apiManagementListApisByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.api.listByTags( - resourceGroupName, - serviceName, - )) { + for await (const item of client.api.listByTags("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementGatewaySkusListAvailableSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementGatewaySkusListAvailableSkusSample.ts index f5eb3cbb853f..accebacc3117 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementGatewaySkusListAvailableSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementGatewaySkusListAvailableSkusSample.ts @@ -1,38 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all available SKU for a given API Management gateway - * - * @summary Gets all available SKU for a given API Management gateway - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; -async function apiManagementListSkUsGateways(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; +/** + * This sample demonstrates how to gets all available SKU for a given API Management gateway + * + * @summary gets all available SKU for a given API Management gateway + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Gateways.json + */ +async function apiManagementListSKUsGateways(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiManagementGatewaySkus.listAvailableSkus( - resourceGroupName, - gatewayName, + "rg1", + "apimService1", )) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await apiManagementListSkUsGateways(); + await apiManagementListSKUsGateways(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts index 30ce8660923b..f8380fbfadbb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementOperationsListSample.ts @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @summary Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * + * @summary lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOperations.json + */ async function apiManagementListOperations(): Promise { const credential = new DefaultAzureCredential(); const client = new ApiManagementClient(credential); @@ -19,6 +17,7 @@ async function apiManagementListOperations(): Promise { for await (const item of client.apiManagementOperations.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts index 11478c1e6a16..50d05049289f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -1,41 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * This sample demonstrates how to updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. * - * @summary Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json + * @summary updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json */ - -import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementApplyNetworkConfigurationUpdates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us", - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = - { parameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options, - ); + const result = await client.apiManagementService.applyNetworkConfigurationUpdates( + "rg1", + "apimService1", + { parameters: { location: "west us" } }, + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts index 81272477ab68..fbb8dfe8320c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceBackupSample.ts @@ -1,100 +1,65 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithAccessKey.json */ - -import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementBackupWithAccessKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { accessKey: "**************************************************", accessType: "AccessKey", backupName: "apimService1backup_2017_03_19", containerName: "backupContainer", storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithSystemManagedIdentity.json + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithSystemManagedIdentity.json */ async function apiManagementBackupWithSystemManagedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { accessType: "SystemAssignedManagedIdentity", backupName: "backup5", containerName: "apim-backups", storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithUserAssignedManagedIdentity.json */ async function apiManagementBackupWithUserAssignedManagedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { accessType: "UserAssignedManagedIdentity", backupName: "backup5", clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", containerName: "apim-backups", storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts index 7790266a333f..f3a29bae2d9b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCheckNameAvailabilitySample.ts @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. + * This sample demonstrates how to checks availability and correctness of a name for an API Management service. * - * @summary Checks availability and correctness of a name for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json + * @summary checks availability and correctness of a name for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceCheckNameAvailability.json */ - -import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementServiceCheckNameAvailability(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.checkNameAvailability(parameters); + const result = await client.apiManagementService.checkNameAvailability({ name: "apimService1" }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts index fc5a403d662b..2d76219bc2e5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceCreateOrUpdateSample.ts @@ -1,34 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json */ - -import { - ApiManagementServiceResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateMultiRegionServiceWithCustomHostname(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "West US", additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 }, - }, + { disableGateway: true, location: "East US", sku: { name: "Premium", capacity: 1 } }, ], apiVersionConstraint: { minApiVersion: "2019-01-01" }, hostnameConfigurations: [ @@ -58,198 +47,145 @@ async function apiManagementCreateMultiRegionServiceWithCustomHostname(): Promis hostName: "configuration-api.msitesting.net", }, ], - location: "West US", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", + virtualNetworkType: "None", sku: { name: "Premium", capacity: 1 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateService.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateService.json */ async function apiManagementCreateService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "South Central US", publisherEmail: "foo@contoso.com", publisherName: "foo", sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + tags: { Name: "Contoso", Test: "User" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceHavingMsi.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceHavingMsi.json */ async function apiManagementCreateServiceHavingMsi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { identity: { type: "SystemAssigned" }, location: "West US", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "Consumption", capacity: 0 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInVnetWithPublicIP.json */ async function apiManagementCreateServiceInVnetWithPublicIP(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "East US 2 EUAP", publicIpAddressId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, virtualNetworkConfiguration: { subnetResourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant", }, virtualNetworkType: "External", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInZones.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInZones.json */ async function apiManagementCreateServiceInZones(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "North europe", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "Premium", capacity: 2 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceSkuv2Service.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceSkuv2Service.json */ async function apiManagementCreateServiceSkuv2Service(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { identity: { type: "SystemAssigned" }, location: "West US", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "StandardV2", capacity: 1 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithCustomHostnameKeyVault.json */ async function apiManagementCreateServiceWithCustomHostnameKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + location: "North Europe", apiVersionConstraint: { minApiVersion: "2019-01-01" }, hostnameConfigurations: [ { @@ -257,22 +193,19 @@ async function apiManagementCreateServiceWithCustomHostnameKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - developerPortalStatus: "Enabled", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "South Central US", + developerPortalStatus: "Enabled", publisherEmail: "foo@contoso.com", publisherName: "foo", sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + tags: { Name: "Contoso", Test: "User" }, + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithNatGatewayEnabled.json */ async function apiManagementCreateServiceWithNatGatewayEnabled(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "East US", natGatewayState: "Enabled", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "Premium", capacity: 1 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithSystemCertificates.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithSystemCertificates.json */ async function apiManagementCreateServiceWithSystemCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "Central US", certificates: [ { certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", + encodedCertificate: "*******Base64 encoded Certificate******************", storeName: "CertificateAuthority", }, ], - location: "Central US", publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "Basic", capacity: 1 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithUserAssignedIdentity.json */ async function apiManagementCreateServiceWithUserAssignedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { identity: { type: "UserAssigned", userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {}, }, }, @@ -431,75 +315,48 @@ async function apiManagementCreateServiceWithUserAssignedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - configurationApi: { legacyApi: "Disabled" }, + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "Central US", + configurationApi: { legacyApi: "Disabled" }, publisherEmail: "apim@autorestsdk.com", publisherName: "autorestsdk", sku: { name: "Basic", capacity: 1 }, tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUndelete.json + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUndelete.json */ async function apiManagementUndelete(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { location: "South Central US", publisherEmail: "foo@contoso.com", publisherName: "foo", restore: true, sku: { name: "Developer", capacity: 1 }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts index 1f0d3d225406..d39938644eda 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceDeleteSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes an existing API Management service. - * - * @summary Deletes an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes an existing API Management service. + * + * @summary deletes an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceDeleteService.json + */ async function apiManagementServiceDeleteService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); + const result = await client.apiManagementService.delete("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts index 562fa3c3eaee..b2057a6ce1e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. - * - * @summary Get the custom domain ownership identifier for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the custom domain ownership identifier for an API Management service. + * + * @summary get the custom domain ownership identifier for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json + */ async function apiManagementServiceGetDomainOwnershipIdentifier(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.getDomainOwnershipIdentifier(); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts index e9cd837d44f6..0d51ec7feab9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSample.ts @@ -1,74 +1,48 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json + */ async function apiManagementServiceGetMultiRegionInternalVnet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); + const result = await client.apiManagementService.get("rg1", "apimService1"); console.log(result); } /** - * This sample demonstrates how to Gets an API Management service resource description. + * This sample demonstrates how to gets an API Management service resource description. * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetService.json */ async function apiManagementServiceGetService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); + const result = await client.apiManagementService.get("rg1", "apimService1"); console.log(result); } /** - * This sample demonstrates how to Gets an API Management service resource description. + * This sample demonstrates how to gets an API Management service resource description. * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetServiceHavingMsi.json */ async function apiManagementServiceGetServiceHavingMsi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); + const result = await client.apiManagementService.get("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts index 93ad8a59da68..3e10e187e615 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceGetSsoTokenSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @summary Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * + * @summary gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetSsoToken.json + */ async function apiManagementServiceGetSsoToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName, - ); + const result = await client.apiManagementService.getSsoToken("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts index 0e4f0a065e6a..8ab5e32dfdcf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListByResourceGroupSample.ts @@ -1,31 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List all API Management services within a resource group. - * - * @summary List all API Management services within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list all API Management services within a resource group. + * + * @summary list all API Management services within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json + */ async function apiManagementListServiceBySubscriptionAndResourceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiManagementService.listByResourceGroup( - resourceGroupName, - )) { + for await (const item of client.apiManagementService.listByResourceGroup("rg1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts index 2608224ba0ef..a2774f5552b6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceListSample.ts @@ -1,27 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all API Management services within an Azure subscription. - * - * @summary Lists all API Management services within an Azure subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all API Management services within an Azure subscription. + * + * @summary lists all API Management services within an Azure subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscription.json + */ async function apiManagementListServiceBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiManagementService.list()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts index 85ee3a2f580e..bc19b12d5531 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceMigrateToStv2Sample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * This sample demonstrates how to upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. * - * @summary Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json + * @summary upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceMigrateToStv2.json */ - -import { - MigrateToStv2Contract, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementMigrateService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: MigrateToStv2Contract = { mode: "PreserveIp" }; - const options: ApiManagementServiceMigrateToStv2OptionalParams = { - parameters, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName, - options, - ); + const result = await client.apiManagementService.migrateToStv2("rg1", "apimService1", { + parameters: { mode: "PreserveIp" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRefreshHostnamesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRefreshHostnamesSample.ts new file mode 100644 index 000000000000..934a30790d99 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRefreshHostnamesSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * + * @summary force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json + */ +async function apiManagementServiceRefreshKeyVaultHostnames(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.refreshHostnames("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceRefreshKeyVaultHostnames(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts new file mode 100644 index 000000000000..f85f11100394 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheck.json + */ +async function tcpConnectivityCheck(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "8.8.8.8", port: 53 }, + preferredIPVersion: "IPv4", + source: { region: "northeurope" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheckHttpConnect.json + */ +async function httpConnectivityCheck(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "https://microsoft.com", port: 3306 }, + protocolConfiguration: { + httpConfiguration: { + method: "GET", + headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], + validStatusCodes: [200, 204], + }, + }, + source: { region: "northeurope" }, + protocol: "HTTPS", + }, + ); + console.log(result); +} + +async function main(): Promise { + await tcpConnectivityCheck(); + await httpConnectivityCheck(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts index 0b114baba359..c56c00a06752 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceRestoreSample.ts @@ -1,41 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * This sample demonstrates how to restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. * - * @summary Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json + * @summary restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRestoreWithAccessKey.json */ - -import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementRestoreService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.restore("rg1", "apimService1", { accessKey: "**************************************************", accessType: "AccessKey", backupName: "apimService1backup_2017_03_19", containerName: "backupContainer", storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts index 88a9ed2469a6..d1088ff41d07 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -1,64 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all available SKU for a given API Management service - * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; -async function apiManagementListSkUsConsumption(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; +/** + * This sample demonstrates how to gets all available SKU for a given API Management service + * + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Consumption.json + */ +async function apiManagementListSKUsConsumption(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, + "rg1", + "apimService1", )) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Gets all available SKU for a given API Management service + * This sample demonstrates how to gets all available SKU for a given API Management service * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Dedicated.json + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Dedicated.json */ -async function apiManagementListSkUsDedicated(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; +async function apiManagementListSKUsDedicated(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, + "rg1", + "apimService1", )) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await apiManagementListSkUsConsumption(); - await apiManagementListSkUsDedicated(); + await apiManagementListSKUsConsumption(); + await apiManagementListSKUsDedicated(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts index 13bfeaf22a92..2d0e9fdb6d7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementServiceUpdateSample.ts @@ -1,83 +1,55 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing API Management service. + * This sample demonstrates how to updates an existing API Management service. * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceDisableTls10.json */ - -import { - ApiManagementServiceUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateServiceDisableTls10(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + const result = await client.apiManagementService.update("rg1", "apimService1", { + customProperties: { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + }, + }); console.log(result); } /** - * This sample demonstrates how to Updates an existing API Management service. + * This sample demonstrates how to updates an existing API Management service. * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServicePublisherDetails.json + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServicePublisherDetails.json */ async function apiManagementUpdateServicePublisherDetails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + const result = await client.apiManagementService.update("rg1", "apimService1", { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext", + }); console.log(result); } /** - * This sample demonstrates how to Updates an existing API Management service. + * This sample demonstrates how to updates an existing API Management service. * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceToNewVnetAndAZs.json */ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { additionalLocations: [ { location: "Australia East", @@ -93,21 +65,14 @@ async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones(): Promis ], publicIpAddressId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, virtualNetworkConfiguration: { subnetResourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2", }, virtualNetworkType: "External", + sku: { name: "Premium", capacity: 3 }, zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts index 91127ed34c4e..6c4807446c72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementSkusListSample.ts @@ -1,32 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * - * @summary Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; -async function listsAllAvailableResourceSkUs(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; +/** + * This sample demonstrates how to gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * + * @summary gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSku.json + */ +async function listsAllAvailableResourceSKUs(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiManagementSkus.list()) { resArray.push(item); } + console.log(resArray); } async function main(): Promise { - await listsAllAvailableResourceSkUs(); + await listsAllAvailableResourceSKUs(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinkGetSample.ts index 9a1327f3ed2f..c436de2f83e7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinkGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets an API Management WorkspaceLink resource description. - * - * @summary Gets an API Management WorkspaceLink resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets an API Management WorkspaceLink resource description. + * + * @summary gets an API Management WorkspaceLink resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLink.json + */ async function apiManagementGetWorkspaceLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; - const workspaceId = "wk-1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementWorkspaceLink.get( - resourceGroupName, - serviceName, - workspaceId, - ); + const result = await client.apiManagementWorkspaceLink.get("rg1", "service1", "wk-1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinksListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinksListByServiceSample.ts index a57b4c52bb24..45bc5d10d750 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinksListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiManagementWorkspaceLinksListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List all API Management workspaceLinks for a service. - * - * @summary List all API Management workspaceLinks for a service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list all API Management workspaceLinks for a service. + * + * @summary list all API Management workspaceLinks for a service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLinks.json + */ async function apiManagementListGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiManagementWorkspaceLinks.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.apiManagementWorkspaceLinks.listByService("rg1", "service1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts index 74768c655900..a5d27f6ff553 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationCreateOrUpdateSample.ts @@ -1,67 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. + * This sample demonstrates how to creates a new operation in the API or updates an existing one. * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperation.json */ - -import { - OperationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + "rg1", + "apimService1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", headers: [], + queryParameters: [], representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" }, + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, ], - statusCode: 200, }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts index 10ec07aa8423..2129313a8296 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperation.json + */ async function apiManagementDeleteApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, + await client.apiOperation.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts index c7af69f1d20e..37e926a7e2cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperation.json + */ async function apiManagementHeadApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, + await client.apiOperation.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts index 1cc8c98749cc..59a816ef22b5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationGetSample.ts @@ -1,59 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperation.json + */ async function apiManagementGetApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPetStore.json */ async function apiManagementGetApiOperationPetStore(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId, + "rg1", + "apimService1", + "swagger-petstore", + "loginUser", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts index 99df0b0bf7c0..c152ccefb175 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationListByApiSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperations.json + */ async function apiManagementListApiOperations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts index f826a58b494f..a53d4ed2d87c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyCreateOrUpdateSample.ts @@ -1,48 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationPolicy.json */ - -import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts index 13c32c0e32d6..fd9b35fa8640 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationPolicy.json + */ async function apiManagementDeleteApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, + await client.apiOperationPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testoperation", + "policy", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts index 283dce598e89..7579ba800948 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationPolicy.json + */ async function apiManagementHeadApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, + await client.apiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts index 54c04ef90029..41f3009cc3b1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPolicy.json + */ async function apiManagementGetApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts index e6db261ead34..c67774278400 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationPolicyListByOperationSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationPolicies.json + */ async function apiManagementListApiOperationPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts index 9172c4876e32..7bdaac75dc13 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiOperationUpdateSample.ts @@ -1,72 +1,52 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiOperation.json */ - -import { - OperationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + "rg1", + "apimService1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, ], }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts index e1a91019b007..2f0b1a71b92b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyCreateOrUpdateSample.ts @@ -1,81 +1,55 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the API. + * This sample demonstrates how to creates or updates policy configuration for the API. * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicy.json */ - -import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates policy configuration for the API. + * This sample demonstrates how to creates or updates policy configuration for the API. * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicyNonXmlEncoded.json */ async function apiManagementCreateApiPolicyNonXmlEncoded(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts index 690913f3e63b..1ff1015a5b05 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiPolicy.json + */ async function apiManagementDeleteApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch, - ); - console.log(result); + await client.apiPolicy.delete("rg1", "apimService1", "loggerId", "policy", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts index b02e8b4373ad..1cbaa19e0d6c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiPolicy.json + */ async function apiManagementHeadApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId, - ); - console.log(result); + await client.apiPolicy.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "policy"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts index e196885c4df8..5985832222e6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiPolicy.json + */ async function apiManagementGetApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId, + "rg1", + "apimService1", + "5600b59475ff190048040001", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts index 917826e12ee8..1713a106962e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiPolicyListByApiSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiPolicies.json + */ async function apiManagementListApiPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "5600b59475ff190048040001", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts index 98039ac76e82..3d994f19affe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiProductListByApisSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Products, which the API is part of. - * - * @summary Lists all Products, which the API is part of. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Products, which the API is part of. + * + * @summary lists all Products, which the API is part of. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiProducts.json + */ async function apiManagementListApiProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts index 55c6372b3b88..ddcc599f5145 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseCreateOrUpdateSample.ts @@ -1,43 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Release for the API. + * This sample demonstrates how to creates a new Release for the API. * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRelease.json */ - -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate("rg1", "apimService1", "a1", "testrev", { apiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts index 9bb7c35c5e8c..cce1b5479ccb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiRelease.json + */ async function apiManagementDeleteApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - ); - console.log(result); + await client.apiRelease.delete("rg1", "apimService1", "5a5fcc09124a7fa9b89f2f1d", "testrev", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts index 9910bfe562f4..5ce348c3e60e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiRelease.json + */ async function apiManagementHeadApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId, - ); - console.log(result); + await client.apiRelease.getEntityTag("rg1", "apimService1", "a1", "5a7cb545298324c53224a799"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts index ed332a8af36d..694a8a9e7add 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRelease.json + */ async function apiManagementGetApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId, + "rg1", + "apimService1", + "a1", + "5a7cb545298324c53224a799", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts index d9549f7f3931..4ae515d2830e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiReleases.json + */ async function apiManagementListApiReleases(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId, - )) { + for await (const item of client.apiRelease.listByService("rg1", "apimService1", "a1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts index a54c52b46422..86ee45fa4f76 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiReleaseUpdateSample.ts @@ -1,45 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiRelease.json */ - -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update("rg1", "apimService1", "a1", "testrev", "*", { apiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts index 012d25568975..b32203c3ace3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiRevisionListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiRevisions.json + */ async function apiManagementListApiRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts index f36e589c0554..8e0d86e16471 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaCreateOrUpdateSample.ts @@ -1,39 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates schema configuration for the API. + * This sample demonstrates how to creates or updates schema configuration for the API. * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiSchema.json */ - -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, + const result = await client.apiSchema.createOrUpdate( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts index 4beaf024ce14..060565c1af2d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiSchema.json + */ async function apiManagementDeleteApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch, + await client.apiSchema.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts index 11b57211c0d3..2fbd25aa6487 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiSchema.json + */ async function apiManagementHeadApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId, + await client.apiSchema.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts index 951d51b97670..ff67c37fe055 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiSchema.json + */ async function apiManagementGetApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId, + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts index 96bdeda90df2..d1605209827b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiSchemaListByApiSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiSchemas.json + */ async function apiManagementListApiSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts index 6f80ac4a4e6d..8ada3ba8f06c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionCreateOrUpdateSample.ts @@ -1,43 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create/Update tag description in scope of the Api. + * This sample demonstrates how to create/Update tag description in scope of the Api. * - * @summary Create/Update tag description in scope of the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json + * @summary create/Update tag description in scope of the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTagDescription.json */ - -import { - TagDescriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts index 961ebf48c262..188e988616ce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Delete tag description for the Api. - * - * @summary Delete tag description for the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to delete tag description for the Api. + * + * @summary delete tag description for the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTagDescription.json + */ async function apiManagementDeleteApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, + await client.apiTagDescription.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts index e365216b2242..d479d2dc01b3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTagDescription.json + */ async function apiManagementHeadApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, + await client.apiTagDescription.getEntityTag( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts index a6dd195ed6c6..60d57855af60 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get Tag description in scope of API - * - * @summary Get Tag description in scope of API - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get Tag description in scope of API + * + * @summary get Tag description in scope of API + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTagDescription.json + */ async function apiManagementGetApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts index 752177092eff..a2690b908489 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiTagDescriptionListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * - * @summary Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * + * @summary lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTagDescriptions.json + */ async function apiManagementListApiTagDescriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e2367699a598 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new tool in the API or updates an existing one. + * + * @summary creates a new tool in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTool.json + */ +async function apiManagementCreateApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.createOrUpdate( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/github-rest-api/operations/createIssue", + description: "This is a MCP tool to create an issue in a github repository", + displayName: "createIssue", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolDeleteSample.ts new file mode 100644 index 000000000000..9055191303d7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified tool in the API. + * + * @summary deletes the specified tool in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTool.json + */ +async function apiManagementDeleteApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetEntityTagSample.ts new file mode 100644 index 000000000000..bede0be7a005 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API tool specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTool.json + */ +async function apiManagementHeadApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetSample.ts new file mode 100644 index 000000000000..984f99d8be86 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API Tool specified by its identifier. + * + * @summary gets the details of the API Tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTool.json + */ +async function apiManagementGetApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.get( + "rg1", + "apimService1", + "github-mcp-api", + "findRepositories", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolListByApiSample.ts new file mode 100644 index 000000000000..fd458f21aa68 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolListByApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the MCP tools for the specified API. + * + * @summary lists a collection of the MCP tools for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTools.json + */ +async function apiManagementListApiTools(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiTool.listByApi("rg1", "apimService1", "github-mcp-api")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiTools(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolUpdateSample.ts new file mode 100644 index 000000000000..a6764f325aaa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiToolUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the tool in the API specified by its identifier. + * + * @summary updates the details of the tool in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiTool.json + */ +async function apiManagementUpdateApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.update( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { description: "This is updated description", displayName: "createIssue" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts index 2edb02a62ead..1172bc254a70 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiUpdateSample.ts @@ -1,43 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the specified API of the API Management service instance. + * This sample demonstrates how to updates the specified API of the API Management service instance. * - * @summary Updates the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json + * @summary updates the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApi.json */ - -import { - ApiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update("rg1", "apimService1", "echo-api", "*", { path: "newecho", displayName: "Echo API New", serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts index eade31d1acbb..6e685fdfd88e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetCreateOrUpdateSample.ts @@ -1,41 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a Api Version Set. + * This sample demonstrates how to creates or Updates a Api Version Set. * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiVersionSet.json */ - -import { - ApiVersionSetContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate("rg1", "apimService1", "api1", { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts index bdde3c1d0795..51579a6a609b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiVersionSet.json + */ async function apiManagementDeleteApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - ); - console.log(result); + await client.apiVersionSet.delete("rg1", "apimService1", "a1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts index 440a5a99dcb9..705bc98c9db5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiVersionSet.json + */ async function apiManagementHeadApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId, - ); - console.log(result); + await client.apiVersionSet.getEntityTag("rg1", "apimService1", "vs1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts index ae86acce8862..948fc03f573e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiVersionSet.json + */ async function apiManagementGetApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId, - ); + const result = await client.apiVersionSet.get("rg1", "apimService1", "vs1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts index 784aa7a917fc..e22b545eb7ac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. - * - * @summary Lists a collection of API Version Sets in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified service instance. + * + * @summary lists a collection of API Version Sets in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiVersionSets.json + */ async function apiManagementListApiVersionSets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.apiVersionSet.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts index b2a9d4725d4f..6b2bd7876063 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiVersionSetUpdateSample.ts @@ -1,43 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiVersionSet.json */ - -import { - ApiVersionSetUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update("rg1", "apimService1", "vs1", "*", { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts index 9fa78c015fd4..72328341c7db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiCreateOrUpdateSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. + * This sample demonstrates how to creates a new Wiki for an API or updates an existing one. * - * @summary Creates a new Wiki for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json + * @summary creates a new Wiki for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWiki.json */ - -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts index ab0dfc035ae5..5ca65b2ea817 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Wiki from an API. - * - * @summary Deletes the specified Wiki from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Wiki from an API. + * + * @summary deletes the specified Wiki from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiWiki.json + */ async function apiManagementDeleteApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch, - ); - console.log(result); + await client.apiWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts index 8e468ff69e78..df2d67e89597 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiWiki.json + */ async function apiManagementHeadApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); + await client.apiWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts index 2378cc0935a1..4606824ce4d0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. - * - * @summary Gets the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Wiki for an API specified by its identifier. + * + * @summary gets the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiWiki.json + */ async function apiManagementGetApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId, - ); + const result = await client.apiWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts index 0e6b2fe05f2d..6a876c151e73 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikiUpdateSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. + * This sample demonstrates how to updates the details of the Wiki for an API specified by its identifier. * - * @summary Updates the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json + * @summary updates the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiWiki.json */ - -import { - WikiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts index a1df5aa12f4b..4de9edee4b20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/apiWikisListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the wikis for an API specified by its identifier. - * - * @summary Gets the wikis for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the wikis for an API specified by its identifier. + * + * @summary gets the wikis for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiWikis.json + */ async function apiManagementListApiWikis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts index c6a8e91e6237..4374fb346f6a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -1,44 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates Authorization Access Policy. + * This sample demonstrates how to creates or updates Authorization Access Policy. * - * @summary Creates or updates Authorization Access Policy. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json + * @summary creates or updates Authorization Access Policy. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json */ - -import { - AuthorizationAccessPolicyContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + { + appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts index cebf7f9484a2..62ec6aae8486 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific access policy from the Authorization. - * - * @summary Deletes specific access policy from the Authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific access policy from the Authorization. + * + * @summary deletes specific access policy from the Authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json + */ async function apiManagementDeleteAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, + await client.authorizationAccessPolicy.delete( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts index c713c4def21d..005b9aa93ff4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. - * - * @summary Gets the details of the authorization access policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the authorization access policy specified by its identifier. + * + * @summary gets the details of the authorization access policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationAccessPolicy.json + */ async function apiManagementGetAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts index c275d449f60e..13fad840905e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationAccessPolicyListByAuthorizationSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. - * - * @summary Lists a collection of authorization access policy defined within a authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of authorization access policy defined within a authorization. + * + * @summary lists a collection of authorization access policy defined within a authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationAccessPolicies.json + */ async function apiManagementListAuthorizationAccessPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts index ac834c7a5529..2ba5bada7e94 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationConfirmConsentCodeSample.ts @@ -1,42 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. + * This sample demonstrates how to confirm valid consent code to suppress Authorizations anti-phishing page. * - * @summary Confirm valid consent code to suppress Authorizations anti-phishing page. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + * @summary confirm valid consent code to suppress Authorizations anti-phishing page. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json */ - -import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPostAuthorizationConfirmConsentCodeRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, + await client.authorization.confirmConsentCode( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { consentCode: "theconsentcode" }, ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts index ffe3b01d0127..6b71b2f80742 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationCreateOrUpdateSample.ts @@ -1,83 +1,56 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates authorization. + * This sample demonstrates how to creates or updates authorization. * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json */ - -import { - AuthorizationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateAuthorizationAadAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - }; +async function apiManagementCreateAuthorizationAADAuthCode(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, + "rg1", + "apimService1", + "aadwithauthcode", + "authz2", + { authorizationType: "OAuth2", oAuth2GrantType: "AuthorizationCode" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates authorization. + * This sample demonstrates how to creates or updates authorization. * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADClientCred.json */ -async function apiManagementCreateAuthorizationAadClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - }, - }; +async function apiManagementCreateAuthorizationAADClientCred(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, + "rg1", + "apimService1", + "aadwithclientcred", + "authz1", + { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { clientId: "clientsecretid", clientSecret: "clientsecretvalue" }, + }, ); console.log(result); } async function main(): Promise { - await apiManagementCreateAuthorizationAadAuthCode(); - await apiManagementCreateAuthorizationAadClientCred(); + await apiManagementCreateAuthorizationAADAuthCode(); + await apiManagementCreateAuthorizationAADClientCred(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts index 076c5d375d31..ab82c84696ab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. - * - * @summary Deletes specific Authorization from the Authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Authorization from the Authorization provider. + * + * @summary deletes specific Authorization from the Authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorization.json + */ async function apiManagementDeleteAuthorization(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - ); - console.log(result); + await client.authorization.delete("rg1", "apimService1", "aadwithauthcode", "authz1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts index aefc1b212dc6..312ab12788b0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the authorization specified by its identifier. - * - * @summary Gets the details of the authorization specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the authorization specified by its identifier. + * + * @summary gets the details of the authorization specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorization.json + */ async function apiManagementGetAuthorization(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ); + const result = await client.authorization.get("rg1", "apimService1", "aadwithauthcode", "authz1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts index e08318941296..60ab37f47a2e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationListByAuthorizationProviderSample.ts @@ -1,62 +1,50 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. - * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. + * + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsAuthCode.json + */ async function apiManagementListAuthorizationsAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, + "rg1", + "apimService1", + "aadwithauthcode", )) { resArray.push(item); } + console.log(resArray); } /** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsClientCred.json + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsClientCred.json */ async function apiManagementListAuthorizationsClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, + "rg1", + "apimService1", + "aadwithclientcred", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts index cee7eb07b2fa..2f2ac5647b62 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationLoginLinksPostSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Gets authorization login links. + * This sample demonstrates how to gets authorization login links. * - * @summary Gets authorization login links. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json + * @summary gets authorization login links. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationLoginRequest.json */ - -import { - AuthorizationLoginRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGetAuthorizationLoginRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationLoginRequestContract = { - postLoginRedirectUrl: "https://www.bing.com/", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationLoginLinks.post( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { postLoginRedirectUrl: "https://www.bing.com/" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts index 9c3f9960266d..7ace96bdbc33 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderCreateOrUpdateSample.ts @@ -1,183 +1,184 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates authorization provider. + * This sample demonstrates how to creates or updates authorization provider. * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json */ - -import { - type AuthorizationProviderContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateAuthorizationProviderAadAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithauthcode", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; +async function apiManagementCreateAuthorizationProviderAADAuthCode(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, + "rg1", + "apimService1", + "aadwithauthcode", + { + displayName: "aadwithauthcode", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "clientsecretid", + clientSecret: "clientsecretvalue", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates authorization provider. + * This sample demonstrates how to creates or updates authorization provider. * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json */ -async function apiManagementCreateAuthorizationProviderAadClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithclientcred", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", +async function apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithkeyvault", + { + displayName: "Azure AD with Key Vault", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "53790825-fdd3-4b80-bc7a-4c3aaf25801d", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, }, + keyVault: { secretIdentifier: "https://my.vault.azure.net/secrets/clientSecret" }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", }, - }; + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADClientCred.json + */ +async function apiManagementCreateAuthorizationProviderAADClientCred(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, + "rg1", + "apimService1", + "aadwithclientcred", + { + displayName: "aadwithclientcred", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates authorization provider. + * This sample demonstrates how to creates or updates authorization provider. * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderGenericOAuth2.json */ async function apiManagementCreateAuthorizationProviderGenericOAuth2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "eventbrite"; - const parameters: AuthorizationProviderContract = { - displayName: "eventbrite", - identityProvider: "oauth2", - oauth2: { - grantTypes: { - authorizationCode: { - authorizationUrl: "https://www.eventbrite.com/oauth/authorize", - clientId: "clientid", - clientSecret: "clientsecretvalue", - refreshUrl: "https://www.eventbrite.com/oauth/token", - tokenUrl: "https://www.eventbrite.com/oauth/token", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, + "rg1", + "apimService1", + "eventbrite", + { + displayName: "eventbrite", + identityProvider: "oauth2", + oauth2: { + grantTypes: { + authorizationCode: { + authorizationUrl: "https://www.eventbrite.com/oauth/authorize", + clientId: "clientid", + clientSecret: "clientsecretvalue", + refreshUrl: "https://www.eventbrite.com/oauth/token", + tokenUrl: "https://www.eventbrite.com/oauth/token", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates authorization provider. + * This sample demonstrates how to creates or updates authorization provider. * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderOOBGoogle.json */ -async function apiManagementCreateAuthorizationProviderOobGoogle(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "google"; - const parameters: AuthorizationProviderContract = { - displayName: "google", - identityProvider: "google", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: - "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", - clientSecret: "clientsecretvalue", - scopes: - "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; +async function apiManagementCreateAuthorizationProviderOOBGoogle(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, + "rg1", + "apimService1", + "google", + { + displayName: "google", + identityProvider: "google", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", + clientSecret: "clientsecretvalue", + scopes: + "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, ); console.log(result); } async function main(): Promise { - await apiManagementCreateAuthorizationProviderAadAuthCode(); - await apiManagementCreateAuthorizationProviderAadClientCred(); + await apiManagementCreateAuthorizationProviderAADAuthCode(); + await apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault(); + await apiManagementCreateAuthorizationProviderAADClientCred(); await apiManagementCreateAuthorizationProviderGenericOAuth2(); - await apiManagementCreateAuthorizationProviderOobGoogle(); + await apiManagementCreateAuthorizationProviderOOBGoogle(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts index 35cfa5051a80..b77d18679daa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. - * - * @summary Deletes specific authorization provider from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific authorization provider from the API Management service instance. + * + * @summary deletes specific authorization provider from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationProvider.json + */ async function apiManagementDeleteAuthorizationProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - ); - console.log(result); + await client.authorizationProvider.delete("rg1", "apimService1", "aadwithauthcode", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts index 257c7a874822..9d68374aa7a4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. - * - * @summary Gets the details of the authorization provider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the authorization provider specified by its identifier. + * + * @summary gets the details of the authorization provider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationProvider.json + */ async function apiManagementGetAuthorizationProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.get( - resourceGroupName, - serviceName, - authorizationProviderId, - ); + const result = await client.authorizationProvider.get("rg1", "apimService1", "aadwithauthcode"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts index 3256714e81b9..99190c1f9b85 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. - * - * @summary Lists a collection of authorization providers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a service instance. + * + * @summary lists a collection of authorization providers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationProviders.json + */ async function apiManagementListAuthorizationProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.authorizationProvider.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.authorizationProvider.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderRefreshSecretSample.ts new file mode 100644 index 000000000000..9217675d64f6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationProviderRefreshSecretSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refreshes the Key Vault reference secret for the specified authorization provider. + * + * @summary refreshes the Key Vault reference secret for the specified authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json + */ +async function apiManagementAuthorizationProviderRefreshSecret(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.refreshSecret( + "rg1", + "apimService1", + "aadwithkeyvault", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementAuthorizationProviderRefreshSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts index 0b28d7b49d5c..34102a21cc3a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerCreateOrUpdateSample.ts @@ -1,53 +1,41 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. + * This sample demonstrates how to creates new authorization server or updates an existing authorization server. * - * @summary Creates new authorization server or updates an existing authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json + * @summary creates new authorization server or updates an existing authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationServer.json */ - -import { - AuthorizationServerContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const parameters: AuthorizationServerContract = { - description: "test server", - authorizationEndpoint: "https://www.contoso.com/oauth2/auth", - authorizationMethods: ["GET"], - bearerTokenSendingMethods: ["authorizationHeader"], - clientId: "1", - clientRegistrationEndpoint: "https://www.contoso.com/apps", - clientSecret: "2", - defaultScope: "read write", - displayName: "test2", - grantTypes: ["authorizationCode", "implicit"], - resourceOwnerPassword: "pwd", - resourceOwnerUsername: "un", - supportState: true, - tokenEndpoint: "https://www.contoso.com/oauth2/token", - useInApiDocumentation: true, - useInTestConsole: false, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationServer.createOrUpdate( - resourceGroupName, - serviceName, - authsid, - parameters, + "rg1", + "apimService1", + "newauthServer", + { + description: "test server", + authorizationEndpoint: "https://www.contoso.com/oauth2/auth", + authorizationMethods: ["GET"], + bearerTokenSendingMethods: ["authorizationHeader"], + clientId: "1", + clientRegistrationEndpoint: "https://www.contoso.com/apps", + clientSecret: "2", + defaultScope: "read write", + displayName: "test2", + grantTypes: ["authorizationCode", "implicit"], + resourceOwnerPassword: "pwd", + resourceOwnerUsername: "un", + supportState: true, + tokenEndpoint: "https://www.contoso.com/oauth2/token", + useInApiDocumentation: true, + useInTestConsole: false, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts index cdab223346d4..438e2bb7f83a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific authorization server instance. - * - * @summary Deletes specific authorization server instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific authorization server instance. + * + * @summary deletes specific authorization server instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationServer.json + */ async function apiManagementDeleteAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.delete( - resourceGroupName, - serviceName, - authsid, - ifMatch, - ); - console.log(result); + await client.authorizationServer.delete("rg1", "apimService1", "newauthServer2", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts index f4ba9c400579..94ef98eda885 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * + * @summary gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadAuthorizationServer.json + */ async function apiManagementHeadAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.getEntityTag( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); + await client.authorizationServer.getEntityTag("rg1", "apimService1", "newauthServer2"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts index f9a7aff8967f..951e6be2f130 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. - * - * @summary Gets the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the authorization server specified by its identifier. + * + * @summary gets the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationServer.json + */ async function apiManagementGetAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.get( - resourceGroupName, - serviceName, - authsid, - ); + const result = await client.authorizationServer.get("rg1", "apimService1", "newauthServer2"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts index efbe101a79db..d991a9e0851d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. - * - * @summary Lists a collection of authorization servers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of authorization servers defined within a service instance. + * + * @summary lists a collection of authorization servers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationServers.json + */ async function apiManagementListAuthorizationServers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.authorizationServer.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.authorizationServer.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts index ce42ade5b3a3..c7c282b5d683 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerListSecretsSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the client secret details of the authorization server. - * - * @summary Gets the client secret details of the authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the client secret details of the authorization server. + * + * @summary gets the client secret details of the authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAuthorizationServerListSecrets.json + */ async function apiManagementAuthorizationServerListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationServer.listSecrets( - resourceGroupName, - serviceName, - authsid, + "rg1", + "apimService1", + "newauthServer2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts index a20481c301e4..4a345e08b153 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/authorizationServerUpdateSample.ts @@ -1,43 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. + * This sample demonstrates how to updates the details of the authorization server specified by its identifier. * - * @summary Updates the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json + * @summary updates the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateAuthorizationServer.json */ - -import { - AuthorizationServerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const ifMatch = "*"; - const parameters: AuthorizationServerUpdateContract = { - clientId: "update", - clientSecret: "updated", - useInApiDocumentation: true, - useInTestConsole: false, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.authorizationServer.update( - resourceGroupName, - serviceName, - authsid, - ifMatch, - parameters, + "rg1", + "apimService1", + "newauthServer", + "*", + { + clientId: "update", + clientSecret: "updated", + useInApiDocumentation: true, + useInTestConsole: false, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts index 69c95e700339..fec249d2f5a1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendCreateOrUpdateSample.ts @@ -1,67 +1,68 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a backend. + * This sample demonstrates how to creates or Updates a backend. * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json */ +async function apiManagementCreateBackendCustomAssignedCertificateThumbprint(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverCertificateThumbprints: ["1365083bae61ee876fc26850b825d05d3eb2e503"], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendProxyBackend.json + */ async function apiManagementCreateBackendProxyBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "proxybackend", { description: "description5308", credentials: { authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, + header: { "x-my-1": ["val1", "val2"] }, query: { sv: ["xx", "bb", "cc"] }, }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, tls: { validateCertificateChain: true, validateCertificateName: true }, url: "https://backendname2644/", protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a backend. + * This sample demonstrates how to creates or Updates a backend. * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendServiceFabric.json + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendServiceFabric.json */ async function apiManagementCreateBackendServiceFabric(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "sfbackend", { description: "Service Fabric Test App 1", properties: { serviceFabricCluster: { @@ -79,21 +80,202 @@ async function apiManagementCreateBackendServiceFabric(): Promise { }, url: "fabric:/mytestapp/mytestservice", protocol: "http", - }; + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithAzureRegion.json + */ +async function apiManagementCreateBackendWithAzureRegion(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "azurebackend", { + azureRegion: "northeurope", + url: "https://backendname2644/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json + */ +async function apiManagementCreateBackendWithCarbonAwareLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "carbonawareloadbalancerbackend", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sustainable-backend-europe-north", + preferredCarbonEmission: "Medium", + priority: 1, + weight: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + priority: 1, + weight: 1, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json + */ +async function apiManagementCreateBackendCustomAssignedCertificateX509Names(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverX509Names: [{ name: "*.badssl.com" }], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json + */ +async function apiManagementCreateBackendWithPriorityBasedLoadBalancer(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, + "rg1", + "apimService1", + "priority-based-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-3", + priority: 2, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-4", + priority: 2, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithSimpleLoadBalancer.json + */ +async function apiManagementCreateBackendWithSimpleLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "simple-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithWeightedLoadBalancer.json + */ +async function apiManagementCreateBackendWithWeightedLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "weighted-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + weight: 75, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + weight: 25, + }, + ], + }, + }, ); console.log(result); } async function main(): Promise { + await apiManagementCreateBackendCustomAssignedCertificateThumbprint(); await apiManagementCreateBackendProxyBackend(); await apiManagementCreateBackendServiceFabric(); + await apiManagementCreateBackendWithAzureRegion(); + await apiManagementCreateBackendWithCarbonAwareLoadBalancer(); + await apiManagementCreateBackendCustomAssignedCertificateX509Names(); + await apiManagementCreateBackendWithPriorityBasedLoadBalancer(); + await apiManagementCreateBackendWithSimpleLoadBalancer(); + await apiManagementCreateBackendWithWeightedLoadBalancer(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts index 74fca21b010f..64d94822c3d9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteBackend.json + */ async function apiManagementDeleteBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.delete( - resourceGroupName, - serviceName, - backendId, - ifMatch, - ); - console.log(result); + await client.backend.delete("rg1", "apimService1", "sfbackend", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts index 75c23d7bc62d..1d35d5551774 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadBackend.json + */ async function apiManagementHeadBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.getEntityTag( - resourceGroupName, - serviceName, - backendId, - ); - console.log(result); + await client.backend.getEntityTag("rg1", "apimService1", "sfbackend"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts index d43f4872df15..7c96c5fc5bae 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetBackend.json + */ async function apiManagementGetBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.get( - resourceGroupName, - serviceName, - backendId, - ); + const result = await client.backend.get("rg1", "apimService1", "sfbackend"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts index 7d98a4b0aa2b..54cafc5d0487 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of backends in the specified service instance. - * - * @summary Lists a collection of backends in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of backends in the specified service instance. + * + * @summary lists a collection of backends in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListBackends.json + */ async function apiManagementListBackends(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.backend.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.backend.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts index 3e1219d07c85..cdd6e04d1459 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendReconnectSample.ts @@ -1,40 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * This sample demonstrates how to notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. * - * @summary Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json + * @summary notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackendReconnect.json */ - -import { - BackendReconnectContract, - BackendReconnectOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementBackendReconnect(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendReconnectContract = { after: "PT3S" }; - const options: BackendReconnectOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.reconnect( - resourceGroupName, - serviceName, - backendId, - options, - ); - console.log(result); + await client.backend.reconnect("rg1", "apimService1", "proxybackend", { + parameters: { after: "PT3S" }, + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts index 54dcf9ddbb36..fbe21088be34 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/backendUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing backend. + * This sample demonstrates how to updates an existing backend. * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateBackend.json */ - -import { - BackendUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.update( - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - ); + const result = await client.backend.update("rg1", "apimService1", "proxybackend", "*", { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts index 09a4acb3f422..779a85778fc5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheCreateOrUpdateSample.ts @@ -1,41 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. + * This sample demonstrates how to creates or updates an External Cache to be used in Api Management instance. * - * @summary Creates or updates an External Cache to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json + * @summary creates or updates an External Cache to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCache.json */ - -import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const parameters: CacheContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.createOrUpdate("rg1", "apimService1", "c1", { description: "Redis cache instances in West India", - connectionString: - "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + connectionString: "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", resourceId: "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", useFromLocation: "default", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.createOrUpdate( - resourceGroupName, - serviceName, - cacheId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts index 0b93e83b89d0..c4fcde49b4c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Cache. - * - * @summary Deletes specific Cache. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Cache. + * + * @summary deletes specific Cache. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCache.json + */ async function apiManagementDeleteCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "southindia"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.delete( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - ); - console.log(result); + await client.cache.delete("rg1", "apimService1", "southindia", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts index f840678baacb..88606e6e03a0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Cache specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCache.json + */ async function apiManagementHeadCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.getEntityTag( - resourceGroupName, - serviceName, - cacheId, - ); - console.log(result); + await client.cache.getEntityTag("rg1", "apimService1", "default"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts index 0a6bb2b7845a..37ff302ba48c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Cache specified by its identifier. - * - * @summary Gets the details of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Cache specified by its identifier. + * + * @summary gets the details of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCache.json + */ async function apiManagementGetCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.get( - resourceGroupName, - serviceName, - cacheId, - ); + const result = await client.cache.get("rg1", "apimService1", "c1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts index 5e9ff603c3c6..6524dc396986 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. - * - * @summary Lists a collection of all external Caches in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of all external Caches in the specified service instance. + * + * @summary lists a collection of all external Caches in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCaches.json + */ async function apiManagementListCaches(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.cache.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.cache.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts index 9295b27edca3..d71883f38e02 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/cacheUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the cache specified by its identifier. + * This sample demonstrates how to updates the details of the cache specified by its identifier. * - * @summary Updates the details of the cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json + * @summary updates the details of the cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateCache.json */ - -import { - CacheUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const ifMatch = "*"; - const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.update( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - parameters, - ); + const result = await client.cache.update("rg1", "apimService1", "c1", "*", { + useFromLocation: "westindia", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts index 0986414116b5..7fe9f55ebaa5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateCreateOrUpdateSample.ts @@ -1,72 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificate.json */ - -import { - CertificateCreateOrUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "tempcert", { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificateWithKeyVault.json */ async function apiManagementCreateCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "templateCertkv", { keyVault: { identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", secretIdentifier: "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts index 70e71aad98c8..e33da89ded58 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCertificate.json + */ async function apiManagementDeleteCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.delete( - resourceGroupName, - serviceName, - certificateId, - ifMatch, - ); - console.log(result); + await client.certificate.delete("rg1", "apimService1", "tempcert", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts index bba4e2e408dd..db167955e2f1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCertificate.json + */ async function apiManagementHeadCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.getEntityTag( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); + await client.certificate.getEntityTag("rg1", "apimService1", "templateCert1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts index f346a3b5141a..9d736e20a8c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateGetSample.ts @@ -1,56 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificate.json + */ async function apiManagementGetCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId, - ); + const result = await client.certificate.get("rg1", "apimService1", "templateCert1"); console.log(result); } /** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. + * This sample demonstrates how to gets the details of the certificate specified by its identifier. * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificateWithKeyVault.json */ async function apiManagementGetCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId, - ); + const result = await client.certificate.get("rg1", "apimService1", "templateCertkv"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts index 67a8b8e2b18d..c2e2ea2fd83a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. - * - * @summary Lists a collection of all certificates in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of all certificates in the specified service instance. + * + * @summary lists a collection of all certificates in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCertificates.json + */ async function apiManagementListCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.certificate.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.certificate.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts index 5b453559cc93..a8dfa331c664 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/certificateRefreshSecretSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshCertificate.json + */ async function apiManagementRefreshCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.refreshSecret( - resourceGroupName, - serviceName, - certificateId, - ); + const result = await client.certificate.refreshSecret("rg1", "apimService1", "templateCertkv"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8196c46ef5d2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a client application. + * + * @summary creates or Updates a client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplication.json + */ +async function apiManagementCreateProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.createOrUpdate("rg1", "apimService1", "testAppId", { + description: "This is just an example application", + displayName: "Test Application", + ownerId: "/users/userId", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationDeleteSample.ts new file mode 100644 index 000000000000..d1ced2fdc146 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete client application. + * + * @summary delete client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplication.json + */ +async function apiManagementDeleteProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.delete("rg1", "apimService1", "testAppId"); +} + +async function main(): Promise { + await apiManagementDeleteProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetEntityTagSample.ts new file mode 100644 index 000000000000..5cb31a7f4b20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadClientApplication.json + */ +async function apiManagementHeadProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.getEntityTag("rg1", "apimService1", "testAppId"); +} + +async function main(): Promise { + await apiManagementHeadProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetSample.ts new file mode 100644 index 000000000000..1789de792860 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the client application specified by its identifier. + * + * @summary gets the details of the client application specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplication.json + */ +async function apiManagementGetClientApplication(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.get("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetClientApplication(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListByServiceSample.ts new file mode 100644 index 000000000000..1b8652e780a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of client applications in the specified service instance. + * + * @summary lists a collection of client applications in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplications.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplication.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListSecretsSample.ts new file mode 100644 index 000000000000..59a906d5c8a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationListSecretsSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrived client application secrets. + * + * @summary retrived client application secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationSecrets.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.listSecrets("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkCreateSample.ts new file mode 100644 index 000000000000..5c939659c2b9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkCreateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an Product to the specified Client Application via link. + * + * @summary adds an Product to the specified Client Application via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplicationProductLink.json + */ +async function apiManagementCreateClientApplicationProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.create( + "rg1", + "apimService1", + "testAppId", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkDeleteSample.ts new file mode 100644 index 000000000000..d628c0bf88ea --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Product from the specified client application. + * + * @summary deletes the specified Product from the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplicationProductLink.json + */ +async function apiManagementDeleteClientApplicationProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplicationProductLink.delete("rg1", "apimService1", "testAppId", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkGetSample.ts new file mode 100644 index 000000000000..e4a8524cef9b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the product link for the client application. + * + * @summary gets the product link for the client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplicationProductLink.json + */ +async function apiManagementGetProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.get( + "rg1", + "apimService1", + "testAppId", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkListByClientApplicationsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkListByClientApplicationsSample.ts new file mode 100644 index 000000000000..21d1a4bf28b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/clientApplicationProductLinkListByClientApplicationsSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of product links associated with the specified client application. + * + * @summary lists a collection of product links associated with the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationProductLinks.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplicationProductLink.listByClientApplications( + "rg1", + "apimService1", + "testAppId", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts index 0036193fb3f9..5f85953fcbc9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemCreateOrUpdateSample.ts @@ -1,49 +1,35 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. + * This sample demonstrates how to creates a new developer portal's content item specified by the provided content type. * - * @summary Creates a new developer portal's content item specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json + * @summary creates a new developer portal's content item specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentTypeContentItem.json */ - -import { - ContentItemContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const parameters: ContentItemContract = { - properties: { - enUs: { - description: "Short story about the company.", - documentId: - "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - keywords: "company, about", - permalink: "/about", - title: "About", - }, - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.contentItem.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + { + properties: { + en_us: { + description: "Short story about the company.", + documentId: "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + keywords: "company, about", + permalink: "/about", + title: "About", + }, + }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts index 29fb8aca9561..2e4d61fcd580 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the specified developer portal's content item. - * - * @summary Removes the specified developer portal's content item. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the specified developer portal's content item. + * + * @summary removes the specified developer portal's content item. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentTypeContentItem.json + */ async function apiManagementDeleteContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.delete( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, + await client.contentItem.delete( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts index d1dac35ba290..b30f5d115c0c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * - * @summary Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * + * @summary returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadContentTypeContentItem.json + */ async function apiManagementHeadContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.getEntityTag( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, + await client.contentItem.getEntityTag( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts index cb10fef05ff8..8cfec995ba17 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. - * - * @summary Returns the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the developer portal's content item specified by its identifier. + * + * @summary returns the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentTypeContentItem.json + */ async function apiManagementGetContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.contentItem.get( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts index b1628b16a038..cc7c5471073c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentItemListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. - * - * @summary Lists developer portal's content items specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists developer portal's content items specified by the provided content type. + * + * @summary lists developer portal's content items specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypeContentItems.json + */ async function apiManagementListContentTypeContentItems(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.contentItem.listByService( - resourceGroupName, - serviceName, - contentTypeId, - )) { + for await (const item of client.contentItem.listByService("rg1", "apimService1", "page")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts index 10117378009a..63bbe360e311 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeCreateOrUpdateSample.ts @@ -1,29 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * This sample demonstrates how to creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. * - * @summary Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json + * @summary creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentType.json */ - -import { - ContentTypeContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const parameters: ContentTypeContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.createOrUpdate("rg1", "apimService1", "page", { namePropertiesName: "Page", schema: { additionalProperties: false, @@ -34,8 +25,7 @@ async function apiManagementCreateContentType(): Promise { properties: { description: { type: "string", - description: - "Page description. This property gets included in SEO attributes.", + description: "Page description. This property gets included in SEO attributes.", indexed: true, title: "Description", }, @@ -46,8 +36,7 @@ async function apiManagementCreateContentType(): Promise { }, keywords: { type: "string", - description: - "Page keywords. This property gets included in SEO attributes.", + description: "Page keywords. This property gets included in SEO attributes.", indexed: true, title: "Keywords", }, @@ -59,8 +48,7 @@ async function apiManagementCreateContentType(): Promise { }, title: { type: "string", - description: - "Page title. This property gets included in SEO attributes.", + description: "Page title. This property gets included in SEO attributes.", indexed: true, title: "Title", }, @@ -71,15 +59,7 @@ async function apiManagementCreateContentType(): Promise { }, description: "A regular page", version: "1.0.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts index cb33229bff07..bba35e284463 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * - * @summary Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * + * @summary removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentType.json + */ async function apiManagementDeleteContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.delete( - resourceGroupName, - serviceName, - contentTypeId, - ifMatch, - ); - console.log(result); + await client.contentType.delete("rg1", "apimService1", "page", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts index e01231b57ae3..246731f2467f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * + * @summary gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentType.json + */ async function apiManagementGetContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.get( - resourceGroupName, - serviceName, - contentTypeId, - ); + const result = await client.contentType.get("rg1", "apimService1", "page"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts index c0674d20ea56..17e8ae824d21 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/contentTypeListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * + * @summary lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypes.json + */ async function apiManagementListContentTypes(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.contentType.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.contentType.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts index 5d3672dd6610..c35a054d48b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create or Update Delegation settings. + * This sample demonstrates how to create or Update Delegation settings. * - * @summary Create or Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json + * @summary create or Update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutDelegation.json */ - -import { - PortalDelegationSettings, - DelegationSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "", - }; - const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.delegationSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, + "rg1", + "apimService1", + { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "", + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts index 1587f6cdc49b..83e0b638ae6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetEntityTagSample.ts @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. - * - * @summary Gets the entity state (Etag) version of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the DelegationSettings. + * + * @summary gets the entity state (Etag) version of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDelegationSettings.json + */ async function apiManagementHeadDelegationSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); + await client.delegationSettings.getEntityTag("rg1", "apimService1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts index 60a0eef4fd79..6cf2b57fe667 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsGetSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get Delegation Settings for the Portal. - * - * @summary Get Delegation Settings for the Portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get Delegation Settings for the Portal. + * + * @summary get Delegation Settings for the Portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetDelegation.json + */ async function apiManagementPortalSettingsGetDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.get( - resourceGroupName, - serviceName, - ); + const result = await client.delegationSettings.get("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts index 5bcec0376d90..6095a85092d1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsListSecretsSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. - * - * @summary Gets the secret validation key of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the secret validation key of the DelegationSettings. + * + * @summary gets the secret validation key of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json + */ async function apiManagementListSecretsPortalSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.listSecrets( - resourceGroupName, - serviceName, - ); + const result = await client.delegationSettings.listSecrets("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts index 4e15307e3dca..3a781b6b656c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/delegationSettingsUpdateSample.ts @@ -1,43 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update Delegation settings. + * This sample demonstrates how to update Delegation settings. * - * @summary Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json + * @summary update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateDelegation.json */ - -import { - PortalDelegationSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.delegationSettings.update("rg1", "apimService1", "*", { subscriptions: { enabled: true }, url: "http://contoso.com/delegation", userRegistration: { enabled: true }, validationKey: "", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts index 67b0614dc07b..7d1947a02a91 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesGetByNameSample.ts @@ -1,26 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get soft-deleted Api Management Service by name. - * - * @summary Get soft-deleted Api Management Service by name. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get soft-deleted Api Management Service by name. + * + * @summary get soft-deleted Api Management Service by name. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDeletedServiceByName.json + */ async function apiManagementGetDeletedServiceByName(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.getByName(serviceName, location); + const result = await client.deletedServices.getByName("westus", "apimService3"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts index dd8801c005bc..3ff30ef8d91e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesListBySubscriptionSample.ts @@ -1,27 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. - * - * @summary Lists all soft-deleted services available for undelete for the given subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all soft-deleted services available for undelete for the given subscription. + * + * @summary lists all soft-deleted services available for undelete for the given subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesListBySubscription.json + */ async function apiManagementDeletedServicesListBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.deletedServices.listBySubscription()) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts index 187a44bf1d14..ce7132bf595e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/deletedServicesPurgeSample.ts @@ -1,29 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). - * - * @summary Purges Api Management Service (deletes it with no option to undelete). - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to purges Api Management Service (deletes it with no option to undelete). + * + * @summary purges Api Management Service (deletes it with no option to undelete). + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesPurge.json + */ async function apiManagementDeletedServicesPurge(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.beginPurgeAndWait( - serviceName, - location, - ); + const result = await client.deletedServices.purge("westus", "apimService3"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts index 958d52df2911..eafb4167d15e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticCreateOrUpdateSample.ts @@ -1,48 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.diagnostic.createOrUpdate( - resourceGroupName, - serviceName, - diagnosticId, - parameters, + "rg1", + "apimService1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts index 1bb20fd6cbde..52d8b79d332b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDiagnostic.json + */ async function apiManagementDeleteDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.delete( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - ); - console.log(result); + await client.diagnostic.delete("rg1", "apimService1", "applicationinsights", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts index 2332e2444f00..378c6a605a3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDiagnostic.json + */ async function apiManagementHeadDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.getEntityTag( - resourceGroupName, - serviceName, - diagnosticId, - ); - console.log(result); + await client.diagnostic.getEntityTag("rg1", "apimService1", "applicationinsights"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts index 8a8039690d6b..e059b49798a0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDiagnostic.json + */ async function apiManagementGetDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.get( - resourceGroupName, - serviceName, - diagnosticId, - ); + const result = await client.diagnostic.get("rg1", "apimService1", "applicationinsights"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts index e769c6a90a1b..bea7dae99a7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all diagnostics of the API Management service instance. - * - * @summary Lists all diagnostics of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all diagnostics of the API Management service instance. + * + * @summary lists all diagnostics of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDiagnostics.json + */ async function apiManagementListDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.diagnostic.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.diagnostic.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts index a7bc1ce2a7b3..c76670fb3c1a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/diagnosticUpdateSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.update("rg1", "apimService1", "applicationinsights", "*", { alwaysLog: "allErrors", backend: { response: { body: { bytes: 512 }, headers: ["Content-type"] }, @@ -36,16 +26,7 @@ async function apiManagementUpdateDiagnostic(): Promise { }, loggerId: "/loggers/applicationinsights", sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.update( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts index c65c2bed5c60..871f0415779a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationCreateOrUpdateSample.ts @@ -1,39 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Documentation or updates an existing one. + * This sample demonstrates how to creates a new Documentation or updates an existing one. * - * @summary Creates a new Documentation or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json + * @summary creates a new Documentation or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDocumentation.json */ - -import { - DocumentationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationContract = { - content: "content", - title: "Title", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.documentation.createOrUpdate( - resourceGroupName, - serviceName, - documentationId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { content: "content", title: "Title" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts index 40c413377081..a72ebc9ffb47 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationDeleteSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Documentation from an API. - * - * @summary Deletes the specified Documentation from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Documentation from an API. + * + * @summary deletes the specified Documentation from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDocumentation.json + */ async function apiManagementDeleteDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.delete( - resourceGroupName, - serviceName, - documentationId, - "*" - ); - console.log(result); + await client.documentation.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts index 910e6b918af0..6f988600db65 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. - * - * @summary Gets the entity state (Etag) version of the Documentation by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Documentation by its identifier. + * + * @summary gets the entity state (Etag) version of the Documentation by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDocumentation.json + */ async function apiManagementHeadDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.getEntityTag( - resourceGroupName, - serviceName, - documentationId, - ); - console.log(result); + await client.documentation.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts index 837498870236..fe5188e690af 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. - * - * @summary Gets the details of the Documentation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Documentation specified by its identifier. + * + * @summary gets the details of the Documentation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDocumentation.json + */ async function apiManagementGetDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.get( - resourceGroupName, - serviceName, - documentationId, - ); + const result = await client.documentation.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts index 2ed473294f02..6e356e8cc4dd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Documentations of the API Management service instance. - * - * @summary Lists all Documentations of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Documentations of the API Management service instance. + * + * @summary lists all Documentations of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDocumentations.json + */ async function apiManagementListApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.documentation.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.documentation.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts index 23e8295345d4..7cae60ed368b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/documentationUpdateSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. + * This sample demonstrates how to updates the details of the Documentation for an API specified by its identifier. * - * @summary Updates the details of the Documentation for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json + * @summary updates the details of the Documentation for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDocumentation.json */ - -import { - DocumentationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationUpdateContract = { - content: "content updated", - title: "Title updated", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.documentation.update( - resourceGroupName, - serviceName, - documentationId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", "*", - parameters, + { content: "content updated", title: "Title updated" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts index 3082bd86aae1..d72f8ae08a18 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateCreateOrUpdateSample.ts @@ -1,38 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an Email Template. + * This sample demonstrates how to updates an Email Template. * - * @summary Updates an Email Template. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json + * @summary updates an Email Template. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTemplate.json */ - -import { - EmailTemplateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const parameters: EmailTemplateUpdateParameters = { - subject: "Your request for $IssueName was successfully received.", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.emailTemplate.createOrUpdate( - resourceGroupName, - serviceName, - templateName, - parameters, + "rg1", + "apimService1", + "newIssueNotificationMessage", + { subject: "Your request for $IssueName was successfully received." }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts index c2517dc4c325..d85f3822f15a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. - * - * @summary Reset the Email Template to default template provided by the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to reset the Email Template to default template provided by the API Management service instance. + * + * @summary reset the Email Template to default template provided by the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTemplate.json + */ async function apiManagementDeleteTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.delete( - resourceGroupName, - serviceName, - templateName, - ifMatch, - ); - console.log(result); + await client.emailTemplate.delete("rg1", "apimService1", "newIssueNotificationMessage", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts index 515be3fcaedc..faaca3da2866 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the email template specified by its identifier. + * + * @summary gets the entity state (Etag) version of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadEmailTemplate.json + */ async function apiManagementHeadEmailTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.getEntityTag( - resourceGroupName, - serviceName, - templateName, - ); - console.log(result); + await client.emailTemplate.getEntityTag("rg1", "apimService1", "newIssueNotificationMessage"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts index 0726afa3db50..96459558ea4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateGetSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the email template specified by its identifier. - * - * @summary Gets the details of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the email template specified by its identifier. + * + * @summary gets the details of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTemplate.json + */ async function apiManagementGetTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.emailTemplate.get( - resourceGroupName, - serviceName, - templateName, + "rg1", + "apimService1", + "newIssueNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts index 25df45568329..7b932ae121ba 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all email templates - * - * @summary Gets all email templates - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets all email templates + * + * @summary gets all email templates + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTemplates.json + */ async function apiManagementListTemplates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.emailTemplate.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.emailTemplate.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts index 40c881a359f0..ac3a4e386d6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/emailTemplateUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates API Management email template + * This sample demonstrates how to updates API Management email template * - * @summary Updates API Management email template - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json + * @summary updates API Management email template + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTemplate.json */ - -import { - EmailTemplateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const parameters: EmailTemplateUpdateParameters = { - body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', - subject: "Your request $IssueName was received", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.emailTemplate.update( - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, + "rg1", + "apimService1", + "newIssueNotificationMessage", + "*", + { + body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', + subject: "Your request $IssueName was received", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts index 14e8fcf5737a..54bf8423f74f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiCreateOrUpdateSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an API to the specified Gateway. + * This sample demonstrates how to adds an API to the specified Gateway. * - * @summary Adds an API to the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json + * @summary adds an API to the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayApi.json */ - -import { - AssociationContract, - GatewayApiCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const parameters: AssociationContract = { provisioningState: "created" }; - const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - apiId, - options, - ); + const result = await client.gatewayApi.createOrUpdate("rg1", "apimService1", "gw1", "echo-api", { + parameters: { provisioningState: "created" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts index f38e422d37aa..bee9cadfc850 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified Gateway. - * - * @summary Deletes the specified API from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified Gateway. + * + * @summary deletes the specified API from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayApi.json + */ async function apiManagementDeleteGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.delete( - resourceGroupName, - serviceName, - gatewayId, - apiId, - ); - console.log(result); + await client.gatewayApi.delete("rg1", "apimService1", "gw1", "echo-api"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts index 060e15dae29c..dc753a633863 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. - * - * @summary Checks that API entity specified by identifier is associated with the Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Gateway entity. + * + * @summary checks that API entity specified by identifier is associated with the Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayApi.json + */ async function apiManagementHeadGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "api1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - apiId, - ); - console.log(result); + await client.gatewayApi.getEntityTag("rg1", "apimService1", "gw1", "api1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts index 7aeeda751957..9567fc25e8f4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayApiListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. - * - * @summary Lists a collection of the APIs associated with a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the APIs associated with a gateway. + * + * @summary lists a collection of the APIs associated with a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayApis.json + */ async function apiManagementListGatewayApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.gatewayApi.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { + for await (const item of client.gatewayApi.listByService("rg1", "apimService1", "gw1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts index 3c91552a614f..2a8c11727021 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. + * This sample demonstrates how to assign Certificate entity to Gateway entity as Certificate Authority. * - * @summary Assign Certificate entity to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json + * @summary assign Certificate entity to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayCertificateAuthority.json */ - -import { - GatewayCertificateAuthorityContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.gatewayCertificateAuthority.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, + "rg1", + "apimService1", + "gw1", + "cert1", + { isTrusted: false }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts index f605a5b32b91..60bd119b6402 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. - * - * @summary Remove relationship between Certificate Authority and Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to remove relationship between Certificate Authority and Gateway entity. + * + * @summary remove relationship between Certificate Authority and Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json + */ async function apiManagementDeleteGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "default"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.delete( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - ); - console.log(result); + await client.gatewayCertificateAuthority.delete("rg1", "apimService1", "gw1", "default", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts index e3643a1e3312..e7c9e6e07df1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * - * @summary Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * + * @summary checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayCertificateAuthority.json + */ async function apiManagementHeadGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ); - console.log(result); + await client.gatewayCertificateAuthority.getEntityTag("rg1", "apimService1", "gw1", "cert1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts index 5dc7df28381b..c78d47451c36 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get assigned Gateway Certificate Authority details. - * - * @summary Get assigned Gateway Certificate Authority details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get assigned Gateway Certificate Authority details. + * + * @summary get assigned Gateway Certificate Authority details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayCertificateAuthority.json + */ async function apiManagementGetGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.gatewayCertificateAuthority.get( - resourceGroupName, - serviceName, - gatewayId, - certificateId, + "rg1", + "apimService1", + "gw1", + "cert1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts index 07b48a22216f..70483ac49cc1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCertificateAuthorityListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. - * - * @summary Lists the collection of Certificate Authorities for the specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the collection of Certificate Authorities for the specified Gateway entity. + * + * @summary lists the collection of Certificate Authorities for the specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayCertificateAuthorities.json + */ async function apiManagementListGatewaycertificateAuthorities(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.gatewayCertificateAuthority.listByService( - resourceGroupName, - serviceName, - gatewayId, + "rg1", + "apimService1", + "gw1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts index 5927c708c6a3..1ed99e898547 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayCreateOrUpdateSample.ts @@ -1,37 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. + * This sample demonstrates how to creates or updates a Gateway to be used in Api Management instance. * - * @summary Creates or updates a Gateway to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json + * @summary creates or updates a Gateway to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGateway.json */ - -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); + const result = await client.gateway.createOrUpdate("rg1", "apimService1", "gw1", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts index 596b13e75e2e..3d177a9c0deb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Gateway. - * - * @summary Deletes specific Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Gateway. + * + * @summary deletes specific Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGateway.json + */ async function apiManagementDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.delete( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - ); - console.log(result); + await client.gateway.delete("rg1", "apimService1", "gw1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts index 0c346bb6455d..df2f8fda9951 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGenerateTokenSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. + * This sample demonstrates how to gets the Shared Access Authorization Token for the gateway. * - * @summary Gets the Shared Access Authorization Token for the gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json + * @summary gets the Shared Access Authorization Token for the gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGenerateToken.json */ - -import { - GatewayTokenRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGatewayGenerateToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayTokenRequestContract = { - expiry: new Date("2020-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.generateToken( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); + const result = await client.gateway.generateToken("rg1", "apimService1", "gw1", { + expiry: new Date("2020-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts index 53b013e86fb9..3baf7b0e3fcc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Gateway specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGateway.json + */ async function apiManagementHeadGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "mygateway"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); + await client.gateway.getEntityTag("rg1", "apimService1", "mygateway"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts index e91bd792b386..bfa85f127ba0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. - * - * @summary Gets the details of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Gateway specified by its identifier. + * + * @summary gets the details of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGateway.json + */ async function apiManagementGetGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.get( - resourceGroupName, - serviceName, - gatewayId, - ); + const result = await client.gateway.get("rg1", "apimService1", "gw1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts index cd5bf430df0c..26cbb3bf35fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -1,46 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. + * This sample demonstrates how to creates of updates hostname configuration for a Gateway. * - * @summary Creates of updates hostname configuration for a Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json + * @summary creates of updates hostname configuration for a Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json */ - -import { - GatewayHostnameConfigurationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const parameters: GatewayHostnameConfigurationContract = { - certificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - hostname: "*", - http2Enabled: true, - negotiateClientCertificate: false, - tls10Enabled: false, - tls11Enabled: false, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.gatewayHostnameConfiguration.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - hcId, - parameters, + "rg1", + "apimService1", + "gw1", + "default", + { + certificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + hostname: "*", + http2Enabled: true, + negotiateClientCertificate: false, + tls10Enabled: false, + tls11Enabled: false, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts index 6681f8eb12dd..b320eca928d0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. - * - * @summary Deletes the specified hostname configuration from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified hostname configuration from the specified Gateway. + * + * @summary deletes the specified hostname configuration from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json + */ async function apiManagementDeleteGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.delete( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ifMatch, - ); - console.log(result); + await client.gatewayHostnameConfiguration.delete("rg1", "apimService1", "gw1", "default", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts index bccc44ac5abf..189f8b9dc5d3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * - * @summary Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * + * @summary checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json + */ async function apiManagementHeadGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ); - console.log(result); + await client.gatewayHostnameConfiguration.getEntityTag("rg1", "apimService1", "gw1", "default"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts index 050463fe2aef..f49b21fe673a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get details of a hostname configuration - * - * @summary Get details of a hostname configuration - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get details of a hostname configuration + * + * @summary get details of a hostname configuration + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameConfiguration.json + */ async function apiManagementGetGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.gatewayHostnameConfiguration.get( - resourceGroupName, - serviceName, - gatewayId, - hcId, + "rg1", + "apimService1", + "gw1", + "default", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts index 462bbb17b050..46627034dc87 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayHostnameConfigurationListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. - * - * @summary Lists the collection of hostname configurations for the specified gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the collection of hostname configurations for the specified gateway. + * + * @summary lists the collection of hostname configurations for the specified gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameConfigurations.json + */ async function apiManagementListGatewayHostnameConfigurations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.gatewayHostnameConfiguration.listByService( - resourceGroupName, - serviceName, - gatewayId, + "rg1", + "apimService1", + "gw1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayInvalidateDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayInvalidateDebugCredentialsSample.ts index 227dc5a773ee..2eceeb888f7a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayInvalidateDebugCredentialsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayInvalidateDebugCredentialsSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Action is invalidating all debug credentials issued for gateway. - * - * @summary Action is invalidating all debug credentials issued for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to action is invalidating all debug credentials issued for gateway. + * + * @summary action is invalidating all debug credentials issued for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json + */ async function apiManagementGatewayInvalidateDebugCredentials(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.invalidateDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); + await client.gateway.invalidateDebugCredentials("rg1", "apimService1", "gw1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts index 9b0b5325e039..ff922825ce21 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of gateways registered with service instance. - * - * @summary Lists a collection of gateways registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of gateways registered with service instance. + * + * @summary lists a collection of gateways registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGateways.json + */ async function apiManagementListGateways(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.gateway.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.gateway.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListDebugCredentialsSample.ts index 1194756eaee0..a003c4bf47a6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListDebugCredentialsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListDebugCredentialsSample.ts @@ -1,42 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create new debug credentials for gateway. + * This sample demonstrates how to create new debug credentials for gateway. * - * @summary Create new debug credentials for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json + * @summary create new debug credentials for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListDebugCredentials.json */ - -import { - GatewayListDebugCredentialsContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGatewayListDebugCredentials(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayListDebugCredentialsContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listDebugCredentials("rg1", "apimService1", "gw1", { apiId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", credentialsExpireAfter: "PT1H", purposes: ["tracing"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts index 5fbbbef3bfd8..6754228af5c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListKeysSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Retrieves gateway keys. - * - * @summary Retrieves gateway keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to retrieves gateway keys. + * + * @summary retrieves gateway keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListKeys.json + */ async function apiManagementGatewayListKeys(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listKeys( - resourceGroupName, - serviceName, - gatewayId, - ); + const result = await client.gateway.listKeys("rg1", "apimService1", "gw1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListTraceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListTraceSample.ts index 1d9c3afb96e5..e6acb0b8ede9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListTraceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayListTraceSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Fetches trace collected by gateway. + * This sample demonstrates how to fetches trace collected by gateway. * - * @summary Fetches trace collected by gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json + * @summary fetches trace collected by gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListTrace.json */ - -import { - GatewayListTraceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGatewayListTrace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayListTraceContract = { - traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listTrace( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); + const result = await client.gateway.listTrace("rg1", "apimService1", "gw1", { + traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts index 618141cc6ac4..55c2459e93a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayRegenerateKeySample.ts @@ -1,40 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. + * This sample demonstrates how to regenerates specified gateway key invalidating any tokens created with it. * - * @summary Regenerates specified gateway key invalidating any tokens created with it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json + * @summary regenerates specified gateway key invalidating any tokens created with it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayRegenerateKey.json */ - -import { - GatewayKeyRegenerationRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGatewayRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gwId"; - const parameters: GatewayKeyRegenerationRequestContract = { - keyType: "primary", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.regenerateKey( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); + await client.gateway.regenerateKey("rg1", "apimService1", "gwId", { keyType: "primary" }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts index 874071a17462..aed2d5bb2043 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/gatewayUpdateSample.ts @@ -1,39 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the gateway specified by its identifier. + * This sample demonstrates how to updates the details of the gateway specified by its identifier. * - * @summary Updates the details of the gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json + * @summary updates the details of the gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGateway.json */ - -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.update( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - ); + const result = await client.gateway.update("rg1", "apimService1", "gw1", "*", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts index 314977918458..ab24a1216981 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaCreateOrUpdateSample.ts @@ -1,60 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema1.json */ - -import { - GlobalSchemaContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateSchema1(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { description: "sample schema description", schemaType: "xml", value: '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema2.json */ async function apiManagementCreateSchema2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { description: "sample schema description", document: { type: "object", @@ -63,8 +42,7 @@ async function apiManagementCreateSchema2(): Promise { properties: { age: { type: "integer", - description: - "Age in years which must be equal to or greater than zero.", + description: "Age in years which must be equal to or greater than zero.", minimum: 0, }, firstName: { type: "string", description: "The person's first name." }, @@ -73,15 +51,7 @@ async function apiManagementCreateSchema2(): Promise { title: "Person", }, schemaType: "json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts index c0b48568ec62..151dd3377284 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGlobalSchema.json + */ async function apiManagementDeleteSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.delete( - resourceGroupName, - serviceName, - schemaId, - ifMatch, - ); - console.log(result); + await client.globalSchema.delete("rg1", "apimService1", "schema1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts index 1d101dadcf39..5e217b561530 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGlobalSchema.json + */ async function apiManagementHeadApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "myschema"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.getEntityTag( - resourceGroupName, - serviceName, - schemaId, - ); - console.log(result); + await client.globalSchema.getEntityTag("rg1", "apimService1", "myschema"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts index 2b9bd4bce1bd..6f908ee016de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaGetSample.ts @@ -1,56 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema1.json + */ async function apiManagementGetSchema1(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId, - ); + const result = await client.globalSchema.get("rg1", "apimService1", "schema1"); console.log(result); } /** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. + * This sample demonstrates how to gets the details of the Schema specified by its identifier. * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema2.json */ async function apiManagementGetSchema2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId, - ); + const result = await client.globalSchema.get("rg1", "apimService1", "schema2"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts index 9940c9bb9794..7b20787b18e0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/globalSchemaListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of schemas registered with service instance. - * - * @summary Lists a collection of schemas registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of schemas registered with service instance. + * + * @summary lists a collection of schemas registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGlobalSchemas.json + */ async function apiManagementListSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.globalSchema.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.globalSchema.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8b9605bc736c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new resolver in the GraphQL API or updates an existing one. + * + * @summary creates a new resolver in the GraphQL API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolver.json + */ +async function apiManagementCreateGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.createOrUpdate( + "rg1", + "apimService1", + "someAPI", + "newResolver", + { path: "Query/users", description: "A GraphQL Resolver example", displayName: "Query Users" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverDeleteSample.ts new file mode 100644 index 000000000000..8a36c22698ad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified resolver in the GraphQL API. + * + * @summary deletes the specified resolver in the GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolver.json + */ +async function apiManagementDeleteGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetEntityTagSample.ts new file mode 100644 index 000000000000..8ccd8481acfb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolver.json + */ +async function apiManagementHeadGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetSample.ts new file mode 100644 index 000000000000..64e23ef07109 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the GraphQL API Resolver specified by its identifier. + * + * @summary gets the details of the GraphQL API Resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolver.json + */ +async function apiManagementGetGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverListByApiSample.ts new file mode 100644 index 000000000000..446a799bbd0e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the resolvers for the specified GraphQL API. + * + * @summary lists a collection of the resolvers for the specified GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolvers.json + */ +async function apiManagementListGraphQLApiResolvers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolver.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGraphQLApiResolvers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f24a258b11d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the GraphQL API Resolver level. + * + * @summary creates or updates policy configuration for the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json + */ +async function apiManagementCreateGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + 'GET/api/users', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyDeleteSample.ts new file mode 100644 index 000000000000..7949cfd58c35 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the GraphQL Api Resolver. + * + * @summary deletes the policy configuration at the GraphQL Api Resolver. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json + */ +async function apiManagementDeleteGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testResolver", + "policy", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..6fe7eb2863c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json + */ +async function apiManagementHeadGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetSample.ts new file mode 100644 index 000000000000..23b0232457c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the GraphQL API Resolver level. + * + * @summary get the policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json + */ +async function apiManagementGetGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.get( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyListByResolverSample.ts new file mode 100644 index 000000000000..959ccfae7e4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverPolicyListByResolverSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the list of policy configuration at the GraphQL API Resolver level. + * + * @summary get the list of policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolverPolicies.json + */ +async function apiManagementListGraphQLApiResolverPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolverPolicy.listByResolver( + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGraphQLApiResolverPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverUpdateSample.ts new file mode 100644 index 000000000000..3ac497404139 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQLApiResolverUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the resolver in the GraphQL API specified by its identifier. + * + * @summary updates the details of the resolver in the GraphQL API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGraphQLApiResolver.json + */ +async function apiManagementUpdateGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.update( + "rg1", + "apimService1", + "echo-api", + "resolverId", + "*", + { + path: "Query/adminUsers", + description: "A GraphQL Resolver example", + displayName: "Query AdminUsers", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts deleted file mode 100644 index 85d5ddf29cef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. - * - * @summary Creates a new resolver in the GraphQL API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json - */ - -import { - ResolverContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "someAPI"; - const resolverId = "newResolver"; - const parameters: ResolverContract = { - path: "Query/users", - description: "A GraphQL Resolver example", - displayName: "Query Users", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts deleted file mode 100644 index 97bb2dcd7516..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverDeleteSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. - * - * @summary Deletes the specified resolver in the GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementDeleteGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts deleted file mode 100644 index 9cebe6f52512..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetEntityTagSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementHeadGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts deleted file mode 100644 index 2d82e7252aec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. - * - * @summary Gets the details of the GraphQL API Resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementGetGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts deleted file mode 100644 index 4081f2969584..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverListByApiSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. - * - * @summary Lists a collection of the resolvers for the specified GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementListGraphQlApiResolvers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolver.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGraphQlApiResolvers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 79e317bc7b68..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. - * - * @summary Creates or updates policy configuration for the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json - */ - -import { - PolicyContract, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const resolverId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - 'GET/api/users', - }; - const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { - ifMatch, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts deleted file mode 100644 index 80859ceeda72..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. - * - * @summary Deletes the policy configuration at the GraphQL Api Resolver. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementDeleteGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const resolverId = "testResolver"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts deleted file mode 100644 index 4d777c6a0e8b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementHeadGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts deleted file mode 100644 index 53e8251523fd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. - * - * @summary Get the policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementGetGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts deleted file mode 100644 index 2ea9ebfd2c4c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverPolicyListByResolverSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. - * - * @summary Get the list of policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json - */ - -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementListGraphQlApiResolverPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const resolverId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolverPolicy.listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGraphQlApiResolverPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts deleted file mode 100644 index c91b62ab6c8e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/graphQlApiResolverUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. - * - * @summary Updates the details of the resolver in the GraphQL API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json - */ - -import { - ResolverUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementUpdateGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const resolverId = "resolverId"; - const ifMatch = "*"; - const parameters: ResolverUpdateContract = { - path: "Query/adminUsers", - description: "A GraphQL Resolver example", - displayName: "Query AdminUsers", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.update( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts index 5317026b8321..96f7c7eed703 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupCreateOrUpdateSample.ts @@ -1,69 +1,41 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a group. + * This sample demonstrates how to creates or Updates a group. * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroup.json */ - -import { - GroupCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); + const result = await client.group.createOrUpdate("rg1", "apimService1", "tempgroup", { + displayName: "temp group", + }); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a group. + * This sample demonstrates how to creates or Updates a group. * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupExternal.json + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupExternal.json */ async function apiManagementCreateGroupExternal(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate("rg1", "apimService1", "aadGroup", { type: "external", description: "new group to test", displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts index 2bfddcd8a313..6a7d5d23b8fa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific group of the API Management service instance. - * - * @summary Deletes specific group of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific group of the API Management service instance. + * + * @summary deletes specific group of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroup.json + */ async function apiManagementDeleteGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.delete( - resourceGroupName, - serviceName, - groupId, - ifMatch, - ); - console.log(result); + await client.group.delete("rg1", "apimService1", "aadGroup", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts index e67028cd3ee8..870643398656 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroup.json + */ async function apiManagementHeadGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.getEntityTag( - resourceGroupName, - serviceName, - groupId, - ); - console.log(result); + await client.group.getEntityTag("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts index 5afa02d91fb6..583840ae7c09 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGroup.json + */ async function apiManagementGetGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.get( - resourceGroupName, - serviceName, - groupId, - ); + const result = await client.group.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts index 8d785e044ecd..b64b1f18cbfb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of groups defined within a service instance. - * - * @summary Lists a collection of groups defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of groups defined within a service instance. + * + * @summary lists a collection of groups defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroups.json + */ async function apiManagementListGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.group.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.group.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts index ff504107f2a7..e062ab244782 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the group specified by its identifier. + * This sample demonstrates how to updates the details of the group specified by its identifier. * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGroup.json */ - -import { - GroupUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.update( - resourceGroupName, - serviceName, - groupId, - ifMatch, - parameters, - ); + const result = await client.group.update("rg1", "apimService1", "tempgroup", "*", { + displayName: "temp group", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts index c36a43e8a3d4..a7cd7065eec3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCheckEntityExistsSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroupUser.json + */ async function apiManagementHeadGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.checkEntityExists( - resourceGroupName, - serviceName, - groupId, - userId, + await client.groupUser.checkEntityExists( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts index f5eaef5dc742..9dd7d1955ac5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserCreateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupUser.json + */ async function apiManagementCreateGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.groupUser.create( - resourceGroupName, - serviceName, - groupId, - userId, + "rg1", + "apimService1", + "tempgroup", + "59307d350af58404d8a26300", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts index 6d3064daebe6..21848172a283 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroupUser.json + */ async function apiManagementDeleteGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.delete( - resourceGroupName, - serviceName, - groupId, - userId, - ); - console.log(result); + await client.groupUser.delete("rg1", "apimService1", "templategroup", "59307d350af58404d8a26300"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts index 4361444190f1..5fc7949957da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/groupUserListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroupUsers.json + */ async function apiManagementListGroupUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.groupUser.list( - resourceGroupName, - serviceName, - groupId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts index bd3974bfd6d0..8a1ea103b163 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderCreateOrUpdateSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. + * This sample demonstrates how to creates or Updates the IdentityProvider configuration. * - * @summary Creates or Updates the IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json + * @summary creates or Updates the IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateIdentityProvider.json */ - -import { - IdentityProviderCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const parameters: IdentityProviderCreateContract = { - clientId: "facebookid", - clientSecret: "facebookapplicationsecret", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.createOrUpdate( - resourceGroupName, - serviceName, - identityProviderName, - parameters, - ); + const result = await client.identityProvider.createOrUpdate("rg1", "apimService1", "facebook", { + clientId: "facebookid", + clientSecret: "facebookapplicationsecret", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts index 8dfef6eafa3d..e663e4ae0ac2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified identity provider configuration. - * - * @summary Deletes the specified identity provider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified identity provider configuration. + * + * @summary deletes the specified identity provider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteIdentityProvider.json + */ async function apiManagementDeleteIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aad"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.delete( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - ); - console.log(result); + await client.identityProvider.delete("rg1", "apimService1", "aad", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts index 116f17f98d15..8eacddeecdcf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the identityProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the identityProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadIdentityProvider.json + */ async function apiManagementHeadIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.getEntityTag( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); + await client.identityProvider.getEntityTag("rg1", "apimService1", "aadB2C"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts index f63ebe6f3024..2df45d8db1b0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. - * - * @summary Gets the configuration details of the identity Provider configured in specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the configuration details of the identity Provider configured in specified service instance. + * + * @summary gets the configuration details of the identity Provider configured in specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIdentityProvider.json + */ async function apiManagementGetIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.get( - resourceGroupName, - serviceName, - identityProviderName, - ); + const result = await client.identityProvider.get("rg1", "apimService1", "aadB2C"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts index 194373de8e3c..7d76d5fd79f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. - * - * @summary Lists a collection of Identity Provider configured in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of Identity Provider configured in the specified service instance. + * + * @summary lists a collection of Identity Provider configured in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIdentityProviders.json + */ async function apiManagementListIdentityProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.identityProvider.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.identityProvider.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts index 6f02f674c7c2..5270904f7c22 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderListSecretsSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the client secret details of the Identity Provider. - * - * @summary Gets the client secret details of the Identity Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the client secret details of the Identity Provider. + * + * @summary gets the client secret details of the Identity Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementIdentityProviderListSecrets.json + */ async function apiManagementIdentityProviderListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.listSecrets( - resourceGroupName, - serviceName, - identityProviderName, - ); + const result = await client.identityProvider.listSecrets("rg1", "apimService1", "aadB2C"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts index c6e9d2dc505e..576d4fc69395 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/identityProviderUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing IdentityProvider configuration. + * This sample demonstrates how to updates an existing IdentityProvider configuration. * - * @summary Updates an existing IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json + * @summary updates an existing IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateIdentityProvider.json */ - -import { - IdentityProviderUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const ifMatch = "*"; - const parameters: IdentityProviderUpdateParameters = { - clientId: "updatedfacebookid", - clientSecret: "updatedfacebooksecret", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.update( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - ); + const result = await client.identityProvider.update("rg1", "apimService1", "facebook", "*", { + clientId: "updatedfacebookid", + clientSecret: "updatedfacebooksecret", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts index 8caa76acab22..5633a1f7d889 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets API Management issue details - * - * @summary Gets API Management issue details - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets API Management issue details + * + * @summary gets API Management issue details + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIssue.json + */ async function apiManagementGetIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.issue.get( - resourceGroupName, - serviceName, - issueId, - ); + const result = await client.issue.get("rg1", "apimService1", "57d2ef278aa04f0ad01d6cdc"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts index 802b7f9475dd..a949449e1138 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/issueListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of issues in the specified service instance. - * - * @summary Lists a collection of issues in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of issues in the specified service instance. + * + * @summary lists a collection of issues in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIssues.json + */ async function apiManagementListIssues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.issue.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.issue.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts index 8a1d31274009..ce4e8625fbdd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerCreateOrUpdateSample.ts @@ -1,56 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a logger. + * This sample demonstrates how to creates or Updates a logger. * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAILogger.json */ - -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateAiLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { +async function apiManagementCreateAILogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "loggerId", { description: "adding a new logger", credentials: { instrumentationKey: "11................a1" }, loggerType: "applicationInsights", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a logger. + * This sample demonstrates how to creates or Updates a logger. * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateEHLogger.json + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateEHLogger.json */ -async function apiManagementCreateEhLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { +async function apiManagementCreateEHLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "eh1", { description: "adding a new logger", credentials: { name: "hydraeventhub", @@ -58,21 +40,13 @@ async function apiManagementCreateEhLogger(): Promise { "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", }, loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await apiManagementCreateAiLogger(); - await apiManagementCreateEhLogger(); + await apiManagementCreateAILogger(); + await apiManagementCreateEHLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts index 9376d48e1d2e..93fc4995f4ba 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteLogger.json + */ async function apiManagementDeleteLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.delete( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - ); - console.log(result); + await client.logger.delete("rg1", "apimService1", "loggerId", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts index c5370ce47c8a..3871d2ff87cf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadLogger.json + */ async function apiManagementHeadLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.getEntityTag( - resourceGroupName, - serviceName, - loggerId, - ); - console.log(result); + await client.logger.getEntityTag("rg1", "apimService1", "templateLogger"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts index 8aaf0d7e408c..18b9f5f5b0b6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetLogger.json + */ async function apiManagementGetLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.get( - resourceGroupName, - serviceName, - loggerId, - ); + const result = await client.logger.get("rg1", "apimService1", "templateLogger"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts index 8e2680920174..c82ccbeb9a42 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of loggers in the specified service instance. - * - * @summary Lists a collection of loggers in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of loggers in the specified service instance. + * + * @summary lists a collection of loggers in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListLoggers.json + */ async function apiManagementListLoggers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.logger.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.logger.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts index 25c3f1d05344..5ea311a39dcb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/loggerUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing logger. + * This sample demonstrates how to updates an existing logger. * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateLogger.json */ - -import { - LoggerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.update( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - ); + const result = await client.logger.update("rg1", "apimService1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts index 375482fe3857..9e55d06222dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueCreateOrUpdateSample.ts @@ -1,60 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates named value. + * This sample demonstrates how to creates or updates named value. * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValue.json */ - -import { - NamedValueCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop2", { displayName: "prop3name", secret: false, tags: ["foo", "bar"], value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); + }); console.log(result); } /** - * This sample demonstrates how to Creates or updates named value. + * This sample demonstrates how to creates or updates named value. * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValueWithKeyVault.json + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValueWithKeyVault.json */ async function apiManagementCreateNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop6", { displayName: "prop6namekv", keyVault: { identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", @@ -62,15 +41,7 @@ async function apiManagementCreateNamedValueWithKeyVault(): Promise { }, secret: true, tags: ["foo", "bar"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts index a3ea35a532a2..021c7c7bcd95 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific named value from the API Management service instance. - * - * @summary Deletes specific named value from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific named value from the API Management service instance. + * + * @summary deletes specific named value from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNamedValue.json + */ async function apiManagementDeleteNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.delete( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - ); - console.log(result); + await client.namedValue.delete("rg1", "apimService1", "testprop2", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts index df2b0e4010ca..4afafe868cc7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNamedValue.json + */ async function apiManagementHeadNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.getEntityTag( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); + await client.namedValue.getEntityTag("rg1", "apimService1", "testarmTemplateproperties2"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts index a1a9560dd60a..318f2434c3d0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueGetSample.ts @@ -1,56 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValue.json + */ async function apiManagementGetNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId, - ); + const result = await client.namedValue.get("rg1", "apimService1", "testarmTemplateproperties2"); console.log(result); } /** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. + * This sample demonstrates how to gets the details of the named value specified by its identifier. * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValueWithKeyVault.json */ async function apiManagementGetNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId, - ); + const result = await client.namedValue.get("rg1", "apimService1", "testprop6"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts index a76ab4dab3d1..0fb19005827c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of named values defined within a service instance. - * - * @summary Lists a collection of named values defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of named values defined within a service instance. + * + * @summary lists a collection of named values defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNamedValues.json + */ async function apiManagementListNamedValues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.namedValue.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.namedValue.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts index 1a23c4a34845..13eba5aa4988 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueListValueSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementNamedValueListValue.json + */ async function apiManagementNamedValueListValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.namedValue.listValue( - resourceGroupName, - serviceName, - namedValueId, + "rg1", + "apimService1", + "testarmTemplateproperties2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts index 8a6793d373f9..13b3682ea198 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueRefreshSecretSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshNamedValue.json + */ async function apiManagementRefreshNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - namedValueId, - ); + const result = await client.namedValue.refreshSecret("rg1", "apimService1", "testprop2"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts index 2654677debad..9ee755d69d53 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/namedValueUpdateSample.ts @@ -1,44 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the specific named value. + * This sample demonstrates how to updates the specific named value. * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateNamedValue.json */ - -import { - NamedValueUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.update("rg1", "apimService1", "testprop2", "*", { displayName: "prop3name", secret: false, tags: ["foo", "bar2"], value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts index d68a88437125..0c982c8ba2c9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByLocationSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json + */ async function apiManagementServiceGetNetworkStatusByLocation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const locationName = "North Central US"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.networkStatus.listByLocation( - resourceGroupName, - serviceName, - locationName, + "rg1", + "apimService1", + "North Central US", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts index b5cea068d59a..2e8eb4eac0b5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/networkStatusListByServiceSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatus.json + */ async function apiManagementServiceGetNetworkStatus(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByService( - resourceGroupName, - serviceName, - ); + const result = await client.networkStatus.listByService("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts index 138f643d590b..9d18376c29bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationCreateOrUpdateSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Create or Update API Management publisher notification. - * - * @summary Create or Update API Management publisher notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to create or Update API Management publisher notification. + * + * @summary create or Update API Management publisher notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotification.json + */ async function apiManagementCreateNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notification.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts index 3622411662c6..ed04a9a02bef 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationGetSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNotification.json + */ async function apiManagementGetNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notification.get( - resourceGroupName, - serviceName, - notificationName, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts index bce07abd09c5..4740e754bcf2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotifications.json + */ async function apiManagementListNotifications(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.notification.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.notification.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts index 85e164822709..b6c4c7a4c84b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCheckEntityExistsSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientEmail.json + */ async function apiManagementHeadNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - email, + await client.notificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts index 774b7c59a33c..41978011ebb2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailCreateOrUpdateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientEmail.json + */ async function apiManagementCreateNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - email, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "foobar@live.com", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts index af7a95382b44..e13b59f7a2c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailDeleteSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientEmail.json + */ async function apiManagementDeleteNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.delete( - resourceGroupName, - serviceName, - notificationName, - email, + await client.notificationRecipientEmail.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts index fc157f192f8b..def4f229a831 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientEmailListByNotificationSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientEmails.json + */ async function apiManagementListNotificationRecipientEmails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - notificationName, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts index 03129e55a527..b34d45a9586c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCheckEntityExistsSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientUser.json + */ async function apiManagementHeadNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - userId, + await client.notificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts index ad6fb7d7806e..e26610e9b7c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserCreateOrUpdateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientUser.json + */ async function apiManagementCreateNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - userId, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts index 0b9d1eae7b93..8ea1e0445744 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserDeleteSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientUser.json + */ async function apiManagementDeleteNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.delete( - resourceGroupName, - serviceName, - notificationName, - userId, + await client.notificationRecipientUser.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts index 3adfb7e55aee..fc9670cbc741 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/notificationRecipientUserListByNotificationSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientUsers.json + */ async function apiManagementListNotificationRecipientUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.notificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - notificationName, + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts index 3e7260253d86..b1b7aec9f59d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderCreateOrUpdateSample.ts @@ -1,43 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the OpenID Connect Provider. + * This sample demonstrates how to creates or updates the OpenID Connect Provider. * - * @summary Creates or updates the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json + * @summary creates or updates the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateOpenIdConnectProvider.json */ - -import { - OpenidConnectProviderContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const parameters: OpenidConnectProviderContract = { - clientId: "oidprovidertemplate3", - clientSecret: "x", - displayName: "templateoidprovider3", - metadataEndpoint: "https://oidprovider-template3.net", - useInApiDocumentation: true, - useInTestConsole: false, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.openIdConnectProvider.createOrUpdate( - resourceGroupName, - serviceName, - opid, - parameters, + "rg1", + "apimService1", + "templateOpenIdConnect3", + { + clientId: "oidprovidertemplate3", + clientSecret: "x", + displayName: "templateoidprovider3", + metadataEndpoint: "https://oidprovider-template3.net", + useInApiDocumentation: true, + useInTestConsole: false, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts index aee82464e7cd..5bd8788d2e29 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @summary Deletes specific OpenID Connect Provider of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific OpenID Connect Provider of the API Management service instance. + * + * @summary deletes specific OpenID Connect Provider of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteOpenIdConnectProvider.json + */ async function apiManagementDeleteOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.delete( - resourceGroupName, - serviceName, - opid, - ifMatch, - ); - console.log(result); + await client.openIdConnectProvider.delete("rg1", "apimService1", "templateOpenIdConnect3", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts index 8c399157bccd..82b2e90532e8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadOpenIdConnectProvider.json + */ async function apiManagementHeadOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.getEntityTag( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); + await client.openIdConnectProvider.getEntityTag("rg1", "apimService1", "templateOpenIdConnect2"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts index 88b5991aa4be..915a9d458e44 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderGetSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. - * - * @summary Gets specific OpenID Connect Provider without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets specific OpenID Connect Provider without secrets. + * + * @summary gets specific OpenID Connect Provider without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOpenIdConnectProvider.json + */ async function apiManagementGetOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.openIdConnectProvider.get( - resourceGroupName, - serviceName, - opid, + "rg1", + "apimService1", + "templateOpenIdConnect2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts index 10b3060cd249..6782cdb77c35 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists of all the OpenId Connect Providers. - * - * @summary Lists of all the OpenId Connect Providers. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists of all the OpenId Connect Providers. + * + * @summary lists of all the OpenId Connect Providers. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOpenIdConnectProviders.json + */ async function apiManagementListOpenIdConnectProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.openIdConnectProvider.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.openIdConnectProvider.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts index 38e64f2d31e9..14b933ed1a8d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderListSecretsSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. - * - * @summary Gets the client secret details of the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the client secret details of the OpenID Connect Provider. + * + * @summary gets the client secret details of the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementOpenidConnectProviderListSecrets.json + */ async function apiManagementOpenidConnectProviderListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.openIdConnectProvider.listSecrets( - resourceGroupName, - serviceName, - opid, + "rg1", + "apimService1", + "templateOpenIdConnect2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts index 8e206f1661c2..ec76fca3ba28 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/openIdConnectProviderUpdateSample.ts @@ -1,42 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the specific OpenID Connect Provider. + * This sample demonstrates how to updates the specific OpenID Connect Provider. * - * @summary Updates the specific OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json + * @summary updates the specific OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateOpenIdConnectProvider.json */ - -import { - OpenidConnectProviderUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const ifMatch = "*"; - const parameters: OpenidConnectProviderUpdateContract = { - clientSecret: "updatedsecret", - useInApiDocumentation: true, - useInTestConsole: false, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.openIdConnectProvider.update( - resourceGroupName, - serviceName, - opid, - ifMatch, - parameters, + "rg1", + "apimService1", + "templateOpenIdConnect2", + "*", + { clientSecret: "updatedsecret", useInApiDocumentation: true, useInTestConsole: false }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts index fab2b167ba7c..a450599b588b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/operationListByTagsSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of operations associated with tags. - * - * @summary Lists a collection of operations associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of operations associated with tags. + * + * @summary lists a collection of operations associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationsByTags.json + */ async function apiManagementListApiOperationsByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.operationOperations.listByTags( - resourceGroupName, - serviceName, - apiId, - )) { + for await (const item of client.operation.listByTags("rg1", "apimService1", "a1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/operationStatusGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/operationStatusGetSample.ts index 84998a8aae90..56281cbdf7da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/operationStatusGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/operationStatusGetSample.ts @@ -1,26 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the current status of an async operation. - * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the current status of an async operation. + * + * @summary returns the current status of an async operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationStatus.json + */ async function getOperationStatus(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/operationsResultsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/operationsResultsGetSample.ts index 080a9782e2e5..2f341e0beee1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/operationsResultsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/operationsResultsGetSample.ts @@ -1,27 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns operation results for long running operations executing DELETE or PATCH on the resource. - * - * @summary Returns operation results for long running operations executing DELETE or PATCH on the resource. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns operation results for long running operations executing DELETE or PATCH on the resource. + * + * @summary returns operation results for long running operations executing DELETE or PATCH on the resource. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationResult.json + */ async function apiManagementGetOperationResult(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "westus2"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationsResults.get(location, operationId); - console.log(result); + await client.operationsResults.get("westus2", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts index c4ebe1f3902a..34de4827ced9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * - * @summary Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the network endpoints of all outbound dependencies of a ApiManagement service. + * + * @summary gets the network endpoints of all outbound dependencies of a ApiManagement service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + */ async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.outboundNetworkDependenciesEndpoints.listByService( - resourceGroupName, - serviceName, - ); + const result = await client.outboundNetworkDependenciesEndpoints.listByService( + "rg1", + "apimService1", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts deleted file mode 100644 index 2dfc7c327878..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/performConnectivityCheckAsyncSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json - */ - -import { - ConnectivityCheckRequest, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function httpConnectivityCheck(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "https://microsoft.com", port: 3306 }, - protocolConfiguration: { - httpConfiguration: { - method: "GET", - headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], - validStatusCodes: [200, 204], - }, - }, - source: { region: "northeurope" }, - protocol: "HTTPS", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheck.json - */ -async function tcpConnectivityCheck(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "8.8.8.8", port: 53 }, - preferredIPVersion: "IPv4", - source: { region: "northeurope" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -async function main(): Promise { - await httpConnectivityCheck(); - await tcpConnectivityCheck(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts index b7c419a9480d..3b4a78ec14be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyCreateOrUpdateSample.ts @@ -1,38 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. + * This sample demonstrates how to creates or updates the global policy configuration of the Api Management service. * - * @summary Creates or updates the global policy configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json + * @summary creates or updates the global policy configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicy.json */ - -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreatePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const parameters: PolicyContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.createOrUpdate("rg1", "apimService1", "policy", { format: "xml", value: "\r\n \r\n \r\n \r\n \r\n \r\n", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.createOrUpdate( - resourceGroupName, - serviceName, - policyId, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts index 945bed9bc7c7..39d5429c51fe 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. - * - * @summary Deletes the global policy configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the global policy configuration of the Api Management Service. + * + * @summary deletes the global policy configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicy.json + */ async function apiManagementDeletePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.delete( - resourceGroupName, - serviceName, - policyId, - ifMatch, - ); - console.log(result); + await client.policy.delete("rg1", "apimService1", "policy", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts index 124961820f2c..78e60e569422 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyDescriptionListByServiceSample.ts @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Lists all policy descriptions. + * This sample demonstrates how to lists all policy descriptions. * - * @summary Lists all policy descriptions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json + * @summary lists all policy descriptions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyDescriptions.json */ - -import { - PolicyDescriptionListByServiceOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementListPolicyDescriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const scope = "Api"; - const options: PolicyDescriptionListByServiceOptionalParams = { scope }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyDescription.listByService( - resourceGroupName, - serviceName, - options, - ); + const result = await client.policyDescription.listByService("rg1", "apimService1", { + scope: "Api", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts index 9406b8a90516..fd7ab49fec1f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates a policy fragment. + * This sample demonstrates how to creates or updates a policy fragment. * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyFragment.json */ - -import { - PolicyFragmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreatePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - id, - parameters, + const result = await client.policyFragment.createOrUpdate( + "rg1", + "apimService1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts index b391cbbaea41..f0687be5245c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyFragment.json + */ async function apiManagementDeletePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.delete( - resourceGroupName, - serviceName, - id, - ifMatch, - ); - console.log(result); + await client.policyFragment.delete("rg1", "apimService1", "policyFragment1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts index d25340398fdd..4af8189c403e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyFragment.json + */ async function apiManagementHeadPolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.getEntityTag( - resourceGroupName, - serviceName, - id, - ); - console.log(result); + await client.policyFragment.getEntityTag("rg1", "apimService1", "policyFragment1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts index d928e7766885..c2eb3591ad9e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentGetSample.ts @@ -1,62 +1,36 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Gets a policy fragment. + * This sample demonstrates how to gets a policy fragment. * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragment.json */ - -import { - PolicyFragmentGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGetPolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - ); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1"); console.log(result); } /** - * This sample demonstrates how to Gets a policy fragment. + * This sample demonstrates how to gets a policy fragment. * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragmentFormat.json */ async function apiManagementGetPolicyFragmentFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: PolicyFragmentGetOptionalParams = { format }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - options, - ); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1", { + format: "rawxml", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts index 03863a6f865c..d759d7387e25 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all policy fragments. - * - * @summary Gets all policy fragments. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets all policy fragments. + * + * @summary gets all policy fragments. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragments.json + */ async function apiManagementListPolicyFragments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.policyFragment.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.policyFragment.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts index 2e375f7990fc..91e038e698b2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyFragmentListReferencesSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragmentReferences.json + */ async function apiManagementListPolicyFragmentReferences(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.policyFragment.listReferences( - resourceGroupName, - serviceName, - id, + "rg1", + "apimService1", + "policyFragment1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts index a47dcede1fa7..2925464e68bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * + * @summary gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicy.json + */ async function apiManagementHeadPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.getEntityTag( - resourceGroupName, - serviceName, - policyId, - ); - console.log(result); + await client.policy.getEntityTag("rg1", "apimService1", "policy"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts index 641c75202c1d..2b184b3a95cd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyGetSample.ts @@ -1,62 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. + * This sample demonstrates how to get the Global policy definition of the Api Management service. * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicy.json */ - -import { - PolicyGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGetPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - ); + const result = await client.policy.get("rg1", "apimService1", "policy"); console.log(result); } /** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. + * This sample demonstrates how to get the Global policy definition of the Api Management service. * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFormat.json */ async function apiManagementGetPolicyFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const format = "rawxml"; - const options: PolicyGetOptionalParams = { format }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - options, - ); + const result = await client.policy.get("rg1", "apimService1", "policy"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts index 0318f4dcff3c..e3779371ca78 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. - * - * @summary Lists all the Global Policy definitions of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all the Global Policy definitions of the Api Management service. + * + * @summary lists all the Global Policy definitions of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicies.json + */ async function apiManagementListPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.policy.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.policy.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionCreateOrUpdateSample.ts index 72cc009b438b..d06548c735cb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionCreateOrUpdateSample.ts @@ -1,43 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the policy restriction configuration of the Api Management service. + * This sample demonstrates how to creates or updates the policy restriction configuration of the Api Management service. * - * @summary Creates or updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json + * @summary creates or updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyRestriction.json */ - -import { - PolicyRestrictionContract, - PolicyRestrictionCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreatePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters: PolicyRestrictionContract = { - requireBase: "true", - scope: "Sample Path to the policy document.", - }; - const options: PolicyRestrictionCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.policyRestriction.createOrUpdate( - resourceGroupName, - serviceName, - policyRestrictionId, - parameters, - options, + "rg1", + "apimService1", + "policyRestriction1", + { requireBase: "true", scope: "Sample Path to the policy document." }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionDeleteSample.ts index 44b8d2b16972..e6bf457debb9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionDeleteSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Deletes the policy restriction configuration of the Api Management Service. + * This sample demonstrates how to deletes the policy restriction configuration of the Api Management Service. * - * @summary Deletes the policy restriction configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json + * @summary deletes the policy restriction configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyRestriction.json */ - -import { - PolicyRestrictionDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementDeletePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const options: PolicyRestrictionDeleteOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.delete( - resourceGroupName, - serviceName, - policyRestrictionId, - options, - ); - console.log(result); + await client.policyRestriction.delete("rg1", "apimService1", "policyRestriction1", { + ifMatch: "*", + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetEntityTagSample.ts index fd66c31f0430..f7b3dc80e57e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the policy restriction in the Api Management service. + * + * @summary gets the entity state (Etag) version of the policy restriction in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyRestriction.json + */ async function apiManagementHeadPolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.getEntityTag( - resourceGroupName, - serviceName, - policyRestrictionId, - ); - console.log(result); + await client.policyRestriction.getEntityTag("rg1", "apimService1", "policyRestriction1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetSample.ts index 6f6db3f3ca29..56d7671039f0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy restriction of the Api Management service. - * - * @summary Get the policy restriction of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy restriction of the Api Management service. + * + * @summary get the policy restriction of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyRestriction.json + */ async function apiManagementGetPolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.get( - resourceGroupName, - serviceName, - policyRestrictionId, - ); + const result = await client.policyRestriction.get("rg1", "apimService1", "policyRestriction1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionListByServiceSample.ts index 3f835bfbf4b2..e91ba6b26e3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all policy restrictions of API Management services. - * - * @summary Gets all policy restrictions of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets all policy restrictions of API Management services. + * + * @summary gets all policy restrictions of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyRestrictions.json + */ async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.policyRestriction.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.policyRestriction.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionUpdateSample.ts index 34f51b5273e5..5f574c9fbd7f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionUpdateSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the policy restriction configuration of the Api Management service. + * This sample demonstrates how to updates the policy restriction configuration of the Api Management service. * - * @summary Updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json + * @summary updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePolicyRestriction.json */ - -import { - PolicyRestrictionUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdatePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters: PolicyRestrictionUpdateContract = { - scope: "Sample Path 2 to the policy document.", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.policyRestriction.update( - resourceGroupName, - serviceName, - policyRestrictionId, - ifMatch, - parameters, + "rg1", + "apimService1", + "policyRestriction1", + "*", + { scope: "Sample Path 2 to the policy document." }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionValidationsByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionValidationsByServiceSample.ts index cf69f81bdc7c..29eb7ca1a7f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionValidationsByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/policyRestrictionValidationsByServiceSample.ts @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Validate all policies of API Management services. - * - * @summary Validate all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to validate all policies of API Management services. + * + * @summary validate all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementValidatePolicies.json + */ async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.policyRestrictionValidations.beginByServiceAndWait( - resourceGroupName, - serviceName, - ); + const result = await client.policyRestrictionValidations.byService("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts index b354bc96fc27..bf68b5fb0a62 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigCreateOrUpdateSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create or update the developer portal configuration. + * This sample demonstrates how to create or update the developer portal configuration. * - * @summary Create or update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json + * @summary create or update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalConfig.json */ - -import { - PortalConfigContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreatePortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.createOrUpdate("rg1", "apimService1", "default", "*", { cors: { allowedOrigins: ["https://contoso.com"] }, csp: { allowedSources: ["*.contoso.com"], mode: "reportOnly", reportUri: ["https://report.contoso.com"], }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, + delegation: { delegateRegistration: false, delegateSubscription: false }, enableBasicAuth: true, signin: { require: false }, signup: { @@ -45,16 +30,7 @@ async function apiManagementCreatePortalConfig(): Promise { text: "I agree to the service terms and conditions.", }, }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.createOrUpdate( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts index 48a2aeae10e8..7ec079f6c369 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. - * - * @summary Gets the entity state (Etag) version of the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the developer portal configuration. + * + * @summary gets the entity state (Etag) version of the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalConfig.json + */ async function apiManagementHeadPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.getEntityTag( - resourceGroupName, - serviceName, - portalConfigId, - ); - console.log(result); + await client.portalConfig.getEntityTag("rg1", "apimService1", "default"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts index 80ff36d9e89f..8a8f3f6460ee 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the developer portal configuration. - * - * @summary Get the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the developer portal configuration. + * + * @summary get the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalConfig.json + */ async function apiManagementPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.get( - resourceGroupName, - serviceName, - portalConfigId, - ); + const result = await client.portalConfig.get("rg1", "apimService1", "default"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts index 292080f22797..51dbdcb786ba 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the developer portal configurations. - * - * @summary Lists the developer portal configurations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the developer portal configurations. + * + * @summary lists the developer portal configurations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalConfig.json + */ async function apiManagementListPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.portalConfig.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.portalConfig.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts index 745134fcc583..646312a10623 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalConfigUpdateSample.ts @@ -1,42 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update the developer portal configuration. + * This sample demonstrates how to update the developer portal configuration. * - * @summary Update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json + * @summary update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalConfig.json */ - -import { - PortalConfigContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdatePortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.update("rg1", "apimService1", "default", "*", { cors: { allowedOrigins: ["https://contoso.com"] }, csp: { allowedSources: ["*.contoso.com"], mode: "reportOnly", reportUri: ["https://report.contoso.com"], }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, + delegation: { delegateRegistration: false, delegateSubscription: false }, enableBasicAuth: true, signin: { require: false }, signup: { @@ -45,16 +30,7 @@ async function apiManagementUpdatePortalConfig(): Promise { text: "I agree to the service terms and conditions.", }, }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.update( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts index 562d5798f3a6..7be3e539c8a4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionCreateOrUpdateSample.ts @@ -1,39 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * This sample demonstrates how to creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. * - * @summary Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json + * @summary creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalRevision.json */ - -import { - PortalRevisionContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreatePortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const parameters: PortalRevisionContract = { - description: "portal revision 1", - isCurrent: true, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, + const result = await client.portalRevision.createOrUpdate( + "rg1", + "apimService1", + "20201112101010", + { description: "portal revision 1", isCurrent: true }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts index ce858404f3d1..d90698edf941 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the developer portal revision specified by its identifier. - * - * @summary Gets the developer portal revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the developer portal revision specified by its identifier. + * + * @summary gets the developer portal revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalRevision.json + */ async function apiManagementHeadPortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.getEntityTag( - resourceGroupName, - serviceName, - portalRevisionId, - ); - console.log(result); + await client.portalRevision.getEntityTag("rg1", "apimService1", "20201112101010"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts index bd7211a083ad..be5784e78692 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. - * - * @summary Gets the developer portal's revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the developer portal's revision specified by its identifier. + * + * @summary gets the developer portal's revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPortalRevision.json + */ async function apiManagementGetPortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.get( - resourceGroupName, - serviceName, - portalRevisionId, - ); + const result = await client.portalRevision.get("rg1", "apimService1", "20201112101010"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts index b528b397923c..0aee0239ca54 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists developer portal's revisions. - * - * @summary Lists developer portal's revisions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists developer portal's revisions. + * + * @summary lists developer portal's revisions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalRevisions.json + */ async function apiManagementListPortalRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.portalRevision.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.portalRevision.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts index 03c7d3d671cc..95338ce09117 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalRevisionUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the description of specified portal revision or makes it current. + * This sample demonstrates how to updates the description of specified portal revision or makes it current. * - * @summary Updates the description of specified portal revision or makes it current. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json + * @summary updates the description of specified portal revision or makes it current. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalRevision.json */ - -import { - PortalRevisionContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdatePortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const ifMatch = "*"; - const parameters: PortalRevisionContract = { - description: "portal revision update", - isCurrent: true, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - ); + const result = await client.portalRevision.update("rg1", "apimService1", "20201112101010", "*", { + description: "portal revision update", + isCurrent: true, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts index eddfa3dba083..c115257d71d3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/portalSettingsListByServiceSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. - * - * @summary Lists a collection of portalsettings defined within a service instance.. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of portalsettings defined within a service instance.. + * + * @summary lists a collection of portalsettings defined within a service instance.. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalSettings.json + */ async function apiManagementListPortalSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalSettings.listByService( - resourceGroupName, - serviceName, - ); + const result = await client.portalSettings.listByService("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts index 98ccdd75eeb4..a00e92643919 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionCreateOrUpdateSample.ts @@ -1,46 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. + * This sample demonstrates how to creates a new Private Endpoint Connection or updates an existing one. * - * @summary Creates a new Private Endpoint Connection or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + * @summary creates a new Private Endpoint Connection or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json */ - -import { - PrivateEndpointConnectionRequest, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementApproveOrRejectPrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", - properties: { - privateLinkServiceConnectionState: { - description: "The Private Endpoint Connection is approved.", - status: "Approved", - }, - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - ); + const result = await client.privateEndpointConnection.createOrUpdate( + "rg1", + "apimService1", + "privateEndpointConnectionName", + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + properties: { + privateLinkServiceConnectionState: { + description: "The Private Endpoint Connection is approved.", + status: "Approved", + }, + }, + }, + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts index 1f7d666c9670..42c1baaca5da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionDeleteSample.ts @@ -1,34 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Private Endpoint Connection. - * - * @summary Deletes the specified Private Endpoint Connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Private Endpoint Connection. + * + * @summary deletes the specified Private Endpoint Connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePrivateEndpointConnection.json + */ async function apiManagementDeletePrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.beginDeleteAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - ); - console.log(result); + await client.privateEndpointConnection.delete( + "rg1", + "apimService1", + "privateEndpointConnectionName", + ); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts index f423967114ae..b84a264229bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetByNameSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. - * - * @summary Gets the details of the Private Endpoint Connection specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Private Endpoint Connection specified by its identifier. + * + * @summary gets the details of the Private Endpoint Connection specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateEndpointConnection.json + */ async function apiManagementGetPrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getByName( - resourceGroupName, - serviceName, - privateEndpointConnectionName, + const result = await client.privateEndpointConnection.getByName( + "rg1", + "apimService1", + "privateEndpointConnectionName", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts index d4742af77c4a..e29bef3cf213 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateLinkGroupResource.json + */ async function apiManagementGetPrivateLinkGroupResource(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateLinkSubResourceName = "privateLinkSubResourceName"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.getPrivateLinkResource( - resourceGroupName, - serviceName, - privateLinkSubResourceName, - ); + const result = await client.privateEndpointConnection.getPrivateLinkResource( + "rg1", + "apimService1", + "privateLinkSubResourceName", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts index 74580db2eadb..5f34a2bc3ba4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. - * - * @summary Lists all private endpoint connections of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all private endpoint connections of the API Management service instance. + * + * @summary lists all private endpoint connections of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateEndpointConnections.json + */ async function apiManagementListPrivateEndpointConnections(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.privateEndpointConnectionOperations.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.privateEndpointConnection.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts index 5f4f88f72d49..ff706a6dae8b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateLinkGroupResources.json + */ async function apiManagementListPrivateLinkGroupResources(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.listPrivateLinkResources( - resourceGroupName, - serviceName, - ); + const result = await client.privateEndpointConnection.listPrivateLinkResources( + "rg1", + "apimService1", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts index 885b5dac08b3..9c17cc5f6762 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCheckEntityExistsSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. - * - * @summary Checks that API entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Product entity. + * + * @summary checks that API entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductApi.json + */ async function apiManagementHeadProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const apiId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.checkEntityExists( - resourceGroupName, - serviceName, - productId, - apiId, + await client.productApi.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts index 93fac5c529b3..8b5a4ba0f4da 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiCreateOrUpdateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds an API to the specified product. - * - * @summary Adds an API to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds an API to the specified product. + * + * @summary adds an API to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApi.json + */ async function apiManagementCreateProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productApi.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiId, + "rg1", + "apimService1", + "testproduct", + "echo-api", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts index 5e6cf5e44100..53d256d0d069 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApi.json + */ async function apiManagementDeleteProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.delete( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); + await client.productApi.delete("rg1", "apimService1", "testproduct", "echo-api"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkCreateOrUpdateSample.ts index e4aed96f8340..bbfccd2ac4ab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an API to the specified product via link. + * This sample demonstrates how to adds an API to the specified product via link. * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApiLink.json */ - -import { - ProductApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters: ProductApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productApiLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiLinkId, - parameters, + "rg1", + "apimService1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkDeleteSample.ts index aa83956e1e3b..acd9c45002c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApiLink.json + */ async function apiManagementDeleteProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.delete( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); - console.log(result); + await client.productApiLink.delete("rg1", "apimService1", "testproduct", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkGetSample.ts index 9adea864493e..491ca657df9c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductApiLink.json + */ async function apiManagementGetProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.get( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); + const result = await client.productApiLink.get("rg1", "apimService1", "testproduct", "link1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkListByProductSample.ts index d861f69e6d7b..31805ffb0afa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiLinkListByProductSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApiLinks.json + */ async function apiManagementListProductApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.productApiLink.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { + for await (const item of client.productApiLink.listByProduct("rg1", "apimService1", "product1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts index 9b11f57b8079..79dbc9679546 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productApiListByProductSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a product. - * - * @summary Lists a collection of the APIs associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the APIs associated with a product. + * + * @summary lists a collection of the APIs associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApis.json + */ async function apiManagementListProductApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5768181ea40f7eb6c49f6ac7"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productApi.listByProduct( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "5768181ea40f7eb6c49f6ac7", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts index a07ecdeac34e..768d2c34d838 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productCreateOrUpdateSample.ts @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a product. + * This sample demonstrates how to creates or Updates a product. * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProduct.json */ - -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, - ); + const result = await client.product.createOrUpdate("rg1", "apimService1", "testproduct", { + displayName: "Test Template ProductName 4", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts index d92ea60e4571..c6569adffa81 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productDeleteSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Delete product. + * This sample demonstrates how to delete product. * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProduct.json */ - -import { - ProductDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementDeleteProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: ProductDeleteOptionalParams = { deleteSubscriptions }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - options, - ); - console.log(result); + await client.product.delete("rg1", "apimService1", "testproduct", "*", { + deleteSubscriptions: true, + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts index 72d5f6038730..48f404110823 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProduct.json + */ async function apiManagementHeadProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.getEntityTag( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); + await client.product.getEntityTag("rg1", "apimService1", "unlimited"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts index 506ee2516393..3dd56919579c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProduct.json + */ async function apiManagementGetProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.get( - resourceGroupName, - serviceName, - productId, - ); + const result = await client.product.get("rg1", "apimService1", "unlimited"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts index e0403f89f875..da938642f44d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCheckEntityExistsSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. - * - * @summary Checks that Group entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that Group entity specified by identifier is associated with the Product entity. + * + * @summary checks that Group entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductGroup.json + */ async function apiManagementHeadProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const groupId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.checkEntityExists( - resourceGroupName, - serviceName, - productId, - groupId, + await client.productGroup.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts index 28599905768c..efacb4f165ec 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupCreateOrUpdateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds the association between the specified developer group with the specified product. - * - * @summary Adds the association between the specified developer group with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds the association between the specified developer group with the specified product. + * + * @summary adds the association between the specified developer group with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroup.json + */ async function apiManagementCreateProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productGroup.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupId, + "rg1", + "apimService1", + "testproduct", + "templateGroup", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts index 6851a295bdf3..acb0c3dea927 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the association between the specified group and product. - * - * @summary Deletes the association between the specified group and product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the association between the specified group and product. + * + * @summary deletes the association between the specified group and product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroup.json + */ async function apiManagementDeleteProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.delete( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); + await client.productGroup.delete("rg1", "apimService1", "testproduct", "templateGroup"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkCreateOrUpdateSample.ts index 64a97fef8d56..519ce3776ac6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds a group to the specified product via link. + * This sample demonstrates how to adds a group to the specified product via link. * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroupLink.json */ - -import { - ProductGroupLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters: ProductGroupLinkContract = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupLinkId, - parameters, + "rg1", + "apimService1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkDeleteSample.ts index a76801298c60..5899338549a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroupLink.json + */ async function apiManagementDeleteProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.delete( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); - console.log(result); + await client.productGroupLink.delete("rg1", "apimService1", "testproduct", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkGetSample.ts index 30cc47337c0a..64bb0890b864 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductGroupLink.json + */ async function apiManagementGetProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.get( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); + const result = await client.productGroupLink.get("rg1", "apimService1", "testproduct", "link1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkListByProductSample.ts index 94849e8267e2..7deefc788c4e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupLinkListByProductSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroupLinks.json + */ async function apiManagementListProductGroupLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productGroupLink.listByProduct( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "product1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts index a2e6ef0c5588..6f07cfeb6ed4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productGroupListByProductSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. - * - * @summary Lists the collection of developer groups associated with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the collection of developer groups associated with the specified product. + * + * @summary lists the collection of developer groups associated with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroups.json + */ async function apiManagementListProductGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productGroup.listByProduct( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "5600b57e7e8880006a060002", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts index ad26f631ec69..69ef84558c37 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of products in the specified service instance. - * - * @summary Lists a collection of products in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of products in the specified service instance. + * + * @summary lists a collection of products in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProducts.json + */ async function apiManagementListProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.product.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.product.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts index 8f1d915d8832..715c75a724f5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productListByTagsSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of products associated with tags. - * - * @summary Lists a collection of products associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of products associated with tags. + * + * @summary lists a collection of products associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductsByTags.json + */ async function apiManagementListProductsByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.product.listByTags( - resourceGroupName, - serviceName, - )) { + for await (const item of client.product.listByTags("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts index ffe13f295577..a83998480f82 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyCreateOrUpdateSample.ts @@ -1,39 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the Product. + * This sample demonstrates how to creates or updates policy configuration for the Product. * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductPolicy.json */ - -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productPolicy.createOrUpdate( - resourceGroupName, - serviceName, - productId, - policyId, - parameters, + "rg1", + "apimService1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts index a5ab52706c5a..49bfebdf8c3b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductPolicy.json + */ async function apiManagementDeleteProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.delete( - resourceGroupName, - serviceName, - productId, - policyId, - ifMatch, - ); - console.log(result); + await client.productPolicy.delete("rg1", "apimService1", "testproduct", "policy", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts index 144bd5f8d536..09df3907628e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductPolicy.json + */ async function apiManagementHeadProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.getEntityTag( - resourceGroupName, - serviceName, - productId, - policyId, - ); - console.log(result); + await client.productPolicy.getEntityTag("rg1", "apimService1", "unlimited", "policy"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts index 95462cb9464b..d68f44266d6f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductPolicy.json + */ async function apiManagementGetProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productPolicy.get( - resourceGroupName, - serviceName, - productId, - policyId, + "rg1", + "apimService1", + "kjoshiarmTemplateProduct4", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts index 3e221c6ea58d..aba8d1dbc437 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productPolicyListByProductSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductPolicies.json + */ async function apiManagementListProductPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "armTemplateProduct4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productPolicy.listByProduct( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "armTemplateProduct4", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts index deb74879b81f..912542d2dfd5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productSubscriptionsListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the collection of subscriptions to the specified product. - * - * @summary Lists the collection of subscriptions to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the collection of subscriptions to the specified product. + * + * @summary lists the collection of subscriptions to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductSubscriptions.json + */ async function apiManagementListProductSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productSubscriptions.list( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "5600b57e7e8880006a060002", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts index 26a71be0eb71..c81172110d6a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productUpdateSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update existing product details. + * This sample demonstrates how to update existing product details. * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProduct.json */ - -import { - ProductUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - ); + const result = await client.product.update("rg1", "apimService1", "testproduct", "*", { + displayName: "Test Template ProductName 4", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts index 46056f03218a..72f90e9e8151 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiCreateOrUpdateSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. + * This sample demonstrates how to creates a new Wiki for a Product or updates an existing one. * - * @summary Creates a new Wiki for a Product or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json + * @summary creates a new Wiki for a Product or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductWiki.json */ - -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productWiki.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts index e427776b8705..998472f32ac9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Wiki from a Product. - * - * @summary Deletes the specified Wiki from a Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Wiki from a Product. + * + * @summary deletes the specified Wiki from a Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductWiki.json + */ async function apiManagementDeleteProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - ); - console.log(result); + await client.productWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts index 3779b25542ad..d19a7f7e5b26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductWiki.json + */ async function apiManagementHeadProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.getEntityTag( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); + await client.productWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts index 45de5a579b95..6777df079957 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductWiki.json + */ async function apiManagementGetProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.get( - resourceGroupName, - serviceName, - productId, - ); + const result = await client.productWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts index 22ee34a232e9..1562aa67a141 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikiUpdateSample.ts @@ -1,40 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. + * This sample demonstrates how to updates the details of the Wiki for a Product specified by its identifier. * - * @summary Updates the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json + * @summary updates the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProductWiki.json */ - -import { - WikiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.productWiki.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts index d5f0a7fbedca..caeb5d6934d8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/productWikisListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductWikis.json + */ async function apiManagementGetApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.productWikis.list( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts index 68fd692ae384..4617547474bf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysListByServiceSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @summary Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * + * @summary lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeys.json + */ async function apiManagementGetQuotaCounterKeys(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.listByService( - resourceGroupName, - serviceName, - quotaCounterKey, - ); + const result = await client.quotaByCounterKeys.listByService("rg1", "apimService1", "ba"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts index cd6b5ab73e80..807d06d09c19 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByCounterKeysUpdateSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * This sample demonstrates how to updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. * - * @summary Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json + * @summary updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKey.json */ - -import { - QuotaCounterValueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateQuotaCounterKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 2.5630078125, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - parameters, - ); + const result = await client.quotaByCounterKeys.update("rg1", "apimService1", "ba", { + callsCount: 0, + kbTransferred: 2.5630078125, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts index ecf37d6247a8..58118e9f93ff 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @summary Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * + * @summary gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + */ async function apiManagementGetQuotaCounterKeysByQuotaPeriod(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.quotaByPeriodKeys.get( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts index 39ebd3ff4ffc..f5c7e6b0088b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/quotaByPeriodKeysUpdateSample.ts @@ -1,41 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. + * This sample demonstrates how to updates an existing quota counter value in the specified service instance. * - * @summary Updates an existing quota counter value in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + * @summary updates an existing quota counter value in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json */ - -import { - QuotaCounterValueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 0, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.quotaByPeriodKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", + { callsCount: 0, kbTransferred: 0 }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts index 65e8e83f017b..1c77b9a3b447 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/regionListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all azure regions in which the service exists. - * - * @summary Lists all azure regions in which the service exists. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all azure regions in which the service exists. + * + * @summary lists all azure regions in which the service exists. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListRegions.json + */ async function apiManagementListRegions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.region.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.region.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts index 1f4dab437eed..d53410feccab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByApiSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by API. - * - * @summary Lists report records by API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by API. + * + * @summary lists report records by API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByApi.json + */ async function apiManagementGetReportsByApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByApi( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts index 57d5a7ea2792..ca195413a293 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByGeoSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by geography. - * - * @summary Lists report records by geography. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by geography. + * + * @summary lists report records by geography. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByGeo.json + */ async function apiManagementGetReportsByGeo(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByGeo( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts index c178524ef7c2..eece3321b1f7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByOperationSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by API Operations. - * - * @summary Lists report records by API Operations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by API Operations. + * + * @summary lists report records by API Operations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByOperation.json + */ async function apiManagementGetReportsByOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByOperation( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts index f6d4c1b931da..f3002bd0b327 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByProductSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by Product. - * - * @summary Lists report records by Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by Product. + * + * @summary lists report records by Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByProduct.json + */ async function apiManagementGetReportsByProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByProduct( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts index 1c05982e4ef5..8ba8ff3be09b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByRequestSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by Request. - * - * @summary Lists report records by Request. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by Request. + * + * @summary lists report records by Request. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByRequest.json + */ async function apiManagementGetReportsByRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByRequest( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts index e7684c5b83d8..3480bf2efbdb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListBySubscriptionSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by subscription. - * - * @summary Lists report records by subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by subscription. + * + * @summary lists report records by subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsBySubscription.json + */ async function apiManagementGetReportsBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listBySubscription( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts index c4d59fe59a24..e213f7ec4288 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByTimeSample.ts @@ -1,38 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by Time. - * - * @summary Lists report records by Time. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by Time. + * + * @summary lists report records by Time. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByTime.json + */ async function apiManagementGetReportsByTime(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const interval = "PT15M"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByTime( - resourceGroupName, - serviceName, - filter, - interval, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "PT15M", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts index 23a178939cee..26551e955def 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/reportsListByUserSample.ts @@ -1,36 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists report records by User. - * - * @summary Lists report records by User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists report records by User. + * + * @summary lists report records by User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByUser.json + */ async function apiManagementGetReportsByUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.reports.listByUser( - resourceGroupName, - serviceName, - filter, + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts index 5ab95e5f999b..09a91bd95760 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsCreateOrUpdateSample.ts @@ -1,38 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create or Update Sign-In settings. + * This sample demonstrates how to create or Update Sign-In settings. * - * @summary Create or Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json + * @summary create or Update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignIn.json */ - -import { - PortalSigninSettings, - SignInSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.signInSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, + "rg1", + "apimService1", + { enabled: true }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts index 45192e06e50c..d96b51bf397e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetEntityTagSample.ts @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. - * - * @summary Gets the entity state (Etag) version of the SignInSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignInSettings. + * + * @summary gets the entity state (Etag) version of the SignInSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignInSettings.json + */ async function apiManagementHeadSignInSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); + await client.signInSettings.getEntityTag("rg1", "apimService1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts index 6a41213b99af..862badab4511 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsGetSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get Sign In Settings for the Portal - * - * @summary Get Sign In Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get Sign In Settings for the Portal + * + * @summary get Sign In Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignIn.json + */ async function apiManagementPortalSettingsGetSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.get( - resourceGroupName, - serviceName, - ); + const result = await client.signInSettings.get("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts index 869966373734..56cd18e1e0af 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signInSettingsUpdateSample.ts @@ -1,38 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update Sign-In settings. + * This sample demonstrates how to update Sign-In settings. * - * @summary Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json + * @summary update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignIn.json */ - -import { - PortalSigninSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); + await client.signInSettings.update("rg1", "apimService1", "*", { enabled: true }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts index 5f63979309b6..740e42ae3196 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsCreateOrUpdateSample.ts @@ -1,45 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Create or Update Sign-Up settings. + * This sample demonstrates how to create or Update Sign-Up settings. * - * @summary Create or Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json + * @summary create or Update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignUp.json */ - -import { - PortalSignupSettings, - SignUpSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; - const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.signUpSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, + "rg1", + "apimService1", + { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts index e6ca71fbff9b..8f34d01bc0a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetEntityTagSample.ts @@ -1,31 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. - * - * @summary Gets the entity state (Etag) version of the SignUpSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignUpSettings. + * + * @summary gets the entity state (Etag) version of the SignUpSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignUpSettings.json + */ async function apiManagementHeadSignUpSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); + await client.signUpSettings.getEntityTag("rg1", "apimService1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts index 546510fd0858..bc1706d76799 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsGetSample.ts @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get Sign Up Settings for the Portal - * - * @summary Get Sign Up Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get Sign Up Settings for the Portal + * + * @summary get Sign Up Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignUp.json + */ async function apiManagementPortalSettingsGetSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.get( - resourceGroupName, - serviceName, - ); + const result = await client.signUpSettings.get("rg1", "apimService1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts index 3ca3e6b767ff..ca2155bc004f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/signUpSettingsUpdateSample.ts @@ -1,45 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update Sign-Up settings. + * This sample demonstrates how to update Sign-Up settings. * - * @summary Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json + * @summary update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignUp.json */ - -import { - PortalSignupSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementPortalSettingsUpdateSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); + await client.signUpSettings.update("rg1", "apimService1", "*", { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts index c19659c918a0..23300701a09f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionCreateOrUpdateSample.ts @@ -1,43 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSubscription.json */ - -import { - SubscriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.createOrUpdate("rg1", "apimService1", "testsub", { displayName: "testsub", ownerId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", scope: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.createOrUpdate( - resourceGroupName, - serviceName, - sid, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts index 5d04f9e73529..04ec45ac3c72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteSubscription.json + */ async function apiManagementDeleteSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.delete( - resourceGroupName, - serviceName, - sid, - ifMatch, - ); - console.log(result); + await client.subscription.delete("rg1", "apimService1", "testsub", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts index da6118392d86..3beeb2f4026b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSubscription.json + */ async function apiManagementHeadSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.getEntityTag( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); + await client.subscription.getEntityTag("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts index 4b5534177674..c8cb28fe6eb0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetSubscription.json + */ async function apiManagementGetSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.get( - resourceGroupName, - serviceName, - sid, - ); + const result = await client.subscription.get("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts index 245d6430273d..9293ff8ddff6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all subscriptions of the API Management service instance. - * - * @summary Lists all subscriptions of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all subscriptions of the API Management service instance. + * + * @summary lists all subscriptions of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSubscriptions.json + */ async function apiManagementListSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.subscription.list( - resourceGroupName, - serviceName, - )) { + for await (const item of client.subscription.list("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts index 8cc77c0217c4..82945b0d60e1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionListSecretsSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionListSecrets.json + */ async function apiManagementSubscriptionListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.subscription.listSecrets( - resourceGroupName, - serviceName, - sid, + "rg1", + "apimService1", + "5931a769d8d14f0ad8ce13b8", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts index f4c546e3c6af..a1d84b271451 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegeneratePrimaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the API Management service instance. + * + * @summary regenerates primary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json + */ async function apiManagementSubscriptionRegeneratePrimaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); + await client.subscription.regeneratePrimaryKey("rg1", "apimService1", "testsub"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts index cd5fef8197fe..33c92d2f7db6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionRegenerateSecondaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json + */ async function apiManagementSubscriptionRegenerateSecondaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); + await client.subscription.regenerateSecondaryKey("rg1", "apimService1", "testsub"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts index e620a5786e37..92f33751aed3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/subscriptionUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. + * This sample demonstrates how to updates the details of a subscription specified by its identifier. * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateSubscription.json */ - -import { - SubscriptionUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.update( - resourceGroupName, - serviceName, - sid, - ifMatch, - parameters, - ); + const result = await client.subscription.update("rg1", "apimService1", "testsub", "*", { + displayName: "testsub", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkCreateOrUpdateSample.ts index 425f6c32970f..2cca83eb9c48 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkCreateOrUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an API to the specified tag via link. + * This sample demonstrates how to adds an API to the specified tag via link. * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagApiLink.json */ - -import { - TagApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters: TagApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - parameters, - ); + const result = await client.tagApiLink.createOrUpdate("rg1", "apimService1", "tag1", "link1", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkDeleteSample.ts index c717fffa873a..f51942085252 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagApiLink.json + */ async function apiManagementDeleteTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.delete( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - ); - console.log(result); + await client.tagApiLink.delete("rg1", "apimService1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkGetSample.ts index 5ef87ef8d591..c2b8b707c13c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagApiLink.json + */ async function apiManagementGetTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.get( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - ); + const result = await client.tagApiLink.get("rg1", "apimService1", "tag1", "link1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkListByProductSample.ts index 8ba9461f1490..e2a30d5809c5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagApiLinkListByProductSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagApiLinks.json + */ async function apiManagementListTagApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tagApiLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { + for await (const item of client.tagApiLink.listByProduct("rg1", "apimService1", "tag1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts index 21e36cde09c2..5032386d844c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToApiSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Assign tag to the Api. - * - * @summary Assign tag to the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to assign tag to the Api. + * + * @summary assign tag to the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTag.json + */ async function apiManagementCreateApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.assignToApi( - resourceGroupName, - serviceName, - apiId, - tagId, + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts index 926ffe220e5b..5df5927fbeb2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToOperationSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Assign tag to the Operation. - * - * @summary Assign tag to the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to assign tag to the Operation. + * + * @summary assign tag to the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationTag.json + */ async function apiManagementCreateApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const operationId = "5931a75ae4bbd512a88c680a"; - const tagId = "tagId1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.assignToOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "5931a75ae4bbd512a88c680a", + "tagId1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts index 1816d57fe9ef..dd26452f0e4a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagAssignToProductSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Assign tag to the Product. - * - * @summary Assign tag to the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to assign tag to the Product. + * + * @summary assign tag to the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductTag.json + */ async function apiManagementCreateProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.assignToProduct( - resourceGroupName, - serviceName, - productId, - tagId, + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts index 0e9db50ed488..439f6a18ac6e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagCreateOrUpdateSample.ts @@ -1,37 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a tag. + * This sample demonstrates how to creates a tag. * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTag.json */ - -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - parameters, - ); + const result = await client.tag.createOrUpdate("rg1", "apimService1", "tagId1", { + displayName: "tag1", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts index a7940198b97a..afb50e50a525 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific tag of the API Management service instance. - * - * @summary Deletes specific tag of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific tag of the API Management service instance. + * + * @summary deletes specific tag of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTag.json + */ async function apiManagementDeleteTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.delete( - resourceGroupName, - serviceName, - tagId, - ifMatch, - ); - console.log(result); + await client.tag.delete("rg1", "apimService1", "tagId1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts index 2af1e2f5127f..f337c031790c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromApiSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Detach the tag from the Api. - * - * @summary Detach the tag from the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to detach the tag from the Api. + * + * @summary detach the tag from the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTag.json + */ async function apiManagementDeleteApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromApi( - resourceGroupName, - serviceName, - apiId, - tagId, + await client.tag.detachFromApi( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts index d837103cb318..88f539322d71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromOperationSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Detach the tag from the Operation. - * - * @summary Detach the tag from the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to detach the tag from the Operation. + * + * @summary detach the tag from the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationTag.json + */ async function apiManagementDeleteApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const operationId = "59d5b28d1f7fab116c282651"; - const tagId = "59d5b28e1f7fab116402044e"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, + await client.tag.detachFromOperation( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28d1f7fab116c282651", + "59d5b28e1f7fab116402044e", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts index e42e9b1d404e..54a9d603c21c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagDetachFromProductSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Detach the tag from the Product. - * - * @summary Detach the tag from the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to detach the tag from the Product. + * + * @summary detach the tag from the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductTag.json + */ async function apiManagementDeleteProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromProduct( - resourceGroupName, - serviceName, - productId, - tagId, + await client.tag.detachFromProduct( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts index f5f89e111086..d68c886d724e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByApiSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tag associated with the API. - * - * @summary Get tag associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tag associated with the API. + * + * @summary get tag associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTag.json + */ async function apiManagementGetApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.getByApi( - resourceGroupName, - serviceName, - apiId, - tagId, + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts index 885ddd3868df..b79f0acaa38f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByOperationSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tag associated with the Operation. - * - * @summary Get tag associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tag associated with the Operation. + * + * @summary get tag associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationTag.json + */ async function apiManagementGetApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.getByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts index ed25b1a97146..2291a39fcb5c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetByProductSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tag associated with the Product. - * - * @summary Get tag associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tag associated with the Product. + * + * @summary get tag associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductTag.json + */ async function apiManagementGetProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tag.getByProduct( - resourceGroupName, - serviceName, - productId, - tagId, + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts index 1b090ac425a6..53f14f53db0d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByApiSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTag.json + */ async function apiManagementHeadApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByApi( - resourceGroupName, - serviceName, - apiId, - tagId, + await client.tag.getEntityStateByApi( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts index 362ccac691ad..275c1430952c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByOperationSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationTag.json + */ async function apiManagementHeadApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, + await client.tag.getEntityStateByOperation( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts index 721070e9418a..e621c40d55c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateByProductSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductTag.json + */ async function apiManagementHeadProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59306a29e4bbd510dc24e5f8"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByProduct( - resourceGroupName, - serviceName, - productId, - tagId, + await client.tag.getEntityStateByProduct( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f8", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts index b8619a9f284c..5548e557bed8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetEntityStateSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTag.json + */ async function apiManagementHeadTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityState( - resourceGroupName, - serviceName, - tagId, - ); - console.log(result); + await client.tag.getEntityState("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts index 61b133e058c2..ef09b92f6ffd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagGetSample.ts @@ -1,28 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTag.json + */ async function apiManagementGetTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.get(resourceGroupName, serviceName, tagId); + const result = await client.tag.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts index 9e9757b55862..b452d6dab17e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByApiSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Tags associated with the API. - * - * @summary Lists all Tags associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Tags associated with the API. + * + * @summary lists all Tags associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTags.json + */ async function apiManagementListApiTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.tag.listByApi( - resourceGroupName, - serviceName, - apiId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts index 9f2c752232c3..4b87717dade6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByOperationSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Tags associated with the Operation. - * - * @summary Lists all Tags associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Tags associated with the Operation. + * + * @summary lists all Tags associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationTags.json + */ async function apiManagementListApiOperationTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0888cba3f6"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.tag.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0888cba3f6", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts index 011415401d44..3f479868212d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByProductSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all Tags associated with the Product. - * - * @summary Lists all Tags associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all Tags associated with the Product. + * + * @summary lists all Tags associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductTags.json + */ async function apiManagementListProductTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d2ef278aa04f0888cba3f1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.tag.listByProduct( - resourceGroupName, - serviceName, - productId, + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts index 3b6dcbd46cf1..32a361ad5af7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of tags defined within a service instance. - * - * @summary Lists a collection of tags defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of tags defined within a service instance. + * + * @summary lists a collection of tags defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTags.json + */ async function apiManagementListTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tag.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.tag.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkCreateOrUpdateSample.ts index 6078771a61fd..283a06be9a52 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an operation to the specified tag via link. + * This sample demonstrates how to adds an operation to the specified tag via link. * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagOperationLink.json */ - -import { - TagOperationLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters: TagOperationLinkContract = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - parameters, + "rg1", + "apimService1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkDeleteSample.ts index 1446d41d3f88..c28924b8ef4d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagOperationLink.json + */ async function apiManagementDeleteTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.delete( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); - console.log(result); + await client.tagOperationLink.delete("rg1", "apimService1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkGetSample.ts index 9203eceb8d8c..7d88fbd9b255 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagOperationLink.json + */ async function apiManagementGetTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.get( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); + const result = await client.tagOperationLink.get("rg1", "apimService1", "tag1", "link1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkListByProductSample.ts index f6b7b373d770..dcfc31525770 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagOperationLinkListByProductSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagOperationLinks.json + */ async function apiManagementListTagOperationLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tagOperationLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { + for await (const item of client.tagOperationLink.listByProduct("rg1", "apimService1", "tag1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkCreateOrUpdateSample.ts index f5174ae1a756..1810cb245938 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkCreateOrUpdateSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds a product to the specified tag via link. + * This sample demonstrates how to adds a product to the specified tag via link. * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagProductLink.json */ - -import { - TagProductLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters: TagProductLinkContract = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - productLinkId, - parameters, + "rg1", + "apimService1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkDeleteSample.ts index 7dde8dab59e6..2b494349012d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagProductLink.json + */ async function apiManagementDeleteTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.delete( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); - console.log(result); + await client.tagProductLink.delete("rg1", "apimService1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkGetSample.ts index 8adcd5bba729..0ccf9798c01f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagProductLink.json + */ async function apiManagementGetTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.get( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); + const result = await client.tagProductLink.get("rg1", "apimService1", "tag1", "link1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkListByProductSample.ts index 4151987f6e68..2a9cfc218630 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagProductLinkListByProductSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagProductLinks.json + */ async function apiManagementListTagProductLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tagProductLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { + for await (const item of client.tagProductLink.listByProduct("rg1", "apimService1", "tag1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts index eb2754044e83..5cb1f2f71453 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagResourceListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of resources associated with tags. - * - * @summary Lists a collection of resources associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of resources associated with tags. + * + * @summary lists a collection of resources associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagResources.json + */ async function apiManagementListTagResources(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tagResource.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.tagResource.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts index adf117ae5ff2..3959894bf512 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tagUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. + * This sample demonstrates how to updates the details of the tag specified by its identifier. * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTag.json */ - -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.update( - resourceGroupName, - serviceName, - tagId, - ifMatch, - parameters, - ); + const result = await client.tag.update("rg1", "apimService1", "temptag", "*", { + displayName: "temp tag", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts index a94616342f14..72070597c8e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessCreateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update tenant access information details. + * This sample demonstrates how to update tenant access information details. * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTenantAccess.json */ - -import { - AccessInformationCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationCreateParameters = { enabled: true }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.create( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); + const result = await client.tenantAccess.create("rg1", "apimService1", "access", "*", { + enabled: true, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts index ccbecaf4ab37..283a4380965f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Tenant access metadata - * - * @summary Tenant access metadata - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to tenant access metadata + * + * @summary tenant access metadata + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTenantAccess.json + */ async function apiManagementHeadTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.getEntityTag( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); + await client.tenantAccess.getEntityTag("rg1", "apimService1", "access"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts index df7520835fbc..dfe45af8b4b9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGetSample.ts @@ -1,56 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tenant access information details without secrets. - * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tenant access information details without secrets. + * + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantAccess.json + */ async function apiManagementGetTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName, - ); + const result = await client.tenantAccess.get("rg1", "apimService1", "access"); console.log(result); } /** - * This sample demonstrates how to Get tenant access information details without secrets. + * This sample demonstrates how to get tenant access information details without secrets. * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantGitAccess.json */ async function apiManagementGetTenantGitAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "gitAccess"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName, - ); + const result = await client.tenantAccess.get("rg1", "apimService1", "gitAccess"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts index 0793b57a93a8..4f91d7eaa4cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerate primary access key for GIT. - * - * @summary Regenerate primary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerate primary access key for GIT. + * + * @summary regenerate primary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json + */ async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); + await client.tenantAccessGit.regeneratePrimaryKey("rg1", "apimService1", "access"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts index 8fdc5e04fbc2..bc4284cfd4e1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerate secondary access key for GIT. - * - * @summary Regenerate secondary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerate secondary access key for GIT. + * + * @summary regenerate secondary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateKey.json + */ async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); + await client.tenantAccessGit.regenerateSecondaryKey("rg1", "apimService1", "access"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts index 62e70de90f89..4dd7aa4dd289 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. - * - * @summary Returns list of access infos - for Git and Management endpoints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns list of access infos - for Git and Management endpoints. + * + * @summary returns list of access infos - for Git and Management endpoints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantAccess.json + */ async function apiManagementListTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tenantAccess.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.tenantAccess.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts index ed972def3386..2e50dab66fa9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessListSecretsSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tenant access information details. - * - * @summary Get tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tenant access information details. + * + * @summary get tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsTenantAccess.json + */ async function apiManagementListSecretsTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.listSecrets( - resourceGroupName, - serviceName, - accessName, - ); + const result = await client.tenantAccess.listSecrets("rg1", "apimService1", "access"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts index 7e1ff00bfda5..17d7da7f7c66 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegeneratePrimaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerate primary access key - * - * @summary Regenerate primary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerate primary access key + * + * @summary regenerate primary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json + */ async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); + await client.tenantAccess.regeneratePrimaryKey("rg1", "apimService1", "access"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts index 05c9bac771d3..45ade4225136 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessRegenerateSecondaryKeySample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerate secondary access key - * - * @summary Regenerate secondary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerate secondary access key + * + * @summary regenerate secondary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json + */ async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); + await client.tenantAccess.regenerateSecondaryKey("rg1", "apimService1", "access"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts index 2adca69c7d3d..c64d5f93f803 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantAccessUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update tenant access information details. + * This sample demonstrates how to update tenant access information details. * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTenantAccess.json */ - -import { - AccessInformationUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationUpdateParameters = { enabled: true }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.update( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); + const result = await client.tenantAccess.update("rg1", "apimService1", "access", "*", { + enabled: true, + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts index 54218818ec2a..a9aa9434c522 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationDeploySample.ts @@ -1,37 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * This sample demonstrates how to this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. * - * @summary This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json + * @summary this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationDeploy.json */ - -import { - DeployConfigurationParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementTenantConfigurationDeploy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginDeployAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); + const result = await client.tenantConfiguration.deploy("rg1", "apimService1", "configuration", { + branch: "master", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts index 169377913fe8..512c3d803c0a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationGetSyncStateSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @summary Gets the status of the most recent synchronization between the configuration database and the Git repository. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the status of the most recent synchronization between the configuration database and the Git repository. + * + * @summary gets the status of the most recent synchronization between the configuration database and the Git repository. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessSyncState.json + */ async function apiManagementTenantAccessSyncState(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.tenantConfiguration.getSyncState( - resourceGroupName, - serviceName, - configurationName, + "rg1", + "apimService1", + "configuration", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts index 996eab5af3d4..9ab843dde334 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationSaveSample.ts @@ -1,37 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * This sample demonstrates how to this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. * - * @summary This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json + * @summary this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationSave.json */ - -import { - SaveConfigurationParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementTenantConfigurationSave(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: SaveConfigurationParameter = { branch: "master" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginSaveAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); + const result = await client.tenantConfiguration.save("rg1", "apimService1", "configuration", { + branch: "master", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts index 676250ef812f..611e7a1b6ee4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantConfigurationValidateSample.ts @@ -1,37 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * This sample demonstrates how to this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. * - * @summary This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json + * @summary this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationValidate.json */ - -import { - DeployConfigurationParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementTenantConfigurationValidate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginValidateAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); + const result = await client.tenantConfiguration.validate("rg1", "apimService1", "configuration", { + branch: "master", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts index 2565d9894b62..7c431309667e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get tenant settings. - * - * @summary Get tenant settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get tenant settings. + * + * @summary get tenant settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantSettings.json + */ async function apiManagementGetTenantSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const settingsType = "public"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantSettings.get( - resourceGroupName, - serviceName, - settingsType, - ); + const result = await client.tenantSettings.get("rg1", "apimService1", "public"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts index c2972c6376ae..9c88669ce6b6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/tenantSettingsListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Public settings. - * - * @summary Public settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to public settings. + * + * @summary public settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantSettings.json + */ async function apiManagementListTenantSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.tenantSettings.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.tenantSettings.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts index c0a9b837b92e..0687c2f8bd97 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userConfirmationPasswordSendSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Sends confirmation - * - * @summary Sends confirmation - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to sends confirmation + * + * @summary sends confirmation + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserConfirmationPasswordSend.json + */ async function apiManagementUserConfirmationPasswordSend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userConfirmationPassword.send( - resourceGroupName, - serviceName, - userId, - ); - console.log(result); + await client.userConfirmationPassword.send("rg1", "apimService1", "57127d485157a511ace86ae7"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts index 6a6423b9f5a0..f1a1cc4e557b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userCreateOrUpdateSample.ts @@ -1,41 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a user. + * This sample demonstrates how to creates or Updates a user. * - * @summary Creates or Updates a user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json + * @summary creates or Updates a user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateUser.json */ - -import { - UserCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const parameters: UserCreateParameters = { - confirmation: "signup", - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.user.createOrUpdate( - resourceGroupName, - serviceName, - userId, - parameters, + "rg1", + "apimService1", + "5931a75ae4bbd512288c680b", + { confirmation: "signup", email: "foobar@outlook.com", firstName: "foo", lastName: "bar" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts index 64e61c7ab01b..ecf0c8ee5db1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific user. - * - * @summary Deletes specific user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific user. + * + * @summary deletes specific user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteUser.json + */ async function apiManagementDeleteUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.beginDeleteAndWait( - resourceGroupName, - serviceName, - userId, - ifMatch, - ); - console.log(result); + await client.user.delete("rg1", "apimService1", "5931a75ae4bbd512288c680b", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts index 67e6fd8a1ad4..0a40900a36cc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGenerateSsoUrlSample.ts @@ -1,31 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @summary Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * + * @summary retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserGenerateSsoUrl.json + */ async function apiManagementUserGenerateSsoUrl(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.user.generateSsoUrl( - resourceGroupName, - serviceName, - userId, + "rg1", + "apimService1", + "57127d485157a511ace86ae7", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts index d0af681d558d..306f80c7c941 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the user specified by its identifier. + * + * @summary gets the entity state (Etag) version of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadUser.json + */ async function apiManagementHeadUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getEntityTag( - resourceGroupName, - serviceName, - userId, - ); - console.log(result); + await client.user.getEntityTag("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts index 13248278d87e..df3938688246 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSample.ts @@ -1,28 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the user specified by its identifier. - * - * @summary Gets the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the user specified by its identifier. + * + * @summary gets the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUser.json + */ async function apiManagementGetUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.get(resourceGroupName, serviceName, userId); + const result = await client.user.get("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts index e9b5d4cd62b1..07dc5976c3c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGetSharedAccessTokenSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. + * This sample demonstrates how to gets the Shared Access Authorization Token for the User. * - * @summary Gets the Shared Access Authorization Token for the User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json + * @summary gets the Shared Access Authorization Token for the User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserToken.json */ - -import { - UserTokenParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUserToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "userId1718"; - const parameters: UserTokenParameters = { - expiry: new Date("2019-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getSharedAccessToken( - resourceGroupName, - serviceName, - userId, - parameters, - ); + const result = await client.user.getSharedAccessToken("rg1", "apimService1", "userId1718", { + expiry: new Date("2019-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts index fb5b710801af..193651a050b7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userGroupListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all user groups. - * - * @summary Lists all user groups. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all user groups. + * + * @summary lists all user groups. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserGroups.json + */ async function apiManagementListUserGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.userGroup.list( - resourceGroupName, - serviceName, - userId, + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts index 57a31f00869f..3f32bce42470 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userIdentitiesListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to List of all user identities. - * - * @summary List of all user identities. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to list of all user identities. + * + * @summary list of all user identities. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserIdentities.json + */ async function apiManagementListUserIdentities(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57f2af53bb17172280f44057"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.userIdentities.list( - resourceGroupName, - serviceName, - userId, + "rg1", + "apimService1", + "57f2af53bb17172280f44057", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts index bf8ff65458ee..6d3e1b06c0c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of registered users in the specified service instance. - * - * @summary Lists a collection of registered users in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of registered users in the specified service instance. + * + * @summary lists a collection of registered users in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUsers.json + */ async function apiManagementListUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.user.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.user.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts index 6398106119ad..367cf2991c3e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. - * - * @summary Gets the specified Subscription entity associated with a particular user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the specified Subscription entity associated with a particular user. + * + * @summary gets the specified Subscription entity associated with a particular user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUserSubscription.json + */ async function apiManagementGetUserSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "1"; - const sid = "5fa9b096f3df14003c070001"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.userSubscription.get( - resourceGroupName, - serviceName, - userId, - sid, + "rg1", + "apimService1", + "1", + "5fa9b096f3df14003c070001", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts index ff64a47670ad..76e847ef505a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userSubscriptionListSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists the collection of subscriptions of the specified user. - * - * @summary Lists the collection of subscriptions of the specified user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists the collection of subscriptions of the specified user. + * + * @summary lists the collection of subscriptions of the specified user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserSubscriptions.json + */ async function apiManagementListUserSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.userSubscription.list( - resourceGroupName, - serviceName, - userId, + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts index e16d03efb1a7..5f7a97e6c36d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/userUpdateSample.ts @@ -1,43 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the user specified by its identifier. + * This sample demonstrates how to updates the details of the user specified by its identifier. * - * @summary Updates the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json + * @summary updates the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateUser.json */ - -import { - UserUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const ifMatch = "*"; - const parameters: UserUpdateParameters = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.update("rg1", "apimService1", "5931a75ae4bbd512a88c680b", "*", { email: "foobar@outlook.com", firstName: "foo", lastName: "bar", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.update( - resourceGroupName, - serviceName, - userId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiCreateOrUpdateSample.ts index 340e6fab720f..b086fac2ed76 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiCreateOrUpdateSample.ts @@ -1,51 +1,35 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates new or updates existing specified API of the workspace in an API Management service instance. + * This sample demonstrates how to creates new or updates existing specified API of the workspace in an API Management service instance. * - * @summary Creates new or updates existing specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json + * @summary creates new or updates existing specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApi.json */ - -import { - ApiCreateOrUpdateParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - parameters, + const result = await client.workspaceApi.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempgroup", + { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDeleteSample.ts index cf9a7dcb5f8b..14f985b70ef9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API of the workspace in an API Management service instance. - * - * @summary Deletes the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API of the workspace in an API Management service instance. + * + * @summary deletes the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApi.json + */ async function apiManagementDeleteWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - ); - console.log(result); + await client.workspaceApi.delete("rg1", "apimService1", "wks1", "echo-api", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticCreateOrUpdateSample.ts index f28a675d583c..2bb9fd7fac20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticCreateOrUpdateSample.ts @@ -1,52 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - parameters, + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticDeleteSample.ts index 0bf17eec68f0..91bc4baefa1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json + */ async function apiManagementDeleteWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, + await client.workspaceApiDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetEntityTagSample.ts index 4c5f0da249fb..285989ce2168 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json + */ async function apiManagementHeadWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, + await client.workspaceApiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetSample.ts index d6bbb80e8c45..7cb3eb102d71 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json + */ async function apiManagementGetWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticListByWorkspaceSample.ts index bee07033c898..6193e3253806 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticListByWorkspaceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticListByWorkspaceSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiDiagnostics.json + */ async function apiManagementListWorkspaceApiDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "echo-api", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticUpdateSample.ts index f7d73b80f31c..d34e0d10aee9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiDiagnosticUpdateSample.ts @@ -1,54 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json */ - -import { - DiagnosticUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticUpdateContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiExportGetSample.ts index 2f540df5185b..a9c2fd2bcece 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiExportGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiExportGetSample.ts @@ -1,67 +1,47 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json + */ async function apiManagementGetWorkspaceApiExportInOpenApi2Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, + "rg1", + "apimService1", + "wks1", + "echo-api", + "swagger-link", + "true", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json */ async function apiManagementGetWorkspaceApiExportInOpenApi3Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, + "rg1", + "apimService1", + "wks1", + "aid9676", + "openapi-link", + "true", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetEntityTagSample.ts index 4167852d8c33..812e96d96ae1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApi.json + */ async function apiManagementHeadWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); - console.log(result); + await client.workspaceApi.getEntityTag("rg1", "apimService1", "wks1", "57d1f7558aa04f15146d9d8a"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetSample.ts index 0376c553d540..fb955f931827 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiGetSample.ts @@ -1,60 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiContract.json + */ async function apiManagementGetWorkspaceApiContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApi.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the API specified by its identifier. + * This sample demonstrates how to gets the details of the API specified by its identifier. * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRevision.json */ async function apiManagementGetWorkspaceApiRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api;rev=3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); + const result = await client.workspaceApi.get("rg1", "apimService1", "wks1", "echo-api;rev=3"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiListByServiceSample.ts index 98b229f8dfdd..c83603d3995e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all APIs of the workspace in an API Management service instance. - * - * @summary Lists all APIs of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all APIs of the workspace in an API Management service instance. + * + * @summary lists all APIs of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApis.json + */ async function apiManagementListWorkspaceApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceApi.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceApi.listByService("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationCreateOrUpdateSample.ts index 9d2b6b2cc25d..21065d176cb3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationCreateOrUpdateSample.ts @@ -1,69 +1,55 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. + * This sample demonstrates how to creates a new operation in the API or updates an existing one. * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperation.json */ - -import { - OperationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", headers: [], + queryParameters: [], representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" }, + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, ], - statusCode: 200, }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - parameters, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationDeleteSample.ts index 3bfab3b7eefb..2374e6d05ac9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperation.json + */ async function apiManagementDeleteWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, + await client.workspaceApiOperation.delete( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetEntityTagSample.ts index 51a55401ff0a..140b77d4430a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperation.json + */ async function apiManagementHeadWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, + await client.workspaceApiOperation.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetSample.ts index 7536b82addc9..64615d78b8af 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperation.json + */ async function apiManagementGetWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiOperation.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationListByApiSample.ts index a95f893154c9..a454b81023c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationListByApiSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperations.json + */ async function apiManagementListWorkspaceApiOperations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiOperation.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyCreateOrUpdateSample.ts index ebf0517808c2..af8cb490616e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyCreateOrUpdateSample.ts @@ -1,52 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json */ - -import { - PolicyContract, - WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams = { - ifMatch, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyDeleteSample.ts index e5d8234556ba..e4323099863a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyDeleteSample.ts @@ -1,41 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json + */ async function apiManagementDeleteWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ifMatch, + await client.workspaceApiOperationPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testapi", + "testoperation", + "policy", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetEntityTagSample.ts index f6b2b6ef0570..dd43386b4225 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetEntityTagSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json + */ async function apiManagementHeadWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, + await client.workspaceApiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetSample.ts index dddaa7350b78..03fdf6c707b7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyGetSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json + */ async function apiManagementGetWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiOperationPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyListByOperationSample.ts index f9ede754dcd4..8c96325e09c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyListByOperationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationPolicyListByOperationSample.ts @@ -1,39 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json + */ async function apiManagementListWorkspaceApiOperationPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, + "rg1", + "apimService1", + "wks1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationUpdateSample.ts index ec3a964d1654..7bef1988eef2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiOperationUpdateSample.ts @@ -1,74 +1,53 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiOperation.json */ - -import { - OperationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.update( + "rg1", + "apimService1", + "wks1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, ], }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - parameters, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyCreateOrUpdateSample.ts index ae6d075ae1ea..7cc9ff84599e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyCreateOrUpdateSample.ts @@ -1,48 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the API. + * This sample demonstrates how to creates or updates policy configuration for the API. * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiPolicy.json */ - -import { - PolicyContract, - WorkspaceApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspaceApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyDeleteSample.ts index b60ba723de71..3d861ab3965c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyDeleteSample.ts @@ -1,39 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json + */ async function apiManagementDeleteWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ifMatch, - ); - console.log(result); + await client.workspaceApiPolicy.delete("rg1", "apimService1", "wks1", "loggerId", "policy", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetEntityTagSample.ts index 88e22f4b795b..ef1fbc96fa65 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiPolicy.json + */ async function apiManagementHeadWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, + await client.workspaceApiPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "policy", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetSample.ts index 3d1d3b2bc91b..2c6684f18caa 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiPolicy.json + */ async function apiManagementGetWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyListByApiSample.ts index b1732d4b48cb..ed350f184de6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiPolicyListByApiSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiPolicies.json + */ async function apiManagementListWorkspaceApiPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiPolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseCreateOrUpdateSample.ts index 3f3c68c53dbe..83fc349ad924 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseCreateOrUpdateSample.ts @@ -1,44 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Release for the API. + * This sample demonstrates how to creates a new Release for the API. * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiRelease.json */ - -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiRelease.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - parameters, + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseDeleteSample.ts index c1c73b06f7c8..6b290a75c6d9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiRelease.json + */ async function apiManagementDeleteWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, + await client.workspaceApiRelease.delete( + "rg1", + "apimService1", + "wks1", + "5a5fcc09124a7fa9b89f2f1d", + "testrev", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetEntityTagSample.ts index 03906f173442..35770296dddf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiRelease.json + */ async function apiManagementHeadWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, + await client.workspaceApiRelease.getEntityTag( + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetSample.ts index 3b5214c19547..3110476f662e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRelease.json + */ async function apiManagementGetWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiRelease.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseListByServiceSample.ts index 617af60bc394..d0a9dab2ebe2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseListByServiceSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiReleases.json + */ async function apiManagementListWorkspaceApiReleases(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiRelease.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "a1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseUpdateSample.ts index e26873c42d5b..f5abb68fd9cd 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiReleaseUpdateSample.ts @@ -1,46 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiRelease.json */ - -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiRelease.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + "*", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiRevisionListByServiceSample.ts index 116b080a66ac..923a86590982 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiRevisionListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiRevisionListByServiceSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiRevisions.json + */ async function apiManagementListWorkspaceApiRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiRevision.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaCreateOrUpdateSample.ts index eb6a96367f7e..7cac3028c8ae 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaCreateOrUpdateSample.ts @@ -1,41 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates schema configuration for the API. + * This sample demonstrates how to creates or updates schema configuration for the API. * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiSchema.json */ - -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - parameters, + const result = await client.workspaceApiSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaDeleteSample.ts index 46dbfc80c08e..37d5220878ad 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiSchema.json + */ async function apiManagementDeleteWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ifMatch, + await client.workspaceApiSchema.delete( + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetEntityTagSample.ts index 67586b97fb0f..7f4bd7d56cac 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiSchema.json + */ async function apiManagementHeadWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, + await client.workspaceApiSchema.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetSample.ts index 2c959518c6e5..b45224e06240 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiSchema.json + */ async function apiManagementGetWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiSchema.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaListByApiSample.ts index 9adc43420c55..313f8edf2100 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiSchemaListByApiSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiSchemas.json + */ async function apiManagementListWorkspaceApiSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiSchema.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiUpdateSample.ts index 6a2ac1b08d46..42243ffe3063 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiUpdateSample.ts @@ -1,45 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the specified API of the workspace in an API Management service instance. + * This sample demonstrates how to updates the specified API of the workspace in an API Management service instance. * - * @summary Updates the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json + * @summary updates the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApi.json */ - -import { - ApiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.update("rg1", "apimService1", "wks1", "echo-api", "*", { path: "newecho", displayName: "Echo API New", serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - parameters, - ); + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetCreateOrUpdateSample.ts index 54032d2fc49b..a6585e877bb4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetCreateOrUpdateSample.ts @@ -1,42 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a Api Version Set. + * This sample demonstrates how to creates or Updates a Api Version Set. * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json */ - -import { - ApiVersionSetContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - parameters, + "rg1", + "apimService1", + "wks1", + "api1", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetDeleteSample.ts index 49817642f2a0..21dd0a586527 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json + */ async function apiManagementDeleteWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "a1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.delete( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - ); - console.log(result); + await client.workspaceApiVersionSet.delete("rg1", "apimService1", "wks1", "a1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetEntityTagSample.ts index 192a06082b20..6308c6610889 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json + */ async function apiManagementHeadWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); - console.log(result); + await client.workspaceApiVersionSet.getEntityTag("rg1", "apimService1", "wks1", "vs1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetSample.ts index b70d3274ecbb..afeb89fbcbe8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiVersionSet.json + */ async function apiManagementGetWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.get( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); + const result = await client.workspaceApiVersionSet.get("rg1", "apimService1", "wks1", "vs1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetListByServiceSample.ts index 3321180f9594..39c3288c60c8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified workspace with a service instance. - * - * @summary Lists a collection of API Version Sets in the specified workspace with a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified workspace with a service instance. + * + * @summary lists a collection of API Version Sets in the specified workspace with a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiVersionSets.json + */ async function apiManagementListWorkspaceApiVersionSets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceApiVersionSet.listByService( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetUpdateSample.ts index 43d30ba17daf..fc12563f88f9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceApiVersionSetUpdateSample.ts @@ -1,44 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json */ - -import { - ApiVersionSetUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceApiVersionSet.update( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "vs1", + "*", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendCreateOrUpdateSample.ts index 97bb7831a009..39362b81415a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendCreateOrUpdateSample.ts @@ -1,96 +1,74 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a backend. + * This sample demonstrates how to creates or Updates a backend. * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json */ - -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceBackendProxyBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] }, - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, + "rg1", + "apimService1", + "wks1", + "proxybackend", + { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { "x-my-1": ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] }, + }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http", + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a backend. + * This sample demonstrates how to creates or Updates a backend. * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendServiceFabric.json */ async function apiManagementCreateWorkspaceBackendServiceFabric(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1", - }, - ], - }, - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, + "rg1", + "apimService1", + "wks1", + "sfbackend", + { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1", + }, + ], + }, + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendDeleteSample.ts index 0b7b1a17abdb..9a14a4dd28dc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceBackend.json + */ async function apiManagementDeleteWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.delete( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - ); - console.log(result); + await client.workspaceBackend.delete("rg1", "apimService1", "wks1", "sfbackend", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetEntityTagSample.ts index bb1518df3bda..4fa435435a8c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceBackend.json + */ async function apiManagementHeadWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); - console.log(result); + await client.workspaceBackend.getEntityTag("rg1", "apimService1", "wks1", "sfbackend"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetSample.ts index ab02aabeaa58..9dfd0a7ec5be 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceBackend.json + */ async function apiManagementGetWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.get( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); + const result = await client.workspaceBackend.get("rg1", "apimService1", "wks1", "sfbackend"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendListByWorkspaceSample.ts index 36f7841e6074..6d105b4925f1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendListByWorkspaceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendListByWorkspaceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of backends in the specified workspace. - * - * @summary Lists a collection of backends in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of backends in the specified workspace. + * + * @summary lists a collection of backends in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceBackends.json + */ async function apiManagementListWorkspaceBackends(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceBackend.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceBackend.listByWorkspace("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendUpdateSample.ts index 9828a2411aab..7bab9c5d5ac8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceBackendUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing backend. + * This sample demonstrates how to updates an existing backend. * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceBackend.json */ - -import { - BackendUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceBackend.update( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "proxybackend", + "*", + { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateCreateOrUpdateSample.ts index 5a7873c4c837..cdc5f59bf02a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateCreateOrUpdateSample.ts @@ -1,75 +1,54 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificate.json */ - -import { - CertificateCreateOrUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, + "rg1", + "apimService1", + "wks1", + "tempcert", + { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificateWithKeyVault.json */ async function apiManagementCreateWorkspaceCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", - }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, + "rg1", + "apimService1", + "wks1", + "templateCertkv", + { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateDeleteSample.ts index 7b9e7a7c71a7..07379f787149 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceCertificate.json + */ async function apiManagementDeleteWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.delete( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ifMatch, - ); - console.log(result); + await client.workspaceCertificate.delete("rg1", "apimService1", "wks1", "tempcert", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetEntityTagSample.ts index b5dce4df745f..c5e79bf08f26 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceCertificate.json + */ async function apiManagementWorkspaceHeadCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); + await client.workspaceCertificate.getEntityTag("rg1", "apimService1", "wks1", "templateCert1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetSample.ts index e68da8b88146..c2f3d09639b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateGetSample.ts @@ -1,59 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificate.json + */ async function apiManagementGetWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, + "rg1", + "apimService1", + "wks1", + "templateCert1", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. + * This sample demonstrates how to gets the details of the certificate specified by its identifier. * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificateWithKeyVault.json */ async function apiManagementGetWorkspaceCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, + "rg1", + "apimService1", + "wks1", + "templateCertkv", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateListByWorkspaceSample.ts index 00d1286184fd..47a596fb05c7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateListByWorkspaceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateListByWorkspaceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified workspace. - * - * @summary Lists a collection of all certificates in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of all certificates in the specified workspace. + * + * @summary lists a collection of all certificates in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceCertificates.json + */ async function apiManagementListWorkspaceCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceCertificate.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateRefreshSecretSample.ts index ba2ae76f2e2c..8c65ab0bc613 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCertificateRefreshSecretSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceCertificate.json + */ async function apiManagementRefreshWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceCertificate.refreshSecret( - resourceGroupName, - serviceName, - workspaceId, - certificateId, + "rg1", + "apimService1", + "wks1", + "templateCertkv", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCreateOrUpdateSample.ts index bca258d88dd4..e540174d764c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceCreateOrUpdateSample.ts @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new workspace or updates an existing one. + * This sample demonstrates how to creates a new workspace or updates an existing one. * - * @summary Creates a new workspace or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json + * @summary creates a new workspace or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspace.json */ - -import { - WorkspaceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const parameters: WorkspaceContract = { - description: "workspace 1", - displayName: "my workspace", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - parameters, - ); + const result = await client.workspace.createOrUpdate("rg1", "apimService1", "wks1", { + description: "workspace 1", + displayName: "my workspace", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDeleteSample.ts index d02389b2dbe0..f724b85bdff2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDeleteSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified workspace. - * - * @summary Deletes the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified workspace. + * + * @summary deletes the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspace.json + */ async function apiManagementDeleteWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.delete( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - ); - console.log(result); + await client.workspace.delete("rg1", "apimService1", "wks1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticCreateOrUpdateSample.ts index 47e6cda5febe..7e42a31bb265 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticCreateOrUpdateSample.ts @@ -1,50 +1,37 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceDiagnostic.json */ - -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - parameters, + "rg1", + "apimService1", + "wks1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticDeleteSample.ts index e7be0cd522b1..82d71a55c035 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json + */ async function apiManagementDeleteWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, + await client.workspaceDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetEntityTagSample.ts index 9d9e125c84f7..1fd4bde902c1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceDiagnostic.json + */ async function apiManagementHeadWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, + await client.workspaceDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "applicationinsights", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetSample.ts index 580d07a3b341..d9b801a120b4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceDiagnostic.json + */ async function apiManagementGetWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, + "rg1", + "apimService1", + "wks1", + "applicationinsights", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticListByWorkspaceSample.ts index e7906babca4b..42079a323c1b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticListByWorkspaceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticListByWorkspaceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all diagnostics in the specified workspace. - * - * @summary Lists all diagnostics in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all diagnostics in the specified workspace. + * + * @summary lists all diagnostics in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceDiagnostics.json + */ async function apiManagementListWorkspaceDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticUpdateSample.ts index 6559f60d67b1..2ee82dd38f89 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceDiagnosticUpdateSample.ts @@ -1,52 +1,38 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json */ - -import { - DiagnosticUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticUpdateContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetEntityTagSample.ts index 512cc6336af7..68ea701913ae 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetEntityTagSample.ts @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspace.json + */ async function apiManagementHeadWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - ); - console.log(result); + await client.workspace.getEntityTag("rg1", "apimService1", "wks"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetSample.ts index 4585b2a6a161..9b1a3bb506b7 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGetSample.ts @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the workspace specified by its identifier. - * - * @summary Gets the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the workspace specified by its identifier. + * + * @summary gets the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspace.json + */ async function apiManagementGetWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.get( - resourceGroupName, - serviceName, - workspaceId, - ); + const result = await client.workspace.get("rg1", "apimService1", "wks1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaCreateOrUpdateSample.ts index d794ca2eee1e..e27df94695eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaCreateOrUpdateSample.ts @@ -1,43 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates new or updates existing specified Schema of the workspace in an API Management service instance. + * This sample demonstrates how to creates new or updates existing specified Schema of the workspace in an API Management service instance. * - * @summary Creates new or updates existing specified Schema of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json + * @summary creates new or updates existing specified Schema of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSchema.json */ - -import { - GlobalSchemaContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - parameters, + const result = await client.workspaceGlobalSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "schema1", + { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaDeleteSample.ts index d997c5ae530f..28eca0764da5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSchema.json + */ async function apiManagementDeleteWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ifMatch, - ); - console.log(result); + await client.workspaceGlobalSchema.delete("rg1", "apimService1", "wks1", "schema1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetEntityTagSample.ts index 8cbf8474322e..d73bdf9a5c17 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSchema.json + */ async function apiManagementHeadWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "myschema"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); - console.log(result); + await client.workspaceGlobalSchema.getEntityTag("rg1", "apimService1", "wks1", "myschema"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetSample.ts index 0303faf4bf88..4508f4b7a192 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSchema.json + */ async function apiManagementGetWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.get( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); + const result = await client.workspaceGlobalSchema.get("rg1", "apimService1", "wks1", "schema1"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaListByServiceSample.ts index bbfa50205610..3ed32f2a3666 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGlobalSchemaListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of schemas registered with workspace in a service instance. - * - * @summary Lists a collection of schemas registered with workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of schemas registered with workspace in a service instance. + * + * @summary lists a collection of schemas registered with workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSchemas.json + */ async function apiManagementListWorkspaceSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceGlobalSchema.listByService( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupCreateOrUpdateSample.ts index 8dba751ee797..410708bc3788 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupCreateOrUpdateSample.ts @@ -1,72 +1,50 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a group. + * This sample demonstrates how to creates or Updates a group. * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroup.json */ - -import { - GroupCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, + "rg1", + "apimService1", + "wks1", + "tempgroup", + { displayName: "temp group" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a group. + * This sample demonstrates how to creates or Updates a group. * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupExternal.json + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupExternal.json */ async function apiManagementCreateWorkspaceGroupExternal(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, + "rg1", + "apimService1", + "wks1", + "aadGroup", + { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupDeleteSample.ts index 8c54fa5e23a2..c4153801736c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific group of the workspace in an API Management service instance. - * - * @summary Deletes specific group of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific group of the workspace in an API Management service instance. + * + * @summary deletes specific group of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroup.json + */ async function apiManagementDeleteWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - ); - console.log(result); + await client.workspaceGroup.delete("rg1", "apimService1", "wks1", "aadGroup", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetEntityTagSample.ts index 30bd40118941..7bc59e391f20 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroup.json + */ async function apiManagementHeadWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - groupId, + await client.workspaceGroup.getEntityTag( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetSample.ts index 1f5221ce32ee..ca655bf95e1a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceGroup.json + */ async function apiManagementGetWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceGroup.get( - resourceGroupName, - serviceName, - workspaceId, - groupId, + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupListByServiceSample.ts index 147b62fb6613..012011fa8bca 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of groups defined within a workspace in a service instance. - * - * @summary Lists a collection of groups defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of groups defined within a workspace in a service instance. + * + * @summary lists a collection of groups defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroups.json + */ async function apiManagementListWorkspaceGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceGroup.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceGroup.listByService("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUpdateSample.ts index 24133c2767c5..5a6c419e5953 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUpdateSample.ts @@ -1,40 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the group specified by its identifier. + * This sample demonstrates how to updates the details of the group specified by its identifier. * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceGroup.json */ - -import { - GroupUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceGroup.update( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "tempgroup", + "*", + { displayName: "temp group" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCheckEntityExistsSample.ts index 592fef84e0fb..296772d02542 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCheckEntityExistsSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroupUser.json + */ async function apiManagementHeadWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, + await client.workspaceGroupUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCreateSample.ts index a901ef4c427f..67e4bf673736 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCreateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserCreateSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupUser.json + */ async function apiManagementCreateWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceGroupUser.create( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, + "rg1", + "apimService1", + "wks1", + "tempgroup", + "59307d350af58404d8a26300", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserDeleteSample.ts index 5ff83c09754b..d4a1582c2aee 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroupUser.json + */ async function apiManagementDeleteWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, + await client.workspaceGroupUser.delete( + "rg1", + "apimService1", + "wks1", + "templategroup", + "59307d350af58404d8a26300", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserListSample.ts index e56359e625d9..0a686858592d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceGroupUserListSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroupUsers.json + */ async function apiManagementListWorkspaceGroupUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "57d2ef278aa04f0888cba3f3"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceGroupUser.list( - resourceGroupName, - serviceName, - workspaceId, - groupId, + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceListByServiceSample.ts index f10ab27a9e84..8ccf459c34a3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceListByServiceSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all workspaces of the API Management service instance. - * - * @summary Lists all workspaces of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all workspaces of the API Management service instance. + * + * @summary lists all workspaces of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaces.json + */ async function apiManagementListWorkspaces(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspace.listByService( - resourceGroupName, - serviceName, - )) { + for await (const item of client.workspace.listByService("rg1", "apimService1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerCreateOrUpdateSample.ts index c4d6d117a368..74cbbaea24c6 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerCreateOrUpdateSample.ts @@ -1,59 +1,44 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a logger. + * This sample demonstrates how to creates or Updates a logger. * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceAILogger.json */ - -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -async function apiManagementCreateWorkspaceAiLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights", - }; +async function apiManagementCreateWorkspaceAILogger(): Promise { const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, + "rg1", + "apimService1", + "wks1", + "loggerId", + { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights", + }, ); console.log(result); } /** - * This sample demonstrates how to Creates or Updates a logger. + * This sample demonstrates how to creates or Updates a logger. * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceEHLogger.json + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceEHLogger.json */ -async function apiManagementCreateWorkspaceEhLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { +async function apiManagementCreateWorkspaceEHLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.createOrUpdate("rg1", "apimService1", "wks1", "eh1", { description: "adding a new logger", credentials: { name: "hydraeventhub", @@ -61,22 +46,13 @@ async function apiManagementCreateWorkspaceEhLogger(): Promise { "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", }, loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - ); + }); console.log(result); } async function main(): Promise { - await apiManagementCreateWorkspaceAiLogger(); - await apiManagementCreateWorkspaceEhLogger(); + await apiManagementCreateWorkspaceAILogger(); + await apiManagementCreateWorkspaceEHLogger(); } main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerDeleteSample.ts index 286631e7d01c..1cb3daf7f6ff 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceLogger.json + */ async function apiManagementDeleteWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.delete( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - ); - console.log(result); + await client.workspaceLogger.delete("rg1", "apimService1", "wks1", "loggerId", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetEntityTagSample.ts index b03aad56d5d6..ad94a7bde6b1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceLogger.json + */ async function apiManagementHeadWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); - console.log(result); + await client.workspaceLogger.getEntityTag("rg1", "apimService1", "wks1", "templateLogger"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetSample.ts index bf58811948b2..849a298e9fe4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLogger.json + */ async function apiManagementGetWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.get( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); + const result = await client.workspaceLogger.get("rg1", "apimService1", "wks1", "templateLogger"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerListByWorkspaceSample.ts index 4602c67c8795..6f7768f03941 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerListByWorkspaceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerListByWorkspaceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of loggers in the specified workspace. - * - * @summary Lists a collection of loggers in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of loggers in the specified workspace. + * + * @summary lists a collection of loggers in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLoggers.json + */ async function apiManagementListWorkspaceLoggers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceLogger.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceLogger.listByWorkspace("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerUpdateSample.ts index e380333b5229..60a04d5f11de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceLoggerUpdateSample.ts @@ -1,44 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates an existing logger. + * This sample demonstrates how to updates an existing logger. * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceLogger.json */ - -import { - LoggerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.update( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - parameters, - ); + const result = await client.workspaceLogger.update("rg1", "apimService1", "wks1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueCreateOrUpdateSample.ts index 5c415e8b395a..6db0c27bfc72 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueCreateOrUpdateSample.ts @@ -1,79 +1,53 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates named value. + * This sample demonstrates how to creates or updates named value. * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValue.json */ - -import { - NamedValueCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop2", + { displayName: "prop3name", secret: false, tags: ["foo", "bar"], value: "propValue" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates named value. + * This sample demonstrates how to creates or updates named value. * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json */ async function apiManagementCreateWorkspaceNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", - }, - secret: true, - tags: ["foo", "bar"], - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop6", + { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", + }, + secret: true, + tags: ["foo", "bar"], + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueDeleteSample.ts index 660872d345f9..690bd8169790 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific named value from the workspace in an API Management service instance. - * - * @summary Deletes specific named value from the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific named value from the workspace in an API Management service instance. + * + * @summary deletes specific named value from the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNamedValue.json + */ async function apiManagementDeleteWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.delete( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - ); - console.log(result); + await client.workspaceNamedValue.delete("rg1", "apimService1", "wks1", "testprop2", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetEntityTagSample.ts index eaa1836a9272..d0f89f3925e9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNamedValue.json + */ async function apiManagementHeadWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, + await client.workspaceNamedValue.getEntityTag( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetSample.ts index 9a14aa5e574b..dff852821a1e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueGetSample.ts @@ -1,60 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValue.json + */ async function apiManagementGetWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", ); console.log(result); } /** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. + * This sample demonstrates how to gets the details of the named value specified by its identifier. * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValueWithKeyVault.json */ async function apiManagementGetWorkspaceNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); + const result = await client.workspaceNamedValue.get("rg1", "apimService1", "wks1", "testprop6"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListByServiceSample.ts index 6cabfdd54875..05ba7f2c2a01 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of named values defined within a workspace in a service instance. - * - * @summary Lists a collection of named values defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of named values defined within a workspace in a service instance. + * + * @summary lists a collection of named values defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNamedValues.json + */ async function apiManagementListWorkspaceNamedValues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceNamedValue.listByService( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListValueSample.ts index 2b30544ca5b6..7f21b5e6cd1a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListValueSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueListValueSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceNamedValueListValue.json + */ async function apiManagementWorkspaceNamedValueListValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceNamedValue.listValue( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueRefreshSecretSample.ts index f9857da13bf9..e06a38efd345 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueRefreshSecretSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueRefreshSecretSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceNamedValue.json + */ async function apiManagementRefreshWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, + const result = await client.workspaceNamedValue.refreshSecret( + "rg1", + "apimService1", + "wks1", + "testprop2", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueUpdateSample.ts index 4fdffb2776a2..25ee5d84a372 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNamedValueUpdateSample.ts @@ -1,45 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the specific named value. + * This sample demonstrates how to updates the specific named value. * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceNamedValue.json */ - -import { - NamedValueUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - parameters, + const result = await client.workspaceNamedValue.update( + "rg1", + "apimService1", + "wks1", + "testprop2", + "*", + { displayName: "prop3name", secret: false, tags: ["foo", "bar2"], value: "propValue" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationCreateOrUpdateSample.ts index 479569f881d3..a0405a602292 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationCreateOrUpdateSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Create or Update API Management publisher notification for the workspace. - * - * @summary Create or Update API Management publisher notification for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to create or Update API Management publisher notification for the workspace. + * + * @summary create or Update API Management publisher notification for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotification.json + */ async function apiManagementCreateWorkspaceNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceNotification.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationGetSample.ts index b4a28ab2625e..a6a6b3bd9660 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNotification.json + */ async function apiManagementGetWorkspaceNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceNotification.get( - resourceGroupName, - serviceName, - workspaceId, - notificationName, + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationListByServiceSample.ts index 3c33861c9dc5..0f3662c66f1c 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotifications.json + */ async function apiManagementListWorkspaceNotifications(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceNotification.listByService( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts index 49df8e89ec0b..f6ea27824a30 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts @@ -1,38 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json + */ async function apiManagementHeadWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); + await client.workspaceNotificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts index d642ac6bac4e..fe7a9d80008a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json + */ async function apiManagementCreateWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); + const result = await client.workspaceNotificationRecipientEmail.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "foobar@live.com", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailDeleteSample.ts index 67392ca4227f..4dace04e5ae0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json + */ async function apiManagementDeleteWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, + await client.workspaceNotificationRecipientEmail.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailListByNotificationSample.ts index 407170e55479..89178a703e9d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientEmailListByNotificationSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json + */ async function apiManagementListWorkspaceNotificationRecipientEmails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); + const result = await client.workspaceNotificationRecipientEmail.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCheckEntityExistsSample.ts index 9848a491f62a..ef58e8c5c587 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCheckEntityExistsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCheckEntityExistsSample.ts @@ -1,38 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json + */ async function apiManagementHeadWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); + await client.workspaceNotificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCreateOrUpdateSample.ts index c4fc57a6fffe..f4eb594dd8db 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserCreateOrUpdateSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json + */ async function apiManagementCreateWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceNotificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserDeleteSample.ts index edb4ffa2ef33..995da0ddfebf 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json + */ async function apiManagementDeleteWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, + await client.workspaceNotificationRecipientUser.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserListByNotificationSample.ts index 6e30d1e2fc72..0e5885ef8713 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserListByNotificationSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceNotificationRecipientUserListByNotificationSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json + */ async function apiManagementListWorkspaceNotificationRecipientUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); + const result = await client.workspaceNotificationRecipientUser.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyCreateOrUpdateSample.ts index 857b9a75d118..367625a900ce 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyCreateOrUpdateSample.ts @@ -1,81 +1,55 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. + * This sample demonstrates how to creates or updates policy configuration for the workspace. * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicy.json */ - -import { - PolicyContract, - WorkspacePolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspacePolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, ); console.log(result); } /** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. + * This sample demonstrates how to creates or updates policy configuration for the workspace. * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json */ async function apiManagementCreateWorkspacePolicyNonXmlEncoded(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options: WorkspacePolicyCreateOrUpdateOptionalParams = { ifMatch }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyDeleteSample.ts index 4f9b791bbad9..b21d29f396b8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the workspace. - * - * @summary Deletes the policy configuration at the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the workspace. + * + * @summary deletes the policy configuration at the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicy.json + */ async function apiManagementDeleteWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ifMatch, - ); - console.log(result); + await client.workspacePolicy.delete("rg1", "apimService1", "wks1", "policy", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentCreateOrUpdateSample.ts index 67ac741c84aa..eb9fc3e1d685 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentCreateOrUpdateSample.ts @@ -1,45 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates a policy fragment. + * This sample demonstrates how to creates or updates a policy fragment. * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyFragment.json */ - -import { - PolicyFragmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspacePolicyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - id, - parameters, - ); + const result = await client.workspacePolicyFragment.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, + ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentDeleteSample.ts index 1163c081c575..5a75b9382558 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json + */ async function apiManagementDeleteWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.delete( - resourceGroupName, - serviceName, - workspaceId, - id, - ifMatch, + await client.workspacePolicyFragment.delete( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetEntityTagSample.ts index eb12f81ed827..b4597aac7cf4 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicyFragment.json + */ async function apiManagementHeadWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - id, + await client.workspacePolicyFragment.getEntityTag( + "rg1", + "apimService1", + "wks1", + "policyFragment1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetSample.ts index e5cc117eb9e3..31ee75b662de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentGetSample.ts @@ -1,65 +1,44 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Gets a policy fragment. + * This sample demonstrates how to gets a policy fragment. * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragment.json */ - -import { - WorkspacePolicyFragmentGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementGetWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, + "rg1", + "apimService1", + "wks1", + "policyFragment1", ); console.log(result); } /** - * This sample demonstrates how to Gets a policy fragment. + * This sample demonstrates how to gets a policy fragment. * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragmentFormat.json */ async function apiManagementGetWorkspacePolicyFragmentFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: WorkspacePolicyFragmentGetOptionalParams = { format }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, - options, + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { format: "rawxml" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListByServiceSample.ts index 065a023e5479..58566b5795eb 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListByServiceSample.ts @@ -1,35 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets all policy fragments defined within a workspace. - * - * @summary Gets all policy fragments defined within a workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets all policy fragments defined within a workspace. + * + * @summary gets all policy fragments defined within a workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragments.json + */ async function apiManagementListWorkspacePolicyFragments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspacePolicyFragment.listByService( - resourceGroupName, - serviceName, - workspaceId, + "rg1", + "apimService1", + "wks1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListReferencesSample.ts index 1baa6c99f3d2..23a49a2c72ed 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListReferencesSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyFragmentListReferencesSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json + */ async function apiManagementListWorkspacePolicyFragmentReferences(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspacePolicyFragment.listReferences( - resourceGroupName, - serviceName, - workspaceId, - id, + "rg1", + "apimService1", + "wks1", + "policyFragment1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetEntityTagSample.ts index 0dfc9b18eba7..29ac5ab3d88a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicy.json + */ async function apiManagementHeadWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); - console.log(result); + await client.workspacePolicy.getEntityTag("rg1", "apimService1", "wks1", "policy"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetSample.ts index 17f245acecfe..bcc4753a2eb3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicy.json + */ async function apiManagementGetWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.get( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); + const result = await client.workspacePolicy.get("rg1", "apimService1", "wks1", "policy"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyListByApiSample.ts index e616f4e483d9..454ee8402b68 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyListByApiSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspacePolicyListByApiSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the workspace level. - * - * @summary Get the policy configuration at the workspace level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the workspace level. + * + * @summary get the policy configuration at the workspace level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicies.json + */ async function apiManagementListWorkspacePolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspacePolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspacePolicy.listByApi("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkCreateOrUpdateSample.ts index 28b4a2af8c77..6e3300870c2e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an API to the specified product via link. + * This sample demonstrates how to adds an API to the specified product via link. * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductApiLink.json */ - -import { - ProductApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters: ProductApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - parameters, + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkDeleteSample.ts index 8535edcc504c..bc82bdae1c28 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json + */ async function apiManagementDeleteWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, + await client.workspaceProductApiLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkGetSample.ts index ca8958103300..781cf135f11e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductApiLink.json + */ async function apiManagementGetWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkListByProductSample.ts index 3cd60e64787a..91ff259ce9a2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductApiLinkListByProductSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductApiLinks.json + */ async function apiManagementListWorkspaceProductApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceProductApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, + "rg1", + "apimService1", + "wks1", + "product1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductCreateOrUpdateSample.ts index ed861b58f4e6..670eea76eace 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductCreateOrUpdateSample.ts @@ -1,37 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or Updates a product. + * This sample demonstrates how to creates or Updates a product. * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProduct.json */ - -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProduct.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - parameters, + "rg1", + "apimService1", + "wks1", + "testproduct", + { displayName: "Test Template ProductName 4" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductDeleteSample.ts index 87927d47f719..97bdea7a88a8 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductDeleteSample.ts @@ -1,43 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Delete product. + * This sample demonstrates how to delete product. * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProduct.json */ - -import { - WorkspaceProductDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementDeleteWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: WorkspaceProductDeleteOptionalParams = { deleteSubscriptions }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - options, - ); - console.log(result); + await client.workspaceProduct.delete("rg1", "apimService1", "wks1", "testproduct", "*", { + deleteSubscriptions: true, + }); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetEntityTagSample.ts index 27ca43e9fd70..50ebe216e705 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetEntityTagSample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProduct.json + */ async function apiManagementHeadWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); + await client.workspaceProduct.getEntityTag("rg1", "apimService1", "wks1", "unlimited"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetSample.ts index e57ee6e1548f..73d1fd63c362 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGetSample.ts @@ -1,34 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProduct.json + */ async function apiManagementGetWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); + const result = await client.workspaceProduct.get("rg1", "apimService1", "wks1", "unlimited"); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkCreateOrUpdateSample.ts index 2715f71af419..1d42fc9f8bbc 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds a group to the specified product via link. + * This sample demonstrates how to adds a group to the specified product via link. * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json */ - -import { - ProductGroupLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters: ProductGroupLinkContract = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - parameters, + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkDeleteSample.ts index c60226790812..308f3281e372 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkDeleteSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json + */ async function apiManagementDeleteWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, + await client.workspaceProductGroupLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkGetSample.ts index 7643c72d92a2..697cf79891e3 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductGroupLink.json + */ async function apiManagementGetWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductGroupLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkListByProductSample.ts index 2e2a2999f8ea..f4a5b8383419 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductGroupLinkListByProductSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductGroupLinks.json + */ async function apiManagementListWorkspaceProductGroupLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceProductGroupLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, + "rg1", + "apimService1", + "wks1", + "product1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductListByServiceSample.ts index 91878f78d5bf..82fe08075684 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of products in the specified workspace in a service instance. - * - * @summary Lists a collection of products in the specified workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of products in the specified workspace in a service instance. + * + * @summary lists a collection of products in the specified workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProducts.json + */ async function apiManagementListWorkspaceProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceProduct.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceProduct.listByService("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyCreateOrUpdateSample.ts index c380fd58c1f5..71171106a8d5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyCreateOrUpdateSample.ts @@ -1,41 +1,30 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates policy configuration for the Product. + * This sample demonstrates how to creates or updates policy configuration for the Product. * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductPolicy.json */ - -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - parameters, + "rg1", + "apimService1", + "wks1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyDeleteSample.ts index 799e42315b50..a2b048b5dc25 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyDeleteSample.ts @@ -1,39 +1,27 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json + */ async function apiManagementDeleteWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ifMatch, + await client.workspaceProductPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "policy", + "*", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetEntityTagSample.ts index e31ffb513d97..d5c101c0c552 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetEntityTagSample.ts @@ -1,37 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProductPolicy.json + */ async function apiManagementHeadWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, + await client.workspaceProductPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "unlimited", + "policy", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetSample.ts index a464a747bd83..fc0fff588440 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductPolicy.json + */ async function apiManagementGetWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, + "rg1", + "apimService1", + "wks1", + "kjoshiarmTemplateProduct4", + "policy", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyListByProductSample.ts index 65e2486afbab..67dfed49b00d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductPolicyListByProductSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductPolicies.json + */ async function apiManagementListWorkspaceProductPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "armTemplateProduct4"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProductPolicy.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, + "rg1", + "apimService1", + "wks1", + "armTemplateProduct4", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductUpdateSample.ts index d94c17077288..2b715f221c4b 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceProductUpdateSample.ts @@ -1,42 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Update existing product details. + * This sample demonstrates how to update existing product details. * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceProduct.json */ - -import { - ProductUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceProduct.update( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "testproduct", + "*", + { displayName: "Test Template ProductName 4" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionCreateOrUpdateSample.ts index 38cf7695eb31..789433c7c03f 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionCreateOrUpdateSample.ts @@ -1,44 +1,31 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSubscription.json */ - -import { - SubscriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { - displayName: "testsub", - ownerId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceSubscription.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - sid, - parameters, + "rg1", + "apimService1", + "wks1", + "testsub", + { + displayName: "testsub", + ownerId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionDeleteSample.ts index ab2167cebdfa..43a7ea15c608 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSubscription.json + */ async function apiManagementDeleteWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.delete( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - ); - console.log(result); + await client.workspaceSubscription.delete("rg1", "apimService1", "wks1", "testsub", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetEntityTagSample.ts index 1ac649f52cce..375da2af35c2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetEntityTagSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetEntityTagSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSubscription.json + */ async function apiManagementHeadWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - sid, + await client.workspaceSubscription.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetSample.ts index 91a58092649a..333cc54339d9 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSubscription.json + */ async function apiManagementGetWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceSubscription.get( - resourceGroupName, - serviceName, - workspaceId, - sid, + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSample.ts index 3d8a52f14b26..1038612e8787 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists all subscriptions of the workspace in an API Management service instance. - * - * @summary Lists all subscriptions of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists all subscriptions of the workspace in an API Management service instance. + * + * @summary lists all subscriptions of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSubscriptions.json + */ async function apiManagementListWorkspaceSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceSubscription.list( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceSubscription.list("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSecretsSample.ts index b84d560679be..59ea5377d521 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSecretsSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionListSecretsSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json + */ async function apiManagementWorkspaceSubscriptionListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceSubscription.listSecrets( - resourceGroupName, - serviceName, - workspaceId, - sid, + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegeneratePrimaryKeySample.ts index 2a8fca1762ca..2133c5a590ab 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegeneratePrimaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegeneratePrimaryKeySample.ts @@ -1,35 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates primary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json + */ async function apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); + await client.workspaceSubscription.regeneratePrimaryKey("rg1", "apimService1", "wks1", "testsub"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegenerateSecondaryKeySample.ts index dab0c685d04a..d7faffb74a01 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegenerateSecondaryKeySample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionRegenerateSecondaryKeySample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json + */ async function apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, + await client.workspaceSubscription.regenerateSecondaryKey( + "rg1", + "apimService1", + "wks1", + "testsub", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionUpdateSample.ts index 547c0c19e6d6..57b4dfc6df39 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceSubscriptionUpdateSample.ts @@ -1,40 +1,26 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. + * This sample demonstrates how to updates the details of a subscription specified by its identifier. * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceSubscription.json */ - -import { - SubscriptionUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceSubscription.update( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - parameters, + "rg1", + "apimService1", + "wks1", + "testsub", + "*", + { displayName: "testsub" }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkCreateOrUpdateSample.ts index 7bab48404bff..13061ce43146 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an API to the specified tag via link. + * This sample demonstrates how to adds an API to the specified tag via link. * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagApiLink.json */ - -import { - TagApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters: TagApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - parameters, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkDeleteSample.ts index 14734bffd2e0..24a55399ce79 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json + */ async function apiManagementDeleteWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - ); - console.log(result); + await client.workspaceTagApiLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkGetSample.ts index 016ecaeda4b6..a2afbc588f73 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagApiLink.json + */ async function apiManagementGetWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkListByProductSample.ts index 96244aa67094..68b622c1c968 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagApiLinkListByProductSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagApiLinks.json + */ async function apiManagementListWorkspaceTagApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceTagApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, + "rg1", + "apimService1", + "wks1", + "tag1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagCreateOrUpdateSample.ts index 6f756231429c..6d515e8c8556 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagCreateOrUpdateSample.ts @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Creates a tag. + * This sample demonstrates how to creates a tag. * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTag.json */ - -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - parameters, - ); + const result = await client.workspaceTag.createOrUpdate("rg1", "apimService1", "wks1", "tagId1", { + displayName: "tag1", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagDeleteSample.ts index 60390c7b3fd6..38de50f9bad5 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes specific tag of the workspace in an API Management service instance. - * - * @summary Deletes specific tag of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes specific tag of the workspace in an API Management service instance. + * + * @summary deletes specific tag of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTag.json + */ async function apiManagementDeleteWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const ifMatch = "*"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - ); - console.log(result); + await client.workspaceTag.delete("rg1", "apimService1", "wks1", "tagId1", "*"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetEntityStateSample.ts index 599eeb04b332..a0aada7b2f9d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetEntityStateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetEntityStateSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceTag.json + */ async function apiManagementHeadWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.getEntityState( - resourceGroupName, - serviceName, - workspaceId, - tagId, + await client.workspaceTag.getEntityState( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", ); - console.log(result); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetSample.ts index 9f4976f5fe2d..9adc17e944c0 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagGetSample.ts @@ -1,33 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTag.json + */ async function apiManagementGetWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTag.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagListByServiceSample.ts index ed106d9a9e72..a3af9960f204 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagListByServiceSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagListByServiceSample.ts @@ -1,35 +1,24 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of tags defined within a workspace in a service instance. - * - * @summary Lists a collection of tags defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of tags defined within a workspace in a service instance. + * + * @summary lists a collection of tags defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTags.json + */ async function apiManagementListWorkspaceTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.workspaceTag.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { + for await (const item of client.workspaceTag.listByService("rg1", "apimService1", "wks1")) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkCreateOrUpdateSample.ts index 68f082749e0b..5cd4821c122e 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds an operation to the specified tag via link. + * This sample demonstrates how to adds an operation to the specified tag via link. * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json */ - -import { - TagOperationLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters: TagOperationLinkContract = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - parameters, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkDeleteSample.ts index 75238990626e..aa3ba4c96c0a 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json + */ async function apiManagementDeleteWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - ); - console.log(result); + await client.workspaceTagOperationLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkGetSample.ts index e1aba6acc572..c492824a4a43 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagOperationLink.json + */ async function apiManagementGetWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagOperationLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkListByProductSample.ts index afce2a346b72..3a949561c35d 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagOperationLinkListByProductSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagOperationLinks.json + */ async function apiManagementListWorkspaceTagOperationLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceTagOperationLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, + "rg1", + "apimService1", + "wks1", + "tag1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkCreateOrUpdateSample.ts index 81e0360d6175..727eb28648b1 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkCreateOrUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkCreateOrUpdateSample.ts @@ -1,43 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Adds a product to the specified tag via link. + * This sample demonstrates how to adds a product to the specified tag via link. * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagProductLink.json */ - -import { - TagProductLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementCreateWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters: TagProductLinkContract = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - parameters, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", + }, ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkDeleteSample.ts index df71cc9b218d..e0e3b3cc50f2 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkDeleteSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkDeleteSample.ts @@ -1,37 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json + */ async function apiManagementDeleteWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - ); - console.log(result); + await client.workspaceTagProductLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); } async function main(): Promise { diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkGetSample.ts index 1ad5cbbbebf1..1ace746dd013 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkGetSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkGetSample.ts @@ -1,35 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagProductLink.json + */ async function apiManagementGetWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const result = await client.workspaceTagProductLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", ); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkListByProductSample.ts index 7c964069ebf9..0c3fd44f2482 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkListByProductSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagProductLinkListByProductSample.ts @@ -1,37 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json - */ - import { ApiManagementClient } from "@azure/arm-apimanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagProductLinks.json + */ async function apiManagementListWorkspaceTagProductLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.workspaceTagProductLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, + "rg1", + "apimService1", + "wks1", + "tag1", )) { resArray.push(item); } + console.log(resArray); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagUpdateSample.ts index c86c5b3a858a..d86aaafe3297 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceTagUpdateSample.ts @@ -1,41 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. + * This sample demonstrates how to updates the details of the tag specified by its identifier. * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceTag.json */ - -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.update( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - parameters, - ); + const result = await client.workspaceTag.update("rg1", "apimService1", "wks1", "temptag", "*", { + displayName: "temp tag", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceUpdateSample.ts index 3f5961d1354e..5274cb77d3de 100644 --- a/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceUpdateSample.ts +++ b/sdk/apimanagement/arm-apimanagement/samples-dev/workspaceUpdateSample.ts @@ -1,42 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + /** - * This sample demonstrates how to Updates the details of the workspace specified by its identifier. + * This sample demonstrates how to updates the details of the workspace specified by its identifier. * - * @summary Updates the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json + * @summary updates the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspace.json */ - -import { - WorkspaceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - async function apiManagementUpdateWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; - const parameters: WorkspaceContract = { - description: "workspace 1", - displayName: "my workspace", - }; const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.update( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - parameters, - ); + const result = await client.workspace.update("rg1", "apimService1", "wks1", "*", { + description: "workspace 1", + displayName: "my workspace", + }); console.log(result); } diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/README.md b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/README.md deleted file mode 100644 index c749f5ba2a4f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/README.md +++ /dev/null @@ -1,1274 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [allPoliciesListByServiceSample.js][allpolicieslistbyservicesample] | Status of all policies of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json | -| [apiCreateOrUpdateSample.js][apicreateorupdatesample] | Creates new or updates existing specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json | -| [apiDeleteSample.js][apideletesample] | Deletes the specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json | -| [apiDiagnosticCreateOrUpdateSample.js][apidiagnosticcreateorupdatesample] | Creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json | -| [apiDiagnosticDeleteSample.js][apidiagnosticdeletesample] | Deletes the specified Diagnostic from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json | -| [apiDiagnosticGetEntityTagSample.js][apidiagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json | -| [apiDiagnosticGetSample.js][apidiagnosticgetsample] | Gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json | -| [apiDiagnosticListByServiceSample.js][apidiagnosticlistbyservicesample] | Lists all diagnostics of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json | -| [apiDiagnosticUpdateSample.js][apidiagnosticupdatesample] | Updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json | -| [apiExportGetSample.js][apiexportgetsample] | Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json | -| [apiGatewayConfigConnectionCreateOrUpdateSample.js][apigatewayconfigconnectioncreateorupdatesample] | Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json | -| [apiGatewayConfigConnectionDeleteSample.js][apigatewayconfigconnectiondeletesample] | Deletes an existing API Management gateway config connection. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json | -| [apiGatewayConfigConnectionGetSample.js][apigatewayconfigconnectiongetsample] | Gets an API Management gateway config connection resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json | -| [apiGatewayConfigConnectionListByGatewaySample.js][apigatewayconfigconnectionlistbygatewaysample] | List all API Management gateway config connections within a gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json | -| [apiGatewayCreateOrUpdateSample.js][apigatewaycreateorupdatesample] | Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json | -| [apiGatewayDeleteSample.js][apigatewaydeletesample] | Deletes an existing API Management gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json | -| [apiGatewayGetSample.js][apigatewaygetsample] | Gets an API Management gateway resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json | -| [apiGatewayListByResourceGroupSample.js][apigatewaylistbyresourcegroupsample] | List all API Management gateways within a resource group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json | -| [apiGatewayListSample.js][apigatewaylistsample] | List all API Management gateways within a subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json | -| [apiGatewayUpdateSample.js][apigatewayupdatesample] | Updates an existing API Management gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json | -| [apiGetEntityTagSample.js][apigetentitytagsample] | Gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json | -| [apiGetSample.js][apigetsample] | Gets the details of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json | -| [apiIssueAttachmentCreateOrUpdateSample.js][apiissueattachmentcreateorupdatesample] | Creates a new Attachment for the Issue in an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json | -| [apiIssueAttachmentDeleteSample.js][apiissueattachmentdeletesample] | Deletes the specified comment from an Issue. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json | -| [apiIssueAttachmentGetEntityTagSample.js][apiissueattachmentgetentitytagsample] | Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json | -| [apiIssueAttachmentGetSample.js][apiissueattachmentgetsample] | Gets the details of the issue Attachment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json | -| [apiIssueAttachmentListByServiceSample.js][apiissueattachmentlistbyservicesample] | Lists all attachments for the Issue associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json | -| [apiIssueCommentCreateOrUpdateSample.js][apiissuecommentcreateorupdatesample] | Creates a new Comment for the Issue in an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json | -| [apiIssueCommentDeleteSample.js][apiissuecommentdeletesample] | Deletes the specified comment from an Issue. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json | -| [apiIssueCommentGetEntityTagSample.js][apiissuecommentgetentitytagsample] | Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json | -| [apiIssueCommentGetSample.js][apiissuecommentgetsample] | Gets the details of the issue Comment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json | -| [apiIssueCommentListByServiceSample.js][apiissuecommentlistbyservicesample] | Lists all comments for the Issue associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json | -| [apiIssueCreateOrUpdateSample.js][apiissuecreateorupdatesample] | Creates a new Issue for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json | -| [apiIssueDeleteSample.js][apiissuedeletesample] | Deletes the specified Issue from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json | -| [apiIssueGetEntityTagSample.js][apiissuegetentitytagsample] | Gets the entity state (Etag) version of the Issue for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json | -| [apiIssueGetSample.js][apiissuegetsample] | Gets the details of the Issue for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json | -| [apiIssueListByServiceSample.js][apiissuelistbyservicesample] | Lists all issues associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json | -| [apiIssueUpdateSample.js][apiissueupdatesample] | Updates an existing issue for an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json | -| [apiListByServiceSample.js][apilistbyservicesample] | Lists all APIs of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json | -| [apiListByTagsSample.js][apilistbytagssample] | Lists a collection of apis associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json | -| [apiManagementGatewaySkusListAvailableSkusSample.js][apimanagementgatewayskuslistavailableskussample] | Gets all available SKU for a given API Management gateway x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json | -| [apiManagementOperationsListSample.js][apimanagementoperationslistsample] | Lists all of the available REST API operations of the Microsoft.ApiManagement provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json | -| [apiManagementServiceApplyNetworkConfigurationUpdatesSample.js][apimanagementserviceapplynetworkconfigurationupdatessample] | Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json | -| [apiManagementServiceBackupSample.js][apimanagementservicebackupsample] | Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json | -| [apiManagementServiceCheckNameAvailabilitySample.js][apimanagementservicechecknameavailabilitysample] | Checks availability and correctness of a name for an API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json | -| [apiManagementServiceCreateOrUpdateSample.js][apimanagementservicecreateorupdatesample] | Creates or updates an API Management service. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json | -| [apiManagementServiceDeleteSample.js][apimanagementservicedeletesample] | Deletes an existing API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json | -| [apiManagementServiceGetDomainOwnershipIdentifierSample.js][apimanagementservicegetdomainownershipidentifiersample] | Get the custom domain ownership identifier for an API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json | -| [apiManagementServiceGetSample.js][apimanagementservicegetsample] | Gets an API Management service resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json | -| [apiManagementServiceGetSsoTokenSample.js][apimanagementservicegetssotokensample] | Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json | -| [apiManagementServiceListByResourceGroupSample.js][apimanagementservicelistbyresourcegroupsample] | List all API Management services within a resource group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json | -| [apiManagementServiceListSample.js][apimanagementservicelistsample] | Lists all API Management services within an Azure subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json | -| [apiManagementServiceMigrateToStv2Sample.js][apimanagementservicemigratetostv2sample] | Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json | -| [apiManagementServiceRestoreSample.js][apimanagementservicerestoresample] | Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json | -| [apiManagementServiceSkusListAvailableServiceSkusSample.js][apimanagementserviceskuslistavailableserviceskussample] | Gets all available SKU for a given API Management service x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json | -| [apiManagementServiceUpdateSample.js][apimanagementserviceupdatesample] | Updates an existing API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json | -| [apiManagementSkusListSample.js][apimanagementskuslistsample] | Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json | -| [apiManagementWorkspaceLinkGetSample.js][apimanagementworkspacelinkgetsample] | Gets an API Management WorkspaceLink resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json | -| [apiManagementWorkspaceLinksListByServiceSample.js][apimanagementworkspacelinkslistbyservicesample] | List all API Management workspaceLinks for a service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json | -| [apiOperationCreateOrUpdateSample.js][apioperationcreateorupdatesample] | Creates a new operation in the API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json | -| [apiOperationDeleteSample.js][apioperationdeletesample] | Deletes the specified operation in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json | -| [apiOperationGetEntityTagSample.js][apioperationgetentitytagsample] | Gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json | -| [apiOperationGetSample.js][apioperationgetsample] | Gets the details of the API Operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json | -| [apiOperationListByApiSample.js][apioperationlistbyapisample] | Lists a collection of the operations for the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json | -| [apiOperationPolicyCreateOrUpdateSample.js][apioperationpolicycreateorupdatesample] | Creates or updates policy configuration for the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json | -| [apiOperationPolicyDeleteSample.js][apioperationpolicydeletesample] | Deletes the policy configuration at the Api Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json | -| [apiOperationPolicyGetEntityTagSample.js][apioperationpolicygetentitytagsample] | Gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json | -| [apiOperationPolicyGetSample.js][apioperationpolicygetsample] | Get the policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json | -| [apiOperationPolicyListByOperationSample.js][apioperationpolicylistbyoperationsample] | Get the list of policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json | -| [apiOperationUpdateSample.js][apioperationupdatesample] | Updates the details of the operation in the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json | -| [apiPolicyCreateOrUpdateSample.js][apipolicycreateorupdatesample] | Creates or updates policy configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json | -| [apiPolicyDeleteSample.js][apipolicydeletesample] | Deletes the policy configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json | -| [apiPolicyGetEntityTagSample.js][apipolicygetentitytagsample] | Gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json | -| [apiPolicyGetSample.js][apipolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json | -| [apiPolicyListByApiSample.js][apipolicylistbyapisample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json | -| [apiProductListByApisSample.js][apiproductlistbyapissample] | Lists all Products, which the API is part of. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json | -| [apiReleaseCreateOrUpdateSample.js][apireleasecreateorupdatesample] | Creates a new Release for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json | -| [apiReleaseDeleteSample.js][apireleasedeletesample] | Deletes the specified release in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json | -| [apiReleaseGetEntityTagSample.js][apireleasegetentitytagsample] | Returns the etag of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json | -| [apiReleaseGetSample.js][apireleasegetsample] | Returns the details of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json | -| [apiReleaseListByServiceSample.js][apireleaselistbyservicesample] | Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json | -| [apiReleaseUpdateSample.js][apireleaseupdatesample] | Updates the details of the release of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json | -| [apiRevisionListByServiceSample.js][apirevisionlistbyservicesample] | Lists all revisions of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json | -| [apiSchemaCreateOrUpdateSample.js][apischemacreateorupdatesample] | Creates or updates schema configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json | -| [apiSchemaDeleteSample.js][apischemadeletesample] | Deletes the schema configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json | -| [apiSchemaGetEntityTagSample.js][apischemagetentitytagsample] | Gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json | -| [apiSchemaGetSample.js][apischemagetsample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json | -| [apiSchemaListByApiSample.js][apischemalistbyapisample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json | -| [apiTagDescriptionCreateOrUpdateSample.js][apitagdescriptioncreateorupdatesample] | Create/Update tag description in scope of the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json | -| [apiTagDescriptionDeleteSample.js][apitagdescriptiondeletesample] | Delete tag description for the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json | -| [apiTagDescriptionGetEntityTagSample.js][apitagdescriptiongetentitytagsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json | -| [apiTagDescriptionGetSample.js][apitagdescriptiongetsample] | Get Tag description in scope of API x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json | -| [apiTagDescriptionListByServiceSample.js][apitagdescriptionlistbyservicesample] | Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json | -| [apiUpdateSample.js][apiupdatesample] | Updates the specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json | -| [apiVersionSetCreateOrUpdateSample.js][apiversionsetcreateorupdatesample] | Creates or Updates a Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json | -| [apiVersionSetDeleteSample.js][apiversionsetdeletesample] | Deletes specific Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json | -| [apiVersionSetGetEntityTagSample.js][apiversionsetgetentitytagsample] | Gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json | -| [apiVersionSetGetSample.js][apiversionsetgetsample] | Gets the details of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json | -| [apiVersionSetListByServiceSample.js][apiversionsetlistbyservicesample] | Lists a collection of API Version Sets in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json | -| [apiVersionSetUpdateSample.js][apiversionsetupdatesample] | Updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json | -| [apiWikiCreateOrUpdateSample.js][apiwikicreateorupdatesample] | Creates a new Wiki for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json | -| [apiWikiDeleteSample.js][apiwikideletesample] | Deletes the specified Wiki from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json | -| [apiWikiGetEntityTagSample.js][apiwikigetentitytagsample] | Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json | -| [apiWikiGetSample.js][apiwikigetsample] | Gets the details of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json | -| [apiWikiUpdateSample.js][apiwikiupdatesample] | Updates the details of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json | -| [apiWikisListSample.js][apiwikislistsample] | Gets the wikis for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json | -| [authorizationAccessPolicyCreateOrUpdateSample.js][authorizationaccesspolicycreateorupdatesample] | Creates or updates Authorization Access Policy. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyDeleteSample.js][authorizationaccesspolicydeletesample] | Deletes specific access policy from the Authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyGetSample.js][authorizationaccesspolicygetsample] | Gets the details of the authorization access policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyListByAuthorizationSample.js][authorizationaccesspolicylistbyauthorizationsample] | Lists a collection of authorization access policy defined within a authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json | -| [authorizationConfirmConsentCodeSample.js][authorizationconfirmconsentcodesample] | Confirm valid consent code to suppress Authorizations anti-phishing page. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json | -| [authorizationCreateOrUpdateSample.js][authorizationcreateorupdatesample] | Creates or updates authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json | -| [authorizationDeleteSample.js][authorizationdeletesample] | Deletes specific Authorization from the Authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json | -| [authorizationGetSample.js][authorizationgetsample] | Gets the details of the authorization specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json | -| [authorizationListByAuthorizationProviderSample.js][authorizationlistbyauthorizationprovidersample] | Lists a collection of authorization providers defined within a authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json | -| [authorizationLoginLinksPostSample.js][authorizationloginlinkspostsample] | Gets authorization login links. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json | -| [authorizationProviderCreateOrUpdateSample.js][authorizationprovidercreateorupdatesample] | Creates or updates authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json | -| [authorizationProviderDeleteSample.js][authorizationproviderdeletesample] | Deletes specific authorization provider from the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json | -| [authorizationProviderGetSample.js][authorizationprovidergetsample] | Gets the details of the authorization provider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json | -| [authorizationProviderListByServiceSample.js][authorizationproviderlistbyservicesample] | Lists a collection of authorization providers defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json | -| [authorizationServerCreateOrUpdateSample.js][authorizationservercreateorupdatesample] | Creates new authorization server or updates an existing authorization server. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json | -| [authorizationServerDeleteSample.js][authorizationserverdeletesample] | Deletes specific authorization server instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json | -| [authorizationServerGetEntityTagSample.js][authorizationservergetentitytagsample] | Gets the entity state (Etag) version of the authorizationServer specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json | -| [authorizationServerGetSample.js][authorizationservergetsample] | Gets the details of the authorization server specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json | -| [authorizationServerListByServiceSample.js][authorizationserverlistbyservicesample] | Lists a collection of authorization servers defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json | -| [authorizationServerListSecretsSample.js][authorizationserverlistsecretssample] | Gets the client secret details of the authorization server. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json | -| [authorizationServerUpdateSample.js][authorizationserverupdatesample] | Updates the details of the authorization server specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json | -| [backendCreateOrUpdateSample.js][backendcreateorupdatesample] | Creates or Updates a backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json | -| [backendDeleteSample.js][backenddeletesample] | Deletes the specified backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json | -| [backendGetEntityTagSample.js][backendgetentitytagsample] | Gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json | -| [backendGetSample.js][backendgetsample] | Gets the details of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json | -| [backendListByServiceSample.js][backendlistbyservicesample] | Lists a collection of backends in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json | -| [backendReconnectSample.js][backendreconnectsample] | Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json | -| [backendUpdateSample.js][backendupdatesample] | Updates an existing backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json | -| [cacheCreateOrUpdateSample.js][cachecreateorupdatesample] | Creates or updates an External Cache to be used in Api Management instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json | -| [cacheDeleteSample.js][cachedeletesample] | Deletes specific Cache. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json | -| [cacheGetEntityTagSample.js][cachegetentitytagsample] | Gets the entity state (Etag) version of the Cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json | -| [cacheGetSample.js][cachegetsample] | Gets the details of the Cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json | -| [cacheListByServiceSample.js][cachelistbyservicesample] | Lists a collection of all external Caches in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json | -| [cacheUpdateSample.js][cacheupdatesample] | Updates the details of the cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json | -| [certificateCreateOrUpdateSample.js][certificatecreateorupdatesample] | Creates or updates the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json | -| [certificateDeleteSample.js][certificatedeletesample] | Deletes specific certificate. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json | -| [certificateGetEntityTagSample.js][certificategetentitytagsample] | Gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json | -| [certificateGetSample.js][certificategetsample] | Gets the details of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json | -| [certificateListByServiceSample.js][certificatelistbyservicesample] | Lists a collection of all certificates in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json | -| [certificateRefreshSecretSample.js][certificaterefreshsecretsample] | From KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json | -| [contentItemCreateOrUpdateSample.js][contentitemcreateorupdatesample] | Creates a new developer portal's content item specified by the provided content type. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json | -| [contentItemDeleteSample.js][contentitemdeletesample] | Removes the specified developer portal's content item. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json | -| [contentItemGetEntityTagSample.js][contentitemgetentitytagsample] | Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json | -| [contentItemGetSample.js][contentitemgetsample] | Returns the developer portal's content item specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json | -| [contentItemListByServiceSample.js][contentitemlistbyservicesample] | Lists developer portal's content items specified by the provided content type. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json | -| [contentTypeCreateOrUpdateSample.js][contenttypecreateorupdatesample] | Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json | -| [contentTypeDeleteSample.js][contenttypedeletesample] | Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json | -| [contentTypeGetSample.js][contenttypegetsample] | Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json | -| [contentTypeListByServiceSample.js][contenttypelistbyservicesample] | Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json | -| [delegationSettingsCreateOrUpdateSample.js][delegationsettingscreateorupdatesample] | Create or Update Delegation settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json | -| [delegationSettingsGetEntityTagSample.js][delegationsettingsgetentitytagsample] | Gets the entity state (Etag) version of the DelegationSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json | -| [delegationSettingsGetSample.js][delegationsettingsgetsample] | Get Delegation Settings for the Portal. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json | -| [delegationSettingsListSecretsSample.js][delegationsettingslistsecretssample] | Gets the secret validation key of the DelegationSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json | -| [delegationSettingsUpdateSample.js][delegationsettingsupdatesample] | Update Delegation settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json | -| [deletedServicesGetByNameSample.js][deletedservicesgetbynamesample] | Get soft-deleted Api Management Service by name. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json | -| [deletedServicesListBySubscriptionSample.js][deletedserviceslistbysubscriptionsample] | Lists all soft-deleted services available for undelete for the given subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json | -| [deletedServicesPurgeSample.js][deletedservicespurgesample] | Purges Api Management Service (deletes it with no option to undelete). x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json | -| [diagnosticCreateOrUpdateSample.js][diagnosticcreateorupdatesample] | Creates a new Diagnostic or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json | -| [diagnosticDeleteSample.js][diagnosticdeletesample] | Deletes the specified Diagnostic. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json | -| [diagnosticGetEntityTagSample.js][diagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json | -| [diagnosticGetSample.js][diagnosticgetsample] | Gets the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json | -| [diagnosticListByServiceSample.js][diagnosticlistbyservicesample] | Lists all diagnostics of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json | -| [diagnosticUpdateSample.js][diagnosticupdatesample] | Updates the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json | -| [documentationCreateOrUpdateSample.js][documentationcreateorupdatesample] | Creates a new Documentation or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json | -| [documentationDeleteSample.js][documentationdeletesample] | Deletes the specified Documentation from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json | -| [documentationGetEntityTagSample.js][documentationgetentitytagsample] | Gets the entity state (Etag) version of the Documentation by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json | -| [documentationGetSample.js][documentationgetsample] | Gets the details of the Documentation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json | -| [documentationListByServiceSample.js][documentationlistbyservicesample] | Lists all Documentations of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json | -| [documentationUpdateSample.js][documentationupdatesample] | Updates the details of the Documentation for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json | -| [emailTemplateCreateOrUpdateSample.js][emailtemplatecreateorupdatesample] | Updates an Email Template. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json | -| [emailTemplateDeleteSample.js][emailtemplatedeletesample] | Reset the Email Template to default template provided by the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json | -| [emailTemplateGetEntityTagSample.js][emailtemplategetentitytagsample] | Gets the entity state (Etag) version of the email template specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json | -| [emailTemplateGetSample.js][emailtemplategetsample] | Gets the details of the email template specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json | -| [emailTemplateListByServiceSample.js][emailtemplatelistbyservicesample] | Gets all email templates x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json | -| [emailTemplateUpdateSample.js][emailtemplateupdatesample] | Updates API Management email template x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json | -| [gatewayApiCreateOrUpdateSample.js][gatewayapicreateorupdatesample] | Adds an API to the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json | -| [gatewayApiDeleteSample.js][gatewayapideletesample] | Deletes the specified API from the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json | -| [gatewayApiGetEntityTagSample.js][gatewayapigetentitytagsample] | Checks that API entity specified by identifier is associated with the Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json | -| [gatewayApiListByServiceSample.js][gatewayapilistbyservicesample] | Lists a collection of the APIs associated with a gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json | -| [gatewayCertificateAuthorityCreateOrUpdateSample.js][gatewaycertificateauthoritycreateorupdatesample] | Assign Certificate entity to Gateway entity as Certificate Authority. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityDeleteSample.js][gatewaycertificateauthoritydeletesample] | Remove relationship between Certificate Authority and Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityGetEntityTagSample.js][gatewaycertificateauthoritygetentitytagsample] | Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityGetSample.js][gatewaycertificateauthoritygetsample] | Get assigned Gateway Certificate Authority details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityListByServiceSample.js][gatewaycertificateauthoritylistbyservicesample] | Lists the collection of Certificate Authorities for the specified Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json | -| [gatewayCreateOrUpdateSample.js][gatewaycreateorupdatesample] | Creates or updates a Gateway to be used in Api Management instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json | -| [gatewayDeleteSample.js][gatewaydeletesample] | Deletes specific Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json | -| [gatewayGenerateTokenSample.js][gatewaygeneratetokensample] | Gets the Shared Access Authorization Token for the gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json | -| [gatewayGetEntityTagSample.js][gatewaygetentitytagsample] | Gets the entity state (Etag) version of the Gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json | -| [gatewayGetSample.js][gatewaygetsample] | Gets the details of the Gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json | -| [gatewayHostnameConfigurationCreateOrUpdateSample.js][gatewayhostnameconfigurationcreateorupdatesample] | Creates of updates hostname configuration for a Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationDeleteSample.js][gatewayhostnameconfigurationdeletesample] | Deletes the specified hostname configuration from the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationGetEntityTagSample.js][gatewayhostnameconfigurationgetentitytagsample] | Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationGetSample.js][gatewayhostnameconfigurationgetsample] | Get details of a hostname configuration x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationListByServiceSample.js][gatewayhostnameconfigurationlistbyservicesample] | Lists the collection of hostname configurations for the specified gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json | -| [gatewayInvalidateDebugCredentialsSample.js][gatewayinvalidatedebugcredentialssample] | Action is invalidating all debug credentials issued for gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json | -| [gatewayListByServiceSample.js][gatewaylistbyservicesample] | Lists a collection of gateways registered with service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json | -| [gatewayListDebugCredentialsSample.js][gatewaylistdebugcredentialssample] | Create new debug credentials for gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json | -| [gatewayListKeysSample.js][gatewaylistkeyssample] | Retrieves gateway keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json | -| [gatewayListTraceSample.js][gatewaylisttracesample] | Fetches trace collected by gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json | -| [gatewayRegenerateKeySample.js][gatewayregeneratekeysample] | Regenerates specified gateway key invalidating any tokens created with it. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json | -| [gatewayUpdateSample.js][gatewayupdatesample] | Updates the details of the gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json | -| [globalSchemaCreateOrUpdateSample.js][globalschemacreateorupdatesample] | Creates new or updates existing specified Schema of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json | -| [globalSchemaDeleteSample.js][globalschemadeletesample] | Deletes specific Schema. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json | -| [globalSchemaGetEntityTagSample.js][globalschemagetentitytagsample] | Gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json | -| [globalSchemaGetSample.js][globalschemagetsample] | Gets the details of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json | -| [globalSchemaListByServiceSample.js][globalschemalistbyservicesample] | Lists a collection of schemas registered with service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json | -| [graphQlApiResolverCreateOrUpdateSample.js][graphqlapiresolvercreateorupdatesample] | Creates a new resolver in the GraphQL API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json | -| [graphQlApiResolverDeleteSample.js][graphqlapiresolverdeletesample] | Deletes the specified resolver in the GraphQL API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json | -| [graphQlApiResolverGetEntityTagSample.js][graphqlapiresolvergetentitytagsample] | Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json | -| [graphQlApiResolverGetSample.js][graphqlapiresolvergetsample] | Gets the details of the GraphQL API Resolver specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json | -| [graphQlApiResolverListByApiSample.js][graphqlapiresolverlistbyapisample] | Lists a collection of the resolvers for the specified GraphQL API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json | -| [graphQlApiResolverPolicyCreateOrUpdateSample.js][graphqlapiresolverpolicycreateorupdatesample] | Creates or updates policy configuration for the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyDeleteSample.js][graphqlapiresolverpolicydeletesample] | Deletes the policy configuration at the GraphQL Api Resolver. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyGetEntityTagSample.js][graphqlapiresolverpolicygetentitytagsample] | Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyGetSample.js][graphqlapiresolverpolicygetsample] | Get the policy configuration at the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyListByResolverSample.js][graphqlapiresolverpolicylistbyresolversample] | Get the list of policy configuration at the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json | -| [graphQlApiResolverUpdateSample.js][graphqlapiresolverupdatesample] | Updates the details of the resolver in the GraphQL API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json | -| [groupCreateOrUpdateSample.js][groupcreateorupdatesample] | Creates or Updates a group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json | -| [groupDeleteSample.js][groupdeletesample] | Deletes specific group of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json | -| [groupGetEntityTagSample.js][groupgetentitytagsample] | Gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json | -| [groupGetSample.js][groupgetsample] | Gets the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json | -| [groupListByServiceSample.js][grouplistbyservicesample] | Lists a collection of groups defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json | -| [groupUpdateSample.js][groupupdatesample] | Updates the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json | -| [groupUserCheckEntityExistsSample.js][groupusercheckentityexistssample] | Checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json | -| [groupUserCreateSample.js][groupusercreatesample] | Add existing user to existing group x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json | -| [groupUserDeleteSample.js][groupuserdeletesample] | Remove existing user from existing group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json | -| [groupUserListSample.js][groupuserlistsample] | Lists a collection of user entities associated with the group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json | -| [identityProviderCreateOrUpdateSample.js][identityprovidercreateorupdatesample] | Creates or Updates the IdentityProvider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json | -| [identityProviderDeleteSample.js][identityproviderdeletesample] | Deletes the specified identity provider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json | -| [identityProviderGetEntityTagSample.js][identityprovidergetentitytagsample] | Gets the entity state (Etag) version of the identityProvider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json | -| [identityProviderGetSample.js][identityprovidergetsample] | Gets the configuration details of the identity Provider configured in specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json | -| [identityProviderListByServiceSample.js][identityproviderlistbyservicesample] | Lists a collection of Identity Provider configured in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json | -| [identityProviderListSecretsSample.js][identityproviderlistsecretssample] | Gets the client secret details of the Identity Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json | -| [identityProviderUpdateSample.js][identityproviderupdatesample] | Updates an existing IdentityProvider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json | -| [issueGetSample.js][issuegetsample] | Gets API Management issue details x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json | -| [issueListByServiceSample.js][issuelistbyservicesample] | Lists a collection of issues in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json | -| [loggerCreateOrUpdateSample.js][loggercreateorupdatesample] | Creates or Updates a logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json | -| [loggerDeleteSample.js][loggerdeletesample] | Deletes the specified logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json | -| [loggerGetEntityTagSample.js][loggergetentitytagsample] | Gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json | -| [loggerGetSample.js][loggergetsample] | Gets the details of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json | -| [loggerListByServiceSample.js][loggerlistbyservicesample] | Lists a collection of loggers in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json | -| [loggerUpdateSample.js][loggerupdatesample] | Updates an existing logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json | -| [namedValueCreateOrUpdateSample.js][namedvaluecreateorupdatesample] | Creates or updates named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json | -| [namedValueDeleteSample.js][namedvaluedeletesample] | Deletes specific named value from the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json | -| [namedValueGetEntityTagSample.js][namedvaluegetentitytagsample] | Gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json | -| [namedValueGetSample.js][namedvaluegetsample] | Gets the details of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json | -| [namedValueListByServiceSample.js][namedvaluelistbyservicesample] | Lists a collection of named values defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json | -| [namedValueListValueSample.js][namedvaluelistvaluesample] | Gets the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json | -| [namedValueRefreshSecretSample.js][namedvaluerefreshsecretsample] | Refresh the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json | -| [namedValueUpdateSample.js][namedvalueupdatesample] | Updates the specific named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json | -| [networkStatusListByLocationSample.js][networkstatuslistbylocationsample] | Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json | -| [networkStatusListByServiceSample.js][networkstatuslistbyservicesample] | Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json | -| [notificationCreateOrUpdateSample.js][notificationcreateorupdatesample] | Create or Update API Management publisher notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json | -| [notificationGetSample.js][notificationgetsample] | Gets the details of the Notification specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json | -| [notificationListByServiceSample.js][notificationlistbyservicesample] | Lists a collection of properties defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json | -| [notificationRecipientEmailCheckEntityExistsSample.js][notificationrecipientemailcheckentityexistssample] | Determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json | -| [notificationRecipientEmailCreateOrUpdateSample.js][notificationrecipientemailcreateorupdatesample] | Adds the Email address to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json | -| [notificationRecipientEmailDeleteSample.js][notificationrecipientemaildeletesample] | Removes the email from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json | -| [notificationRecipientEmailListByNotificationSample.js][notificationrecipientemaillistbynotificationsample] | Gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json | -| [notificationRecipientUserCheckEntityExistsSample.js][notificationrecipientusercheckentityexistssample] | Determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json | -| [notificationRecipientUserCreateOrUpdateSample.js][notificationrecipientusercreateorupdatesample] | Adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json | -| [notificationRecipientUserDeleteSample.js][notificationrecipientuserdeletesample] | Removes the API Management user from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json | -| [notificationRecipientUserListByNotificationSample.js][notificationrecipientuserlistbynotificationsample] | Gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json | -| [openIdConnectProviderCreateOrUpdateSample.js][openidconnectprovidercreateorupdatesample] | Creates or updates the OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json | -| [openIdConnectProviderDeleteSample.js][openidconnectproviderdeletesample] | Deletes specific OpenID Connect Provider of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json | -| [openIdConnectProviderGetEntityTagSample.js][openidconnectprovidergetentitytagsample] | Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json | -| [openIdConnectProviderGetSample.js][openidconnectprovidergetsample] | Gets specific OpenID Connect Provider without secrets. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json | -| [openIdConnectProviderListByServiceSample.js][openidconnectproviderlistbyservicesample] | Lists of all the OpenId Connect Providers. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json | -| [openIdConnectProviderListSecretsSample.js][openidconnectproviderlistsecretssample] | Gets the client secret details of the OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json | -| [openIdConnectProviderUpdateSample.js][openidconnectproviderupdatesample] | Updates the specific OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json | -| [operationListByTagsSample.js][operationlistbytagssample] | Lists a collection of operations associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json | -| [operationStatusGetSample.js][operationstatusgetsample] | Returns the current status of an async operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json | -| [operationsResultsGetSample.js][operationsresultsgetsample] | Returns operation results for long running operations executing DELETE or PATCH on the resource. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json | -| [outboundNetworkDependenciesEndpointsListByServiceSample.js][outboundnetworkdependenciesendpointslistbyservicesample] | Gets the network endpoints of all outbound dependencies of a ApiManagement service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json | -| [performConnectivityCheckAsyncSample.js][performconnectivitycheckasyncsample] | Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json | -| [policyCreateOrUpdateSample.js][policycreateorupdatesample] | Creates or updates the global policy configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json | -| [policyDeleteSample.js][policydeletesample] | Deletes the global policy configuration of the Api Management Service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json | -| [policyDescriptionListByServiceSample.js][policydescriptionlistbyservicesample] | Lists all policy descriptions. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json | -| [policyFragmentCreateOrUpdateSample.js][policyfragmentcreateorupdatesample] | Creates or updates a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json | -| [policyFragmentDeleteSample.js][policyfragmentdeletesample] | Deletes a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json | -| [policyFragmentGetEntityTagSample.js][policyfragmentgetentitytagsample] | Gets the entity state (Etag) version of a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json | -| [policyFragmentGetSample.js][policyfragmentgetsample] | Gets a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json | -| [policyFragmentListByServiceSample.js][policyfragmentlistbyservicesample] | Gets all policy fragments. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json | -| [policyFragmentListReferencesSample.js][policyfragmentlistreferencessample] | Lists policy resources that reference the policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json | -| [policyGetEntityTagSample.js][policygetentitytagsample] | Gets the entity state (Etag) version of the Global policy definition in the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json | -| [policyGetSample.js][policygetsample] | Get the Global policy definition of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json | -| [policyListByServiceSample.js][policylistbyservicesample] | Lists all the Global Policy definitions of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json | -| [policyRestrictionCreateOrUpdateSample.js][policyrestrictioncreateorupdatesample] | Creates or updates the policy restriction configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json | -| [policyRestrictionDeleteSample.js][policyrestrictiondeletesample] | Deletes the policy restriction configuration of the Api Management Service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json | -| [policyRestrictionGetEntityTagSample.js][policyrestrictiongetentitytagsample] | Gets the entity state (Etag) version of the policy restriction in the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json | -| [policyRestrictionGetSample.js][policyrestrictiongetsample] | Get the policy restriction of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json | -| [policyRestrictionListByServiceSample.js][policyrestrictionlistbyservicesample] | Gets all policy restrictions of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json | -| [policyRestrictionUpdateSample.js][policyrestrictionupdatesample] | Updates the policy restriction configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json | -| [policyRestrictionValidationsByServiceSample.js][policyrestrictionvalidationsbyservicesample] | Validate all policies of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json | -| [portalConfigCreateOrUpdateSample.js][portalconfigcreateorupdatesample] | Create or update the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json | -| [portalConfigGetEntityTagSample.js][portalconfiggetentitytagsample] | Gets the entity state (Etag) version of the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json | -| [portalConfigGetSample.js][portalconfiggetsample] | Get the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json | -| [portalConfigListByServiceSample.js][portalconfiglistbyservicesample] | Lists the developer portal configurations. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json | -| [portalConfigUpdateSample.js][portalconfigupdatesample] | Update the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json | -| [portalRevisionCreateOrUpdateSample.js][portalrevisioncreateorupdatesample] | Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json | -| [portalRevisionGetEntityTagSample.js][portalrevisiongetentitytagsample] | Gets the developer portal revision specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json | -| [portalRevisionGetSample.js][portalrevisiongetsample] | Gets the developer portal's revision specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json | -| [portalRevisionListByServiceSample.js][portalrevisionlistbyservicesample] | Lists developer portal's revisions. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json | -| [portalRevisionUpdateSample.js][portalrevisionupdatesample] | Updates the description of specified portal revision or makes it current. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json | -| [portalSettingsListByServiceSample.js][portalsettingslistbyservicesample] | Lists a collection of portalsettings defined within a service instance.. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json | -| [privateEndpointConnectionCreateOrUpdateSample.js][privateendpointconnectioncreateorupdatesample] | Creates a new Private Endpoint Connection or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json | -| [privateEndpointConnectionDeleteSample.js][privateendpointconnectiondeletesample] | Deletes the specified Private Endpoint Connection. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionGetByNameSample.js][privateendpointconnectiongetbynamesample] | Gets the details of the Private Endpoint Connection specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json | -| [privateEndpointConnectionGetPrivateLinkResourceSample.js][privateendpointconnectiongetprivatelinkresourcesample] | Gets the private link resources x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json | -| [privateEndpointConnectionListByServiceSample.js][privateendpointconnectionlistbyservicesample] | Lists all private endpoint connections of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json | -| [privateEndpointConnectionListPrivateLinkResourcesSample.js][privateendpointconnectionlistprivatelinkresourcessample] | Gets the private link resources x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json | -| [productApiCheckEntityExistsSample.js][productapicheckentityexistssample] | Checks that API entity specified by identifier is associated with the Product entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json | -| [productApiCreateOrUpdateSample.js][productapicreateorupdatesample] | Adds an API to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json | -| [productApiDeleteSample.js][productapideletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json | -| [productApiLinkCreateOrUpdateSample.js][productapilinkcreateorupdatesample] | Adds an API to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json | -| [productApiLinkDeleteSample.js][productapilinkdeletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json | -| [productApiLinkGetSample.js][productapilinkgetsample] | Gets the API link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json | -| [productApiLinkListByProductSample.js][productapilinklistbyproductsample] | Lists a collection of the API links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json | -| [productApiListByProductSample.js][productapilistbyproductsample] | Lists a collection of the APIs associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json | -| [productCreateOrUpdateSample.js][productcreateorupdatesample] | Creates or Updates a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json | -| [productDeleteSample.js][productdeletesample] | Delete product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json | -| [productGetEntityTagSample.js][productgetentitytagsample] | Gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json | -| [productGetSample.js][productgetsample] | Gets the details of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json | -| [productGroupCheckEntityExistsSample.js][productgroupcheckentityexistssample] | Checks that Group entity specified by identifier is associated with the Product entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json | -| [productGroupCreateOrUpdateSample.js][productgroupcreateorupdatesample] | Adds the association between the specified developer group with the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json | -| [productGroupDeleteSample.js][productgroupdeletesample] | Deletes the association between the specified group and product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json | -| [productGroupLinkCreateOrUpdateSample.js][productgrouplinkcreateorupdatesample] | Adds a group to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json | -| [productGroupLinkDeleteSample.js][productgrouplinkdeletesample] | Deletes the specified group from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json | -| [productGroupLinkGetSample.js][productgrouplinkgetsample] | Gets the group link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json | -| [productGroupLinkListByProductSample.js][productgrouplinklistbyproductsample] | Lists a collection of the group links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json | -| [productGroupListByProductSample.js][productgrouplistbyproductsample] | Lists the collection of developer groups associated with the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json | -| [productListByServiceSample.js][productlistbyservicesample] | Lists a collection of products in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json | -| [productListByTagsSample.js][productlistbytagssample] | Lists a collection of products associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json | -| [productPolicyCreateOrUpdateSample.js][productpolicycreateorupdatesample] | Creates or updates policy configuration for the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json | -| [productPolicyDeleteSample.js][productpolicydeletesample] | Deletes the policy configuration at the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json | -| [productPolicyGetEntityTagSample.js][productpolicygetentitytagsample] | Get the ETag of the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json | -| [productPolicyGetSample.js][productpolicygetsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json | -| [productPolicyListByProductSample.js][productpolicylistbyproductsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json | -| [productSubscriptionsListSample.js][productsubscriptionslistsample] | Lists the collection of subscriptions to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json | -| [productUpdateSample.js][productupdatesample] | Update existing product details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json | -| [productWikiCreateOrUpdateSample.js][productwikicreateorupdatesample] | Creates a new Wiki for a Product or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json | -| [productWikiDeleteSample.js][productwikideletesample] | Deletes the specified Wiki from a Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json | -| [productWikiGetEntityTagSample.js][productwikigetentitytagsample] | Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json | -| [productWikiGetSample.js][productwikigetsample] | Gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json | -| [productWikiUpdateSample.js][productwikiupdatesample] | Updates the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json | -| [productWikisListSample.js][productwikislistsample] | Gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json | -| [quotaByCounterKeysListByServiceSample.js][quotabycounterkeyslistbyservicesample] | Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json | -| [quotaByCounterKeysUpdateSample.js][quotabycounterkeysupdatesample] | Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json | -| [quotaByPeriodKeysGetSample.js][quotabyperiodkeysgetsample] | Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json | -| [quotaByPeriodKeysUpdateSample.js][quotabyperiodkeysupdatesample] | Updates an existing quota counter value in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json | -| [regionListByServiceSample.js][regionlistbyservicesample] | Lists all azure regions in which the service exists. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json | -| [reportsListByApiSample.js][reportslistbyapisample] | Lists report records by API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json | -| [reportsListByGeoSample.js][reportslistbygeosample] | Lists report records by geography. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json | -| [reportsListByOperationSample.js][reportslistbyoperationsample] | Lists report records by API Operations. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json | -| [reportsListByProductSample.js][reportslistbyproductsample] | Lists report records by Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json | -| [reportsListByRequestSample.js][reportslistbyrequestsample] | Lists report records by Request. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json | -| [reportsListBySubscriptionSample.js][reportslistbysubscriptionsample] | Lists report records by subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json | -| [reportsListByTimeSample.js][reportslistbytimesample] | Lists report records by Time. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json | -| [reportsListByUserSample.js][reportslistbyusersample] | Lists report records by User. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json | -| [signInSettingsCreateOrUpdateSample.js][signinsettingscreateorupdatesample] | Create or Update Sign-In settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json | -| [signInSettingsGetEntityTagSample.js][signinsettingsgetentitytagsample] | Gets the entity state (Etag) version of the SignInSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json | -| [signInSettingsGetSample.js][signinsettingsgetsample] | Get Sign In Settings for the Portal x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json | -| [signInSettingsUpdateSample.js][signinsettingsupdatesample] | Update Sign-In settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json | -| [signUpSettingsCreateOrUpdateSample.js][signupsettingscreateorupdatesample] | Create or Update Sign-Up settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json | -| [signUpSettingsGetEntityTagSample.js][signupsettingsgetentitytagsample] | Gets the entity state (Etag) version of the SignUpSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json | -| [signUpSettingsGetSample.js][signupsettingsgetsample] | Get Sign Up Settings for the Portal x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json | -| [signUpSettingsUpdateSample.js][signupsettingsupdatesample] | Update Sign-Up settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json | -| [subscriptionCreateOrUpdateSample.js][subscriptioncreateorupdatesample] | Creates or updates the subscription of specified user to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json | -| [subscriptionDeleteSample.js][subscriptiondeletesample] | Deletes the specified subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json | -| [subscriptionGetEntityTagSample.js][subscriptiongetentitytagsample] | Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json | -| [subscriptionGetSample.js][subscriptiongetsample] | Gets the specified Subscription entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json | -| [subscriptionListSample.js][subscriptionlistsample] | Lists all subscriptions of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json | -| [subscriptionListSecretsSample.js][subscriptionlistsecretssample] | Gets the specified Subscription keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json | -| [subscriptionRegeneratePrimaryKeySample.js][subscriptionregenerateprimarykeysample] | Regenerates primary key of existing subscription of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json | -| [subscriptionRegenerateSecondaryKeySample.js][subscriptionregeneratesecondarykeysample] | Regenerates secondary key of existing subscription of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json | -| [subscriptionUpdateSample.js][subscriptionupdatesample] | Updates the details of a subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json | -| [tagApiLinkCreateOrUpdateSample.js][tagapilinkcreateorupdatesample] | Adds an API to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json | -| [tagApiLinkDeleteSample.js][tagapilinkdeletesample] | Deletes the specified API from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json | -| [tagApiLinkGetSample.js][tagapilinkgetsample] | Gets the API link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json | -| [tagApiLinkListByProductSample.js][tagapilinklistbyproductsample] | Lists a collection of the API links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json | -| [tagAssignToApiSample.js][tagassigntoapisample] | Assign tag to the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json | -| [tagAssignToOperationSample.js][tagassigntooperationsample] | Assign tag to the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json | -| [tagAssignToProductSample.js][tagassigntoproductsample] | Assign tag to the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json | -| [tagCreateOrUpdateSample.js][tagcreateorupdatesample] | Creates a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json | -| [tagDeleteSample.js][tagdeletesample] | Deletes specific tag of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json | -| [tagDetachFromApiSample.js][tagdetachfromapisample] | Detach the tag from the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json | -| [tagDetachFromOperationSample.js][tagdetachfromoperationsample] | Detach the tag from the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json | -| [tagDetachFromProductSample.js][tagdetachfromproductsample] | Detach the tag from the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json | -| [tagGetByApiSample.js][taggetbyapisample] | Get tag associated with the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json | -| [tagGetByOperationSample.js][taggetbyoperationsample] | Get tag associated with the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json | -| [tagGetByProductSample.js][taggetbyproductsample] | Get tag associated with the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json | -| [tagGetEntityStateByApiSample.js][taggetentitystatebyapisample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json | -| [tagGetEntityStateByOperationSample.js][taggetentitystatebyoperationsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json | -| [tagGetEntityStateByProductSample.js][taggetentitystatebyproductsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json | -| [tagGetEntityStateSample.js][taggetentitystatesample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json | -| [tagGetSample.js][taggetsample] | Gets the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json | -| [tagListByApiSample.js][taglistbyapisample] | Lists all Tags associated with the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json | -| [tagListByOperationSample.js][taglistbyoperationsample] | Lists all Tags associated with the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json | -| [tagListByProductSample.js][taglistbyproductsample] | Lists all Tags associated with the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json | -| [tagListByServiceSample.js][taglistbyservicesample] | Lists a collection of tags defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json | -| [tagOperationLinkCreateOrUpdateSample.js][tagoperationlinkcreateorupdatesample] | Adds an operation to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json | -| [tagOperationLinkDeleteSample.js][tagoperationlinkdeletesample] | Deletes the specified operation from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json | -| [tagOperationLinkGetSample.js][tagoperationlinkgetsample] | Gets the operation link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json | -| [tagOperationLinkListByProductSample.js][tagoperationlinklistbyproductsample] | Lists a collection of the operation links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json | -| [tagProductLinkCreateOrUpdateSample.js][tagproductlinkcreateorupdatesample] | Adds a product to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json | -| [tagProductLinkDeleteSample.js][tagproductlinkdeletesample] | Deletes the specified product from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json | -| [tagProductLinkGetSample.js][tagproductlinkgetsample] | Gets the product link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json | -| [tagProductLinkListByProductSample.js][tagproductlinklistbyproductsample] | Lists a collection of the product links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json | -| [tagResourceListByServiceSample.js][tagresourcelistbyservicesample] | Lists a collection of resources associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json | -| [tagUpdateSample.js][tagupdatesample] | Updates the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json | -| [tenantAccessCreateSample.js][tenantaccesscreatesample] | Update tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json | -| [tenantAccessGetEntityTagSample.js][tenantaccessgetentitytagsample] | Tenant access metadata x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json | -| [tenantAccessGetSample.js][tenantaccessgetsample] | Get tenant access information details without secrets. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json | -| [tenantAccessGitRegeneratePrimaryKeySample.js][tenantaccessgitregenerateprimarykeysample] | Regenerate primary access key for GIT. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessGitRegenerateSecondaryKeySample.js][tenantaccessgitregeneratesecondarykeysample] | Regenerate secondary access key for GIT. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessListByServiceSample.js][tenantaccesslistbyservicesample] | Returns list of access infos - for Git and Management endpoints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json | -| [tenantAccessListSecretsSample.js][tenantaccesslistsecretssample] | Get tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json | -| [tenantAccessRegeneratePrimaryKeySample.js][tenantaccessregenerateprimarykeysample] | Regenerate primary access key x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessRegenerateSecondaryKeySample.js][tenantaccessregeneratesecondarykeysample] | Regenerate secondary access key x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessUpdateSample.js][tenantaccessupdatesample] | Update tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json | -| [tenantConfigurationDeploySample.js][tenantconfigurationdeploysample] | This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json | -| [tenantConfigurationGetSyncStateSample.js][tenantconfigurationgetsyncstatesample] | Gets the status of the most recent synchronization between the configuration database and the Git repository. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json | -| [tenantConfigurationSaveSample.js][tenantconfigurationsavesample] | This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json | -| [tenantConfigurationValidateSample.js][tenantconfigurationvalidatesample] | This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json | -| [tenantSettingsGetSample.js][tenantsettingsgetsample] | Get tenant settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json | -| [tenantSettingsListByServiceSample.js][tenantsettingslistbyservicesample] | Public settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json | -| [userConfirmationPasswordSendSample.js][userconfirmationpasswordsendsample] | Sends confirmation x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json | -| [userCreateOrUpdateSample.js][usercreateorupdatesample] | Creates or Updates a user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json | -| [userDeleteSample.js][userdeletesample] | Deletes specific user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json | -| [userGenerateSsoUrlSample.js][usergeneratessourlsample] | Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json | -| [userGetEntityTagSample.js][usergetentitytagsample] | Gets the entity state (Etag) version of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json | -| [userGetSample.js][usergetsample] | Gets the details of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json | -| [userGetSharedAccessTokenSample.js][usergetsharedaccesstokensample] | Gets the Shared Access Authorization Token for the User. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json | -| [userGroupListSample.js][usergrouplistsample] | Lists all user groups. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json | -| [userIdentitiesListSample.js][useridentitieslistsample] | List of all user identities. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json | -| [userListByServiceSample.js][userlistbyservicesample] | Lists a collection of registered users in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json | -| [userSubscriptionGetSample.js][usersubscriptiongetsample] | Gets the specified Subscription entity associated with a particular user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json | -| [userSubscriptionListSample.js][usersubscriptionlistsample] | Lists the collection of subscriptions of the specified user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json | -| [userUpdateSample.js][userupdatesample] | Updates the details of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json | -| [workspaceApiCreateOrUpdateSample.js][workspaceapicreateorupdatesample] | Creates new or updates existing specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json | -| [workspaceApiDeleteSample.js][workspaceapideletesample] | Deletes the specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json | -| [workspaceApiDiagnosticCreateOrUpdateSample.js][workspaceapidiagnosticcreateorupdatesample] | Creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticDeleteSample.js][workspaceapidiagnosticdeletesample] | Deletes the specified Diagnostic from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticGetEntityTagSample.js][workspaceapidiagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticGetSample.js][workspaceapidiagnosticgetsample] | Gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticListByWorkspaceSample.js][workspaceapidiagnosticlistbyworkspacesample] | Lists all diagnostics of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json | -| [workspaceApiDiagnosticUpdateSample.js][workspaceapidiagnosticupdatesample] | Updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json | -| [workspaceApiExportGetSample.js][workspaceapiexportgetsample] | Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json | -| [workspaceApiGetEntityTagSample.js][workspaceapigetentitytagsample] | Gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json | -| [workspaceApiGetSample.js][workspaceapigetsample] | Gets the details of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json | -| [workspaceApiListByServiceSample.js][workspaceapilistbyservicesample] | Lists all APIs of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json | -| [workspaceApiOperationCreateOrUpdateSample.js][workspaceapioperationcreateorupdatesample] | Creates a new operation in the API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json | -| [workspaceApiOperationDeleteSample.js][workspaceapioperationdeletesample] | Deletes the specified operation in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json | -| [workspaceApiOperationGetEntityTagSample.js][workspaceapioperationgetentitytagsample] | Gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json | -| [workspaceApiOperationGetSample.js][workspaceapioperationgetsample] | Gets the details of the API Operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json | -| [workspaceApiOperationListByApiSample.js][workspaceapioperationlistbyapisample] | Lists a collection of the operations for the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json | -| [workspaceApiOperationPolicyCreateOrUpdateSample.js][workspaceapioperationpolicycreateorupdatesample] | Creates or updates policy configuration for the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyDeleteSample.js][workspaceapioperationpolicydeletesample] | Deletes the policy configuration at the Api Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyGetEntityTagSample.js][workspaceapioperationpolicygetentitytagsample] | Gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyGetSample.js][workspaceapioperationpolicygetsample] | Get the policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyListByOperationSample.js][workspaceapioperationpolicylistbyoperationsample] | Get the list of policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json | -| [workspaceApiOperationUpdateSample.js][workspaceapioperationupdatesample] | Updates the details of the operation in the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json | -| [workspaceApiPolicyCreateOrUpdateSample.js][workspaceapipolicycreateorupdatesample] | Creates or updates policy configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json | -| [workspaceApiPolicyDeleteSample.js][workspaceapipolicydeletesample] | Deletes the policy configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json | -| [workspaceApiPolicyGetEntityTagSample.js][workspaceapipolicygetentitytagsample] | Gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json | -| [workspaceApiPolicyGetSample.js][workspaceapipolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json | -| [workspaceApiPolicyListByApiSample.js][workspaceapipolicylistbyapisample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json | -| [workspaceApiReleaseCreateOrUpdateSample.js][workspaceapireleasecreateorupdatesample] | Creates a new Release for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json | -| [workspaceApiReleaseDeleteSample.js][workspaceapireleasedeletesample] | Deletes the specified release in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json | -| [workspaceApiReleaseGetEntityTagSample.js][workspaceapireleasegetentitytagsample] | Returns the etag of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json | -| [workspaceApiReleaseGetSample.js][workspaceapireleasegetsample] | Returns the details of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json | -| [workspaceApiReleaseListByServiceSample.js][workspaceapireleaselistbyservicesample] | Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json | -| [workspaceApiReleaseUpdateSample.js][workspaceapireleaseupdatesample] | Updates the details of the release of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json | -| [workspaceApiRevisionListByServiceSample.js][workspaceapirevisionlistbyservicesample] | Lists all revisions of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json | -| [workspaceApiSchemaCreateOrUpdateSample.js][workspaceapischemacreateorupdatesample] | Creates or updates schema configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json | -| [workspaceApiSchemaDeleteSample.js][workspaceapischemadeletesample] | Deletes the schema configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json | -| [workspaceApiSchemaGetEntityTagSample.js][workspaceapischemagetentitytagsample] | Gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json | -| [workspaceApiSchemaGetSample.js][workspaceapischemagetsample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json | -| [workspaceApiSchemaListByApiSample.js][workspaceapischemalistbyapisample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json | -| [workspaceApiUpdateSample.js][workspaceapiupdatesample] | Updates the specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json | -| [workspaceApiVersionSetCreateOrUpdateSample.js][workspaceapiversionsetcreateorupdatesample] | Creates or Updates a Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetDeleteSample.js][workspaceapiversionsetdeletesample] | Deletes specific Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetGetEntityTagSample.js][workspaceapiversionsetgetentitytagsample] | Gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetGetSample.js][workspaceapiversionsetgetsample] | Gets the details of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetListByServiceSample.js][workspaceapiversionsetlistbyservicesample] | Lists a collection of API Version Sets in the specified workspace with a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json | -| [workspaceApiVersionSetUpdateSample.js][workspaceapiversionsetupdatesample] | Updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json | -| [workspaceBackendCreateOrUpdateSample.js][workspacebackendcreateorupdatesample] | Creates or Updates a backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json | -| [workspaceBackendDeleteSample.js][workspacebackenddeletesample] | Deletes the specified backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json | -| [workspaceBackendGetEntityTagSample.js][workspacebackendgetentitytagsample] | Gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json | -| [workspaceBackendGetSample.js][workspacebackendgetsample] | Gets the details of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json | -| [workspaceBackendListByWorkspaceSample.js][workspacebackendlistbyworkspacesample] | Lists a collection of backends in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json | -| [workspaceBackendUpdateSample.js][workspacebackendupdatesample] | Updates an existing backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json | -| [workspaceCertificateCreateOrUpdateSample.js][workspacecertificatecreateorupdatesample] | Creates or updates the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json | -| [workspaceCertificateDeleteSample.js][workspacecertificatedeletesample] | Deletes specific certificate. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json | -| [workspaceCertificateGetEntityTagSample.js][workspacecertificategetentitytagsample] | Gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json | -| [workspaceCertificateGetSample.js][workspacecertificategetsample] | Gets the details of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json | -| [workspaceCertificateListByWorkspaceSample.js][workspacecertificatelistbyworkspacesample] | Lists a collection of all certificates in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json | -| [workspaceCertificateRefreshSecretSample.js][workspacecertificaterefreshsecretsample] | From KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json | -| [workspaceCreateOrUpdateSample.js][workspacecreateorupdatesample] | Creates a new workspace or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json | -| [workspaceDeleteSample.js][workspacedeletesample] | Deletes the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json | -| [workspaceDiagnosticCreateOrUpdateSample.js][workspacediagnosticcreateorupdatesample] | Creates a new Diagnostic or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json | -| [workspaceDiagnosticDeleteSample.js][workspacediagnosticdeletesample] | Deletes the specified Diagnostic. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json | -| [workspaceDiagnosticGetEntityTagSample.js][workspacediagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json | -| [workspaceDiagnosticGetSample.js][workspacediagnosticgetsample] | Gets the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json | -| [workspaceDiagnosticListByWorkspaceSample.js][workspacediagnosticlistbyworkspacesample] | Lists all diagnostics in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json | -| [workspaceDiagnosticUpdateSample.js][workspacediagnosticupdatesample] | Updates the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json | -| [workspaceGetEntityTagSample.js][workspacegetentitytagsample] | Gets the entity state (Etag) version of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json | -| [workspaceGetSample.js][workspacegetsample] | Gets the details of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json | -| [workspaceGlobalSchemaCreateOrUpdateSample.js][workspaceglobalschemacreateorupdatesample] | Creates new or updates existing specified Schema of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json | -| [workspaceGlobalSchemaDeleteSample.js][workspaceglobalschemadeletesample] | Deletes specific Schema. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json | -| [workspaceGlobalSchemaGetEntityTagSample.js][workspaceglobalschemagetentitytagsample] | Gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json | -| [workspaceGlobalSchemaGetSample.js][workspaceglobalschemagetsample] | Gets the details of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json | -| [workspaceGlobalSchemaListByServiceSample.js][workspaceglobalschemalistbyservicesample] | Lists a collection of schemas registered with workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json | -| [workspaceGroupCreateOrUpdateSample.js][workspacegroupcreateorupdatesample] | Creates or Updates a group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json | -| [workspaceGroupDeleteSample.js][workspacegroupdeletesample] | Deletes specific group of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json | -| [workspaceGroupGetEntityTagSample.js][workspacegroupgetentitytagsample] | Gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json | -| [workspaceGroupGetSample.js][workspacegroupgetsample] | Gets the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json | -| [workspaceGroupListByServiceSample.js][workspacegrouplistbyservicesample] | Lists a collection of groups defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json | -| [workspaceGroupUpdateSample.js][workspacegroupupdatesample] | Updates the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json | -| [workspaceGroupUserCheckEntityExistsSample.js][workspacegroupusercheckentityexistssample] | Checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json | -| [workspaceGroupUserCreateSample.js][workspacegroupusercreatesample] | Add existing user to existing group x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json | -| [workspaceGroupUserDeleteSample.js][workspacegroupuserdeletesample] | Remove existing user from existing group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json | -| [workspaceGroupUserListSample.js][workspacegroupuserlistsample] | Lists a collection of user entities associated with the group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json | -| [workspaceListByServiceSample.js][workspacelistbyservicesample] | Lists all workspaces of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json | -| [workspaceLoggerCreateOrUpdateSample.js][workspaceloggercreateorupdatesample] | Creates or Updates a logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json | -| [workspaceLoggerDeleteSample.js][workspaceloggerdeletesample] | Deletes the specified logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json | -| [workspaceLoggerGetEntityTagSample.js][workspaceloggergetentitytagsample] | Gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json | -| [workspaceLoggerGetSample.js][workspaceloggergetsample] | Gets the details of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json | -| [workspaceLoggerListByWorkspaceSample.js][workspaceloggerlistbyworkspacesample] | Lists a collection of loggers in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json | -| [workspaceLoggerUpdateSample.js][workspaceloggerupdatesample] | Updates an existing logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json | -| [workspaceNamedValueCreateOrUpdateSample.js][workspacenamedvaluecreateorupdatesample] | Creates or updates named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json | -| [workspaceNamedValueDeleteSample.js][workspacenamedvaluedeletesample] | Deletes specific named value from the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json | -| [workspaceNamedValueGetEntityTagSample.js][workspacenamedvaluegetentitytagsample] | Gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json | -| [workspaceNamedValueGetSample.js][workspacenamedvaluegetsample] | Gets the details of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json | -| [workspaceNamedValueListByServiceSample.js][workspacenamedvaluelistbyservicesample] | Lists a collection of named values defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json | -| [workspaceNamedValueListValueSample.js][workspacenamedvaluelistvaluesample] | Gets the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json | -| [workspaceNamedValueRefreshSecretSample.js][workspacenamedvaluerefreshsecretsample] | Refresh the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json | -| [workspaceNamedValueUpdateSample.js][workspacenamedvalueupdatesample] | Updates the specific named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json | -| [workspaceNotificationCreateOrUpdateSample.js][workspacenotificationcreateorupdatesample] | Create or Update API Management publisher notification for the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json | -| [workspaceNotificationGetSample.js][workspacenotificationgetsample] | Gets the details of the Notification specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json | -| [workspaceNotificationListByServiceSample.js][workspacenotificationlistbyservicesample] | Lists a collection of properties defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json | -| [workspaceNotificationRecipientEmailCheckEntityExistsSample.js][workspacenotificationrecipientemailcheckentityexistssample] | Determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailCreateOrUpdateSample.js][workspacenotificationrecipientemailcreateorupdatesample] | Adds the Email address to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailDeleteSample.js][workspacenotificationrecipientemaildeletesample] | Removes the email from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailListByNotificationSample.js][workspacenotificationrecipientemaillistbynotificationsample] | Gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json | -| [workspaceNotificationRecipientUserCheckEntityExistsSample.js][workspacenotificationrecipientusercheckentityexistssample] | Determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserCreateOrUpdateSample.js][workspacenotificationrecipientusercreateorupdatesample] | Adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserDeleteSample.js][workspacenotificationrecipientuserdeletesample] | Removes the API Management user from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserListByNotificationSample.js][workspacenotificationrecipientuserlistbynotificationsample] | Gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json | -| [workspacePolicyCreateOrUpdateSample.js][workspacepolicycreateorupdatesample] | Creates or updates policy configuration for the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json | -| [workspacePolicyDeleteSample.js][workspacepolicydeletesample] | Deletes the policy configuration at the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json | -| [workspacePolicyFragmentCreateOrUpdateSample.js][workspacepolicyfragmentcreateorupdatesample] | Creates or updates a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json | -| [workspacePolicyFragmentDeleteSample.js][workspacepolicyfragmentdeletesample] | Deletes a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json | -| [workspacePolicyFragmentGetEntityTagSample.js][workspacepolicyfragmentgetentitytagsample] | Gets the entity state (Etag) version of a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json | -| [workspacePolicyFragmentGetSample.js][workspacepolicyfragmentgetsample] | Gets a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json | -| [workspacePolicyFragmentListByServiceSample.js][workspacepolicyfragmentlistbyservicesample] | Gets all policy fragments defined within a workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json | -| [workspacePolicyFragmentListReferencesSample.js][workspacepolicyfragmentlistreferencessample] | Lists policy resources that reference the policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json | -| [workspacePolicyGetEntityTagSample.js][workspacepolicygetentitytagsample] | Gets the entity state (Etag) version of the workspace policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json | -| [workspacePolicyGetSample.js][workspacepolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json | -| [workspacePolicyListByApiSample.js][workspacepolicylistbyapisample] | Get the policy configuration at the workspace level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json | -| [workspaceProductApiLinkCreateOrUpdateSample.js][workspaceproductapilinkcreateorupdatesample] | Adds an API to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json | -| [workspaceProductApiLinkDeleteSample.js][workspaceproductapilinkdeletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json | -| [workspaceProductApiLinkGetSample.js][workspaceproductapilinkgetsample] | Gets the API link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json | -| [workspaceProductApiLinkListByProductSample.js][workspaceproductapilinklistbyproductsample] | Lists a collection of the API links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json | -| [workspaceProductCreateOrUpdateSample.js][workspaceproductcreateorupdatesample] | Creates or Updates a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json | -| [workspaceProductDeleteSample.js][workspaceproductdeletesample] | Delete product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json | -| [workspaceProductGetEntityTagSample.js][workspaceproductgetentitytagsample] | Gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json | -| [workspaceProductGetSample.js][workspaceproductgetsample] | Gets the details of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json | -| [workspaceProductGroupLinkCreateOrUpdateSample.js][workspaceproductgrouplinkcreateorupdatesample] | Adds a group to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkDeleteSample.js][workspaceproductgrouplinkdeletesample] | Deletes the specified group from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkGetSample.js][workspaceproductgrouplinkgetsample] | Gets the group link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkListByProductSample.js][workspaceproductgrouplinklistbyproductsample] | Lists a collection of the group links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json | -| [workspaceProductListByServiceSample.js][workspaceproductlistbyservicesample] | Lists a collection of products in the specified workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json | -| [workspaceProductPolicyCreateOrUpdateSample.js][workspaceproductpolicycreateorupdatesample] | Creates or updates policy configuration for the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json | -| [workspaceProductPolicyDeleteSample.js][workspaceproductpolicydeletesample] | Deletes the policy configuration at the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json | -| [workspaceProductPolicyGetEntityTagSample.js][workspaceproductpolicygetentitytagsample] | Get the ETag of the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json | -| [workspaceProductPolicyGetSample.js][workspaceproductpolicygetsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json | -| [workspaceProductPolicyListByProductSample.js][workspaceproductpolicylistbyproductsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json | -| [workspaceProductUpdateSample.js][workspaceproductupdatesample] | Update existing product details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json | -| [workspaceSubscriptionCreateOrUpdateSample.js][workspacesubscriptioncreateorupdatesample] | Creates or updates the subscription of specified user to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json | -| [workspaceSubscriptionDeleteSample.js][workspacesubscriptiondeletesample] | Deletes the specified subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json | -| [workspaceSubscriptionGetEntityTagSample.js][workspacesubscriptiongetentitytagsample] | Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json | -| [workspaceSubscriptionGetSample.js][workspacesubscriptiongetsample] | Gets the specified Subscription entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json | -| [workspaceSubscriptionListSample.js][workspacesubscriptionlistsample] | Lists all subscriptions of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json | -| [workspaceSubscriptionListSecretsSample.js][workspacesubscriptionlistsecretssample] | Gets the specified Subscription keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json | -| [workspaceSubscriptionRegeneratePrimaryKeySample.js][workspacesubscriptionregenerateprimarykeysample] | Regenerates primary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json | -| [workspaceSubscriptionRegenerateSecondaryKeySample.js][workspacesubscriptionregeneratesecondarykeysample] | Regenerates secondary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json | -| [workspaceSubscriptionUpdateSample.js][workspacesubscriptionupdatesample] | Updates the details of a subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json | -| [workspaceTagApiLinkCreateOrUpdateSample.js][workspacetagapilinkcreateorupdatesample] | Adds an API to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json | -| [workspaceTagApiLinkDeleteSample.js][workspacetagapilinkdeletesample] | Deletes the specified API from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json | -| [workspaceTagApiLinkGetSample.js][workspacetagapilinkgetsample] | Gets the API link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json | -| [workspaceTagApiLinkListByProductSample.js][workspacetagapilinklistbyproductsample] | Lists a collection of the API links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json | -| [workspaceTagCreateOrUpdateSample.js][workspacetagcreateorupdatesample] | Creates a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json | -| [workspaceTagDeleteSample.js][workspacetagdeletesample] | Deletes specific tag of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json | -| [workspaceTagGetEntityStateSample.js][workspacetaggetentitystatesample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json | -| [workspaceTagGetSample.js][workspacetaggetsample] | Gets the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json | -| [workspaceTagListByServiceSample.js][workspacetaglistbyservicesample] | Lists a collection of tags defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json | -| [workspaceTagOperationLinkCreateOrUpdateSample.js][workspacetagoperationlinkcreateorupdatesample] | Adds an operation to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkDeleteSample.js][workspacetagoperationlinkdeletesample] | Deletes the specified operation from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkGetSample.js][workspacetagoperationlinkgetsample] | Gets the operation link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkListByProductSample.js][workspacetagoperationlinklistbyproductsample] | Lists a collection of the operation links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json | -| [workspaceTagProductLinkCreateOrUpdateSample.js][workspacetagproductlinkcreateorupdatesample] | Adds a product to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json | -| [workspaceTagProductLinkDeleteSample.js][workspacetagproductlinkdeletesample] | Deletes the specified product from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json | -| [workspaceTagProductLinkGetSample.js][workspacetagproductlinkgetsample] | Gets the product link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json | -| [workspaceTagProductLinkListByProductSample.js][workspacetagproductlinklistbyproductsample] | Lists a collection of the product links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json | -| [workspaceTagUpdateSample.js][workspacetagupdatesample] | Updates the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json | -| [workspaceUpdateSample.js][workspaceupdatesample] | Updates the details of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node allPoliciesListByServiceSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env APIMANAGEMENT_SUBSCRIPTION_ID="" APIMANAGEMENT_RESOURCE_GROUP="" node allPoliciesListByServiceSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[allpolicieslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/allPoliciesListByServiceSample.js -[apicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiCreateOrUpdateSample.js -[apideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDeleteSample.js -[apidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticCreateOrUpdateSample.js -[apidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticDeleteSample.js -[apidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetEntityTagSample.js -[apidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetSample.js -[apidiagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticListByServiceSample.js -[apidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticUpdateSample.js -[apiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiExportGetSample.js -[apigatewayconfigconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js -[apigatewayconfigconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionDeleteSample.js -[apigatewayconfigconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionGetSample.js -[apigatewayconfigconnectionlistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionListByGatewaySample.js -[apigatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayCreateOrUpdateSample.js -[apigatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayDeleteSample.js -[apigatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayGetSample.js -[apigatewaylistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListByResourceGroupSample.js -[apigatewaylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListSample.js -[apigatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayUpdateSample.js -[apigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetEntityTagSample.js -[apigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetSample.js -[apiissueattachmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentCreateOrUpdateSample.js -[apiissueattachmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentDeleteSample.js -[apiissueattachmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetEntityTagSample.js -[apiissueattachmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetSample.js -[apiissueattachmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentListByServiceSample.js -[apiissuecommentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentCreateOrUpdateSample.js -[apiissuecommentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentDeleteSample.js -[apiissuecommentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetEntityTagSample.js -[apiissuecommentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetSample.js -[apiissuecommentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentListByServiceSample.js -[apiissuecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCreateOrUpdateSample.js -[apiissuedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueDeleteSample.js -[apiissuegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetEntityTagSample.js -[apiissuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetSample.js -[apiissuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueListByServiceSample.js -[apiissueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueUpdateSample.js -[apilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByServiceSample.js -[apilistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByTagsSample.js -[apimanagementgatewayskuslistavailableskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementGatewaySkusListAvailableSkusSample.js -[apimanagementoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementOperationsListSample.js -[apimanagementserviceapplynetworkconfigurationupdatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js -[apimanagementservicebackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceBackupSample.js -[apimanagementservicechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCheckNameAvailabilitySample.js -[apimanagementservicecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCreateOrUpdateSample.js -[apimanagementservicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceDeleteSample.js -[apimanagementservicegetdomainownershipidentifiersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js -[apimanagementservicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSample.js -[apimanagementservicegetssotokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSsoTokenSample.js -[apimanagementservicelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListByResourceGroupSample.js -[apimanagementservicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListSample.js -[apimanagementservicemigratetostv2sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceMigrateToStv2Sample.js -[apimanagementservicerestoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceRestoreSample.js -[apimanagementserviceskuslistavailableserviceskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js -[apimanagementserviceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceUpdateSample.js -[apimanagementskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementSkusListSample.js -[apimanagementworkspacelinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinkGetSample.js -[apimanagementworkspacelinkslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinksListByServiceSample.js -[apioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationCreateOrUpdateSample.js -[apioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationDeleteSample.js -[apioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetEntityTagSample.js -[apioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetSample.js -[apioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationListByApiSample.js -[apioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyCreateOrUpdateSample.js -[apioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyDeleteSample.js -[apioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetEntityTagSample.js -[apioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetSample.js -[apioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyListByOperationSample.js -[apioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationUpdateSample.js -[apipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyCreateOrUpdateSample.js -[apipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyDeleteSample.js -[apipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetEntityTagSample.js -[apipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetSample.js -[apipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyListByApiSample.js -[apiproductlistbyapissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiProductListByApisSample.js -[apireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseCreateOrUpdateSample.js -[apireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseDeleteSample.js -[apireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetEntityTagSample.js -[apireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetSample.js -[apireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseListByServiceSample.js -[apireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseUpdateSample.js -[apirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiRevisionListByServiceSample.js -[apischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaCreateOrUpdateSample.js -[apischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaDeleteSample.js -[apischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetEntityTagSample.js -[apischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetSample.js -[apischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaListByApiSample.js -[apitagdescriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionCreateOrUpdateSample.js -[apitagdescriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionDeleteSample.js -[apitagdescriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetEntityTagSample.js -[apitagdescriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetSample.js -[apitagdescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionListByServiceSample.js -[apiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiUpdateSample.js -[apiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetCreateOrUpdateSample.js -[apiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetDeleteSample.js -[apiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetEntityTagSample.js -[apiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetSample.js -[apiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetListByServiceSample.js -[apiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetUpdateSample.js -[apiwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiCreateOrUpdateSample.js -[apiwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiDeleteSample.js -[apiwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetEntityTagSample.js -[apiwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetSample.js -[apiwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiUpdateSample.js -[apiwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikisListSample.js -[authorizationaccesspolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyCreateOrUpdateSample.js -[authorizationaccesspolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyDeleteSample.js -[authorizationaccesspolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyGetSample.js -[authorizationaccesspolicylistbyauthorizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyListByAuthorizationSample.js -[authorizationconfirmconsentcodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationConfirmConsentCodeSample.js -[authorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationCreateOrUpdateSample.js -[authorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationDeleteSample.js -[authorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationGetSample.js -[authorizationlistbyauthorizationprovidersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationListByAuthorizationProviderSample.js -[authorizationloginlinkspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationLoginLinksPostSample.js -[authorizationprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderCreateOrUpdateSample.js -[authorizationproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderDeleteSample.js -[authorizationprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderGetSample.js -[authorizationproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderListByServiceSample.js -[authorizationservercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerCreateOrUpdateSample.js -[authorizationserverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerDeleteSample.js -[authorizationservergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetEntityTagSample.js -[authorizationservergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetSample.js -[authorizationserverlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListByServiceSample.js -[authorizationserverlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListSecretsSample.js -[authorizationserverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerUpdateSample.js -[backendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendCreateOrUpdateSample.js -[backenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendDeleteSample.js -[backendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetEntityTagSample.js -[backendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetSample.js -[backendlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendListByServiceSample.js -[backendreconnectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendReconnectSample.js -[backendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendUpdateSample.js -[cachecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheCreateOrUpdateSample.js -[cachedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheDeleteSample.js -[cachegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetEntityTagSample.js -[cachegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetSample.js -[cachelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheListByServiceSample.js -[cacheupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheUpdateSample.js -[certificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateCreateOrUpdateSample.js -[certificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateDeleteSample.js -[certificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetEntityTagSample.js -[certificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetSample.js -[certificatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateListByServiceSample.js -[certificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateRefreshSecretSample.js -[contentitemcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemCreateOrUpdateSample.js -[contentitemdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemDeleteSample.js -[contentitemgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetEntityTagSample.js -[contentitemgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetSample.js -[contentitemlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemListByServiceSample.js -[contenttypecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeCreateOrUpdateSample.js -[contenttypedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeDeleteSample.js -[contenttypegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeGetSample.js -[contenttypelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeListByServiceSample.js -[delegationsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsCreateOrUpdateSample.js -[delegationsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetEntityTagSample.js -[delegationsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetSample.js -[delegationsettingslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsListSecretsSample.js -[delegationsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsUpdateSample.js -[deletedservicesgetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesGetByNameSample.js -[deletedserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesListBySubscriptionSample.js -[deletedservicespurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesPurgeSample.js -[diagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticCreateOrUpdateSample.js -[diagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticDeleteSample.js -[diagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetEntityTagSample.js -[diagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetSample.js -[diagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticListByServiceSample.js -[diagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticUpdateSample.js -[documentationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationCreateOrUpdateSample.js -[documentationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationDeleteSample.js -[documentationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetEntityTagSample.js -[documentationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetSample.js -[documentationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationListByServiceSample.js -[documentationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationUpdateSample.js -[emailtemplatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateCreateOrUpdateSample.js -[emailtemplatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateDeleteSample.js -[emailtemplategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetEntityTagSample.js -[emailtemplategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetSample.js -[emailtemplatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateListByServiceSample.js -[emailtemplateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateUpdateSample.js -[gatewayapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiCreateOrUpdateSample.js -[gatewayapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiDeleteSample.js -[gatewayapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiGetEntityTagSample.js -[gatewayapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiListByServiceSample.js -[gatewaycertificateauthoritycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js -[gatewaycertificateauthoritydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityDeleteSample.js -[gatewaycertificateauthoritygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetEntityTagSample.js -[gatewaycertificateauthoritygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetSample.js -[gatewaycertificateauthoritylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityListByServiceSample.js -[gatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCreateOrUpdateSample.js -[gatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayDeleteSample.js -[gatewaygeneratetokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGenerateTokenSample.js -[gatewaygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetEntityTagSample.js -[gatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetSample.js -[gatewayhostnameconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js -[gatewayhostnameconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationDeleteSample.js -[gatewayhostnameconfigurationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetEntityTagSample.js -[gatewayhostnameconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetSample.js -[gatewayhostnameconfigurationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationListByServiceSample.js -[gatewayinvalidatedebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayInvalidateDebugCredentialsSample.js -[gatewaylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListByServiceSample.js -[gatewaylistdebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListDebugCredentialsSample.js -[gatewaylistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListKeysSample.js -[gatewaylisttracesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListTraceSample.js -[gatewayregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayRegenerateKeySample.js -[gatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayUpdateSample.js -[globalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaCreateOrUpdateSample.js -[globalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaDeleteSample.js -[globalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetEntityTagSample.js -[globalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetSample.js -[globalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaListByServiceSample.js -[graphqlapiresolvercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverCreateOrUpdateSample.js -[graphqlapiresolverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverDeleteSample.js -[graphqlapiresolvergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetEntityTagSample.js -[graphqlapiresolvergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetSample.js -[graphqlapiresolverlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverListByApiSample.js -[graphqlapiresolverpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyCreateOrUpdateSample.js -[graphqlapiresolverpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyDeleteSample.js -[graphqlapiresolverpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetEntityTagSample.js -[graphqlapiresolverpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetSample.js -[graphqlapiresolverpolicylistbyresolversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyListByResolverSample.js -[graphqlapiresolverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverUpdateSample.js -[groupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupCreateOrUpdateSample.js -[groupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupDeleteSample.js -[groupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetEntityTagSample.js -[groupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetSample.js -[grouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupListByServiceSample.js -[groupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUpdateSample.js -[groupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCheckEntityExistsSample.js -[groupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCreateSample.js -[groupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserDeleteSample.js -[groupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserListSample.js -[identityprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderCreateOrUpdateSample.js -[identityproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderDeleteSample.js -[identityprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetEntityTagSample.js -[identityprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetSample.js -[identityproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListByServiceSample.js -[identityproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListSecretsSample.js -[identityproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderUpdateSample.js -[issuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueGetSample.js -[issuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueListByServiceSample.js -[loggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerCreateOrUpdateSample.js -[loggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerDeleteSample.js -[loggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetEntityTagSample.js -[loggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetSample.js -[loggerlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerListByServiceSample.js -[loggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerUpdateSample.js -[namedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueCreateOrUpdateSample.js -[namedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueDeleteSample.js -[namedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetEntityTagSample.js -[namedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetSample.js -[namedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListByServiceSample.js -[namedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListValueSample.js -[namedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueRefreshSecretSample.js -[namedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueUpdateSample.js -[networkstatuslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByLocationSample.js -[networkstatuslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByServiceSample.js -[notificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationCreateOrUpdateSample.js -[notificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationGetSample.js -[notificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationListByServiceSample.js -[notificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCheckEntityExistsSample.js -[notificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCreateOrUpdateSample.js -[notificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailDeleteSample.js -[notificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailListByNotificationSample.js -[notificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCheckEntityExistsSample.js -[notificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCreateOrUpdateSample.js -[notificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserDeleteSample.js -[notificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserListByNotificationSample.js -[openidconnectprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderCreateOrUpdateSample.js -[openidconnectproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderDeleteSample.js -[openidconnectprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetEntityTagSample.js -[openidconnectprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetSample.js -[openidconnectproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListByServiceSample.js -[openidconnectproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListSecretsSample.js -[openidconnectproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderUpdateSample.js -[operationlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationListByTagsSample.js -[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationStatusGetSample.js -[operationsresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationsResultsGetSample.js -[outboundnetworkdependenciesendpointslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js -[performconnectivitycheckasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/performConnectivityCheckAsyncSample.js -[policycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyCreateOrUpdateSample.js -[policydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDeleteSample.js -[policydescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDescriptionListByServiceSample.js -[policyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentCreateOrUpdateSample.js -[policyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentDeleteSample.js -[policyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetEntityTagSample.js -[policyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetSample.js -[policyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListByServiceSample.js -[policyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListReferencesSample.js -[policygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetEntityTagSample.js -[policygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetSample.js -[policylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyListByServiceSample.js -[policyrestrictioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionCreateOrUpdateSample.js -[policyrestrictiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionDeleteSample.js -[policyrestrictiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetEntityTagSample.js -[policyrestrictiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetSample.js -[policyrestrictionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionListByServiceSample.js -[policyrestrictionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionUpdateSample.js -[policyrestrictionvalidationsbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionValidationsByServiceSample.js -[portalconfigcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigCreateOrUpdateSample.js -[portalconfiggetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetEntityTagSample.js -[portalconfiggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetSample.js -[portalconfiglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigListByServiceSample.js -[portalconfigupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigUpdateSample.js -[portalrevisioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionCreateOrUpdateSample.js -[portalrevisiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetEntityTagSample.js -[portalrevisiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetSample.js -[portalrevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionListByServiceSample.js -[portalrevisionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionUpdateSample.js -[portalsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalSettingsListByServiceSample.js -[privateendpointconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionCreateOrUpdateSample.js -[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionDeleteSample.js -[privateendpointconnectiongetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetByNameSample.js -[privateendpointconnectiongetprivatelinkresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js -[privateendpointconnectionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListByServiceSample.js -[privateendpointconnectionlistprivatelinkresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js -[productapicheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCheckEntityExistsSample.js -[productapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCreateOrUpdateSample.js -[productapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiDeleteSample.js -[productapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkCreateOrUpdateSample.js -[productapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkDeleteSample.js -[productapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkGetSample.js -[productapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkListByProductSample.js -[productapilistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiListByProductSample.js -[productcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productCreateOrUpdateSample.js -[productdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productDeleteSample.js -[productgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetEntityTagSample.js -[productgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetSample.js -[productgroupcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCheckEntityExistsSample.js -[productgroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCreateOrUpdateSample.js -[productgroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupDeleteSample.js -[productgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkCreateOrUpdateSample.js -[productgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkDeleteSample.js -[productgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkGetSample.js -[productgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkListByProductSample.js -[productgrouplistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupListByProductSample.js -[productlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByServiceSample.js -[productlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByTagsSample.js -[productpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyCreateOrUpdateSample.js -[productpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyDeleteSample.js -[productpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetEntityTagSample.js -[productpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetSample.js -[productpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyListByProductSample.js -[productsubscriptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productSubscriptionsListSample.js -[productupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productUpdateSample.js -[productwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiCreateOrUpdateSample.js -[productwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiDeleteSample.js -[productwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetEntityTagSample.js -[productwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetSample.js -[productwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiUpdateSample.js -[productwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikisListSample.js -[quotabycounterkeyslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysListByServiceSample.js -[quotabycounterkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysUpdateSample.js -[quotabyperiodkeysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysGetSample.js -[quotabyperiodkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysUpdateSample.js -[regionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/regionListByServiceSample.js -[reportslistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByApiSample.js -[reportslistbygeosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByGeoSample.js -[reportslistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByOperationSample.js -[reportslistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByProductSample.js -[reportslistbyrequestsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByRequestSample.js -[reportslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListBySubscriptionSample.js -[reportslistbytimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByTimeSample.js -[reportslistbyusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByUserSample.js -[signinsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsCreateOrUpdateSample.js -[signinsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetEntityTagSample.js -[signinsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetSample.js -[signinsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsUpdateSample.js -[signupsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsCreateOrUpdateSample.js -[signupsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetEntityTagSample.js -[signupsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetSample.js -[signupsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsUpdateSample.js -[subscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionCreateOrUpdateSample.js -[subscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionDeleteSample.js -[subscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetEntityTagSample.js -[subscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetSample.js -[subscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSample.js -[subscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSecretsSample.js -[subscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegeneratePrimaryKeySample.js -[subscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegenerateSecondaryKeySample.js -[subscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionUpdateSample.js -[tagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkCreateOrUpdateSample.js -[tagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkDeleteSample.js -[tagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkGetSample.js -[tagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkListByProductSample.js -[tagassigntoapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToApiSample.js -[tagassigntooperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToOperationSample.js -[tagassigntoproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToProductSample.js -[tagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagCreateOrUpdateSample.js -[tagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDeleteSample.js -[tagdetachfromapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromApiSample.js -[tagdetachfromoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromOperationSample.js -[tagdetachfromproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromProductSample.js -[taggetbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByApiSample.js -[taggetbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByOperationSample.js -[taggetbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByProductSample.js -[taggetentitystatebyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByApiSample.js -[taggetentitystatebyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByOperationSample.js -[taggetentitystatebyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByProductSample.js -[taggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateSample.js -[taggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetSample.js -[taglistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByApiSample.js -[taglistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByOperationSample.js -[taglistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByProductSample.js -[taglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByServiceSample.js -[tagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkCreateOrUpdateSample.js -[tagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkDeleteSample.js -[tagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkGetSample.js -[tagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkListByProductSample.js -[tagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkCreateOrUpdateSample.js -[tagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkDeleteSample.js -[tagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkGetSample.js -[tagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkListByProductSample.js -[tagresourcelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagResourceListByServiceSample.js -[tagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagUpdateSample.js -[tenantaccesscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessCreateSample.js -[tenantaccessgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetEntityTagSample.js -[tenantaccessgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetSample.js -[tenantaccessgitregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegeneratePrimaryKeySample.js -[tenantaccessgitregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegenerateSecondaryKeySample.js -[tenantaccesslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListByServiceSample.js -[tenantaccesslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListSecretsSample.js -[tenantaccessregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegeneratePrimaryKeySample.js -[tenantaccessregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegenerateSecondaryKeySample.js -[tenantaccessupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessUpdateSample.js -[tenantconfigurationdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationDeploySample.js -[tenantconfigurationgetsyncstatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationGetSyncStateSample.js -[tenantconfigurationsavesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationSaveSample.js -[tenantconfigurationvalidatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationValidateSample.js -[tenantsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsGetSample.js -[tenantsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsListByServiceSample.js -[userconfirmationpasswordsendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userConfirmationPasswordSendSample.js -[usercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userCreateOrUpdateSample.js -[userdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userDeleteSample.js -[usergeneratessourlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGenerateSsoUrlSample.js -[usergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetEntityTagSample.js -[usergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSample.js -[usergetsharedaccesstokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSharedAccessTokenSample.js -[usergrouplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGroupListSample.js -[useridentitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userIdentitiesListSample.js -[userlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userListByServiceSample.js -[usersubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionGetSample.js -[usersubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionListSample.js -[userupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userUpdateSample.js -[workspaceapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiCreateOrUpdateSample.js -[workspaceapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDeleteSample.js -[workspaceapidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js -[workspaceapidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticDeleteSample.js -[workspaceapidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetEntityTagSample.js -[workspaceapidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetSample.js -[workspaceapidiagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticListByWorkspaceSample.js -[workspaceapidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticUpdateSample.js -[workspaceapiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiExportGetSample.js -[workspaceapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetEntityTagSample.js -[workspaceapigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetSample.js -[workspaceapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiListByServiceSample.js -[workspaceapioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationCreateOrUpdateSample.js -[workspaceapioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationDeleteSample.js -[workspaceapioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetEntityTagSample.js -[workspaceapioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetSample.js -[workspaceapioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationListByApiSample.js -[workspaceapioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js -[workspaceapioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyDeleteSample.js -[workspaceapioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetEntityTagSample.js -[workspaceapioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetSample.js -[workspaceapioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyListByOperationSample.js -[workspaceapioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationUpdateSample.js -[workspaceapipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyCreateOrUpdateSample.js -[workspaceapipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyDeleteSample.js -[workspaceapipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetEntityTagSample.js -[workspaceapipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetSample.js -[workspaceapipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyListByApiSample.js -[workspaceapireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseCreateOrUpdateSample.js -[workspaceapireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseDeleteSample.js -[workspaceapireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetEntityTagSample.js -[workspaceapireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetSample.js -[workspaceapireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseListByServiceSample.js -[workspaceapireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseUpdateSample.js -[workspaceapirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiRevisionListByServiceSample.js -[workspaceapischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaCreateOrUpdateSample.js -[workspaceapischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaDeleteSample.js -[workspaceapischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetEntityTagSample.js -[workspaceapischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetSample.js -[workspaceapischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaListByApiSample.js -[workspaceapiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiUpdateSample.js -[workspaceapiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetCreateOrUpdateSample.js -[workspaceapiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetDeleteSample.js -[workspaceapiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetEntityTagSample.js -[workspaceapiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetSample.js -[workspaceapiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetListByServiceSample.js -[workspaceapiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetUpdateSample.js -[workspacebackendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendCreateOrUpdateSample.js -[workspacebackenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendDeleteSample.js -[workspacebackendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetEntityTagSample.js -[workspacebackendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetSample.js -[workspacebackendlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendListByWorkspaceSample.js -[workspacebackendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendUpdateSample.js -[workspacecertificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateCreateOrUpdateSample.js -[workspacecertificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateDeleteSample.js -[workspacecertificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetEntityTagSample.js -[workspacecertificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetSample.js -[workspacecertificatelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateListByWorkspaceSample.js -[workspacecertificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateRefreshSecretSample.js -[workspacecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCreateOrUpdateSample.js -[workspacedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDeleteSample.js -[workspacediagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticCreateOrUpdateSample.js -[workspacediagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticDeleteSample.js -[workspacediagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetEntityTagSample.js -[workspacediagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetSample.js -[workspacediagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticListByWorkspaceSample.js -[workspacediagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticUpdateSample.js -[workspacegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetEntityTagSample.js -[workspacegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetSample.js -[workspaceglobalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js -[workspaceglobalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaDeleteSample.js -[workspaceglobalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetEntityTagSample.js -[workspaceglobalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetSample.js -[workspaceglobalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaListByServiceSample.js -[workspacegroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupCreateOrUpdateSample.js -[workspacegroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupDeleteSample.js -[workspacegroupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetEntityTagSample.js -[workspacegroupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetSample.js -[workspacegrouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupListByServiceSample.js -[workspacegroupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUpdateSample.js -[workspacegroupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCheckEntityExistsSample.js -[workspacegroupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCreateSample.js -[workspacegroupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserDeleteSample.js -[workspacegroupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserListSample.js -[workspacelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceListByServiceSample.js -[workspaceloggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerCreateOrUpdateSample.js -[workspaceloggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerDeleteSample.js -[workspaceloggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetEntityTagSample.js -[workspaceloggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetSample.js -[workspaceloggerlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerListByWorkspaceSample.js -[workspaceloggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerUpdateSample.js -[workspacenamedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueCreateOrUpdateSample.js -[workspacenamedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueDeleteSample.js -[workspacenamedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetEntityTagSample.js -[workspacenamedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetSample.js -[workspacenamedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListByServiceSample.js -[workspacenamedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListValueSample.js -[workspacenamedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueRefreshSecretSample.js -[workspacenamedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueUpdateSample.js -[workspacenotificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationCreateOrUpdateSample.js -[workspacenotificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationGetSample.js -[workspacenotificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationListByServiceSample.js -[workspacenotificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js -[workspacenotificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js -[workspacenotificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailDeleteSample.js -[workspacenotificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js -[workspacenotificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js -[workspacenotificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js -[workspacenotificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserDeleteSample.js -[workspacenotificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserListByNotificationSample.js -[workspacepolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyCreateOrUpdateSample.js -[workspacepolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyDeleteSample.js -[workspacepolicyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentCreateOrUpdateSample.js -[workspacepolicyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentDeleteSample.js -[workspacepolicyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetEntityTagSample.js -[workspacepolicyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetSample.js -[workspacepolicyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListByServiceSample.js -[workspacepolicyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListReferencesSample.js -[workspacepolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetEntityTagSample.js -[workspacepolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetSample.js -[workspacepolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyListByApiSample.js -[workspaceproductapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkCreateOrUpdateSample.js -[workspaceproductapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkDeleteSample.js -[workspaceproductapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkGetSample.js -[workspaceproductapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkListByProductSample.js -[workspaceproductcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductCreateOrUpdateSample.js -[workspaceproductdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductDeleteSample.js -[workspaceproductgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetEntityTagSample.js -[workspaceproductgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetSample.js -[workspaceproductgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js -[workspaceproductgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkDeleteSample.js -[workspaceproductgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkGetSample.js -[workspaceproductgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkListByProductSample.js -[workspaceproductlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductListByServiceSample.js -[workspaceproductpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyCreateOrUpdateSample.js -[workspaceproductpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyDeleteSample.js -[workspaceproductpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetEntityTagSample.js -[workspaceproductpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetSample.js -[workspaceproductpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyListByProductSample.js -[workspaceproductupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductUpdateSample.js -[workspacesubscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionCreateOrUpdateSample.js -[workspacesubscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionDeleteSample.js -[workspacesubscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetEntityTagSample.js -[workspacesubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetSample.js -[workspacesubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSample.js -[workspacesubscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSecretsSample.js -[workspacesubscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js -[workspacesubscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js -[workspacesubscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionUpdateSample.js -[workspacetagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkCreateOrUpdateSample.js -[workspacetagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkDeleteSample.js -[workspacetagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkGetSample.js -[workspacetagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkListByProductSample.js -[workspacetagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagCreateOrUpdateSample.js -[workspacetagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagDeleteSample.js -[workspacetaggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetEntityStateSample.js -[workspacetaggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetSample.js -[workspacetaglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagListByServiceSample.js -[workspacetagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js -[workspacetagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkDeleteSample.js -[workspacetagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkGetSample.js -[workspacetagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkListByProductSample.js -[workspacetagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkCreateOrUpdateSample.js -[workspacetagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkDeleteSample.js -[workspacetagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkGetSample.js -[workspacetagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkListByProductSample.js -[workspacetagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagUpdateSample.js -[workspaceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceUpdateSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/README.md diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/allPoliciesListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/allPoliciesListByServiceSample.js deleted file mode 100644 index 84efcd97ca52..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/allPoliciesListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Status of all policies of API Management services. - * - * @summary Status of all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json - */ -async function apiManagementListPolicyRestrictions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.allPolicies.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiCreateOrUpdateSample.js deleted file mode 100644 index 91d2a875682f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiCreateOrUpdateSample.js +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json - */ -async function apiManagementCreateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiClone.json - */ -async function apiManagementCreateApiClone() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json - */ -async function apiManagementCreateApiNewVersionUsingExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json - */ -async function apiManagementCreateApiRevisionFromExistingApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json - */ -async function apiManagementCreateApiUsingImportOverrideServiceUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3Import.json - */ -async function apiManagementCreateApiUsingOai3Import() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json - */ -async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingSwaggerImport.json - */ -async function apiManagementCreateApiUsingSwaggerImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingWadlImport.json - */ -async function apiManagementCreateApiUsingWadlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json - */ -async function apiManagementCreateApiWithMultipleAuthServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581", - }, - ], - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json - */ -async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283", - }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284", - }, - ], - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithOpenIdConnect.json - */ -async function apiManagementCreateApiWithOpenIdConnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid", - }, - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApi.json - */ -async function apiManagementCreateGraphQlApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGrpcApi.json - */ -async function apiManagementCreateGrpcApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - apiType: "grpc", - format: "grpc-link", - path: "grpc-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["https"], - serviceUrl: "https://your-api-hostname/samples", - value: - "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateODataApi.json - */ -async function apiManagementCreateODataApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - apiType: "odata", - format: "odata-link", - path: "odata-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://services.odata.org/TripPinWebApiService", - value: "https://services.odata.org/TripPinWebApiService/$metadata", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json - */ -async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json - */ -async function apiManagementCreateSoapToRestApiUsingWsdlImport() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWebsocketApi.json - */ -async function apiManagementCreateWebSocketApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApi(); - await apiManagementCreateApiClone(); - await apiManagementCreateApiNewVersionUsingExistingApi(); - await apiManagementCreateApiRevisionFromExistingApi(); - await apiManagementCreateApiUsingImportOverrideServiceUrl(); - await apiManagementCreateApiUsingOai3Import(); - await apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - await apiManagementCreateApiUsingSwaggerImport(); - await apiManagementCreateApiUsingWadlImport(); - await apiManagementCreateApiWithMultipleAuthServers(); - await apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - await apiManagementCreateApiWithOpenIdConnect(); - await apiManagementCreateGraphQlApi(); - await apiManagementCreateGrpcApi(); - await apiManagementCreateODataApi(); - await apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - await apiManagementCreateSoapToRestApiUsingWsdlImport(); - await apiManagementCreateWebSocketApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDeleteSample.js deleted file mode 100644 index 4654b96fde01..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API of the API Management service instance. - * - * @summary Deletes the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json - */ -async function apiManagementDeleteApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginDeleteAndWait( - resourceGroupName, - serviceName, - apiId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticCreateOrUpdateSample.js deleted file mode 100644 index 8dec3208277b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. - * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json - */ -async function apiManagementCreateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticDeleteSample.js deleted file mode 100644 index cffe9a5e8cc4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json - */ -async function apiManagementDeleteApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetEntityTagSample.js deleted file mode 100644 index b9e977b34750..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json - */ -async function apiManagementHeadApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetSample.js deleted file mode 100644 index 76a083155d0c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json - */ -async function apiManagementGetApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticListByServiceSample.js deleted file mode 100644 index 84167639c4be..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json - */ -async function apiManagementListApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticUpdateSample.js deleted file mode 100644 index d55fc456dd7d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiDiagnosticUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. - * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json - */ -async function apiManagementUpdateApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiExportGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiExportGetSample.js deleted file mode 100644 index 5d2a584e6ce0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiExportGetSample.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json - */ -async function apiManagementGetApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json - */ -async function apiManagementGetApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiExportInOpenApi2Dot0(); - await apiManagementGetApiExportInOpenApi3Dot0(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js deleted file mode 100644 index 339d29837e43..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json - */ -async function apiManagementCreateGatewayConfigConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const parameters = { - sourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionDeleteSample.js deleted file mode 100644 index e986898ec120..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an existing API Management gateway config connection. - * - * @summary Deletes an existing API Management gateway config connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json - */ -async function apiManagementGatewayDeleteGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.beginDeleteAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionGetSample.js deleted file mode 100644 index 72bd13ad3506..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets an API Management gateway config connection resource description. - * - * @summary Gets an API Management gateway config connection resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json - */ -async function apiManagementGetGatewayConfigConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.get( - resourceGroupName, - gatewayName, - configConnectionName, - ); - console.log(result); -} - -async function main() { - await apiManagementGetGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionListByGatewaySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionListByGatewaySample.js deleted file mode 100644 index 6196028dbb44..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayConfigConnectionListByGatewaySample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all API Management gateway config connections within a gateway. - * - * @summary List all API Management gateway config connections within a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json - */ -async function apiManagementListGatewayConfigConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGatewayConfigConnection.listByGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayCreateOrUpdateSample.js deleted file mode 100644 index 42ad4c412c22..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayCreateOrUpdateSample.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json - */ -async function apiManagementCreateStandardGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters = { - backend: { - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", - }, - }, - location: "South Central US", - sku: { name: "Standard", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePremiumGateway.json - */ -async function apiManagementCreateWorkspacePremiumGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters = { - backend: { - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", - }, - }, - location: "South Central US", - sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - virtualNetworkType: "External", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateStandardGateway(); - await apiManagementCreateWorkspacePremiumGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayDeleteSample.js deleted file mode 100644 index 2a7795c251ed..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an existing API Management gateway. - * - * @summary Deletes an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json - */ -async function apiManagementGatewayDeleteGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "example-gateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginDeleteAndWait(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await apiManagementGatewayDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayGetSample.js deleted file mode 100644 index 30470c1cd7dd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets an API Management gateway resource description. - * - * @summary Gets an API Management gateway resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json - */ -async function apiManagementGatewayGetGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main() { - await apiManagementGatewayGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListByResourceGroupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListByResourceGroupSample.js deleted file mode 100644 index 9ea2a0032a0f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all API Management gateways within a resource group. - * - * @summary List all API Management gateways within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json - */ -async function apiManagementListGatewaysBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGateway.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewaysBySubscriptionAndResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListSample.js deleted file mode 100644 index 5e95bb49f892..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all API Management gateways within a subscription. - * - * @summary List all API Management gateways within a subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json - */ -async function apiManagementListGatewaysBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGateway.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewaysBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayUpdateSample.js deleted file mode 100644 index d45e1ee5848d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGatewayUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing API Management gateway. - * - * @summary Updates an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json - */ -async function apiManagementUpdateStandardGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters = { - sku: { name: "Standard", capacity: 10 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateStandardGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetEntityTagSample.js deleted file mode 100644 index 0d717f2b21de..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json - */ -async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main() { - await apiManagementHeadApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetSample.js deleted file mode 100644 index 91919837f755..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json - */ -async function apiManagementGetApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json - */ -async function apiManagementGetApiRevisionContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main() { - await apiManagementGetApiContract(); - await apiManagementGetApiRevisionContract(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentCreateOrUpdateSample.js deleted file mode 100644 index 481058b35121..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. - * - * @summary Creates a new Attachment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json - */ -async function apiManagementCreateApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentDeleteSample.js deleted file mode 100644 index e9f9c55f0220..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json - */ -async function apiManagementDeleteApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetEntityTagSample.js deleted file mode 100644 index 7bedae51d157..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json - */ -async function apiManagementHeadApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetSample.js deleted file mode 100644 index e0bf43f36ac1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the details of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json - */ -async function apiManagementGetApiIssueAttachment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentListByServiceSample.js deleted file mode 100644 index 477113841f7b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueAttachmentListByServiceSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. - * - * @summary Lists all attachments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json - */ -async function apiManagementListApiIssueAttachments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiIssueAttachments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentCreateOrUpdateSample.js deleted file mode 100644 index 619c3de00f47..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. - * - * @summary Creates a new Comment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json - */ -async function apiManagementCreateApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentDeleteSample.js deleted file mode 100644 index 5756e148deae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json - */ -async function apiManagementDeleteApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetEntityTagSample.js deleted file mode 100644 index 26a36e04caed..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json - */ -async function apiManagementHeadApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetSample.js deleted file mode 100644 index e0b4c70f6986..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. - * - * @summary Gets the details of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json - */ -async function apiManagementGetApiIssueComment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentListByServiceSample.js deleted file mode 100644 index 4e899984d5d1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCommentListByServiceSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. - * - * @summary Lists all comments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json - */ -async function apiManagementListApiIssueComments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiIssueComments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCreateOrUpdateSample.js deleted file mode 100644 index 3f059958ce52..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. - * - * @summary Creates a new Issue for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json - */ -async function apiManagementCreateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueDeleteSample.js deleted file mode 100644 index 4bfb77012842..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Issue from an API. - * - * @summary Deletes the specified Issue from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json - */ -async function apiManagementDeleteApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetEntityTagSample.js deleted file mode 100644 index 323609efbe0f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetEntityTagSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json - */ -async function apiManagementHeadApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag(resourceGroupName, serviceName, apiId, issueId); - console.log(result); -} - -async function main() { - await apiManagementHeadApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetSample.js deleted file mode 100644 index 62aab50d16c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. - * - * @summary Gets the details of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json - */ -async function apiManagementGetApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get(resourceGroupName, serviceName, apiId, issueId); - console.log(result); -} - -async function main() { - await apiManagementGetApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueListByServiceSample.js deleted file mode 100644 index 97443da6b4b3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueListByServiceSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all issues associated with the specified API. - * - * @summary Lists all issues associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json - */ -async function apiManagementListApiIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssue.listByService(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiIssues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueUpdateSample.js deleted file mode 100644 index 40ef0a3426ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiIssueUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing issue for an API. - * - * @summary Updates an existing issue for an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json - */ -async function apiManagementUpdateApiIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByServiceSample.js deleted file mode 100644 index 8d8261b17d6b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all APIs of the API Management service instance. - * - * @summary Lists all APIs of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json - */ -async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.api.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByTagsSample.js deleted file mode 100644 index 3fc6864fa758..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiListByTagsSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of apis associated with tags. - * - * @summary Lists a collection of apis associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json - */ -async function apiManagementListApisByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.api.listByTags(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApisByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementGatewaySkusListAvailableSkusSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementGatewaySkusListAvailableSkusSample.js deleted file mode 100644 index cb08542922b4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementGatewaySkusListAvailableSkusSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management gateway - * - * @summary Gets all available SKU for a given API Management gateway - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json - */ -async function apiManagementListSkUsGateways() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementGatewaySkus.listAvailableSkus( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListSkUsGateways(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementOperationsListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementOperationsListSample.js deleted file mode 100644 index ab4d7b8225ea..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementOperationsListSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @summary Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json - */ -async function apiManagementListOperations() { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (const item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js deleted file mode 100644 index 15e9cf1e8683..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - * - * @summary Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json - */ -async function apiManagementApplyNetworkConfigurationUpdates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "west us", - }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementApplyNetworkConfigurationUpdates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceBackupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceBackupSample.js deleted file mode 100644 index a7b2c20b1a45..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceBackupSample.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json - */ -async function apiManagementBackupWithAccessKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithSystemManagedIdentity.json - */ -async function apiManagementBackupWithSystemManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json - */ -async function apiManagementBackupWithUserAssignedManagedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementBackupWithAccessKey(); - await apiManagementBackupWithSystemManagedIdentity(); - await apiManagementBackupWithUserAssignedManagedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCheckNameAvailabilitySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCheckNameAvailabilitySample.js deleted file mode 100644 index ff80cf2e5564..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCheckNameAvailabilitySample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. - * - * @summary Checks availability and correctness of a name for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json - */ -async function apiManagementServiceCheckNameAvailability() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const parameters = { - name: "apimService1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.checkNameAvailability(parameters); - console.log(result); -} - -async function main() { - await apiManagementServiceCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCreateOrUpdateSample.js deleted file mode 100644 index 379ffb7a50d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceCreateOrUpdateSample.js +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json - */ -async function apiManagementCreateMultiRegionServiceWithCustomHostname() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 }, - }, - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net", - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net", - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net", - }, - { - type: "ConfigurationApi", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "configuration-api.msitesting.net", - }, - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateService.json - */ -async function apiManagementCreateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceHavingMsi.json - */ -async function apiManagementCreateServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json - */ -async function apiManagementCreateServiceInVnetWithPublicIP() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant", - }, - virtualNetworkType: "External", - zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInZones.json - */ -async function apiManagementCreateServiceInZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceSkuv2Service.json - */ -async function apiManagementCreateServiceSkuv2Service() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "StandardV2", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json - */ -async function apiManagementCreateServiceWithCustomHostnameKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "ConfigurationApi", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "configuration-api.msitesting.net", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithDeveloperPortal.json - */ -async function apiManagementCreateServiceWithDeveloperPortal() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - developerPortalStatus: "Enabled", - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json - */ -async function apiManagementCreateServiceWithNatGatewayEnabled() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithSystemCertificates.json - */ -async function apiManagementCreateServiceWithSystemCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority", - }, - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json - */ -async function apiManagementCreateServiceWithUserAssignedIdentity() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": - {}, - }, - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json - */ -async function apiManagementCreateServiceWithoutLegacyConfigurationApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - configurationApi: { legacyApi: "Disabled" }, - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUndelete.json - */ -async function apiManagementUndelete() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateMultiRegionServiceWithCustomHostname(); - await apiManagementCreateService(); - await apiManagementCreateServiceHavingMsi(); - await apiManagementCreateServiceInVnetWithPublicIP(); - await apiManagementCreateServiceInZones(); - await apiManagementCreateServiceSkuv2Service(); - await apiManagementCreateServiceWithCustomHostnameKeyVault(); - await apiManagementCreateServiceWithDeveloperPortal(); - await apiManagementCreateServiceWithNatGatewayEnabled(); - await apiManagementCreateServiceWithSystemCertificates(); - await apiManagementCreateServiceWithUserAssignedIdentity(); - await apiManagementCreateServiceWithoutLegacyConfigurationApi(); - await apiManagementUndelete(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceDeleteSample.js deleted file mode 100644 index bbf9b69a3688..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes an existing API Management service. - * - * @summary Deletes an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json - */ -async function apiManagementServiceDeleteService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await apiManagementServiceDeleteService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js deleted file mode 100644 index 796ec4126d77..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. - * - * @summary Get the custom domain ownership identifier for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json - */ -async function apiManagementServiceGetDomainOwnershipIdentifier() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); -} - -async function main() { - await apiManagementServiceGetDomainOwnershipIdentifier(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSample.js deleted file mode 100644 index 69cd5c9de55a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSample.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json - */ -async function apiManagementServiceGetMultiRegionInternalVnet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get(resourceGroupName, serviceName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json - */ -async function apiManagementServiceGetService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get(resourceGroupName, serviceName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json - */ -async function apiManagementServiceGetServiceHavingMsi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementServiceGetMultiRegionInternalVnet(); - await apiManagementServiceGetService(); - await apiManagementServiceGetServiceHavingMsi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSsoTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSsoTokenSample.js deleted file mode 100644 index e0c8fab034b3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceGetSsoTokenSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @summary Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json - */ -async function apiManagementServiceGetSsoToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementServiceGetSsoToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListByResourceGroupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListByResourceGroupSample.js deleted file mode 100644 index 73e3208fefa5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all API Management services within a resource group. - * - * @summary List all API Management services within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json - */ -async function apiManagementListServiceBySubscriptionAndResourceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementService.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListServiceBySubscriptionAndResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListSample.js deleted file mode 100644 index 44d496c0a035..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all API Management services within an Azure subscription. - * - * @summary Lists all API Management services within an Azure subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json - */ -async function apiManagementListServiceBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListServiceBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceMigrateToStv2Sample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceMigrateToStv2Sample.js deleted file mode 100644 index 9a7b04f24f65..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceMigrateToStv2Sample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. - * - * @summary Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json - */ -async function apiManagementMigrateService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { mode: "PreserveIp" }; - const options = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementMigrateService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceRestoreSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceRestoreSample.js deleted file mode 100644 index 83310697de73..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceRestoreSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @summary Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json - */ -async function apiManagementRestoreService() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementRestoreService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js deleted file mode 100644 index 83ec258b7f7d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management service - * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json - */ -async function apiManagementListSkUsConsumption() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management service - * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Dedicated.json - */ -async function apiManagementListSkUsDedicated() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListSkUsConsumption(); - await apiManagementListSkUsDedicated(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceUpdateSample.js deleted file mode 100644 index 9f6c13e97d8a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementServiceUpdateSample.js +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json - */ -async function apiManagementUpdateServiceDisableTls10() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServicePublisherDetails.json - */ -async function apiManagementUpdateServicePublisherDetails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json - */ -async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters = { - additionalLocations: [ - { - location: "Australia East", - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default", - }, - zones: ["1", "2", "3"], - }, - ], - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2", - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateServiceDisableTls10(); - await apiManagementUpdateServicePublisherDetails(); - await apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementSkusListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementSkusListSample.js deleted file mode 100644 index dad1287cb1c1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementSkusListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * - * @summary Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json - */ -async function listsAllAvailableResourceSkUs() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await listsAllAvailableResourceSkUs(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinkGetSample.js deleted file mode 100644 index 1920df9e5e21..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinkGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets an API Management WorkspaceLink resource description. - * - * @summary Gets an API Management WorkspaceLink resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json - */ -async function apiManagementGetWorkspaceLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; - const workspaceId = "wk-1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementWorkspaceLink.get( - resourceGroupName, - serviceName, - workspaceId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinksListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinksListByServiceSample.js deleted file mode 100644 index 9062e5ace2a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiManagementWorkspaceLinksListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List all API Management workspaceLinks for a service. - * - * @summary List all API Management workspaceLinks for a service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json - */ -async function apiManagementListGatewayConfigConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementWorkspaceLinks.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationCreateOrUpdateSample.js deleted file mode 100644 index 39ce1d8178dc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationCreateOrUpdateSample.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. - * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json - */ -async function apiManagementCreateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [{ contentType: "application/xml" }, { contentType: "application/json" }], - statusCode: 200, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationDeleteSample.js deleted file mode 100644 index 8e89062ce063..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json - */ -async function apiManagementDeleteApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetEntityTagSample.js deleted file mode 100644 index cc9cdd8a46f7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json - */ -async function apiManagementHeadApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetSample.js deleted file mode 100644 index 9b91dfd96e65..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationGetSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json - */ -async function apiManagementGetApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get(resourceGroupName, serviceName, apiId, operationId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json - */ -async function apiManagementGetApiOperationPetStore() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get(resourceGroupName, serviceName, apiId, operationId); - console.log(result); -} - -async function main() { - await apiManagementGetApiOperation(); - await apiManagementGetApiOperationPetStore(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationListByApiSample.js deleted file mode 100644 index 861270dd348d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationListByApiSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json - */ -async function apiManagementListApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiOperation.listByApi(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyCreateOrUpdateSample.js deleted file mode 100644 index 962cc97603a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. - * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json - */ -async function apiManagementCreateApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - " ", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyDeleteSample.js deleted file mode 100644 index b20c5baeaa71..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json - */ -async function apiManagementDeleteApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetEntityTagSample.js deleted file mode 100644 index 2ce722fc0200..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json - */ -async function apiManagementHeadApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetSample.js deleted file mode 100644 index 04d4e7ff12d1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json - */ -async function apiManagementGetApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyListByOperationSample.js deleted file mode 100644 index 38669e8f0e1b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationPolicyListByOperationSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json - */ -async function apiManagementListApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -async function main() { - await apiManagementListApiOperationPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationUpdateSample.js deleted file mode 100644 index c59a8223ba7a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiOperationUpdateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. - * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json - */ -async function apiManagementUpdateApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], - }, - ], - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyCreateOrUpdateSample.js deleted file mode 100644 index a8f08bf1cb09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json - */ -async function apiManagementCreateApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - " ", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json - */ -async function apiManagementCreateApiPolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiPolicy(); - await apiManagementCreateApiPolicyNonXmlEncoded(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyDeleteSample.js deleted file mode 100644 index 72b10d33afec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json - */ -async function apiManagementDeleteApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetEntityTagSample.js deleted file mode 100644 index da556c70938b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json - */ -async function apiManagementHeadApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetSample.js deleted file mode 100644 index 48be56fed403..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json - */ -async function apiManagementGetApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get(resourceGroupName, serviceName, apiId, policyId); - console.log(result); -} - -async function main() { - await apiManagementGetApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyListByApiSample.js deleted file mode 100644 index 1e7c4e2e47f3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiPolicyListByApiSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json - */ -async function apiManagementListApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main() { - await apiManagementListApiPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiProductListByApisSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiProductListByApisSample.js deleted file mode 100644 index bd3cfd0944d3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiProductListByApisSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Products, which the API is part of. - * - * @summary Lists all Products, which the API is part of. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json - */ -async function apiManagementListApiProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiProduct.listByApis(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseCreateOrUpdateSample.js deleted file mode 100644 index e7b5f3e8312a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Release for the API. - * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json - */ -async function apiManagementCreateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseDeleteSample.js deleted file mode 100644 index 221fa465c0dd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json - */ -async function apiManagementDeleteApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetEntityTagSample.js deleted file mode 100644 index b55ea04b47a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json - */ -async function apiManagementHeadApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetSample.js deleted file mode 100644 index 4fdb80280ede..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json - */ -async function apiManagementGetApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get(resourceGroupName, serviceName, apiId, releaseId); - console.log(result); -} - -async function main() { - await apiManagementGetApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseListByServiceSample.js deleted file mode 100644 index 49135d253df9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseListByServiceSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json - */ -async function apiManagementListApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiRelease.listByService(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiReleases(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseUpdateSample.js deleted file mode 100644 index 2faf8d3ff3b6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiReleaseUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. - * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json - */ -async function apiManagementUpdateApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiRevisionListByServiceSample.js deleted file mode 100644 index aea38004d38a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiRevisionListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json - */ -async function apiManagementListApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaCreateOrUpdateSample.js deleted file mode 100644 index 2a54b71578a2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates schema configuration for the API. - * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json - */ -async function apiManagementCreateApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaDeleteSample.js deleted file mode 100644 index 0c9a484d16b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json - */ -async function apiManagementDeleteApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetEntityTagSample.js deleted file mode 100644 index b2266600bc81..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json - */ -async function apiManagementHeadApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetSample.js deleted file mode 100644 index 81333365c88d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json - */ -async function apiManagementGetApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get(resourceGroupName, serviceName, apiId, schemaId); - console.log(result); -} - -async function main() { - await apiManagementGetApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaListByApiSample.js deleted file mode 100644 index 9c3230086281..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiSchemaListByApiSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json - */ -async function apiManagementListApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiSchema.listByApi(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionCreateOrUpdateSample.js deleted file mode 100644 index c5b4aaabbd8a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create/Update tag description in scope of the Api. - * - * @summary Create/Update tag description in scope of the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json - */ -async function apiManagementCreateApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionDeleteSample.js deleted file mode 100644 index 6d94efa96f84..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete tag description for the Api. - * - * @summary Delete tag description for the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json - */ -async function apiManagementDeleteApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetEntityTagSample.js deleted file mode 100644 index af267ae0d2d7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json - */ -async function apiManagementHeadApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetSample.js deleted file mode 100644 index 417b4bf95fe2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Tag description in scope of API - * - * @summary Get Tag description in scope of API - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json - */ -async function apiManagementGetApiTagDescription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionListByServiceSample.js deleted file mode 100644 index c4fec204f3b4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiTagDescriptionListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * - * @summary Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json - */ -async function apiManagementListApiTagDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiTagDescriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiUpdateSample.js deleted file mode 100644 index 32c0839aa9d5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified API of the API Management service instance. - * - * @summary Updates the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json - */ -async function apiManagementUpdateApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetCreateOrUpdateSample.js deleted file mode 100644 index f4b37ae707f8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a Api Version Set. - * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json - */ -async function apiManagementCreateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetDeleteSample.js deleted file mode 100644 index 6f0acb0745ff..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json - */ -async function apiManagementDeleteApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetEntityTagSample.js deleted file mode 100644 index bb88c3265a98..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json - */ -async function apiManagementHeadApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetSample.js deleted file mode 100644 index 88a773ef551d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json - */ -async function apiManagementGetApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get(resourceGroupName, serviceName, versionSetId); - console.log(result); -} - -async function main() { - await apiManagementGetApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetListByServiceSample.js deleted file mode 100644 index eff66ebb505a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. - * - * @summary Lists a collection of API Version Sets in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json - */ -async function apiManagementListApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiVersionSet.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiVersionSets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetUpdateSample.js deleted file mode 100644 index 37ecab743de5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiVersionSetUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. - * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json - */ -async function apiManagementUpdateApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiCreateOrUpdateSample.js deleted file mode 100644 index f7290766fba7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. - * - * @summary Creates a new Wiki for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json - */ -async function apiManagementCreateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiDeleteSample.js deleted file mode 100644 index a913a7d586a0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Wiki from an API. - * - * @summary Deletes the specified Wiki from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json - */ -async function apiManagementDeleteApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete(resourceGroupName, serviceName, apiId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetEntityTagSample.js deleted file mode 100644 index 2f1db7de713b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json - */ -async function apiManagementHeadApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main() { - await apiManagementHeadApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetSample.js deleted file mode 100644 index 43a012e92267..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. - * - * @summary Gets the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json - */ -async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main() { - await apiManagementGetApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiUpdateSample.js deleted file mode 100644 index 6d303ed7b782..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikiUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. - * - * @summary Updates the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json - */ -async function apiManagementUpdateApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters = { - documents: [{ documentationId: "docId1" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikisListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikisListSample.js deleted file mode 100644 index b476998e8234..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/apiWikisListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the wikis for an API specified by its identifier. - * - * @summary Gets the wikis for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json - */ -async function apiManagementListApiWikis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiWikis.list(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiWikis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyCreateOrUpdateSample.js deleted file mode 100644 index f0ce83fd6c87..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates Authorization Access Policy. - * - * @summary Creates or updates Authorization Access Policy. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json - */ -async function apiManagementCreateAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters = { - appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyDeleteSample.js deleted file mode 100644 index b42eb466ec01..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific access policy from the Authorization. - * - * @summary Deletes specific access policy from the Authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json - */ -async function apiManagementDeleteAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyGetSample.js deleted file mode 100644 index 4981b2b4a7c5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. - * - * @summary Gets the details of the authorization access policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json - */ -async function apiManagementGetAuthorizationAccessPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyListByAuthorizationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyListByAuthorizationSample.js deleted file mode 100644 index 1cf40fb91702..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationAccessPolicyListByAuthorizationSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. - * - * @summary Lists a collection of authorization access policy defined within a authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json - */ -async function apiManagementListAuthorizationAccessPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListAuthorizationAccessPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationConfirmConsentCodeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationConfirmConsentCodeSample.js deleted file mode 100644 index 4a5130e68ab5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationConfirmConsentCodeSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. - * - * @summary Confirm valid consent code to suppress Authorizations anti-phishing page. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json - */ -async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters = { - consentCode: "theconsentcode", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementPostAuthorizationConfirmConsentCodeRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationCreateOrUpdateSample.js deleted file mode 100644 index bdecd8cd9a6f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationCreateOrUpdateSample.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates authorization. - * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json - */ -async function apiManagementCreateAuthorizationAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization. - * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json - */ -async function apiManagementCreateAuthorizationAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateAuthorizationAadAuthCode(); - await apiManagementCreateAuthorizationAadClientCred(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationDeleteSample.js deleted file mode 100644 index 36b1381dd7a9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. - * - * @summary Deletes specific Authorization from the Authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json - */ -async function apiManagementDeleteAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationGetSample.js deleted file mode 100644 index 2151275c788c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the authorization specified by its identifier. - * - * @summary Gets the details of the authorization specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json - */ -async function apiManagementGetAuthorization() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationListByAuthorizationProviderSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationListByAuthorizationProviderSample.js deleted file mode 100644 index dbef47ece8aa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationListByAuthorizationProviderSample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. - * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json - */ -async function apiManagementListAuthorizationsAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. - * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsClientCred.json - */ -async function apiManagementListAuthorizationsClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListAuthorizationsAuthCode(); - await apiManagementListAuthorizationsClientCred(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationLoginLinksPostSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationLoginLinksPostSample.js deleted file mode 100644 index 13d08fd88ef7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationLoginLinksPostSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets authorization login links. - * - * @summary Gets authorization login links. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json - */ -async function apiManagementGetAuthorizationLoginRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters = { - postLoginRedirectUrl: "https://www.bing.com/", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationLoginLinks.post( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementGetAuthorizationLoginRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderCreateOrUpdateSample.js deleted file mode 100644 index fe49593c9338..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderCreateOrUpdateSample.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json - */ -async function apiManagementCreateAuthorizationProviderAadAuthCode() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const parameters = { - displayName: "aadwithauthcode", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json - */ -async function apiManagementCreateAuthorizationProviderAadClientCred() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const parameters = { - displayName: "aadwithclientcred", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json - */ -async function apiManagementCreateAuthorizationProviderGenericOAuth2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "eventbrite"; - const parameters = { - displayName: "eventbrite", - identityProvider: "oauth2", - oauth2: { - grantTypes: { - authorizationCode: { - authorizationUrl: "https://www.eventbrite.com/oauth/authorize", - clientId: "clientid", - clientSecret: "clientsecretvalue", - refreshUrl: "https://www.eventbrite.com/oauth/token", - scopes: undefined, - tokenUrl: "https://www.eventbrite.com/oauth/token", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json - */ -async function apiManagementCreateAuthorizationProviderOobGoogle() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "google"; - const parameters = { - displayName: "google", - identityProvider: "google", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", - clientSecret: "clientsecretvalue", - scopes: - "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateAuthorizationProviderAadAuthCode(); - await apiManagementCreateAuthorizationProviderAadClientCred(); - await apiManagementCreateAuthorizationProviderGenericOAuth2(); - await apiManagementCreateAuthorizationProviderOobGoogle(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderDeleteSample.js deleted file mode 100644 index bda2e76be18f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. - * - * @summary Deletes specific authorization provider from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json - */ -async function apiManagementDeleteAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteAuthorizationProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderGetSample.js deleted file mode 100644 index e3abb898ff13..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. - * - * @summary Gets the details of the authorization provider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json - */ -async function apiManagementGetAuthorizationProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.get( - resourceGroupName, - serviceName, - authorizationProviderId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetAuthorizationProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderListByServiceSample.js deleted file mode 100644 index 2a4e7e00d8a4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationProviderListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. - * - * @summary Lists a collection of authorization providers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json - */ -async function apiManagementListAuthorizationProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationProvider.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListAuthorizationProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerCreateOrUpdateSample.js deleted file mode 100644 index ff3d497a0116..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerCreateOrUpdateSample.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. - * - * @summary Creates new authorization server or updates an existing authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json - */ -async function apiManagementCreateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const parameters = { - description: "test server", - authorizationEndpoint: "https://www.contoso.com/oauth2/auth", - authorizationMethods: ["GET"], - bearerTokenSendingMethods: ["authorizationHeader"], - clientId: "1", - clientRegistrationEndpoint: "https://www.contoso.com/apps", - clientSecret: "2", - defaultScope: "read write", - displayName: "test2", - grantTypes: ["authorizationCode", "implicit"], - resourceOwnerPassword: "pwd", - resourceOwnerUsername: "un", - supportState: true, - tokenEndpoint: "https://www.contoso.com/oauth2/token", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.createOrUpdate( - resourceGroupName, - serviceName, - authsid, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerDeleteSample.js deleted file mode 100644 index 465b9714ff65..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific authorization server instance. - * - * @summary Deletes specific authorization server instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json - */ -async function apiManagementDeleteAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.delete( - resourceGroupName, - serviceName, - authsid, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetEntityTagSample.js deleted file mode 100644 index 592e30443026..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json - */ -async function apiManagementHeadAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.getEntityTag( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetSample.js deleted file mode 100644 index 254e450db426..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. - * - * @summary Gets the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json - */ -async function apiManagementGetAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.get(resourceGroupName, serviceName, authsid); - console.log(result); -} - -async function main() { - await apiManagementGetAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListByServiceSample.js deleted file mode 100644 index d2cdb272f1d5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. - * - * @summary Lists a collection of authorization servers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json - */ -async function apiManagementListAuthorizationServers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationServer.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListAuthorizationServers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListSecretsSample.js deleted file mode 100644 index d6d16cab1fbf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerListSecretsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the client secret details of the authorization server. - * - * @summary Gets the client secret details of the authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json - */ -async function apiManagementAuthorizationServerListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.listSecrets( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); -} - -async function main() { - await apiManagementAuthorizationServerListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerUpdateSample.js deleted file mode 100644 index 39389c621e29..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/authorizationServerUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. - * - * @summary Updates the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json - */ -async function apiManagementUpdateAuthorizationServer() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const ifMatch = "*"; - const parameters = { - clientId: "update", - clientSecret: "updated", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.update( - resourceGroupName, - serviceName, - authsid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendCreateOrUpdateSample.js deleted file mode 100644 index 585f78d60815..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendCreateOrUpdateSample.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json - */ -async function apiManagementCreateBackendProxyBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] }, - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendServiceFabric.json - */ -async function apiManagementCreateBackendServiceFabric() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const parameters = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1", - }, - ], - }, - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateBackendProxyBackend(); - await apiManagementCreateBackendServiceFabric(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendDeleteSample.js deleted file mode 100644 index fe2d81c4c086..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json - */ -async function apiManagementDeleteBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.delete(resourceGroupName, serviceName, backendId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetEntityTagSample.js deleted file mode 100644 index eb2a85ea8adf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json - */ -async function apiManagementHeadBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.getEntityTag(resourceGroupName, serviceName, backendId); - console.log(result); -} - -async function main() { - await apiManagementHeadBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetSample.js deleted file mode 100644 index ae95a45fba29..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json - */ -async function apiManagementGetBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.get(resourceGroupName, serviceName, backendId); - console.log(result); -} - -async function main() { - await apiManagementGetBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendListByServiceSample.js deleted file mode 100644 index 97216a5b13e3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of backends in the specified service instance. - * - * @summary Lists a collection of backends in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json - */ -async function apiManagementListBackends() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.backend.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListBackends(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendReconnectSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendReconnectSample.js deleted file mode 100644 index c7fc7a48242d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendReconnectSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @summary Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json - */ -async function apiManagementBackendReconnect() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters = { after: "PT3S" }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.reconnect(resourceGroupName, serviceName, backendId, options); - console.log(result); -} - -async function main() { - await apiManagementBackendReconnect(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendUpdateSample.js deleted file mode 100644 index e9d82fa1f5df..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/backendUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing backend. - * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json - */ -async function apiManagementUpdateBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.update( - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheCreateOrUpdateSample.js deleted file mode 100644 index 449201a49a62..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. - * - * @summary Creates or updates an External Cache to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json - */ -async function apiManagementCreateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const parameters = { - description: "Redis cache instances in West India", - connectionString: "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", - resourceId: - "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", - useFromLocation: "default", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.createOrUpdate( - resourceGroupName, - serviceName, - cacheId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheDeleteSample.js deleted file mode 100644 index 63416706c66a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Cache. - * - * @summary Deletes specific Cache. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json - */ -async function apiManagementDeleteCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "southindia"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.delete(resourceGroupName, serviceName, cacheId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetEntityTagSample.js deleted file mode 100644 index d777e7406b13..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json - */ -async function apiManagementHeadCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.getEntityTag(resourceGroupName, serviceName, cacheId); - console.log(result); -} - -async function main() { - await apiManagementHeadCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetSample.js deleted file mode 100644 index a9cbdc203a11..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Cache specified by its identifier. - * - * @summary Gets the details of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json - */ -async function apiManagementGetCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.get(resourceGroupName, serviceName, cacheId); - console.log(result); -} - -async function main() { - await apiManagementGetCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheListByServiceSample.js deleted file mode 100644 index 7a5887d3a500..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. - * - * @summary Lists a collection of all external Caches in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json - */ -async function apiManagementListCaches() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.cache.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListCaches(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheUpdateSample.js deleted file mode 100644 index eb5fb8c48725..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/cacheUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the cache specified by its identifier. - * - * @summary Updates the details of the cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json - */ -async function apiManagementUpdateCache() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const ifMatch = "*"; - const parameters = { useFromLocation: "westindia" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.update( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateCreateOrUpdateSample.js deleted file mode 100644 index c61764f980a3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json - */ -async function apiManagementCreateCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const parameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json - */ -async function apiManagementCreateCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const parameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateCertificate(); - await apiManagementCreateCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateDeleteSample.js deleted file mode 100644 index 44731b0673d0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json - */ -async function apiManagementDeleteCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.delete( - resourceGroupName, - serviceName, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetEntityTagSample.js deleted file mode 100644 index 9fec3e013065..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json - */ -async function apiManagementHeadCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.getEntityTag( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetSample.js deleted file mode 100644 index 58e25b76d3da..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json - */ -async function apiManagementGetCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get(resourceGroupName, serviceName, certificateId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json - */ -async function apiManagementGetCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get(resourceGroupName, serviceName, certificateId); - console.log(result); -} - -async function main() { - await apiManagementGetCertificate(); - await apiManagementGetCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateListByServiceSample.js deleted file mode 100644 index db00801bdf62..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. - * - * @summary Lists a collection of all certificates in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json - */ -async function apiManagementListCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.certificate.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListCertificates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateRefreshSecretSample.js deleted file mode 100644 index c839aaf5d440..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/certificateRefreshSecretSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json - */ -async function apiManagementRefreshCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.refreshSecret( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementRefreshCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemCreateOrUpdateSample.js deleted file mode 100644 index d80b22d2e9ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. - * - * @summary Creates a new developer portal's content item specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json - */ -async function apiManagementCreateContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const parameters = { - properties: { - enUs: { - description: "Short story about the company.", - documentId: "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - keywords: "company, about", - permalink: "/about", - title: "About", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemDeleteSample.js deleted file mode 100644 index 3f1d076fc63b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the specified developer portal's content item. - * - * @summary Removes the specified developer portal's content item. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json - */ -async function apiManagementDeleteContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.delete( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetEntityTagSample.js deleted file mode 100644 index 56521374a378..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * - * @summary Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json - */ -async function apiManagementHeadContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.getEntityTag( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetSample.js deleted file mode 100644 index d3f4c4145829..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. - * - * @summary Returns the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json - */ -async function apiManagementGetContentTypeContentItem() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.get( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemListByServiceSample.js deleted file mode 100644 index 4c216c9fa2b3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentItemListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. - * - * @summary Lists developer portal's content items specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json - */ -async function apiManagementListContentTypeContentItems() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.contentItem.listByService( - resourceGroupName, - serviceName, - contentTypeId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListContentTypeContentItems(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeCreateOrUpdateSample.js deleted file mode 100644 index d74439bcc98b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeCreateOrUpdateSample.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - * - * @summary Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json - */ -async function apiManagementCreateContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const parameters = { - namePropertiesName: "Page", - schema: { - additionalProperties: false, - properties: { - en_us: { - type: "object", - additionalProperties: false, - properties: { - description: { - type: "string", - description: "Page description. This property gets included in SEO attributes.", - indexed: true, - title: "Description", - }, - documentId: { - type: "string", - description: "Reference to page content document.", - title: "Document ID", - }, - keywords: { - type: "string", - description: "Page keywords. This property gets included in SEO attributes.", - indexed: true, - title: "Keywords", - }, - permalink: { - type: "string", - description: "Page permalink, e.g. '/about'.", - indexed: true, - title: "Permalink", - }, - title: { - type: "string", - description: "Page title. This property gets included in SEO attributes.", - indexed: true, - title: "Title", - }, - }, - required: ["title", "permalink", "documentId"], - }, - }, - }, - description: "A regular page", - version: "1.0.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeDeleteSample.js deleted file mode 100644 index 43d4a9537b9d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * - * @summary Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json - */ -async function apiManagementDeleteContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.delete( - resourceGroupName, - serviceName, - contentTypeId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeGetSample.js deleted file mode 100644 index 02848cc0ac3d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json - */ -async function apiManagementGetContentType() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.get(resourceGroupName, serviceName, contentTypeId); - console.log(result); -} - -async function main() { - await apiManagementGetContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeListByServiceSample.js deleted file mode 100644 index 3099af9317ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/contentTypeListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json - */ -async function apiManagementListContentTypes() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.contentType.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListContentTypes(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsCreateOrUpdateSample.js deleted file mode 100644 index 6031fffee213..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update Delegation settings. - * - * @summary Create or Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json - */ -async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetEntityTagSample.js deleted file mode 100644 index 5dd23f3a84ed..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetEntityTagSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. - * - * @summary Gets the entity state (Etag) version of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json - */ -async function apiManagementHeadDelegationSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.getEntityTag(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementHeadDelegationSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetSample.js deleted file mode 100644 index 0240abc2c9f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Delegation Settings for the Portal. - * - * @summary Get Delegation Settings for the Portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json - */ -async function apiManagementPortalSettingsGetDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsGetDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsListSecretsSample.js deleted file mode 100644 index ae38d3561417..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsListSecretsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. - * - * @summary Gets the secret validation key of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json - */ -async function apiManagementListSecretsPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.listSecrets(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementListSecretsPortalSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsUpdateSample.js deleted file mode 100644 index 6269ff252479..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/delegationSettingsUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update Delegation settings. - * - * @summary Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json - */ -async function apiManagementPortalSettingsUpdateDelegation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesGetByNameSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesGetByNameSample.js deleted file mode 100644 index 3dffb8e91643..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesGetByNameSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get soft-deleted Api Management Service by name. - * - * @summary Get soft-deleted Api Management Service by name. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json - */ -async function apiManagementGetDeletedServiceByName() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.getByName(serviceName, location); - console.log(result); -} - -async function main() { - await apiManagementGetDeletedServiceByName(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesListBySubscriptionSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesListBySubscriptionSample.js deleted file mode 100644 index d5c9b8b4d4a9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. - * - * @summary Lists all soft-deleted services available for undelete for the given subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json - */ -async function apiManagementDeletedServicesListBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.deletedServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementDeletedServicesListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesPurgeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesPurgeSample.js deleted file mode 100644 index 724c8b6eca34..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/deletedServicesPurgeSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). - * - * @summary Purges Api Management Service (deletes it with no option to undelete). - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json - */ -async function apiManagementDeletedServicesPurge() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.beginPurgeAndWait(serviceName, location); - console.log(result); -} - -async function main() { - await apiManagementDeletedServicesPurge(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticCreateOrUpdateSample.js deleted file mode 100644 index ba1cdea1f521..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. - * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json - */ -async function apiManagementCreateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.createOrUpdate( - resourceGroupName, - serviceName, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticDeleteSample.js deleted file mode 100644 index 35e3722a78b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json - */ -async function apiManagementDeleteDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.delete( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetEntityTagSample.js deleted file mode 100644 index 4fa577a53ee9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json - */ -async function apiManagementHeadDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.getEntityTag(resourceGroupName, serviceName, diagnosticId); - console.log(result); -} - -async function main() { - await apiManagementHeadDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetSample.js deleted file mode 100644 index a55d7e1add96..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json - */ -async function apiManagementGetDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.get(resourceGroupName, serviceName, diagnosticId); - console.log(result); -} - -async function main() { - await apiManagementGetDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticListByServiceSample.js deleted file mode 100644 index 613a8571a92e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all diagnostics of the API Management service instance. - * - * @summary Lists all diagnostics of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json - */ -async function apiManagementListDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.diagnostic.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticUpdateSample.js deleted file mode 100644 index f72baf97912d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/diagnosticUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. - * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json - */ -async function apiManagementUpdateDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.update( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationCreateOrUpdateSample.js deleted file mode 100644 index 355ecf626363..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Documentation or updates an existing one. - * - * @summary Creates a new Documentation or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json - */ -async function apiManagementCreateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters = { - content: "content", - title: "Title", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.createOrUpdate( - resourceGroupName, - serviceName, - documentationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationDeleteSample.js deleted file mode 100644 index 25f4e92f177e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationDeleteSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Documentation from an API. - * - * @summary Deletes the specified Documentation from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json - */ -async function apiManagementDeleteDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.delete(resourceGroupName, serviceName, documentationId); - console.log(result); -} - -async function main() { - await apiManagementDeleteDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetEntityTagSample.js deleted file mode 100644 index ffccf06d8432..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. - * - * @summary Gets the entity state (Etag) version of the Documentation by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json - */ -async function apiManagementHeadDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.getEntityTag( - resourceGroupName, - serviceName, - documentationId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetSample.js deleted file mode 100644 index 6ec803e5e691..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. - * - * @summary Gets the details of the Documentation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json - */ -async function apiManagementGetDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.get(resourceGroupName, serviceName, documentationId); - console.log(result); -} - -async function main() { - await apiManagementGetDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationListByServiceSample.js deleted file mode 100644 index c5ba38af55a2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Documentations of the API Management service instance. - * - * @summary Lists all Documentations of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json - */ -async function apiManagementListApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.documentation.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationUpdateSample.js deleted file mode 100644 index 82c01c912d3c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/documentationUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. - * - * @summary Updates the details of the Documentation for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json - */ -async function apiManagementUpdateDocumentation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters = { - content: "content updated", - title: "Title updated", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.update( - resourceGroupName, - serviceName, - documentationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateCreateOrUpdateSample.js deleted file mode 100644 index ff6906740cf4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an Email Template. - * - * @summary Updates an Email Template. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json - */ -async function apiManagementCreateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const parameters = { - subject: "Your request for $IssueName was successfully received.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.createOrUpdate( - resourceGroupName, - serviceName, - templateName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateDeleteSample.js deleted file mode 100644 index 60205677c314..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. - * - * @summary Reset the Email Template to default template provided by the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json - */ -async function apiManagementDeleteTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.delete( - resourceGroupName, - serviceName, - templateName, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetEntityTagSample.js deleted file mode 100644 index 48cc4774392b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json - */ -async function apiManagementHeadEmailTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.getEntityTag( - resourceGroupName, - serviceName, - templateName, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadEmailTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetSample.js deleted file mode 100644 index eb1d6cc39d8f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the email template specified by its identifier. - * - * @summary Gets the details of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json - */ -async function apiManagementGetTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.get(resourceGroupName, serviceName, templateName); - console.log(result); -} - -async function main() { - await apiManagementGetTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateListByServiceSample.js deleted file mode 100644 index f320cce4859b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all email templates - * - * @summary Gets all email templates - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json - */ -async function apiManagementListTemplates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.emailTemplate.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTemplates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateUpdateSample.js deleted file mode 100644 index 0d3729066200..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/emailTemplateUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates API Management email template - * - * @summary Updates API Management email template - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json - */ -async function apiManagementUpdateTemplate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const parameters = { - body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', - subject: "Your request $IssueName was received", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.update( - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiCreateOrUpdateSample.js deleted file mode 100644 index e331b6cbf86d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified Gateway. - * - * @summary Adds an API to the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json - */ -async function apiManagementCreateGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const parameters = { provisioningState: "created" }; - const options = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - apiId, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiDeleteSample.js deleted file mode 100644 index 27e33b90205e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified Gateway. - * - * @summary Deletes the specified API from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json - */ -async function apiManagementDeleteGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.delete(resourceGroupName, serviceName, gatewayId, apiId); - console.log(result); -} - -async function main() { - await apiManagementDeleteGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiGetEntityTagSample.js deleted file mode 100644 index c101169975d2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. - * - * @summary Checks that API entity specified by identifier is associated with the Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json - */ -async function apiManagementHeadGatewayApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "api1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - apiId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiListByServiceSample.js deleted file mode 100644 index 1f7d173be2ec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayApiListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. - * - * @summary Lists a collection of the APIs associated with a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json - */ -async function apiManagementListGatewayApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayApi.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewayApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js deleted file mode 100644 index df90188bab4f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. - * - * @summary Assign Certificate entity to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json - */ -async function apiManagementCreateGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const parameters = { isTrusted: false }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityDeleteSample.js deleted file mode 100644 index 245b75f24c06..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. - * - * @summary Remove relationship between Certificate Authority and Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json - */ -async function apiManagementDeleteGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.delete( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetEntityTagSample.js deleted file mode 100644 index bdd0d1dab0d8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * - * @summary Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json - */ -async function apiManagementHeadGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetSample.js deleted file mode 100644 index 791f77d5edf8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get assigned Gateway Certificate Authority details. - * - * @summary Get assigned Gateway Certificate Authority details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json - */ -async function apiManagementGetGatewayCertificateAuthority() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.get( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityListByServiceSample.js deleted file mode 100644 index d7f3e8067ec6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCertificateAuthorityListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. - * - * @summary Lists the collection of Certificate Authorities for the specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json - */ -async function apiManagementListGatewaycertificateAuthorities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayCertificateAuthority.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewaycertificateAuthorities(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCreateOrUpdateSample.js deleted file mode 100644 index bd9848f1aae8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. - * - * @summary Creates or updates a Gateway to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json - */ -async function apiManagementCreateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayDeleteSample.js deleted file mode 100644 index baeb28beb762..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Gateway. - * - * @summary Deletes specific Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json - */ -async function apiManagementDeleteGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.delete(resourceGroupName, serviceName, gatewayId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGenerateTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGenerateTokenSample.js deleted file mode 100644 index 3d3f9c811f3c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGenerateTokenSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. - * - * @summary Gets the Shared Access Authorization Token for the gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json - */ -async function apiManagementGatewayGenerateToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters = { - expiry: new Date("2020-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.generateToken( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayGenerateToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetEntityTagSample.js deleted file mode 100644 index a6c2974af105..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json - */ -async function apiManagementHeadGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "mygateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.getEntityTag(resourceGroupName, serviceName, gatewayId); - console.log(result); -} - -async function main() { - await apiManagementHeadGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetSample.js deleted file mode 100644 index c95f610c27c1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. - * - * @summary Gets the details of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json - */ -async function apiManagementGetGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.get(resourceGroupName, serviceName, gatewayId); - console.log(result); -} - -async function main() { - await apiManagementGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js deleted file mode 100644 index f1547c288a8e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. - * - * @summary Creates of updates hostname configuration for a Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json - */ -async function apiManagementCreateGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const parameters = { - certificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - hostname: "*", - http2Enabled: true, - negotiateClientCertificate: false, - tls10Enabled: false, - tls11Enabled: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - hcId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationDeleteSample.js deleted file mode 100644 index bc1ad05b4d0b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. - * - * @summary Deletes the specified hostname configuration from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json - */ -async function apiManagementDeleteGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.delete( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetEntityTagSample.js deleted file mode 100644 index d46ee5457830..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * - * @summary Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json - */ -async function apiManagementHeadGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetSample.js deleted file mode 100644 index 9ac3d41309ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get details of a hostname configuration - * - * @summary Get details of a hostname configuration - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json - */ -async function apiManagementGetGatewayHostnameConfiguration() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.get( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationListByServiceSample.js deleted file mode 100644 index 71ae864c9d09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayHostnameConfigurationListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. - * - * @summary Lists the collection of hostname configurations for the specified gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json - */ -async function apiManagementListGatewayHostnameConfigurations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayHostnameConfiguration.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGatewayHostnameConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayInvalidateDebugCredentialsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayInvalidateDebugCredentialsSample.js deleted file mode 100644 index 95884b65c947..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayInvalidateDebugCredentialsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Action is invalidating all debug credentials issued for gateway. - * - * @summary Action is invalidating all debug credentials issued for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json - */ -async function apiManagementGatewayInvalidateDebugCredentials() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.invalidateDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayInvalidateDebugCredentials(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListByServiceSample.js deleted file mode 100644 index f27b955f12f3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of gateways registered with service instance. - * - * @summary Lists a collection of gateways registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json - */ -async function apiManagementListGateways() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gateway.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGateways(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListDebugCredentialsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListDebugCredentialsSample.js deleted file mode 100644 index 48aad65d204b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListDebugCredentialsSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create new debug credentials for gateway. - * - * @summary Create new debug credentials for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json - */ -async function apiManagementGatewayListDebugCredentials() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - credentialsExpireAfter: "PT1H", - purposes: ["tracing"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayListDebugCredentials(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListKeysSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListKeysSample.js deleted file mode 100644 index ca9a6f4c3bfe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListKeysSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves gateway keys. - * - * @summary Retrieves gateway keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json - */ -async function apiManagementGatewayListKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listKeys(resourceGroupName, serviceName, gatewayId); - console.log(result); -} - -async function main() { - await apiManagementGatewayListKeys(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListTraceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListTraceSample.js deleted file mode 100644 index 6447454b454a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayListTraceSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Fetches trace collected by gateway. - * - * @summary Fetches trace collected by gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json - */ -async function apiManagementGatewayListTrace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters = { - traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listTrace( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayListTrace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayRegenerateKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayRegenerateKeySample.js deleted file mode 100644 index f028c3ecda66..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayRegenerateKeySample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. - * - * @summary Regenerates specified gateway key invalidating any tokens created with it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json - */ -async function apiManagementGatewayRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gwId"; - const parameters = { - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.regenerateKey( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementGatewayRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayUpdateSample.js deleted file mode 100644 index 46f05e203eb9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/gatewayUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the gateway specified by its identifier. - * - * @summary Updates the details of the gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json - */ -async function apiManagementUpdateGateway() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const parameters = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.update( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaCreateOrUpdateSample.js deleted file mode 100644 index a038be977193..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaCreateOrUpdateSample.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json - */ -async function apiManagementCreateSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json - */ -async function apiManagementCreateSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters = { - description: "sample schema description", - document: { - type: "object", - $id: "https://example.com/person.schema.json", - $schema: "https://json-schema.org/draft/2020-12/schema", - properties: { - age: { - type: "integer", - description: "Age in years which must be equal to or greater than zero.", - minimum: 0, - }, - firstName: { type: "string", description: "The person's first name." }, - lastName: { type: "string", description: "The person's last name." }, - }, - title: "Person", - }, - schemaType: "json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateSchema1(); - await apiManagementCreateSchema2(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaDeleteSample.js deleted file mode 100644 index 425d4d414e28..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json - */ -async function apiManagementDeleteSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.delete( - resourceGroupName, - serviceName, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetEntityTagSample.js deleted file mode 100644 index 6e159da39db6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json - */ -async function apiManagementHeadApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.getEntityTag(resourceGroupName, serviceName, schemaId); - console.log(result); -} - -async function main() { - await apiManagementHeadApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetSample.js deleted file mode 100644 index f022aa095fad..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json - */ -async function apiManagementGetSchema1() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get(resourceGroupName, serviceName, schemaId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json - */ -async function apiManagementGetSchema2() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get(resourceGroupName, serviceName, schemaId); - console.log(result); -} - -async function main() { - await apiManagementGetSchema1(); - await apiManagementGetSchema2(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaListByServiceSample.js deleted file mode 100644 index 07fa4904d2b5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/globalSchemaListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of schemas registered with service instance. - * - * @summary Lists a collection of schemas registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json - */ -async function apiManagementListSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.globalSchema.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverCreateOrUpdateSample.js deleted file mode 100644 index 15f003a7fc5a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. - * - * @summary Creates a new resolver in the GraphQL API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json - */ -async function apiManagementCreateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "someAPI"; - const resolverId = "newResolver"; - const parameters = { - path: "Query/users", - description: "A GraphQL Resolver example", - displayName: "Query Users", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverDeleteSample.js deleted file mode 100644 index 9a7fd8728831..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. - * - * @summary Deletes the specified resolver in the GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json - */ -async function apiManagementDeleteGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetEntityTagSample.js deleted file mode 100644 index 1548a27a4378..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json - */ -async function apiManagementHeadGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetSample.js deleted file mode 100644 index 13ae9cc3af74..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. - * - * @summary Gets the details of the GraphQL API Resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json - */ -async function apiManagementGetGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverListByApiSample.js deleted file mode 100644 index f22696cd50a2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverListByApiSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. - * - * @summary Lists a collection of the resolvers for the specified GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json - */ -async function apiManagementListGraphQlApiResolvers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolver.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGraphQlApiResolvers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyCreateOrUpdateSample.js deleted file mode 100644 index ce8db4928b4b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. - * - * @summary Creates or updates policy configuration for the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json - */ -async function apiManagementCreateGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const resolverId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - 'GET/api/users', - }; - const options = { - ifMatch, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyDeleteSample.js deleted file mode 100644 index d1257974ded5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. - * - * @summary Deletes the policy configuration at the GraphQL Api Resolver. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json - */ -async function apiManagementDeleteGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const resolverId = "testResolver"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetEntityTagSample.js deleted file mode 100644 index f6b1a3a159d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json - */ -async function apiManagementHeadGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetSample.js deleted file mode 100644 index d5388c2275fe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. - * - * @summary Get the policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json - */ -async function apiManagementGetGraphQlApiResolverPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyListByResolverSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyListByResolverSample.js deleted file mode 100644 index 04c09e4fd486..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverPolicyListByResolverSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. - * - * @summary Get the list of policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json - */ -async function apiManagementListGraphQlApiResolverPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const resolverId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolverPolicy.listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGraphQlApiResolverPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverUpdateSample.js deleted file mode 100644 index 72bf5a539b54..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/graphQlApiResolverUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. - * - * @summary Updates the details of the resolver in the GraphQL API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json - */ -async function apiManagementUpdateGraphQlApiResolver() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const resolverId = "resolverId"; - const ifMatch = "*"; - const parameters = { - path: "Query/adminUsers", - description: "A GraphQL Resolver example", - displayName: "Query AdminUsers", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.update( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupCreateOrUpdateSample.js deleted file mode 100644 index 648eb8dce412..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupCreateOrUpdateSample.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json - */ -async function apiManagementCreateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const parameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupExternal.json - */ -async function apiManagementCreateGroupExternal() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const parameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateGroup(); - await apiManagementCreateGroupExternal(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupDeleteSample.js deleted file mode 100644 index e23c98083294..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific group of the API Management service instance. - * - * @summary Deletes specific group of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json - */ -async function apiManagementDeleteGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.delete(resourceGroupName, serviceName, groupId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetEntityTagSample.js deleted file mode 100644 index b6cac1c5d7a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json - */ -async function apiManagementHeadGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.getEntityTag(resourceGroupName, serviceName, groupId); - console.log(result); -} - -async function main() { - await apiManagementHeadGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetSample.js deleted file mode 100644 index a9585ce198f4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json - */ -async function apiManagementGetGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.get(resourceGroupName, serviceName, groupId); - console.log(result); -} - -async function main() { - await apiManagementGetGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupListByServiceSample.js deleted file mode 100644 index 84dbb65ace1b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of groups defined within a service instance. - * - * @summary Lists a collection of groups defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json - */ -async function apiManagementListGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.group.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUpdateSample.js deleted file mode 100644 index 513593ae5841..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the group specified by its identifier. - * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json - */ -async function apiManagementUpdateGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.update( - resourceGroupName, - serviceName, - groupId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCheckEntityExistsSample.js deleted file mode 100644 index 0d580b5d85cb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCheckEntityExistsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json - */ -async function apiManagementHeadGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.checkEntityExists( - resourceGroupName, - serviceName, - groupId, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCreateSample.js deleted file mode 100644 index 1aba6ff34e2f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserCreateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json - */ -async function apiManagementCreateGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.create(resourceGroupName, serviceName, groupId, userId); - console.log(result); -} - -async function main() { - await apiManagementCreateGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserDeleteSample.js deleted file mode 100644 index feff4453be3b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json - */ -async function apiManagementDeleteGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.delete(resourceGroupName, serviceName, groupId, userId); - console.log(result); -} - -async function main() { - await apiManagementDeleteGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserListSample.js deleted file mode 100644 index 01b5f6eed07f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/groupUserListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json - */ -async function apiManagementListGroupUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.groupUser.list(resourceGroupName, serviceName, groupId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListGroupUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderCreateOrUpdateSample.js deleted file mode 100644 index f5d3793c4472..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. - * - * @summary Creates or Updates the IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json - */ -async function apiManagementCreateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const parameters = { - clientId: "facebookid", - clientSecret: "facebookapplicationsecret", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.createOrUpdate( - resourceGroupName, - serviceName, - identityProviderName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderDeleteSample.js deleted file mode 100644 index 804250d6c781..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified identity provider configuration. - * - * @summary Deletes the specified identity provider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json - */ -async function apiManagementDeleteIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aad"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.delete( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetEntityTagSample.js deleted file mode 100644 index d158a0cf1964..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json - */ -async function apiManagementHeadIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.getEntityTag( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetSample.js deleted file mode 100644 index 3d129b70a802..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. - * - * @summary Gets the configuration details of the identity Provider configured in specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json - */ -async function apiManagementGetIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.get( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main() { - await apiManagementGetIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListByServiceSample.js deleted file mode 100644 index 661f4beacc58..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. - * - * @summary Lists a collection of Identity Provider configured in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json - */ -async function apiManagementListIdentityProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.identityProvider.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListIdentityProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListSecretsSample.js deleted file mode 100644 index fc53e2bc6e47..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderListSecretsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the client secret details of the Identity Provider. - * - * @summary Gets the client secret details of the Identity Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json - */ -async function apiManagementIdentityProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.listSecrets( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main() { - await apiManagementIdentityProviderListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderUpdateSample.js deleted file mode 100644 index 1a29e01587f5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/identityProviderUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing IdentityProvider configuration. - * - * @summary Updates an existing IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json - */ -async function apiManagementUpdateIdentityProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const ifMatch = "*"; - const parameters = { - clientId: "updatedfacebookid", - clientSecret: "updatedfacebooksecret", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.update( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueGetSample.js deleted file mode 100644 index f6fc5804af57..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets API Management issue details - * - * @summary Gets API Management issue details - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json - */ -async function apiManagementGetIssue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.issue.get(resourceGroupName, serviceName, issueId); - console.log(result); -} - -async function main() { - await apiManagementGetIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueListByServiceSample.js deleted file mode 100644 index 003a6bd1d487..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/issueListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of issues in the specified service instance. - * - * @summary Lists a collection of issues in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json - */ -async function apiManagementListIssues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.issue.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListIssues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerCreateOrUpdateSample.js deleted file mode 100644 index cc6efbc55ff2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerCreateOrUpdateSample.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json - */ -async function apiManagementCreateAiLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const parameters = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateEHLogger.json - */ -async function apiManagementCreateEhLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const parameters = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", - }, - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateAiLogger(); - await apiManagementCreateEhLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerDeleteSample.js deleted file mode 100644 index a44a67895c70..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json - */ -async function apiManagementDeleteLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.delete(resourceGroupName, serviceName, loggerId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetEntityTagSample.js deleted file mode 100644 index cade1b21838d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json - */ -async function apiManagementHeadLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.getEntityTag(resourceGroupName, serviceName, loggerId); - console.log(result); -} - -async function main() { - await apiManagementHeadLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetSample.js deleted file mode 100644 index 9332f44f9d74..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json - */ -async function apiManagementGetLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.get(resourceGroupName, serviceName, loggerId); - console.log(result); -} - -async function main() { - await apiManagementGetLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerListByServiceSample.js deleted file mode 100644 index d224f871ed5d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of loggers in the specified service instance. - * - * @summary Lists a collection of loggers in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json - */ -async function apiManagementListLoggers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.logger.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListLoggers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerUpdateSample.js deleted file mode 100644 index a767ef201d4e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/loggerUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing logger. - * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json - */ -async function apiManagementUpdateLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters = { - description: "updating description", - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.update( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueCreateOrUpdateSample.js deleted file mode 100644 index d72595ad3ec1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueCreateOrUpdateSample.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json - */ -async function apiManagementCreateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const parameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValueWithKeyVault.json - */ -async function apiManagementCreateNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const parameters = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", - }, - secret: true, - tags: ["foo", "bar"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateNamedValue(); - await apiManagementCreateNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueDeleteSample.js deleted file mode 100644 index 88805d450bd1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific named value from the API Management service instance. - * - * @summary Deletes specific named value from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json - */ -async function apiManagementDeleteNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.delete( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetEntityTagSample.js deleted file mode 100644 index 9023ef465425..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json - */ -async function apiManagementHeadNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.getEntityTag(resourceGroupName, serviceName, namedValueId); - console.log(result); -} - -async function main() { - await apiManagementHeadNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetSample.js deleted file mode 100644 index 18ea4066a576..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json - */ -async function apiManagementGetNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get(resourceGroupName, serviceName, namedValueId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json - */ -async function apiManagementGetNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get(resourceGroupName, serviceName, namedValueId); - console.log(result); -} - -async function main() { - await apiManagementGetNamedValue(); - await apiManagementGetNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListByServiceSample.js deleted file mode 100644 index a2240b5c4d7b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of named values defined within a service instance. - * - * @summary Lists a collection of named values defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json - */ -async function apiManagementListNamedValues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.namedValue.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListNamedValues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListValueSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListValueSample.js deleted file mode 100644 index dd6b762d2354..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueListValueSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json - */ -async function apiManagementNamedValueListValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.listValue(resourceGroupName, serviceName, namedValueId); - console.log(result); -} - -async function main() { - await apiManagementNamedValueListValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueRefreshSecretSample.js deleted file mode 100644 index fb790005daf3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueRefreshSecretSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json - */ -async function apiManagementRefreshNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -async function main() { - await apiManagementRefreshNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueUpdateSample.js deleted file mode 100644 index 75e2e8a27876..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/namedValueUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specific named value. - * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json - */ -async function apiManagementUpdateNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByLocationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByLocationSample.js deleted file mode 100644 index 7c2976dc279f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByLocationSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json - */ -async function apiManagementServiceGetNetworkStatusByLocation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const locationName = "North Central US"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByLocation( - resourceGroupName, - serviceName, - locationName, - ); - console.log(result); -} - -async function main() { - await apiManagementServiceGetNetworkStatusByLocation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByServiceSample.js deleted file mode 100644 index 542d93e672d2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/networkStatusListByServiceSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json - */ -async function apiManagementServiceGetNetworkStatus() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByService(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementServiceGetNetworkStatus(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationCreateOrUpdateSample.js deleted file mode 100644 index f643b969553b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationCreateOrUpdateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update API Management publisher notification. - * - * @summary Create or Update API Management publisher notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json - */ -async function apiManagementCreateNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationGetSample.js deleted file mode 100644 index 4a5e01cf39da..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json - */ -async function apiManagementGetNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.get(resourceGroupName, serviceName, notificationName); - console.log(result); -} - -async function main() { - await apiManagementGetNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationListByServiceSample.js deleted file mode 100644 index 41de9491bc92..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json - */ -async function apiManagementListNotifications() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.notification.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListNotifications(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCheckEntityExistsSample.js deleted file mode 100644 index 18462f3801ca..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCheckEntityExistsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json - */ -async function apiManagementHeadNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCreateOrUpdateSample.js deleted file mode 100644 index d05cf7b8d838..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json - */ -async function apiManagementCreateNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailDeleteSample.js deleted file mode 100644 index 5b1a1af6c219..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json - */ -async function apiManagementDeleteNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.delete( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailListByNotificationSample.js deleted file mode 100644 index c8e7aa0c6e3c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientEmailListByNotificationSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json - */ -async function apiManagementListNotificationRecipientEmails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementListNotificationRecipientEmails(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCheckEntityExistsSample.js deleted file mode 100644 index 9a37d9091e40..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCheckEntityExistsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json - */ -async function apiManagementHeadNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCreateOrUpdateSample.js deleted file mode 100644 index e7ed835521ff..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json - */ -async function apiManagementCreateNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserDeleteSample.js deleted file mode 100644 index 6da7bbc403d3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json - */ -async function apiManagementDeleteNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.delete( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserListByNotificationSample.js deleted file mode 100644 index b6074013f302..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/notificationRecipientUserListByNotificationSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json - */ -async function apiManagementListNotificationRecipientUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementListNotificationRecipientUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderCreateOrUpdateSample.js deleted file mode 100644 index 000b67bb22b5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the OpenID Connect Provider. - * - * @summary Creates or updates the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json - */ -async function apiManagementCreateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const parameters = { - clientId: "oidprovidertemplate3", - clientSecret: "x", - displayName: "templateoidprovider3", - metadataEndpoint: "https://oidprovider-template3.net", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.createOrUpdate( - resourceGroupName, - serviceName, - opid, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderDeleteSample.js deleted file mode 100644 index 29936ed1a6ee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @summary Deletes specific OpenID Connect Provider of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json - */ -async function apiManagementDeleteOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.delete( - resourceGroupName, - serviceName, - opid, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetEntityTagSample.js deleted file mode 100644 index 22a5c69c0912..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json - */ -async function apiManagementHeadOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.getEntityTag( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetSample.js deleted file mode 100644 index c09a92e16922..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. - * - * @summary Gets specific OpenID Connect Provider without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json - */ -async function apiManagementGetOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.get(resourceGroupName, serviceName, opid); - console.log(result); -} - -async function main() { - await apiManagementGetOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListByServiceSample.js deleted file mode 100644 index 962dc967ab10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists of all the OpenId Connect Providers. - * - * @summary Lists of all the OpenId Connect Providers. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json - */ -async function apiManagementListOpenIdConnectProviders() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.openIdConnectProvider.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListOpenIdConnectProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListSecretsSample.js deleted file mode 100644 index 0ec5654bec32..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderListSecretsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. - * - * @summary Gets the client secret details of the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json - */ -async function apiManagementOpenidConnectProviderListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.listSecrets( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); -} - -async function main() { - await apiManagementOpenidConnectProviderListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderUpdateSample.js deleted file mode 100644 index efc5ad7c1e03..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/openIdConnectProviderUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specific OpenID Connect Provider. - * - * @summary Updates the specific OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json - */ -async function apiManagementUpdateOpenIdConnectProvider() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const ifMatch = "*"; - const parameters = { - clientSecret: "updatedsecret", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.update( - resourceGroupName, - serviceName, - opid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationListByTagsSample.js deleted file mode 100644 index 81d79b6be627..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationListByTagsSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of operations associated with tags. - * - * @summary Lists a collection of operations associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json - */ -async function apiManagementListApiOperationsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operationOperations.listByTags( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiOperationsByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationStatusGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationStatusGetSample.js deleted file mode 100644 index 434f61500f01..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationStatusGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the current status of an async operation. - * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json - */ -async function getOperationStatus() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -async function main() { - await getOperationStatus(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationsResultsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationsResultsGetSample.js deleted file mode 100644 index aa0827432b13..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/operationsResultsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns operation results for long running operations executing DELETE or PATCH on the resource. - * - * @summary Returns operation results for long running operations executing DELETE or PATCH on the resource. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json - */ -async function apiManagementGetOperationResult() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const location = "westus2"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationsResults.get(location, operationId); - console.log(result); -} - -async function main() { - await apiManagementGetOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js deleted file mode 100644 index 10878a914a39..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * - * @summary Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json - */ -async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.outboundNetworkDependenciesEndpoints.listByService( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/package.json b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/package.json deleted file mode 100644 index b4debf10396a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-apimanagement-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=20.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/apimanagement/arm-apimanagement" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement", - "dependencies": { - "@azure/arm-apimanagement": "latest", - "dotenv": "latest", - "@azure/identity": "^4.9.0" - } -} diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/performConnectivityCheckAsyncSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/performConnectivityCheckAsyncSample.js deleted file mode 100644 index 8872919948ff..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/performConnectivityCheckAsyncSample.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json - */ -async function httpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams = { - destination: { address: "https://microsoft.com", port: 3306 }, - protocolConfiguration: { - httpConfiguration: { - method: "GET", - headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], - validStatusCodes: [200, 204], - }, - }, - source: { region: "northeurope" }, - protocol: "HTTPS", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheck.json - */ -async function tcpConnectivityCheck() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams = { - destination: { address: "8.8.8.8", port: 53 }, - preferredIPVersion: "IPv4", - source: { region: "northeurope" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -async function main() { - await httpConnectivityCheck(); - await tcpConnectivityCheck(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyCreateOrUpdateSample.js deleted file mode 100644 index 1592c37297a2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. - * - * @summary Creates or updates the global policy configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json - */ -async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const parameters = { - format: "xml", - value: - "\r\n \r\n \r\n \r\n \r\n \r\n", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.createOrUpdate( - resourceGroupName, - serviceName, - policyId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreatePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDeleteSample.js deleted file mode 100644 index b2618e769344..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. - * - * @summary Deletes the global policy configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json - */ -async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.delete(resourceGroupName, serviceName, policyId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeletePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDescriptionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDescriptionListByServiceSample.js deleted file mode 100644 index 4af6dc7897e1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyDescriptionListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all policy descriptions. - * - * @summary Lists all policy descriptions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json - */ -async function apiManagementListPolicyDescriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const scope = "Api"; - const options = { scope }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyDescription.listByService( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementListPolicyDescriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentCreateOrUpdateSample.js deleted file mode 100644 index e624f3598abe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a policy fragment. - * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json - */ -async function apiManagementCreatePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const parameters = { - format: "xml", - description: "A policy fragment example", - value: '', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - id, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreatePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentDeleteSample.js deleted file mode 100644 index a191264994ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json - */ -async function apiManagementDeletePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.delete(resourceGroupName, serviceName, id, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeletePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetEntityTagSample.js deleted file mode 100644 index d2e65a28dec0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json - */ -async function apiManagementHeadPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.getEntityTag(resourceGroupName, serviceName, id); - console.log(result); -} - -async function main() { - await apiManagementHeadPolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetSample.js deleted file mode 100644 index dd6d0b0074bc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentGetSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json - */ -async function apiManagementGetPolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get(resourceGroupName, serviceName, id); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json - */ -async function apiManagementGetPolicyFragmentFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get(resourceGroupName, serviceName, id, options); - console.log(result); -} - -async function main() { - await apiManagementGetPolicyFragment(); - await apiManagementGetPolicyFragmentFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListByServiceSample.js deleted file mode 100644 index 95c1baaf65bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all policy fragments. - * - * @summary Gets all policy fragments. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json - */ -async function apiManagementListPolicyFragments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policyFragment.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPolicyFragments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListReferencesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListReferencesSample.js deleted file mode 100644 index c7a4d8e863b2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyFragmentListReferencesSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json - */ -async function apiManagementListPolicyFragmentReferences() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listReferences(resourceGroupName, serviceName, id); - console.log(result); -} - -async function main() { - await apiManagementListPolicyFragmentReferences(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetEntityTagSample.js deleted file mode 100644 index fbe519d02673..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json - */ -async function apiManagementHeadPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.getEntityTag(resourceGroupName, serviceName, policyId); - console.log(result); -} - -async function main() { - await apiManagementHeadPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetSample.js deleted file mode 100644 index ab9787af2fd6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyGetSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. - * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json - */ -async function apiManagementGetPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get(resourceGroupName, serviceName, policyId); - console.log(result); -} - -/** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. - * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json - */ -async function apiManagementGetPolicyFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const format = "rawxml"; - const options = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get(resourceGroupName, serviceName, policyId, options); - console.log(result); -} - -async function main() { - await apiManagementGetPolicy(); - await apiManagementGetPolicyFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyListByServiceSample.js deleted file mode 100644 index efef8a6fc8ad..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. - * - * @summary Lists all the Global Policy definitions of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json - */ -async function apiManagementListPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policy.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionCreateOrUpdateSample.js deleted file mode 100644 index 32ef61579c8f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the policy restriction configuration of the Api Management service. - * - * @summary Creates or updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json - */ -async function apiManagementCreatePolicyRestriction() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters = { - requireBase: "true", - scope: "Sample Path to the policy document.", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.createOrUpdate( - resourceGroupName, - serviceName, - policyRestrictionId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreatePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionDeleteSample.js deleted file mode 100644 index c2f6ce97b525..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionDeleteSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy restriction configuration of the Api Management Service. - * - * @summary Deletes the policy restriction configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json - */ -async function apiManagementDeletePolicyRestriction() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.delete( - resourceGroupName, - serviceName, - policyRestrictionId, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementDeletePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetEntityTagSample.js deleted file mode 100644 index 9212553f6f14..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json - */ -async function apiManagementHeadPolicyRestriction() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.getEntityTag( - resourceGroupName, - serviceName, - policyRestrictionId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadPolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetSample.js deleted file mode 100644 index cffb9541ad74..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy restriction of the Api Management service. - * - * @summary Get the policy restriction of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json - */ -async function apiManagementGetPolicyRestriction() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.get( - resourceGroupName, - serviceName, - policyRestrictionId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetPolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionListByServiceSample.js deleted file mode 100644 index a5fa4621212b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all policy restrictions of API Management services. - * - * @summary Gets all policy restrictions of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json - */ -async function apiManagementListPolicyRestrictions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policyRestriction.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionUpdateSample.js deleted file mode 100644 index 4f0e16a24dbd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the policy restriction configuration of the Api Management service. - * - * @summary Updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json - */ -async function apiManagementUpdatePolicyRestriction() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters = { - scope: "Sample Path 2 to the policy document.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.update( - resourceGroupName, - serviceName, - policyRestrictionId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdatePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionValidationsByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionValidationsByServiceSample.js deleted file mode 100644 index 0c715552f78d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/policyRestrictionValidationsByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Validate all policies of API Management services. - * - * @summary Validate all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json - */ -async function apiManagementListPolicyRestrictions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestrictionValidations.beginByServiceAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigCreateOrUpdateSample.js deleted file mode 100644 index 92377da35567..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigCreateOrUpdateSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or update the developer portal configuration. - * - * @summary Create or update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json - */ -async function apiManagementCreatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"], - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions.", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.createOrUpdate( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreatePortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetEntityTagSample.js deleted file mode 100644 index 1c8010f717d8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. - * - * @summary Gets the entity state (Etag) version of the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json - */ -async function apiManagementHeadPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.getEntityTag( - resourceGroupName, - serviceName, - portalConfigId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetSample.js deleted file mode 100644 index 6561ebb2daca..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the developer portal configuration. - * - * @summary Get the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json - */ -async function apiManagementPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.get(resourceGroupName, serviceName, portalConfigId); - console.log(result); -} - -async function main() { - await apiManagementPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigListByServiceSample.js deleted file mode 100644 index 507571fd09fe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the developer portal configurations. - * - * @summary Lists the developer portal configurations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json - */ -async function apiManagementListPortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.portalConfig.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigUpdateSample.js deleted file mode 100644 index cb149a242ead..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalConfigUpdateSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update the developer portal configuration. - * - * @summary Update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json - */ -async function apiManagementUpdatePortalConfig() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"], - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions.", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.update( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdatePortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionCreateOrUpdateSample.js deleted file mode 100644 index cd7bab3fac48..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - * - * @summary Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json - */ -async function apiManagementCreatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const parameters = { - description: "portal revision 1", - isCurrent: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreatePortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetEntityTagSample.js deleted file mode 100644 index fef4f4baf1ed..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetEntityTagSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the developer portal revision specified by its identifier. - * - * @summary Gets the developer portal revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json - */ -async function apiManagementHeadPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.getEntityTag( - resourceGroupName, - serviceName, - portalRevisionId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadPortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetSample.js deleted file mode 100644 index 84c4497fbc8b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. - * - * @summary Gets the developer portal's revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json - */ -async function apiManagementGetPortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.get(resourceGroupName, serviceName, portalRevisionId); - console.log(result); -} - -async function main() { - await apiManagementGetPortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionListByServiceSample.js deleted file mode 100644 index 190a6d9e9734..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists developer portal's revisions. - * - * @summary Lists developer portal's revisions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json - */ -async function apiManagementListPortalRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.portalRevision.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPortalRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionUpdateSample.js deleted file mode 100644 index 938a396f4cf2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalRevisionUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the description of specified portal revision or makes it current. - * - * @summary Updates the description of specified portal revision or makes it current. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json - */ -async function apiManagementUpdatePortalRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const ifMatch = "*"; - const parameters = { - description: "portal revision update", - isCurrent: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdatePortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalSettingsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalSettingsListByServiceSample.js deleted file mode 100644 index d1c4a96032ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/portalSettingsListByServiceSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. - * - * @summary Lists a collection of portalsettings defined within a service instance.. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json - */ -async function apiManagementListPortalSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalSettings.listByService(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementListPortalSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionCreateOrUpdateSample.js deleted file mode 100644 index 8169404c5a58..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. - * - * @summary Creates a new Private Endpoint Connection or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json - */ -async function apiManagementApproveOrRejectPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const privateEndpointConnectionRequest = { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", - properties: { - privateLinkServiceConnectionState: { - description: "The Private Endpoint Connection is approved.", - status: "Approved", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - ); - console.log(result); -} - -async function main() { - await apiManagementApproveOrRejectPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionDeleteSample.js deleted file mode 100644 index ea681ac667f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Private Endpoint Connection. - * - * @summary Deletes the specified Private Endpoint Connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json - */ -async function apiManagementDeletePrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.beginDeleteAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main() { - await apiManagementDeletePrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetByNameSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetByNameSample.js deleted file mode 100644 index 8c9690623df6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetByNameSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. - * - * @summary Gets the details of the Private Endpoint Connection specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json - */ -async function apiManagementGetPrivateEndpointConnection() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getByName( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main() { - await apiManagementGetPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js deleted file mode 100644 index f2232ffa15a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json - */ -async function apiManagementGetPrivateLinkGroupResource() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateLinkSubResourceName = "privateLinkSubResourceName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getPrivateLinkResource( - resourceGroupName, - serviceName, - privateLinkSubResourceName, - ); - console.log(result); -} - -async function main() { - await apiManagementGetPrivateLinkGroupResource(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListByServiceSample.js deleted file mode 100644 index 163a99c0721a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListByServiceSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. - * - * @summary Lists all private endpoint connections of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json - */ -async function apiManagementListPrivateEndpointConnections() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpointConnectionOperations.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListPrivateEndpointConnections(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js deleted file mode 100644 index af770dc38a94..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json - */ -async function apiManagementListPrivateLinkGroupResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.listPrivateLinkResources( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main() { - await apiManagementListPrivateLinkGroupResources(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCheckEntityExistsSample.js deleted file mode 100644 index 6f8ee059eb3b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCheckEntityExistsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. - * - * @summary Checks that API entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json - */ -async function apiManagementHeadProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const apiId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.checkEntityExists( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCreateOrUpdateSample.js deleted file mode 100644 index 5a7fd73bde9e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified product. - * - * @summary Adds an API to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json - */ -async function apiManagementCreateProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiDeleteSample.js deleted file mode 100644 index 2d1592c67c26..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json - */ -async function apiManagementDeleteProductApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.delete(resourceGroupName, serviceName, productId, apiId); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkCreateOrUpdateSample.js deleted file mode 100644 index 328360590664..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified product via link. - * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json - */ -async function apiManagementCreateProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkDeleteSample.js deleted file mode 100644 index a78a6d2ec17c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json - */ -async function apiManagementDeleteProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.delete( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkGetSample.js deleted file mode 100644 index 697bb634e6e6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json - */ -async function apiManagementGetProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.get( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkListByProductSample.js deleted file mode 100644 index 987f9912a52c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiLinkListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json - */ -async function apiManagementListProductApiLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productApiLink.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiListByProductSample.js deleted file mode 100644 index f873e1863ff8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productApiListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a product. - * - * @summary Lists a collection of the APIs associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json - */ -async function apiManagementListProductApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5768181ea40f7eb6c49f6ac7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productApi.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productCreateOrUpdateSample.js deleted file mode 100644 index 57554d8402a8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a product. - * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json - */ -async function apiManagementCreateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const parameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productDeleteSample.js deleted file mode 100644 index a08fa8aabe90..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productDeleteSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete product. - * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json - */ -async function apiManagementDeleteProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetEntityTagSample.js deleted file mode 100644 index e850eb8fc956..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json - */ -async function apiManagementHeadProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.getEntityTag(resourceGroupName, serviceName, productId); - console.log(result); -} - -async function main() { - await apiManagementHeadProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetSample.js deleted file mode 100644 index 5fd6e72dfceb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json - */ -async function apiManagementGetProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.get(resourceGroupName, serviceName, productId); - console.log(result); -} - -async function main() { - await apiManagementGetProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCheckEntityExistsSample.js deleted file mode 100644 index f4bb1a877e20..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCheckEntityExistsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. - * - * @summary Checks that Group entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json - */ -async function apiManagementHeadProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.checkEntityExists( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCreateOrUpdateSample.js deleted file mode 100644 index cdd9353b5225..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds the association between the specified developer group with the specified product. - * - * @summary Adds the association between the specified developer group with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json - */ -async function apiManagementCreateProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupDeleteSample.js deleted file mode 100644 index ead342d76be4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the association between the specified group and product. - * - * @summary Deletes the association between the specified group and product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json - */ -async function apiManagementDeleteProductGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.delete( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkCreateOrUpdateSample.js deleted file mode 100644 index 112966a318ed..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds a group to the specified product via link. - * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json - */ -async function apiManagementCreateProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkDeleteSample.js deleted file mode 100644 index c2ed1b21d9c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json - */ -async function apiManagementDeleteProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.delete( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkGetSample.js deleted file mode 100644 index 258bd8997d5a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json - */ -async function apiManagementGetProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.get( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkListByProductSample.js deleted file mode 100644 index e58e5a30b002..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupLinkListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json - */ -async function apiManagementListProductGroupLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productGroupLink.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductGroupLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupListByProductSample.js deleted file mode 100644 index f914e80d773f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productGroupListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. - * - * @summary Lists the collection of developer groups associated with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json - */ -async function apiManagementListProductGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productGroup.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByServiceSample.js deleted file mode 100644 index c4c5ccdedc85..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of products in the specified service instance. - * - * @summary Lists a collection of products in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json - */ -async function apiManagementListProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.product.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByTagsSample.js deleted file mode 100644 index 11760a40cae5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productListByTagsSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of products associated with tags. - * - * @summary Lists a collection of products associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json - */ -async function apiManagementListProductsByTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.product.listByTags(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductsByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyCreateOrUpdateSample.js deleted file mode 100644 index 6d16ad2d09f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the Product. - * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json - */ -async function apiManagementCreateProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.createOrUpdate( - resourceGroupName, - serviceName, - productId, - policyId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyDeleteSample.js deleted file mode 100644 index ff5869548b27..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json - */ -async function apiManagementDeleteProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.delete( - resourceGroupName, - serviceName, - productId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetEntityTagSample.js deleted file mode 100644 index 828413c111f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json - */ -async function apiManagementHeadProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.getEntityTag( - resourceGroupName, - serviceName, - productId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetSample.js deleted file mode 100644 index 73e4deeb8f43..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json - */ -async function apiManagementGetProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.get( - resourceGroupName, - serviceName, - productId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyListByProductSample.js deleted file mode 100644 index d6c0c6117bbc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productPolicyListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json - */ -async function apiManagementListProductPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productPolicy.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productSubscriptionsListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productSubscriptionsListSample.js deleted file mode 100644 index f0f30b67c324..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productSubscriptionsListSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the collection of subscriptions to the specified product. - * - * @summary Lists the collection of subscriptions to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json - */ -async function apiManagementListProductSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productSubscriptions.list( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productUpdateSample.js deleted file mode 100644 index dbc936925b2f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update existing product details. - * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json - */ -async function apiManagementUpdateProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiCreateOrUpdateSample.js deleted file mode 100644 index 311b81930f59..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. - * - * @summary Creates a new Wiki for a Product or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json - */ -async function apiManagementCreateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const parameters = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiDeleteSample.js deleted file mode 100644 index febde1bb3245..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Wiki from a Product. - * - * @summary Deletes the specified Wiki from a Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json - */ -async function apiManagementDeleteProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetEntityTagSample.js deleted file mode 100644 index 0bd0c60cb08e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json - */ -async function apiManagementHeadProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.getEntityTag(resourceGroupName, serviceName, productId); - console.log(result); -} - -async function main() { - await apiManagementHeadProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetSample.js deleted file mode 100644 index db81695b036f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json - */ -async function apiManagementGetProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.get(resourceGroupName, serviceName, productId); - console.log(result); -} - -async function main() { - await apiManagementGetProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiUpdateSample.js deleted file mode 100644 index c1be2ba85a40..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikiUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. - * - * @summary Updates the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json - */ -async function apiManagementUpdateProductWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters = { - documents: [{ documentationId: "docId1" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikisListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikisListSample.js deleted file mode 100644 index c65c5b3b574a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/productWikisListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json - */ -async function apiManagementGetApiWiki() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productWikis.list(resourceGroupName, serviceName, productId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysListByServiceSample.js deleted file mode 100644 index 2da2126de6aa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysListByServiceSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @summary Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json - */ -async function apiManagementGetQuotaCounterKeys() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.listByService( - resourceGroupName, - serviceName, - quotaCounterKey, - ); - console.log(result); -} - -async function main() { - await apiManagementGetQuotaCounterKeys(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysUpdateSample.js deleted file mode 100644 index e081b6c4a828..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByCounterKeysUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @summary Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json - */ -async function apiManagementUpdateQuotaCounterKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const parameters = { - callsCount: 0, - kbTransferred: 2.5630078125, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateQuotaCounterKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysGetSample.js deleted file mode 100644 index 8b2e6489e2d7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @summary Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json - */ -async function apiManagementGetQuotaCounterKeysByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.get( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - ); - console.log(result); -} - -async function main() { - await apiManagementGetQuotaCounterKeysByQuotaPeriod(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysUpdateSample.js deleted file mode 100644 index bac6a1a79e95..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/quotaByPeriodKeysUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. - * - * @summary Updates an existing quota counter value in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json - */ -async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const parameters = { - callsCount: 0, - kbTransferred: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/regionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/regionListByServiceSample.js deleted file mode 100644 index 5de762e61ad2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/regionListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all azure regions in which the service exists. - * - * @summary Lists all azure regions in which the service exists. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json - */ -async function apiManagementListRegions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.region.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListRegions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByApiSample.js deleted file mode 100644 index b4740d5248fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByApiSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by API. - * - * @summary Lists report records by API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json - */ -async function apiManagementGetReportsByApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByApi(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByGeoSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByGeoSample.js deleted file mode 100644 index ab69efe47e75..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByGeoSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by geography. - * - * @summary Lists report records by geography. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json - */ -async function apiManagementGetReportsByGeo() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByGeo(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByGeo(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByOperationSample.js deleted file mode 100644 index 86fd4cafd636..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByOperationSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by API Operations. - * - * @summary Lists report records by API Operations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json - */ -async function apiManagementGetReportsByOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByOperation(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByProductSample.js deleted file mode 100644 index ef40ae075e2e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByProductSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by Product. - * - * @summary Lists report records by Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json - */ -async function apiManagementGetReportsByProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByProduct(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByRequestSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByRequestSample.js deleted file mode 100644 index 0e3a14eb17ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByRequestSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by Request. - * - * @summary Lists report records by Request. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json - */ -async function apiManagementGetReportsByRequest() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByRequest(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListBySubscriptionSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListBySubscriptionSample.js deleted file mode 100644 index 86c79cf58fd7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListBySubscriptionSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by subscription. - * - * @summary Lists report records by subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json - */ -async function apiManagementGetReportsBySubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listBySubscription( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByTimeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByTimeSample.js deleted file mode 100644 index 2fc8d60e4e4b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByTimeSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by Time. - * - * @summary Lists report records by Time. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json - */ -async function apiManagementGetReportsByTime() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const interval = "PT15M"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByTime( - resourceGroupName, - serviceName, - filter, - interval, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByTime(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByUserSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByUserSample.js deleted file mode 100644 index 1c3c3944295c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/reportsListByUserSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists report records by User. - * - * @summary Lists report records by User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json - */ -async function apiManagementGetReportsByUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByUser(resourceGroupName, serviceName, filter)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementGetReportsByUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsCreateOrUpdateSample.js deleted file mode 100644 index cb463453c159..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update Sign-In settings. - * - * @summary Create or Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json - */ -async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { enabled: true }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetEntityTagSample.js deleted file mode 100644 index bb3d430144eb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetEntityTagSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. - * - * @summary Gets the entity state (Etag) version of the SignInSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json - */ -async function apiManagementHeadSignInSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.getEntityTag(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementHeadSignInSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetSample.js deleted file mode 100644 index 6edbad05828f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Sign In Settings for the Portal - * - * @summary Get Sign In Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json - */ -async function apiManagementPortalSettingsGetSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsGetSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsUpdateSample.js deleted file mode 100644 index ae87e21ccb22..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signInSettingsUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update Sign-In settings. - * - * @summary Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json - */ -async function apiManagementPortalSettingsUpdateSignIn() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsCreateOrUpdateSample.js deleted file mode 100644 index 6a95ea12764b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update Sign-Up settings. - * - * @summary Create or Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json - */ -async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetEntityTagSample.js deleted file mode 100644 index a9a78d3c5103..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetEntityTagSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. - * - * @summary Gets the entity state (Etag) version of the SignUpSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json - */ -async function apiManagementHeadSignUpSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.getEntityTag(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementHeadSignUpSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetSample.js deleted file mode 100644 index ca0092341b58..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get Sign Up Settings for the Portal - * - * @summary Get Sign Up Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json - */ -async function apiManagementPortalSettingsGetSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.get(resourceGroupName, serviceName); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsGetSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsUpdateSample.js deleted file mode 100644 index c64bb80d09d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/signUpSettingsUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update Sign-Up settings. - * - * @summary Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json - */ -async function apiManagementPortalSettingsUpdateSignUp() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementPortalSettingsUpdateSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionCreateOrUpdateSample.js deleted file mode 100644 index 0c8323eabf6e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. - * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json - */ -async function apiManagementCreateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const parameters = { - displayName: "testsub", - ownerId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.createOrUpdate( - resourceGroupName, - serviceName, - sid, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionDeleteSample.js deleted file mode 100644 index 1d2eada40aa8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json - */ -async function apiManagementDeleteSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.delete(resourceGroupName, serviceName, sid, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetEntityTagSample.js deleted file mode 100644 index ec069f3c1dd0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json - */ -async function apiManagementHeadSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.getEntityTag(resourceGroupName, serviceName, sid); - console.log(result); -} - -async function main() { - await apiManagementHeadSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetSample.js deleted file mode 100644 index d04e45c72e26..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json - */ -async function apiManagementGetSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.get(resourceGroupName, serviceName, sid); - console.log(result); -} - -async function main() { - await apiManagementGetSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSample.js deleted file mode 100644 index 8b58ba678523..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all subscriptions of the API Management service instance. - * - * @summary Lists all subscriptions of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json - */ -async function apiManagementListSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscription.list(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSecretsSample.js deleted file mode 100644 index 0fb8599581c0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionListSecretsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json - */ -async function apiManagementSubscriptionListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.listSecrets(resourceGroupName, serviceName, sid); - console.log(result); -} - -async function main() { - await apiManagementSubscriptionListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegeneratePrimaryKeySample.js deleted file mode 100644 index 704725a8255c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegeneratePrimaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json - */ -async function apiManagementSubscriptionRegeneratePrimaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementSubscriptionRegeneratePrimaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegenerateSecondaryKeySample.js deleted file mode 100644 index 76a201fb30a5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionRegenerateSecondaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json - */ -async function apiManagementSubscriptionRegenerateSecondaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementSubscriptionRegenerateSecondaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionUpdateSample.js deleted file mode 100644 index 84f2d5eb2c55..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/subscriptionUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. - * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json - */ -async function apiManagementUpdateSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.update( - resourceGroupName, - serviceName, - sid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkCreateOrUpdateSample.js deleted file mode 100644 index 3fa7936f3105..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified tag via link. - * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json - */ -async function apiManagementCreateTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkDeleteSample.js deleted file mode 100644 index c7fea126844e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json - */ -async function apiManagementDeleteTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.delete(resourceGroupName, serviceName, tagId, apiLinkId); - console.log(result); -} - -async function main() { - await apiManagementDeleteTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkGetSample.js deleted file mode 100644 index 6977a5810c38..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json - */ -async function apiManagementGetTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.get(resourceGroupName, serviceName, tagId, apiLinkId); - console.log(result); -} - -async function main() { - await apiManagementGetTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkListByProductSample.js deleted file mode 100644 index e7ee7dd9eac1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagApiLinkListByProductSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json - */ -async function apiManagementListTagApiLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagApiLink.listByProduct(resourceGroupName, serviceName, tagId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTagApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToApiSample.js deleted file mode 100644 index 91c6f2d81076..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToApiSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Assign tag to the Api. - * - * @summary Assign tag to the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json - */ -async function apiManagementCreateApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToApi(resourceGroupName, serviceName, apiId, tagId); - console.log(result); -} - -async function main() { - await apiManagementCreateApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToOperationSample.js deleted file mode 100644 index ee036bd92ad9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToOperationSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Assign tag to the Operation. - * - * @summary Assign tag to the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json - */ -async function apiManagementCreateApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const operationId = "5931a75ae4bbd512a88c680a"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToProductSample.js deleted file mode 100644 index 8bb2ee967d2c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagAssignToProductSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Assign tag to the Product. - * - * @summary Assign tag to the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json - */ -async function apiManagementCreateProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToProduct(resourceGroupName, serviceName, productId, tagId); - console.log(result); -} - -async function main() { - await apiManagementCreateProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagCreateOrUpdateSample.js deleted file mode 100644 index 67447e3934e1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagCreateOrUpdateSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a tag. - * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json - */ -async function apiManagementCreateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const parameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.createOrUpdate(resourceGroupName, serviceName, tagId, parameters); - console.log(result); -} - -async function main() { - await apiManagementCreateTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDeleteSample.js deleted file mode 100644 index 627f9293d536..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDeleteSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific tag of the API Management service instance. - * - * @summary Deletes specific tag of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json - */ -async function apiManagementDeleteTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.delete(resourceGroupName, serviceName, tagId, ifMatch); - console.log(result); -} - -async function main() { - await apiManagementDeleteTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromApiSample.js deleted file mode 100644 index f8fb0c604614..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromApiSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Detach the tag from the Api. - * - * @summary Detach the tag from the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json - */ -async function apiManagementDeleteApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromApi(resourceGroupName, serviceName, apiId, tagId); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromOperationSample.js deleted file mode 100644 index 2ae27b75d499..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromOperationSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Detach the tag from the Operation. - * - * @summary Detach the tag from the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json - */ -async function apiManagementDeleteApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const operationId = "59d5b28d1f7fab116c282651"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromProductSample.js deleted file mode 100644 index 9fea7ec71bda..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagDetachFromProductSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Detach the tag from the Product. - * - * @summary Detach the tag from the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json - */ -async function apiManagementDeleteProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByApiSample.js deleted file mode 100644 index 20ca64210601..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByApiSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tag associated with the API. - * - * @summary Get tag associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json - */ -async function apiManagementGetApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByApi(resourceGroupName, serviceName, apiId, tagId); - console.log(result); -} - -async function main() { - await apiManagementGetApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByOperationSample.js deleted file mode 100644 index e38631812e1c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByOperationSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tag associated with the Operation. - * - * @summary Get tag associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json - */ -async function apiManagementGetApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByProductSample.js deleted file mode 100644 index 2ed9d5e921e8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetByProductSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tag associated with the Product. - * - * @summary Get tag associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json - */ -async function apiManagementGetProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByProduct(resourceGroupName, serviceName, productId, tagId); - console.log(result); -} - -async function main() { - await apiManagementGetProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByApiSample.js deleted file mode 100644 index 0741d6e872c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByApiSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json - */ -async function apiManagementHeadApiTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByApi(resourceGroupName, serviceName, apiId, tagId); - console.log(result); -} - -async function main() { - await apiManagementHeadApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByOperationSample.js deleted file mode 100644 index e943dd25600d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByOperationSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json - */ -async function apiManagementHeadApiOperationTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByProductSample.js deleted file mode 100644 index 926715c46874..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateByProductSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json - */ -async function apiManagementHeadProductTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59306a29e4bbd510dc24e5f8"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateSample.js deleted file mode 100644 index c1f6464aca17..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetEntityStateSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json - */ -async function apiManagementHeadTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityState(resourceGroupName, serviceName, tagId); - console.log(result); -} - -async function main() { - await apiManagementHeadTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetSample.js deleted file mode 100644 index 4b4b6ecc58b5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json - */ -async function apiManagementGetTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.get(resourceGroupName, serviceName, tagId); - console.log(result); -} - -async function main() { - await apiManagementGetTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByApiSample.js deleted file mode 100644 index 81f82594411b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByApiSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Tags associated with the API. - * - * @summary Lists all Tags associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json - */ -async function apiManagementListApiTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByApi(resourceGroupName, serviceName, apiId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByOperationSample.js deleted file mode 100644 index 194d55842325..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByOperationSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Tags associated with the Operation. - * - * @summary Lists all Tags associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json - */ -async function apiManagementListApiOperationTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0888cba3f6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListApiOperationTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByProductSample.js deleted file mode 100644 index 05a8a36d74d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByProductSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all Tags associated with the Product. - * - * @summary Lists all Tags associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json - */ -async function apiManagementListProductTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d2ef278aa04f0888cba3f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByProduct(resourceGroupName, serviceName, productId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListProductTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByServiceSample.js deleted file mode 100644 index ac1d57186f94..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of tags defined within a service instance. - * - * @summary Lists a collection of tags defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json - */ -async function apiManagementListTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkCreateOrUpdateSample.js deleted file mode 100644 index 93c8d2f3aa0f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an operation to the specified tag via link. - * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json - */ -async function apiManagementCreateTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkDeleteSample.js deleted file mode 100644 index 1fce60b31b65..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json - */ -async function apiManagementDeleteTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.delete( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkGetSample.js deleted file mode 100644 index 0a2333206995..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json - */ -async function apiManagementGetTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.get( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkListByProductSample.js deleted file mode 100644 index 93d7bd33ddc6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagOperationLinkListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json - */ -async function apiManagementListTagOperationLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagOperationLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTagOperationLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkCreateOrUpdateSample.js deleted file mode 100644 index 6dcf12a84789..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds a product to the specified tag via link. - * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json - */ -async function apiManagementCreateTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - productLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkDeleteSample.js deleted file mode 100644 index a972db19de89..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json - */ -async function apiManagementDeleteTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.delete( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkGetSample.js deleted file mode 100644 index d29918441ea4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json - */ -async function apiManagementGetTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.get( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkListByProductSample.js deleted file mode 100644 index 3858c20a7b09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagProductLinkListByProductSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json - */ -async function apiManagementListTagProductLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagProductLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTagProductLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagResourceListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagResourceListByServiceSample.js deleted file mode 100644 index d14e8fcc1794..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagResourceListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of resources associated with tags. - * - * @summary Lists a collection of resources associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json - */ -async function apiManagementListTagResources() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagResource.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTagResources(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagUpdateSample.js deleted file mode 100644 index bbafc8206f35..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tagUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. - * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json - */ -async function apiManagementUpdateTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.update( - resourceGroupName, - serviceName, - tagId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessCreateSample.js deleted file mode 100644 index 0c5ccb4e92a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessCreateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tenant access information details. - * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json - */ -async function apiManagementCreateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.create( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetEntityTagSample.js deleted file mode 100644 index dd0922d894f0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Tenant access metadata - * - * @summary Tenant access metadata - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json - */ -async function apiManagementHeadTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.getEntityTag(resourceGroupName, serviceName, accessName); - console.log(result); -} - -async function main() { - await apiManagementHeadTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetSample.js deleted file mode 100644 index 875077994e6b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tenant access information details without secrets. - * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json - */ -async function apiManagementGetTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get(resourceGroupName, serviceName, accessName); - console.log(result); -} - -/** - * This sample demonstrates how to Get tenant access information details without secrets. - * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json - */ -async function apiManagementGetTenantGitAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "gitAccess"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get(resourceGroupName, serviceName, accessName); - console.log(result); -} - -async function main() { - await apiManagementGetTenantAccess(); - await apiManagementGetTenantGitAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegeneratePrimaryKeySample.js deleted file mode 100644 index c85eaea3296f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegeneratePrimaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerate primary access key for GIT. - * - * @summary Regenerate primary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegenerateSecondaryKeySample.js deleted file mode 100644 index a1a7b33a4a74..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessGitRegenerateSecondaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerate secondary access key for GIT. - * - * @summary Regenerate secondary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListByServiceSample.js deleted file mode 100644 index 696b8e7e9d58..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. - * - * @summary Returns list of access infos - for Git and Management endpoints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json - */ -async function apiManagementListTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tenantAccess.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListSecretsSample.js deleted file mode 100644 index db0e9742c99d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessListSecretsSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tenant access information details. - * - * @summary Get tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json - */ -async function apiManagementListSecretsTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.listSecrets(resourceGroupName, serviceName, accessName); - console.log(result); -} - -async function main() { - await apiManagementListSecretsTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegeneratePrimaryKeySample.js deleted file mode 100644 index b513077f30ee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegeneratePrimaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerate primary access key - * - * @summary Regenerate primary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegenerateSecondaryKeySample.js deleted file mode 100644 index 92f6457ff45a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessRegenerateSecondaryKeySample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerate secondary access key - * - * @summary Regenerate secondary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessUpdateSample.js deleted file mode 100644 index 1a68f9490b70..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantAccessUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update tenant access information details. - * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json - */ -async function apiManagementUpdateTenantAccess() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.update( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationDeploySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationDeploySample.js deleted file mode 100644 index 9481465ec565..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationDeploySample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @summary This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json - */ -async function apiManagementTenantConfigurationDeploy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginDeployAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantConfigurationDeploy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationGetSyncStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationGetSyncStateSample.js deleted file mode 100644 index 6ce157e0b712..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationGetSyncStateSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @summary Gets the status of the most recent synchronization between the configuration database and the Git repository. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json - */ -async function apiManagementTenantAccessSyncState() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.getSyncState( - resourceGroupName, - serviceName, - configurationName, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantAccessSyncState(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationSaveSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationSaveSample.js deleted file mode 100644 index b2f9bc0d9c88..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationSaveSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @summary This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json - */ -async function apiManagementTenantConfigurationSave() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginSaveAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantConfigurationSave(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationValidateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationValidateSample.js deleted file mode 100644 index 209ab6380833..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantConfigurationValidateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @summary This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json - */ -async function apiManagementTenantConfigurationValidate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginValidateAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementTenantConfigurationValidate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsGetSample.js deleted file mode 100644 index f9264c40ba05..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get tenant settings. - * - * @summary Get tenant settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json - */ -async function apiManagementGetTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const settingsType = "public"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantSettings.get(resourceGroupName, serviceName, settingsType); - console.log(result); -} - -async function main() { - await apiManagementGetTenantSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsListByServiceSample.js deleted file mode 100644 index 5bba859276fb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/tenantSettingsListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Public settings. - * - * @summary Public settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json - */ -async function apiManagementListTenantSettings() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tenantSettings.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListTenantSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userConfirmationPasswordSendSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userConfirmationPasswordSendSample.js deleted file mode 100644 index b320de099d6b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userConfirmationPasswordSendSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Sends confirmation - * - * @summary Sends confirmation - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json - */ -async function apiManagementUserConfirmationPasswordSend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userConfirmationPassword.send(resourceGroupName, serviceName, userId); - console.log(result); -} - -async function main() { - await apiManagementUserConfirmationPasswordSend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userCreateOrUpdateSample.js deleted file mode 100644 index a595e296a2b7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userCreateOrUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a user. - * - * @summary Creates or Updates a user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json - */ -async function apiManagementCreateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const parameters = { - confirmation: "signup", - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.createOrUpdate( - resourceGroupName, - serviceName, - userId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userDeleteSample.js deleted file mode 100644 index 96e590b9a29f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific user. - * - * @summary Deletes specific user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json - */ -async function apiManagementDeleteUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.beginDeleteAndWait( - resourceGroupName, - serviceName, - userId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGenerateSsoUrlSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGenerateSsoUrlSample.js deleted file mode 100644 index 384229da419d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGenerateSsoUrlSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @summary Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json - */ -async function apiManagementUserGenerateSsoUrl() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.generateSsoUrl(resourceGroupName, serviceName, userId); - console.log(result); -} - -async function main() { - await apiManagementUserGenerateSsoUrl(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetEntityTagSample.js deleted file mode 100644 index cca2cdb1249c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json - */ -async function apiManagementHeadUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getEntityTag(resourceGroupName, serviceName, userId); - console.log(result); -} - -async function main() { - await apiManagementHeadUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSample.js deleted file mode 100644 index 93e2babec4b2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the user specified by its identifier. - * - * @summary Gets the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json - */ -async function apiManagementGetUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.get(resourceGroupName, serviceName, userId); - console.log(result); -} - -async function main() { - await apiManagementGetUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSharedAccessTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSharedAccessTokenSample.js deleted file mode 100644 index ee1388220d37..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGetSharedAccessTokenSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. - * - * @summary Gets the Shared Access Authorization Token for the User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json - */ -async function apiManagementUserToken() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "userId1718"; - const parameters = { - expiry: new Date("2019-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getSharedAccessToken( - resourceGroupName, - serviceName, - userId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUserToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGroupListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGroupListSample.js deleted file mode 100644 index bf5c466f0b92..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userGroupListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all user groups. - * - * @summary Lists all user groups. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json - */ -async function apiManagementListUserGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userGroup.list(resourceGroupName, serviceName, userId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListUserGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userIdentitiesListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userIdentitiesListSample.js deleted file mode 100644 index 56918122ee1e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userIdentitiesListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to List of all user identities. - * - * @summary List of all user identities. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json - */ -async function apiManagementListUserIdentities() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57f2af53bb17172280f44057"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userIdentities.list(resourceGroupName, serviceName, userId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListUserIdentities(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userListByServiceSample.js deleted file mode 100644 index 4b982a36e16e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of registered users in the specified service instance. - * - * @summary Lists a collection of registered users in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json - */ -async function apiManagementListUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.user.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionGetSample.js deleted file mode 100644 index c13ed23342c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. - * - * @summary Gets the specified Subscription entity associated with a particular user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json - */ -async function apiManagementGetUserSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "1"; - const sid = "5fa9b096f3df14003c070001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userSubscription.get(resourceGroupName, serviceName, userId, sid); - console.log(result); -} - -async function main() { - await apiManagementGetUserSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionListSample.js deleted file mode 100644 index fa4c53677b3f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userSubscriptionListSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists the collection of subscriptions of the specified user. - * - * @summary Lists the collection of subscriptions of the specified user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json - */ -async function apiManagementListUserSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userSubscription.list(resourceGroupName, serviceName, userId)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListUserSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userUpdateSample.js deleted file mode 100644 index 05a9d7539304..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/userUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the user specified by its identifier. - * - * @summary Updates the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json - */ -async function apiManagementUpdateUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const ifMatch = "*"; - const parameters = { - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.update( - resourceGroupName, - serviceName, - userId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiCreateOrUpdateSample.js deleted file mode 100644 index 50378a2ddda1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiCreateOrUpdateSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the workspace in an API Management service instance. - * - * @summary Creates new or updates existing specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json - */ -async function apiManagementCreateWorkspaceApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "tempgroup"; - const parameters = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDeleteSample.js deleted file mode 100644 index 2dfbdaf25e09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API of the workspace in an API Management service instance. - * - * @summary Deletes the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json - */ -async function apiManagementDeleteWorkspaceApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js deleted file mode 100644 index 9fd6995aaead..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. - * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json - */ -async function apiManagementCreateWorkspaceApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticDeleteSample.js deleted file mode 100644 index 2c8ce8bab6d0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json - */ -async function apiManagementDeleteWorkspaceApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetEntityTagSample.js deleted file mode 100644 index 7040d90e160c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json - */ -async function apiManagementHeadWorkspaceApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetSample.js deleted file mode 100644 index 9cd52032cb78..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json - */ -async function apiManagementGetWorkspaceApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticListByWorkspaceSample.js deleted file mode 100644 index 9c2195be5a3d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticListByWorkspaceSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json - */ -async function apiManagementListWorkspaceApiDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticUpdateSample.js deleted file mode 100644 index e88ca3e25875..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiDiagnosticUpdateSample.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. - * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json - */ -async function apiManagementUpdateWorkspaceApiDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiExportGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiExportGetSample.js deleted file mode 100644 index b51b47813fd2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiExportGetSample.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json - */ -async function apiManagementGetWorkspaceApiExportInOpenApi2Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json - */ -async function apiManagementGetWorkspaceApiExportInOpenApi3Dot0() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiExportInOpenApi2Dot0(); - await apiManagementGetWorkspaceApiExportInOpenApi3Dot0(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetEntityTagSample.js deleted file mode 100644 index fd185eb5cae8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json - */ -async function apiManagementHeadWorkspaceApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetSample.js deleted file mode 100644 index 024d43f276d2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiGetSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json - */ -async function apiManagementGetWorkspaceApiContract() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.get(resourceGroupName, serviceName, workspaceId, apiId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json - */ -async function apiManagementGetWorkspaceApiRevision() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.get(resourceGroupName, serviceName, workspaceId, apiId); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiContract(); - await apiManagementGetWorkspaceApiRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiListByServiceSample.js deleted file mode 100644 index ac85cee57d94..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all APIs of the workspace in an API Management service instance. - * - * @summary Lists all APIs of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json - */ -async function apiManagementListWorkspaceApis() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApi.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationCreateOrUpdateSample.js deleted file mode 100644 index 67bbe75aae85..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationCreateOrUpdateSample.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. - * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json - */ -async function apiManagementCreateWorkspaceApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [{ contentType: "application/xml" }, { contentType: "application/json" }], - statusCode: 200, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationDeleteSample.js deleted file mode 100644 index aa412d164aac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json - */ -async function apiManagementDeleteWorkspaceApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetEntityTagSample.js deleted file mode 100644 index c9f4a625ff85..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json - */ -async function apiManagementHeadWorkspaceApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetSample.js deleted file mode 100644 index cbe94b79b2e7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json - */ -async function apiManagementGetWorkspaceApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationListByApiSample.js deleted file mode 100644 index 637ef8625583..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationListByApiSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json - */ -async function apiManagementListWorkspaceApiOperations() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiOperation.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js deleted file mode 100644 index 70375fade567..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. - * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json - */ -async function apiManagementCreateWorkspaceApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - " ", - }; - const options = { - ifMatch, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyDeleteSample.js deleted file mode 100644 index c81781648236..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyDeleteSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json - */ -async function apiManagementDeleteWorkspaceApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetEntityTagSample.js deleted file mode 100644 index 88c684bb965b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetEntityTagSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json - */ -async function apiManagementHeadWorkspaceApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetSample.js deleted file mode 100644 index e33f882d596a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyGetSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json - */ -async function apiManagementGetWorkspaceApiOperationPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyListByOperationSample.js deleted file mode 100644 index 5eccc599e7fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationPolicyListByOperationSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json - */ -async function apiManagementListWorkspaceApiOperationPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiOperationPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationUpdateSample.js deleted file mode 100644 index 4ab5fdddc51c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiOperationUpdateSample.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. - * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json - */ -async function apiManagementUpdateWorkspaceApiOperation() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], - }, - ], - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyCreateOrUpdateSample.js deleted file mode 100644 index 86db5a02c655..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json - */ -async function apiManagementCreateWorkspaceApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - " ", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyDeleteSample.js deleted file mode 100644 index ab22eed940b2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json - */ -async function apiManagementDeleteWorkspaceApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetEntityTagSample.js deleted file mode 100644 index e9ea039e4d39..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json - */ -async function apiManagementHeadWorkspaceApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetSample.js deleted file mode 100644 index 0e9495476d52..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json - */ -async function apiManagementGetWorkspaceApiPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyListByApiSample.js deleted file mode 100644 index 9cb2b26db7b0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiPolicyListByApiSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json - */ -async function apiManagementListWorkspaceApiPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiPolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseCreateOrUpdateSample.js deleted file mode 100644 index c5bb63ad2511..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Release for the API. - * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json - */ -async function apiManagementCreateWorkspaceApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseDeleteSample.js deleted file mode 100644 index 4a2a47fa1b1f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json - */ -async function apiManagementDeleteWorkspaceApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetEntityTagSample.js deleted file mode 100644 index 42730416a525..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json - */ -async function apiManagementHeadWorkspaceApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetSample.js deleted file mode 100644 index 006ebfd10722..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json - */ -async function apiManagementGetWorkspaceApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseListByServiceSample.js deleted file mode 100644 index 6722bcb15067..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseListByServiceSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json - */ -async function apiManagementListWorkspaceApiReleases() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiRelease.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiReleases(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseUpdateSample.js deleted file mode 100644 index a71de79688b2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiReleaseUpdateSample.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. - * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json - */ -async function apiManagementUpdateWorkspaceApiRelease() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiRevisionListByServiceSample.js deleted file mode 100644 index dfc1a70d33fe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiRevisionListByServiceSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json - */ -async function apiManagementListWorkspaceApiRevisions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiRevision.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaCreateOrUpdateSample.js deleted file mode 100644 index 03e52a93db22..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates schema configuration for the API. - * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json - */ -async function apiManagementCreateWorkspaceApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaDeleteSample.js deleted file mode 100644 index dcedb02ea3bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json - */ -async function apiManagementDeleteWorkspaceApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetEntityTagSample.js deleted file mode 100644 index dd4732b44deb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json - */ -async function apiManagementHeadWorkspaceApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetSample.js deleted file mode 100644 index 5af04d62f369..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json - */ -async function apiManagementGetWorkspaceApiSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaListByApiSample.js deleted file mode 100644 index bef730561615..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiSchemaListByApiSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json - */ -async function apiManagementListWorkspaceApiSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiSchema.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiUpdateSample.js deleted file mode 100644 index 2e452a7141a6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specified API of the workspace in an API Management service instance. - * - * @summary Updates the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json - */ -async function apiManagementUpdateWorkspaceApi() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetCreateOrUpdateSample.js deleted file mode 100644 index d8fbf5c9e4a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a Api Version Set. - * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json - */ -async function apiManagementCreateWorkspaceApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "api1"; - const parameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetDeleteSample.js deleted file mode 100644 index 5a657c0a4969..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json - */ -async function apiManagementDeleteWorkspaceApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.delete( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetEntityTagSample.js deleted file mode 100644 index ef20c779fa6e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json - */ -async function apiManagementHeadWorkspaceApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetSample.js deleted file mode 100644 index a2e1c9d25044..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json - */ -async function apiManagementGetWorkspaceApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.get( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetListByServiceSample.js deleted file mode 100644 index 8b845fa27cbf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified workspace with a service instance. - * - * @summary Lists a collection of API Version Sets in the specified workspace with a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json - */ -async function apiManagementListWorkspaceApiVersionSets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiVersionSet.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceApiVersionSets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetUpdateSample.js deleted file mode 100644 index 2b6e75875721..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceApiVersionSetUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. - * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json - */ -async function apiManagementUpdateWorkspaceApiVersionSet() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.update( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendCreateOrUpdateSample.js deleted file mode 100644 index 49aff3952847..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendCreateOrUpdateSample.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json - */ -async function apiManagementCreateWorkspaceBackendProxyBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const parameters = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] }, - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json - */ -async function apiManagementCreateWorkspaceBackendServiceFabric() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const parameters = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1", - }, - ], - }, - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceBackendProxyBackend(); - await apiManagementCreateWorkspaceBackendServiceFabric(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendDeleteSample.js deleted file mode 100644 index b6ea4a21496a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json - */ -async function apiManagementDeleteWorkspaceBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.delete( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetEntityTagSample.js deleted file mode 100644 index b0ba86a625d6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json - */ -async function apiManagementHeadWorkspaceBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetSample.js deleted file mode 100644 index 8a81a2a337eb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json - */ -async function apiManagementGetWorkspaceBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.get( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendListByWorkspaceSample.js deleted file mode 100644 index 3d67940f4edc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendListByWorkspaceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of backends in the specified workspace. - * - * @summary Lists a collection of backends in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json - */ -async function apiManagementListWorkspaceBackends() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceBackend.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceBackends(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendUpdateSample.js deleted file mode 100644 index ca627aab43f8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceBackendUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing backend. - * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json - */ -async function apiManagementUpdateWorkspaceBackend() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.update( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateCreateOrUpdateSample.js deleted file mode 100644 index 934c8cd1b735..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateCreateOrUpdateSample.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json - */ -async function apiManagementCreateWorkspaceCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const parameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json - */ -async function apiManagementCreateWorkspaceCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const parameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceCertificate(); - await apiManagementCreateWorkspaceCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateDeleteSample.js deleted file mode 100644 index 64924d443c2e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json - */ -async function apiManagementDeleteWorkspaceCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.delete( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetEntityTagSample.js deleted file mode 100644 index 09dce35abceb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json - */ -async function apiManagementWorkspaceHeadCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementWorkspaceHeadCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetSample.js deleted file mode 100644 index 4298b95134c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateGetSample.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json - */ -async function apiManagementGetWorkspaceCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json - */ -async function apiManagementGetWorkspaceCertificateWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceCertificate(); - await apiManagementGetWorkspaceCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateListByWorkspaceSample.js deleted file mode 100644 index a065b585893a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateListByWorkspaceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified workspace. - * - * @summary Lists a collection of all certificates in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json - */ -async function apiManagementListWorkspaceCertificates() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceCertificate.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceCertificates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateRefreshSecretSample.js deleted file mode 100644 index e183f6d7c82a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCertificateRefreshSecretSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json - */ -async function apiManagementRefreshWorkspaceCertificate() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.refreshSecret( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main() { - await apiManagementRefreshWorkspaceCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCreateOrUpdateSample.js deleted file mode 100644 index 1d994de44745..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new workspace or updates an existing one. - * - * @summary Creates a new workspace or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json - */ -async function apiManagementCreateWorkspace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const parameters = { - description: "workspace 1", - displayName: "my workspace", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDeleteSample.js deleted file mode 100644 index 40f05400539d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDeleteSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified workspace. - * - * @summary Deletes the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json - */ -async function apiManagementDeleteWorkspace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.delete( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticCreateOrUpdateSample.js deleted file mode 100644 index 94cbac3d28af..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticCreateOrUpdateSample.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. - * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json - */ -async function apiManagementCreateWorkspaceDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticDeleteSample.js deleted file mode 100644 index d508bf4da5df..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json - */ -async function apiManagementDeleteWorkspaceDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetEntityTagSample.js deleted file mode 100644 index a98024475ab6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json - */ -async function apiManagementHeadWorkspaceDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetSample.js deleted file mode 100644 index 54caea08cffd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json - */ -async function apiManagementGetWorkspaceDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticListByWorkspaceSample.js deleted file mode 100644 index c40035597794..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticListByWorkspaceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all diagnostics in the specified workspace. - * - * @summary Lists all diagnostics in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json - */ -async function apiManagementListWorkspaceDiagnostics() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticUpdateSample.js deleted file mode 100644 index c61d237a66b4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceDiagnosticUpdateSample.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. - * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json - */ -async function apiManagementUpdateWorkspaceDiagnostic() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetEntityTagSample.js deleted file mode 100644 index d9f616677d56..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetEntityTagSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json - */ -async function apiManagementHeadWorkspace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.getEntityTag(resourceGroupName, serviceName, workspaceId); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetSample.js deleted file mode 100644 index fb5eaf2244e2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the workspace specified by its identifier. - * - * @summary Gets the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json - */ -async function apiManagementGetWorkspace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.get(resourceGroupName, serviceName, workspaceId); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js deleted file mode 100644 index 7d25759d7a83..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the workspace in an API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json - */ -async function apiManagementCreateWorkspaceSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const parameters = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaDeleteSample.js deleted file mode 100644 index df01639c8cce..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json - */ -async function apiManagementDeleteWorkspaceSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetEntityTagSample.js deleted file mode 100644 index f34631d48a94..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json - */ -async function apiManagementHeadWorkspaceSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetSample.js deleted file mode 100644 index e50e461b4b09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json - */ -async function apiManagementGetWorkspaceSchema() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.get( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaListByServiceSample.js deleted file mode 100644 index 0639e33eb624..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGlobalSchemaListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of schemas registered with workspace in a service instance. - * - * @summary Lists a collection of schemas registered with workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json - */ -async function apiManagementListWorkspaceSchemas() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGlobalSchema.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupCreateOrUpdateSample.js deleted file mode 100644 index c9573b3c7153..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupCreateOrUpdateSample.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json - */ -async function apiManagementCreateWorkspaceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const parameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupExternal.json - */ -async function apiManagementCreateWorkspaceGroupExternal() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const parameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceGroup(); - await apiManagementCreateWorkspaceGroupExternal(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupDeleteSample.js deleted file mode 100644 index d2a544047870..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific group of the workspace in an API Management service instance. - * - * @summary Deletes specific group of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json - */ -async function apiManagementDeleteWorkspaceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetEntityTagSample.js deleted file mode 100644 index 0857a284ce25..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json - */ -async function apiManagementHeadWorkspaceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetSample.js deleted file mode 100644 index d02530123a87..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json - */ -async function apiManagementGetWorkspaceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.get( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupListByServiceSample.js deleted file mode 100644 index ee46954b6afc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of groups defined within a workspace in a service instance. - * - * @summary Lists a collection of groups defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json - */ -async function apiManagementListWorkspaceGroups() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGroup.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUpdateSample.js deleted file mode 100644 index d4acf2696444..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the group specified by its identifier. - * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json - */ -async function apiManagementUpdateWorkspaceGroup() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.update( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCheckEntityExistsSample.js deleted file mode 100644 index df06b447e1e4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCheckEntityExistsSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json - */ -async function apiManagementHeadWorkspaceGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCreateSample.js deleted file mode 100644 index 5d3c189d37d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserCreateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json - */ -async function apiManagementCreateWorkspaceGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.create( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserDeleteSample.js deleted file mode 100644 index cbfa3686883b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json - */ -async function apiManagementDeleteWorkspaceGroupUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserListSample.js deleted file mode 100644 index 527c258d4ec0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceGroupUserListSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json - */ -async function apiManagementListWorkspaceGroupUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGroupUser.list( - resourceGroupName, - serviceName, - workspaceId, - groupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceGroupUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceListByServiceSample.js deleted file mode 100644 index fae24b1c9217..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceListByServiceSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all workspaces of the API Management service instance. - * - * @summary Lists all workspaces of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json - */ -async function apiManagementListWorkspaces() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspace.listByService(resourceGroupName, serviceName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaces(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerCreateOrUpdateSample.js deleted file mode 100644 index 15d052657801..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerCreateOrUpdateSample.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json - */ -async function apiManagementCreateWorkspaceAiLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const parameters = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceEHLogger.json - */ -async function apiManagementCreateWorkspaceEhLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const parameters = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", - }, - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceAiLogger(); - await apiManagementCreateWorkspaceEhLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerDeleteSample.js deleted file mode 100644 index 5a39a77bfcdc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json - */ -async function apiManagementDeleteWorkspaceLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.delete( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetEntityTagSample.js deleted file mode 100644 index 2b96b7efdb9a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json - */ -async function apiManagementHeadWorkspaceLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetSample.js deleted file mode 100644 index 98a6fb741905..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json - */ -async function apiManagementGetWorkspaceLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.get( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerListByWorkspaceSample.js deleted file mode 100644 index 2ffc17989439..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerListByWorkspaceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of loggers in the specified workspace. - * - * @summary Lists a collection of loggers in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json - */ -async function apiManagementListWorkspaceLoggers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceLogger.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceLoggers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerUpdateSample.js deleted file mode 100644 index c0048fc862d6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceLoggerUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates an existing logger. - * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json - */ -async function apiManagementUpdateWorkspaceLogger() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters = { - description: "updating description", - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.update( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueCreateOrUpdateSample.js deleted file mode 100644 index 92714df7a4fc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueCreateOrUpdateSample.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json - */ -async function apiManagementCreateWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const parameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json - */ -async function apiManagementCreateWorkspaceNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; - const parameters = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", - }, - secret: true, - tags: ["foo", "bar"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceNamedValue(); - await apiManagementCreateWorkspaceNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueDeleteSample.js deleted file mode 100644 index 94106b9f8c69..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific named value from the workspace in an API Management service instance. - * - * @summary Deletes specific named value from the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json - */ -async function apiManagementDeleteWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.delete( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetEntityTagSample.js deleted file mode 100644 index a7ec807a5405..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json - */ -async function apiManagementHeadWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetSample.js deleted file mode 100644 index e386e3f860b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueGetSample.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json - */ -async function apiManagementGetWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json - */ -async function apiManagementGetWorkspaceNamedValueWithKeyVault() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceNamedValue(); - await apiManagementGetWorkspaceNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListByServiceSample.js deleted file mode 100644 index f119321c8295..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of named values defined within a workspace in a service instance. - * - * @summary Lists a collection of named values defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json - */ -async function apiManagementListWorkspaceNamedValues() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceNamedValue.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceNamedValues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListValueSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListValueSample.js deleted file mode 100644 index 61469f149572..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueListValueSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json - */ -async function apiManagementWorkspaceNamedValueListValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.listValue( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main() { - await apiManagementWorkspaceNamedValueListValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueRefreshSecretSample.js deleted file mode 100644 index 8213f9e73937..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueRefreshSecretSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json - */ -async function apiManagementRefreshWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main() { - await apiManagementRefreshWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueUpdateSample.js deleted file mode 100644 index 1bfa3c59f6d6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNamedValueUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the specific named value. - * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json - */ -async function apiManagementUpdateWorkspaceNamedValue() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationCreateOrUpdateSample.js deleted file mode 100644 index 5140b713cbbb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Create or Update API Management publisher notification for the workspace. - * - * @summary Create or Update API Management publisher notification for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json - */ -async function apiManagementCreateWorkspaceNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotification.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationGetSample.js deleted file mode 100644 index 23b774b3d291..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json - */ -async function apiManagementGetWorkspaceNotification() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotification.get( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationListByServiceSample.js deleted file mode 100644 index 1b001686985e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json - */ -async function apiManagementListWorkspaceNotifications() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceNotification.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceNotifications(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js deleted file mode 100644 index 638f8156db33..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementHeadWorkspaceNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js deleted file mode 100644 index 94f74f17ccfb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementCreateWorkspaceNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailDeleteSample.js deleted file mode 100644 index efd9cb58edb4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementDeleteWorkspaceNotificationRecipientEmail() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js deleted file mode 100644 index 8bd35c5d2946..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json - */ -async function apiManagementListWorkspaceNotificationRecipientEmails() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementListWorkspaceNotificationRecipientEmails(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js deleted file mode 100644 index deec51ba4553..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json - */ -async function apiManagementHeadWorkspaceNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js deleted file mode 100644 index a2d04cb218f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json - */ -async function apiManagementCreateWorkspaceNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserDeleteSample.js deleted file mode 100644 index cdb5b66dd069..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json - */ -async function apiManagementDeleteWorkspaceNotificationRecipientUser() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserListByNotificationSample.js deleted file mode 100644 index a3e3fac398ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceNotificationRecipientUserListByNotificationSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json - */ -async function apiManagementListWorkspaceNotificationRecipientUsers() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main() { - await apiManagementListWorkspaceNotificationRecipientUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyCreateOrUpdateSample.js deleted file mode 100644 index 0e453e990894..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. - * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json - */ -async function apiManagementCreateWorkspacePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "xml", - value: - " ", - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. - * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json - */ -async function apiManagementCreateWorkspacePolicyNonXmlEncoded() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspacePolicy(); - await apiManagementCreateWorkspacePolicyNonXmlEncoded(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyDeleteSample.js deleted file mode 100644 index 2d66d00a79fd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the workspace. - * - * @summary Deletes the policy configuration at the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json - */ -async function apiManagementDeleteWorkspacePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentCreateOrUpdateSample.js deleted file mode 100644 index a183d9c0f642..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentCreateOrUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates a policy fragment. - * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json - */ -async function apiManagementCreateWorkspacePolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const parameters = { - format: "xml", - description: "A policy fragment example", - value: '', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - id, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentDeleteSample.js deleted file mode 100644 index 81d066ac2f76..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json - */ -async function apiManagementDeleteWorkspacePolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.delete( - resourceGroupName, - serviceName, - workspaceId, - id, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetEntityTagSample.js deleted file mode 100644 index 08980ed96df5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json - */ -async function apiManagementHeadWorkspacePolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetSample.js deleted file mode 100644 index df48aacaaa2b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentGetSample.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json - */ -async function apiManagementGetWorkspacePolicyFragment() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json - */ -async function apiManagementGetWorkspacePolicyFragmentFormat() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspacePolicyFragment(); - await apiManagementGetWorkspacePolicyFragmentFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListByServiceSample.js deleted file mode 100644 index c471f2ede8ae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets all policy fragments defined within a workspace. - * - * @summary Gets all policy fragments defined within a workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json - */ -async function apiManagementListWorkspacePolicyFragments() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspacePolicyFragment.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspacePolicyFragments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListReferencesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListReferencesSample.js deleted file mode 100644 index 61d5d8c27ed8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyFragmentListReferencesSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json - */ -async function apiManagementListWorkspacePolicyFragmentReferences() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.listReferences( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -async function main() { - await apiManagementListWorkspacePolicyFragmentReferences(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetEntityTagSample.js deleted file mode 100644 index 23f61ec72f4c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json - */ -async function apiManagementHeadWorkspacePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetSample.js deleted file mode 100644 index 4cbe7b1ac421..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json - */ -async function apiManagementGetWorkspacePolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.get( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyListByApiSample.js deleted file mode 100644 index aa50938638fb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspacePolicyListByApiSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the workspace level. - * - * @summary Get the policy configuration at the workspace level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json - */ -async function apiManagementListWorkspacePolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspacePolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspacePolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkCreateOrUpdateSample.js deleted file mode 100644 index 8a611252ca49..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified product via link. - * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json - */ -async function apiManagementCreateWorkspaceProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkDeleteSample.js deleted file mode 100644 index 3583cbdb0cdf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json - */ -async function apiManagementDeleteWorkspaceProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkGetSample.js deleted file mode 100644 index 4cecb3645b99..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json - */ -async function apiManagementGetWorkspaceProductApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkListByProductSample.js deleted file mode 100644 index 41e9eac3f181..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductApiLinkListByProductSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json - */ -async function apiManagementListWorkspaceProductApiLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProductApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceProductApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductCreateOrUpdateSample.js deleted file mode 100644 index c991371efdfa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductCreateOrUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or Updates a product. - * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json - */ -async function apiManagementCreateWorkspaceProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const parameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductDeleteSample.js deleted file mode 100644 index 1482e9b2d25c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductDeleteSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Delete product. - * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json - */ -async function apiManagementDeleteWorkspaceProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - options, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetEntityTagSample.js deleted file mode 100644 index e528db99a281..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json - */ -async function apiManagementHeadWorkspaceProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetSample.js deleted file mode 100644 index 52fef65f8d23..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json - */ -async function apiManagementGetWorkspaceProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js deleted file mode 100644 index f5993d12404c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds a group to the specified product via link. - * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json - */ -async function apiManagementCreateWorkspaceProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkDeleteSample.js deleted file mode 100644 index ee28765e32bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json - */ -async function apiManagementDeleteWorkspaceProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkGetSample.js deleted file mode 100644 index ccc3483c5c2c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json - */ -async function apiManagementGetWorkspaceProductGroupLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkListByProductSample.js deleted file mode 100644 index 20b176c86893..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductGroupLinkListByProductSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json - */ -async function apiManagementListWorkspaceProductGroupLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProductGroupLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceProductGroupLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductListByServiceSample.js deleted file mode 100644 index 82a930408d54..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of products in the specified workspace in a service instance. - * - * @summary Lists a collection of products in the specified workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json - */ -async function apiManagementListWorkspaceProducts() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProduct.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyCreateOrUpdateSample.js deleted file mode 100644 index 12a56574b85e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates policy configuration for the Product. - * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json - */ -async function apiManagementCreateWorkspaceProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyDeleteSample.js deleted file mode 100644 index 5cd6a8534ac6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyDeleteSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json - */ -async function apiManagementDeleteWorkspaceProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetEntityTagSample.js deleted file mode 100644 index 7cdb36481bbe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetEntityTagSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json - */ -async function apiManagementHeadWorkspaceProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetSample.js deleted file mode 100644 index 67f1532521f0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json - */ -async function apiManagementGetWorkspaceProductPolicy() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyListByProductSample.js deleted file mode 100644 index 82dd4abcb394..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductPolicyListByProductSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json - */ -async function apiManagementListWorkspaceProductPolicies() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main() { - await apiManagementListWorkspaceProductPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductUpdateSample.js deleted file mode 100644 index 61eaf74d36be..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceProductUpdateSample.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Update existing product details. - * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json - */ -async function apiManagementUpdateWorkspaceProduct() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.update( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionCreateOrUpdateSample.js deleted file mode 100644 index e69b202d91cb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. - * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json - */ -async function apiManagementCreateWorkspaceSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const parameters = { - displayName: "testsub", - ownerId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - sid, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionDeleteSample.js deleted file mode 100644 index 52a52a662a0b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json - */ -async function apiManagementDeleteWorkspaceSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.delete( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetEntityTagSample.js deleted file mode 100644 index df7d0abb35f5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetEntityTagSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json - */ -async function apiManagementHeadWorkspaceSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetSample.js deleted file mode 100644 index 4c663ece3f0f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionGetSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json - */ -async function apiManagementGetWorkspaceSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.get( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSample.js deleted file mode 100644 index de239609c391..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists all subscriptions of the workspace in an API Management service instance. - * - * @summary Lists all subscriptions of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json - */ -async function apiManagementListWorkspaceSubscriptions() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceSubscription.list( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSecretsSample.js deleted file mode 100644 index 42a9324db7b4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionListSecretsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json - */ -async function apiManagementWorkspaceSubscriptionListSecrets() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.listSecrets( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementWorkspaceSubscriptionListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js deleted file mode 100644 index 00cb97e27ea7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json - */ -async function apiManagementWorkspaceSubscriptionRegeneratePrimaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js deleted file mode 100644 index eb77c69ac8b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json - */ -async function apiManagementWorkspaceSubscriptionRegenerateSecondaryKey() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main() { - await apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionUpdateSample.js deleted file mode 100644 index b5724860ca10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceSubscriptionUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. - * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json - */ -async function apiManagementUpdateWorkspaceSubscription() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.update( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkCreateOrUpdateSample.js deleted file mode 100644 index 023613c92b6f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an API to the specified tag via link. - * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json - */ -async function apiManagementCreateWorkspaceTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkDeleteSample.js deleted file mode 100644 index 552e60937f10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json - */ -async function apiManagementDeleteWorkspaceTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkGetSample.js deleted file mode 100644 index f4e1f8bbd2ee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json - */ -async function apiManagementGetWorkspaceTagApiLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkListByProductSample.js deleted file mode 100644 index deae5adc6bc2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagApiLinkListByProductSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json - */ -async function apiManagementListWorkspaceTagApiLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceTagApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagCreateOrUpdateSample.js deleted file mode 100644 index 03ab7999fa63..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Creates a tag. - * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json - */ -async function apiManagementCreateWorkspaceTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const parameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagDeleteSample.js deleted file mode 100644 index 625d707660d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes specific tag of the workspace in an API Management service instance. - * - * @summary Deletes specific tag of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json - */ -async function apiManagementDeleteWorkspaceTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetEntityStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetEntityStateSample.js deleted file mode 100644 index 81c0905fa6ff..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetEntityStateSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json - */ -async function apiManagementHeadWorkspaceTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.getEntityState( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ); - console.log(result); -} - -async function main() { - await apiManagementHeadWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetSample.js deleted file mode 100644 index d6d123222e09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json - */ -async function apiManagementGetWorkspaceTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.get(resourceGroupName, serviceName, workspaceId, tagId); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagListByServiceSample.js deleted file mode 100644 index 92b881725dd6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagListByServiceSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of tags defined within a workspace in a service instance. - * - * @summary Lists a collection of tags defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json - */ -async function apiManagementListWorkspaceTags() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTag.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js deleted file mode 100644 index a2ebef65b535..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds an operation to the specified tag via link. - * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json - */ -async function apiManagementCreateWorkspaceTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkDeleteSample.js deleted file mode 100644 index 84a443fe7009..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json - */ -async function apiManagementDeleteWorkspaceTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkGetSample.js deleted file mode 100644 index b0162f604811..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json - */ -async function apiManagementGetWorkspaceTagOperationLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkListByProductSample.js deleted file mode 100644 index 5f6094c2abb1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagOperationLinkListByProductSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json - */ -async function apiManagementListWorkspaceTagOperationLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagOperationLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceTagOperationLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkCreateOrUpdateSample.js deleted file mode 100644 index bc87c4fe7283..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Adds a product to the specified tag via link. - * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json - */ -async function apiManagementCreateWorkspaceTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementCreateWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkDeleteSample.js deleted file mode 100644 index efd702fb5b82..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkDeleteSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json - */ -async function apiManagementDeleteWorkspaceTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementDeleteWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkGetSample.js deleted file mode 100644 index 04aacf9b0fe4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkGetSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json - */ -async function apiManagementGetWorkspaceTagProductLink() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main() { - await apiManagementGetWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkListByProductSample.js deleted file mode 100644 index 6be09f40123a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagProductLinkListByProductSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json - */ -async function apiManagementListWorkspaceTagProductLinks() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagProductLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - await apiManagementListWorkspaceTagProductLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagUpdateSample.js deleted file mode 100644 index 935725be3ec9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceTagUpdateSample.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. - * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json - */ -async function apiManagementUpdateWorkspaceTag() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.update( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceUpdateSample.js deleted file mode 100644 index 9cad040fd466..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/workspaceUpdateSample.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ApiManagementClient } = require("@azure/arm-apimanagement"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv/config"); - -/** - * This sample demonstrates how to Updates the details of the workspace specified by its identifier. - * - * @summary Updates the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json - */ -async function apiManagementUpdateWorkspace() { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; - const parameters = { - description: "workspace 1", - displayName: "my workspace", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.update( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main() { - await apiManagementUpdateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/README.md b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/README.md deleted file mode 100644 index 0dfba4aba66c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/README.md +++ /dev/null @@ -1,1287 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [allPoliciesListByServiceSample.ts][allpolicieslistbyservicesample] | Status of all policies of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json | -| [apiCreateOrUpdateSample.ts][apicreateorupdatesample] | Creates new or updates existing specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json | -| [apiDeleteSample.ts][apideletesample] | Deletes the specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json | -| [apiDiagnosticCreateOrUpdateSample.ts][apidiagnosticcreateorupdatesample] | Creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json | -| [apiDiagnosticDeleteSample.ts][apidiagnosticdeletesample] | Deletes the specified Diagnostic from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json | -| [apiDiagnosticGetEntityTagSample.ts][apidiagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json | -| [apiDiagnosticGetSample.ts][apidiagnosticgetsample] | Gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json | -| [apiDiagnosticListByServiceSample.ts][apidiagnosticlistbyservicesample] | Lists all diagnostics of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json | -| [apiDiagnosticUpdateSample.ts][apidiagnosticupdatesample] | Updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json | -| [apiExportGetSample.ts][apiexportgetsample] | Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json | -| [apiGatewayConfigConnectionCreateOrUpdateSample.ts][apigatewayconfigconnectioncreateorupdatesample] | Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json | -| [apiGatewayConfigConnectionDeleteSample.ts][apigatewayconfigconnectiondeletesample] | Deletes an existing API Management gateway config connection. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json | -| [apiGatewayConfigConnectionGetSample.ts][apigatewayconfigconnectiongetsample] | Gets an API Management gateway config connection resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json | -| [apiGatewayConfigConnectionListByGatewaySample.ts][apigatewayconfigconnectionlistbygatewaysample] | List all API Management gateway config connections within a gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json | -| [apiGatewayCreateOrUpdateSample.ts][apigatewaycreateorupdatesample] | Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json | -| [apiGatewayDeleteSample.ts][apigatewaydeletesample] | Deletes an existing API Management gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json | -| [apiGatewayGetSample.ts][apigatewaygetsample] | Gets an API Management gateway resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json | -| [apiGatewayListByResourceGroupSample.ts][apigatewaylistbyresourcegroupsample] | List all API Management gateways within a resource group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json | -| [apiGatewayListSample.ts][apigatewaylistsample] | List all API Management gateways within a subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json | -| [apiGatewayUpdateSample.ts][apigatewayupdatesample] | Updates an existing API Management gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json | -| [apiGetEntityTagSample.ts][apigetentitytagsample] | Gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json | -| [apiGetSample.ts][apigetsample] | Gets the details of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json | -| [apiIssueAttachmentCreateOrUpdateSample.ts][apiissueattachmentcreateorupdatesample] | Creates a new Attachment for the Issue in an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json | -| [apiIssueAttachmentDeleteSample.ts][apiissueattachmentdeletesample] | Deletes the specified comment from an Issue. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json | -| [apiIssueAttachmentGetEntityTagSample.ts][apiissueattachmentgetentitytagsample] | Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json | -| [apiIssueAttachmentGetSample.ts][apiissueattachmentgetsample] | Gets the details of the issue Attachment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json | -| [apiIssueAttachmentListByServiceSample.ts][apiissueattachmentlistbyservicesample] | Lists all attachments for the Issue associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json | -| [apiIssueCommentCreateOrUpdateSample.ts][apiissuecommentcreateorupdatesample] | Creates a new Comment for the Issue in an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json | -| [apiIssueCommentDeleteSample.ts][apiissuecommentdeletesample] | Deletes the specified comment from an Issue. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json | -| [apiIssueCommentGetEntityTagSample.ts][apiissuecommentgetentitytagsample] | Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json | -| [apiIssueCommentGetSample.ts][apiissuecommentgetsample] | Gets the details of the issue Comment for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json | -| [apiIssueCommentListByServiceSample.ts][apiissuecommentlistbyservicesample] | Lists all comments for the Issue associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json | -| [apiIssueCreateOrUpdateSample.ts][apiissuecreateorupdatesample] | Creates a new Issue for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json | -| [apiIssueDeleteSample.ts][apiissuedeletesample] | Deletes the specified Issue from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json | -| [apiIssueGetEntityTagSample.ts][apiissuegetentitytagsample] | Gets the entity state (Etag) version of the Issue for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json | -| [apiIssueGetSample.ts][apiissuegetsample] | Gets the details of the Issue for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json | -| [apiIssueListByServiceSample.ts][apiissuelistbyservicesample] | Lists all issues associated with the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json | -| [apiIssueUpdateSample.ts][apiissueupdatesample] | Updates an existing issue for an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json | -| [apiListByServiceSample.ts][apilistbyservicesample] | Lists all APIs of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json | -| [apiListByTagsSample.ts][apilistbytagssample] | Lists a collection of apis associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json | -| [apiManagementGatewaySkusListAvailableSkusSample.ts][apimanagementgatewayskuslistavailableskussample] | Gets all available SKU for a given API Management gateway x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json | -| [apiManagementOperationsListSample.ts][apimanagementoperationslistsample] | Lists all of the available REST API operations of the Microsoft.ApiManagement provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json | -| [apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts][apimanagementserviceapplynetworkconfigurationupdatessample] | Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json | -| [apiManagementServiceBackupSample.ts][apimanagementservicebackupsample] | Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json | -| [apiManagementServiceCheckNameAvailabilitySample.ts][apimanagementservicechecknameavailabilitysample] | Checks availability and correctness of a name for an API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json | -| [apiManagementServiceCreateOrUpdateSample.ts][apimanagementservicecreateorupdatesample] | Creates or updates an API Management service. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json | -| [apiManagementServiceDeleteSample.ts][apimanagementservicedeletesample] | Deletes an existing API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json | -| [apiManagementServiceGetDomainOwnershipIdentifierSample.ts][apimanagementservicegetdomainownershipidentifiersample] | Get the custom domain ownership identifier for an API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json | -| [apiManagementServiceGetSample.ts][apimanagementservicegetsample] | Gets an API Management service resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json | -| [apiManagementServiceGetSsoTokenSample.ts][apimanagementservicegetssotokensample] | Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json | -| [apiManagementServiceListByResourceGroupSample.ts][apimanagementservicelistbyresourcegroupsample] | List all API Management services within a resource group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json | -| [apiManagementServiceListSample.ts][apimanagementservicelistsample] | Lists all API Management services within an Azure subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json | -| [apiManagementServiceMigrateToStv2Sample.ts][apimanagementservicemigratetostv2sample] | Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json | -| [apiManagementServiceRestoreSample.ts][apimanagementservicerestoresample] | Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json | -| [apiManagementServiceSkusListAvailableServiceSkusSample.ts][apimanagementserviceskuslistavailableserviceskussample] | Gets all available SKU for a given API Management service x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json | -| [apiManagementServiceUpdateSample.ts][apimanagementserviceupdatesample] | Updates an existing API Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json | -| [apiManagementSkusListSample.ts][apimanagementskuslistsample] | Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json | -| [apiManagementWorkspaceLinkGetSample.ts][apimanagementworkspacelinkgetsample] | Gets an API Management WorkspaceLink resource description. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json | -| [apiManagementWorkspaceLinksListByServiceSample.ts][apimanagementworkspacelinkslistbyservicesample] | List all API Management workspaceLinks for a service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json | -| [apiOperationCreateOrUpdateSample.ts][apioperationcreateorupdatesample] | Creates a new operation in the API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json | -| [apiOperationDeleteSample.ts][apioperationdeletesample] | Deletes the specified operation in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json | -| [apiOperationGetEntityTagSample.ts][apioperationgetentitytagsample] | Gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json | -| [apiOperationGetSample.ts][apioperationgetsample] | Gets the details of the API Operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json | -| [apiOperationListByApiSample.ts][apioperationlistbyapisample] | Lists a collection of the operations for the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json | -| [apiOperationPolicyCreateOrUpdateSample.ts][apioperationpolicycreateorupdatesample] | Creates or updates policy configuration for the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json | -| [apiOperationPolicyDeleteSample.ts][apioperationpolicydeletesample] | Deletes the policy configuration at the Api Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json | -| [apiOperationPolicyGetEntityTagSample.ts][apioperationpolicygetentitytagsample] | Gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json | -| [apiOperationPolicyGetSample.ts][apioperationpolicygetsample] | Get the policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json | -| [apiOperationPolicyListByOperationSample.ts][apioperationpolicylistbyoperationsample] | Get the list of policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json | -| [apiOperationUpdateSample.ts][apioperationupdatesample] | Updates the details of the operation in the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json | -| [apiPolicyCreateOrUpdateSample.ts][apipolicycreateorupdatesample] | Creates or updates policy configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json | -| [apiPolicyDeleteSample.ts][apipolicydeletesample] | Deletes the policy configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json | -| [apiPolicyGetEntityTagSample.ts][apipolicygetentitytagsample] | Gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json | -| [apiPolicyGetSample.ts][apipolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json | -| [apiPolicyListByApiSample.ts][apipolicylistbyapisample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json | -| [apiProductListByApisSample.ts][apiproductlistbyapissample] | Lists all Products, which the API is part of. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json | -| [apiReleaseCreateOrUpdateSample.ts][apireleasecreateorupdatesample] | Creates a new Release for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json | -| [apiReleaseDeleteSample.ts][apireleasedeletesample] | Deletes the specified release in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json | -| [apiReleaseGetEntityTagSample.ts][apireleasegetentitytagsample] | Returns the etag of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json | -| [apiReleaseGetSample.ts][apireleasegetsample] | Returns the details of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json | -| [apiReleaseListByServiceSample.ts][apireleaselistbyservicesample] | Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json | -| [apiReleaseUpdateSample.ts][apireleaseupdatesample] | Updates the details of the release of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json | -| [apiRevisionListByServiceSample.ts][apirevisionlistbyservicesample] | Lists all revisions of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json | -| [apiSchemaCreateOrUpdateSample.ts][apischemacreateorupdatesample] | Creates or updates schema configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json | -| [apiSchemaDeleteSample.ts][apischemadeletesample] | Deletes the schema configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json | -| [apiSchemaGetEntityTagSample.ts][apischemagetentitytagsample] | Gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json | -| [apiSchemaGetSample.ts][apischemagetsample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json | -| [apiSchemaListByApiSample.ts][apischemalistbyapisample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json | -| [apiTagDescriptionCreateOrUpdateSample.ts][apitagdescriptioncreateorupdatesample] | Create/Update tag description in scope of the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json | -| [apiTagDescriptionDeleteSample.ts][apitagdescriptiondeletesample] | Delete tag description for the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json | -| [apiTagDescriptionGetEntityTagSample.ts][apitagdescriptiongetentitytagsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json | -| [apiTagDescriptionGetSample.ts][apitagdescriptiongetsample] | Get Tag description in scope of API x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json | -| [apiTagDescriptionListByServiceSample.ts][apitagdescriptionlistbyservicesample] | Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json | -| [apiUpdateSample.ts][apiupdatesample] | Updates the specified API of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json | -| [apiVersionSetCreateOrUpdateSample.ts][apiversionsetcreateorupdatesample] | Creates or Updates a Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json | -| [apiVersionSetDeleteSample.ts][apiversionsetdeletesample] | Deletes specific Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json | -| [apiVersionSetGetEntityTagSample.ts][apiversionsetgetentitytagsample] | Gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json | -| [apiVersionSetGetSample.ts][apiversionsetgetsample] | Gets the details of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json | -| [apiVersionSetListByServiceSample.ts][apiversionsetlistbyservicesample] | Lists a collection of API Version Sets in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json | -| [apiVersionSetUpdateSample.ts][apiversionsetupdatesample] | Updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json | -| [apiWikiCreateOrUpdateSample.ts][apiwikicreateorupdatesample] | Creates a new Wiki for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json | -| [apiWikiDeleteSample.ts][apiwikideletesample] | Deletes the specified Wiki from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json | -| [apiWikiGetEntityTagSample.ts][apiwikigetentitytagsample] | Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json | -| [apiWikiGetSample.ts][apiwikigetsample] | Gets the details of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json | -| [apiWikiUpdateSample.ts][apiwikiupdatesample] | Updates the details of the Wiki for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json | -| [apiWikisListSample.ts][apiwikislistsample] | Gets the wikis for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json | -| [authorizationAccessPolicyCreateOrUpdateSample.ts][authorizationaccesspolicycreateorupdatesample] | Creates or updates Authorization Access Policy. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyDeleteSample.ts][authorizationaccesspolicydeletesample] | Deletes specific access policy from the Authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyGetSample.ts][authorizationaccesspolicygetsample] | Gets the details of the authorization access policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json | -| [authorizationAccessPolicyListByAuthorizationSample.ts][authorizationaccesspolicylistbyauthorizationsample] | Lists a collection of authorization access policy defined within a authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json | -| [authorizationConfirmConsentCodeSample.ts][authorizationconfirmconsentcodesample] | Confirm valid consent code to suppress Authorizations anti-phishing page. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json | -| [authorizationCreateOrUpdateSample.ts][authorizationcreateorupdatesample] | Creates or updates authorization. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json | -| [authorizationDeleteSample.ts][authorizationdeletesample] | Deletes specific Authorization from the Authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json | -| [authorizationGetSample.ts][authorizationgetsample] | Gets the details of the authorization specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json | -| [authorizationListByAuthorizationProviderSample.ts][authorizationlistbyauthorizationprovidersample] | Lists a collection of authorization providers defined within a authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json | -| [authorizationLoginLinksPostSample.ts][authorizationloginlinkspostsample] | Gets authorization login links. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json | -| [authorizationProviderCreateOrUpdateSample.ts][authorizationprovidercreateorupdatesample] | Creates or updates authorization provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json | -| [authorizationProviderDeleteSample.ts][authorizationproviderdeletesample] | Deletes specific authorization provider from the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json | -| [authorizationProviderGetSample.ts][authorizationprovidergetsample] | Gets the details of the authorization provider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json | -| [authorizationProviderListByServiceSample.ts][authorizationproviderlistbyservicesample] | Lists a collection of authorization providers defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json | -| [authorizationServerCreateOrUpdateSample.ts][authorizationservercreateorupdatesample] | Creates new authorization server or updates an existing authorization server. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json | -| [authorizationServerDeleteSample.ts][authorizationserverdeletesample] | Deletes specific authorization server instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json | -| [authorizationServerGetEntityTagSample.ts][authorizationservergetentitytagsample] | Gets the entity state (Etag) version of the authorizationServer specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json | -| [authorizationServerGetSample.ts][authorizationservergetsample] | Gets the details of the authorization server specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json | -| [authorizationServerListByServiceSample.ts][authorizationserverlistbyservicesample] | Lists a collection of authorization servers defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json | -| [authorizationServerListSecretsSample.ts][authorizationserverlistsecretssample] | Gets the client secret details of the authorization server. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json | -| [authorizationServerUpdateSample.ts][authorizationserverupdatesample] | Updates the details of the authorization server specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json | -| [backendCreateOrUpdateSample.ts][backendcreateorupdatesample] | Creates or Updates a backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json | -| [backendDeleteSample.ts][backenddeletesample] | Deletes the specified backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json | -| [backendGetEntityTagSample.ts][backendgetentitytagsample] | Gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json | -| [backendGetSample.ts][backendgetsample] | Gets the details of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json | -| [backendListByServiceSample.ts][backendlistbyservicesample] | Lists a collection of backends in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json | -| [backendReconnectSample.ts][backendreconnectsample] | Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json | -| [backendUpdateSample.ts][backendupdatesample] | Updates an existing backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json | -| [cacheCreateOrUpdateSample.ts][cachecreateorupdatesample] | Creates or updates an External Cache to be used in Api Management instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json | -| [cacheDeleteSample.ts][cachedeletesample] | Deletes specific Cache. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json | -| [cacheGetEntityTagSample.ts][cachegetentitytagsample] | Gets the entity state (Etag) version of the Cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json | -| [cacheGetSample.ts][cachegetsample] | Gets the details of the Cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json | -| [cacheListByServiceSample.ts][cachelistbyservicesample] | Lists a collection of all external Caches in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json | -| [cacheUpdateSample.ts][cacheupdatesample] | Updates the details of the cache specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json | -| [certificateCreateOrUpdateSample.ts][certificatecreateorupdatesample] | Creates or updates the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json | -| [certificateDeleteSample.ts][certificatedeletesample] | Deletes specific certificate. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json | -| [certificateGetEntityTagSample.ts][certificategetentitytagsample] | Gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json | -| [certificateGetSample.ts][certificategetsample] | Gets the details of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json | -| [certificateListByServiceSample.ts][certificatelistbyservicesample] | Lists a collection of all certificates in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json | -| [certificateRefreshSecretSample.ts][certificaterefreshsecretsample] | From KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json | -| [contentItemCreateOrUpdateSample.ts][contentitemcreateorupdatesample] | Creates a new developer portal's content item specified by the provided content type. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json | -| [contentItemDeleteSample.ts][contentitemdeletesample] | Removes the specified developer portal's content item. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json | -| [contentItemGetEntityTagSample.ts][contentitemgetentitytagsample] | Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json | -| [contentItemGetSample.ts][contentitemgetsample] | Returns the developer portal's content item specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json | -| [contentItemListByServiceSample.ts][contentitemlistbyservicesample] | Lists developer portal's content items specified by the provided content type. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json | -| [contentTypeCreateOrUpdateSample.ts][contenttypecreateorupdatesample] | Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json | -| [contentTypeDeleteSample.ts][contenttypedeletesample] | Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json | -| [contentTypeGetSample.ts][contenttypegetsample] | Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json | -| [contentTypeListByServiceSample.ts][contenttypelistbyservicesample] | Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json | -| [delegationSettingsCreateOrUpdateSample.ts][delegationsettingscreateorupdatesample] | Create or Update Delegation settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json | -| [delegationSettingsGetEntityTagSample.ts][delegationsettingsgetentitytagsample] | Gets the entity state (Etag) version of the DelegationSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json | -| [delegationSettingsGetSample.ts][delegationsettingsgetsample] | Get Delegation Settings for the Portal. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json | -| [delegationSettingsListSecretsSample.ts][delegationsettingslistsecretssample] | Gets the secret validation key of the DelegationSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json | -| [delegationSettingsUpdateSample.ts][delegationsettingsupdatesample] | Update Delegation settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json | -| [deletedServicesGetByNameSample.ts][deletedservicesgetbynamesample] | Get soft-deleted Api Management Service by name. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json | -| [deletedServicesListBySubscriptionSample.ts][deletedserviceslistbysubscriptionsample] | Lists all soft-deleted services available for undelete for the given subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json | -| [deletedServicesPurgeSample.ts][deletedservicespurgesample] | Purges Api Management Service (deletes it with no option to undelete). x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json | -| [diagnosticCreateOrUpdateSample.ts][diagnosticcreateorupdatesample] | Creates a new Diagnostic or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json | -| [diagnosticDeleteSample.ts][diagnosticdeletesample] | Deletes the specified Diagnostic. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json | -| [diagnosticGetEntityTagSample.ts][diagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json | -| [diagnosticGetSample.ts][diagnosticgetsample] | Gets the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json | -| [diagnosticListByServiceSample.ts][diagnosticlistbyservicesample] | Lists all diagnostics of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json | -| [diagnosticUpdateSample.ts][diagnosticupdatesample] | Updates the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json | -| [documentationCreateOrUpdateSample.ts][documentationcreateorupdatesample] | Creates a new Documentation or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json | -| [documentationDeleteSample.ts][documentationdeletesample] | Deletes the specified Documentation from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json | -| [documentationGetEntityTagSample.ts][documentationgetentitytagsample] | Gets the entity state (Etag) version of the Documentation by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json | -| [documentationGetSample.ts][documentationgetsample] | Gets the details of the Documentation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json | -| [documentationListByServiceSample.ts][documentationlistbyservicesample] | Lists all Documentations of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json | -| [documentationUpdateSample.ts][documentationupdatesample] | Updates the details of the Documentation for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json | -| [emailTemplateCreateOrUpdateSample.ts][emailtemplatecreateorupdatesample] | Updates an Email Template. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json | -| [emailTemplateDeleteSample.ts][emailtemplatedeletesample] | Reset the Email Template to default template provided by the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json | -| [emailTemplateGetEntityTagSample.ts][emailtemplategetentitytagsample] | Gets the entity state (Etag) version of the email template specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json | -| [emailTemplateGetSample.ts][emailtemplategetsample] | Gets the details of the email template specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json | -| [emailTemplateListByServiceSample.ts][emailtemplatelistbyservicesample] | Gets all email templates x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json | -| [emailTemplateUpdateSample.ts][emailtemplateupdatesample] | Updates API Management email template x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json | -| [gatewayApiCreateOrUpdateSample.ts][gatewayapicreateorupdatesample] | Adds an API to the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json | -| [gatewayApiDeleteSample.ts][gatewayapideletesample] | Deletes the specified API from the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json | -| [gatewayApiGetEntityTagSample.ts][gatewayapigetentitytagsample] | Checks that API entity specified by identifier is associated with the Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json | -| [gatewayApiListByServiceSample.ts][gatewayapilistbyservicesample] | Lists a collection of the APIs associated with a gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json | -| [gatewayCertificateAuthorityCreateOrUpdateSample.ts][gatewaycertificateauthoritycreateorupdatesample] | Assign Certificate entity to Gateway entity as Certificate Authority. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityDeleteSample.ts][gatewaycertificateauthoritydeletesample] | Remove relationship between Certificate Authority and Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityGetEntityTagSample.ts][gatewaycertificateauthoritygetentitytagsample] | Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityGetSample.ts][gatewaycertificateauthoritygetsample] | Get assigned Gateway Certificate Authority details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json | -| [gatewayCertificateAuthorityListByServiceSample.ts][gatewaycertificateauthoritylistbyservicesample] | Lists the collection of Certificate Authorities for the specified Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json | -| [gatewayCreateOrUpdateSample.ts][gatewaycreateorupdatesample] | Creates or updates a Gateway to be used in Api Management instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json | -| [gatewayDeleteSample.ts][gatewaydeletesample] | Deletes specific Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json | -| [gatewayGenerateTokenSample.ts][gatewaygeneratetokensample] | Gets the Shared Access Authorization Token for the gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json | -| [gatewayGetEntityTagSample.ts][gatewaygetentitytagsample] | Gets the entity state (Etag) version of the Gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json | -| [gatewayGetSample.ts][gatewaygetsample] | Gets the details of the Gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json | -| [gatewayHostnameConfigurationCreateOrUpdateSample.ts][gatewayhostnameconfigurationcreateorupdatesample] | Creates of updates hostname configuration for a Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationDeleteSample.ts][gatewayhostnameconfigurationdeletesample] | Deletes the specified hostname configuration from the specified Gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationGetEntityTagSample.ts][gatewayhostnameconfigurationgetentitytagsample] | Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationGetSample.ts][gatewayhostnameconfigurationgetsample] | Get details of a hostname configuration x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json | -| [gatewayHostnameConfigurationListByServiceSample.ts][gatewayhostnameconfigurationlistbyservicesample] | Lists the collection of hostname configurations for the specified gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json | -| [gatewayInvalidateDebugCredentialsSample.ts][gatewayinvalidatedebugcredentialssample] | Action is invalidating all debug credentials issued for gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json | -| [gatewayListByServiceSample.ts][gatewaylistbyservicesample] | Lists a collection of gateways registered with service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json | -| [gatewayListDebugCredentialsSample.ts][gatewaylistdebugcredentialssample] | Create new debug credentials for gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json | -| [gatewayListKeysSample.ts][gatewaylistkeyssample] | Retrieves gateway keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json | -| [gatewayListTraceSample.ts][gatewaylisttracesample] | Fetches trace collected by gateway. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json | -| [gatewayRegenerateKeySample.ts][gatewayregeneratekeysample] | Regenerates specified gateway key invalidating any tokens created with it. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json | -| [gatewayUpdateSample.ts][gatewayupdatesample] | Updates the details of the gateway specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json | -| [globalSchemaCreateOrUpdateSample.ts][globalschemacreateorupdatesample] | Creates new or updates existing specified Schema of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json | -| [globalSchemaDeleteSample.ts][globalschemadeletesample] | Deletes specific Schema. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json | -| [globalSchemaGetEntityTagSample.ts][globalschemagetentitytagsample] | Gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json | -| [globalSchemaGetSample.ts][globalschemagetsample] | Gets the details of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json | -| [globalSchemaListByServiceSample.ts][globalschemalistbyservicesample] | Lists a collection of schemas registered with service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json | -| [graphQlApiResolverCreateOrUpdateSample.ts][graphqlapiresolvercreateorupdatesample] | Creates a new resolver in the GraphQL API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json | -| [graphQlApiResolverDeleteSample.ts][graphqlapiresolverdeletesample] | Deletes the specified resolver in the GraphQL API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json | -| [graphQlApiResolverGetEntityTagSample.ts][graphqlapiresolvergetentitytagsample] | Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json | -| [graphQlApiResolverGetSample.ts][graphqlapiresolvergetsample] | Gets the details of the GraphQL API Resolver specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json | -| [graphQlApiResolverListByApiSample.ts][graphqlapiresolverlistbyapisample] | Lists a collection of the resolvers for the specified GraphQL API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json | -| [graphQlApiResolverPolicyCreateOrUpdateSample.ts][graphqlapiresolverpolicycreateorupdatesample] | Creates or updates policy configuration for the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyDeleteSample.ts][graphqlapiresolverpolicydeletesample] | Deletes the policy configuration at the GraphQL Api Resolver. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyGetEntityTagSample.ts][graphqlapiresolverpolicygetentitytagsample] | Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyGetSample.ts][graphqlapiresolverpolicygetsample] | Get the policy configuration at the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json | -| [graphQlApiResolverPolicyListByResolverSample.ts][graphqlapiresolverpolicylistbyresolversample] | Get the list of policy configuration at the GraphQL API Resolver level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json | -| [graphQlApiResolverUpdateSample.ts][graphqlapiresolverupdatesample] | Updates the details of the resolver in the GraphQL API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json | -| [groupCreateOrUpdateSample.ts][groupcreateorupdatesample] | Creates or Updates a group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json | -| [groupDeleteSample.ts][groupdeletesample] | Deletes specific group of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json | -| [groupGetEntityTagSample.ts][groupgetentitytagsample] | Gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json | -| [groupGetSample.ts][groupgetsample] | Gets the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json | -| [groupListByServiceSample.ts][grouplistbyservicesample] | Lists a collection of groups defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json | -| [groupUpdateSample.ts][groupupdatesample] | Updates the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json | -| [groupUserCheckEntityExistsSample.ts][groupusercheckentityexistssample] | Checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json | -| [groupUserCreateSample.ts][groupusercreatesample] | Add existing user to existing group x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json | -| [groupUserDeleteSample.ts][groupuserdeletesample] | Remove existing user from existing group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json | -| [groupUserListSample.ts][groupuserlistsample] | Lists a collection of user entities associated with the group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json | -| [identityProviderCreateOrUpdateSample.ts][identityprovidercreateorupdatesample] | Creates or Updates the IdentityProvider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json | -| [identityProviderDeleteSample.ts][identityproviderdeletesample] | Deletes the specified identity provider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json | -| [identityProviderGetEntityTagSample.ts][identityprovidergetentitytagsample] | Gets the entity state (Etag) version of the identityProvider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json | -| [identityProviderGetSample.ts][identityprovidergetsample] | Gets the configuration details of the identity Provider configured in specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json | -| [identityProviderListByServiceSample.ts][identityproviderlistbyservicesample] | Lists a collection of Identity Provider configured in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json | -| [identityProviderListSecretsSample.ts][identityproviderlistsecretssample] | Gets the client secret details of the Identity Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json | -| [identityProviderUpdateSample.ts][identityproviderupdatesample] | Updates an existing IdentityProvider configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json | -| [issueGetSample.ts][issuegetsample] | Gets API Management issue details x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json | -| [issueListByServiceSample.ts][issuelistbyservicesample] | Lists a collection of issues in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json | -| [loggerCreateOrUpdateSample.ts][loggercreateorupdatesample] | Creates or Updates a logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json | -| [loggerDeleteSample.ts][loggerdeletesample] | Deletes the specified logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json | -| [loggerGetEntityTagSample.ts][loggergetentitytagsample] | Gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json | -| [loggerGetSample.ts][loggergetsample] | Gets the details of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json | -| [loggerListByServiceSample.ts][loggerlistbyservicesample] | Lists a collection of loggers in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json | -| [loggerUpdateSample.ts][loggerupdatesample] | Updates an existing logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json | -| [namedValueCreateOrUpdateSample.ts][namedvaluecreateorupdatesample] | Creates or updates named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json | -| [namedValueDeleteSample.ts][namedvaluedeletesample] | Deletes specific named value from the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json | -| [namedValueGetEntityTagSample.ts][namedvaluegetentitytagsample] | Gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json | -| [namedValueGetSample.ts][namedvaluegetsample] | Gets the details of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json | -| [namedValueListByServiceSample.ts][namedvaluelistbyservicesample] | Lists a collection of named values defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json | -| [namedValueListValueSample.ts][namedvaluelistvaluesample] | Gets the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json | -| [namedValueRefreshSecretSample.ts][namedvaluerefreshsecretsample] | Refresh the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json | -| [namedValueUpdateSample.ts][namedvalueupdatesample] | Updates the specific named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json | -| [networkStatusListByLocationSample.ts][networkstatuslistbylocationsample] | Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json | -| [networkStatusListByServiceSample.ts][networkstatuslistbyservicesample] | Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json | -| [notificationCreateOrUpdateSample.ts][notificationcreateorupdatesample] | Create or Update API Management publisher notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json | -| [notificationGetSample.ts][notificationgetsample] | Gets the details of the Notification specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json | -| [notificationListByServiceSample.ts][notificationlistbyservicesample] | Lists a collection of properties defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json | -| [notificationRecipientEmailCheckEntityExistsSample.ts][notificationrecipientemailcheckentityexistssample] | Determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json | -| [notificationRecipientEmailCreateOrUpdateSample.ts][notificationrecipientemailcreateorupdatesample] | Adds the Email address to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json | -| [notificationRecipientEmailDeleteSample.ts][notificationrecipientemaildeletesample] | Removes the email from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json | -| [notificationRecipientEmailListByNotificationSample.ts][notificationrecipientemaillistbynotificationsample] | Gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json | -| [notificationRecipientUserCheckEntityExistsSample.ts][notificationrecipientusercheckentityexistssample] | Determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json | -| [notificationRecipientUserCreateOrUpdateSample.ts][notificationrecipientusercreateorupdatesample] | Adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json | -| [notificationRecipientUserDeleteSample.ts][notificationrecipientuserdeletesample] | Removes the API Management user from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json | -| [notificationRecipientUserListByNotificationSample.ts][notificationrecipientuserlistbynotificationsample] | Gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json | -| [openIdConnectProviderCreateOrUpdateSample.ts][openidconnectprovidercreateorupdatesample] | Creates or updates the OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json | -| [openIdConnectProviderDeleteSample.ts][openidconnectproviderdeletesample] | Deletes specific OpenID Connect Provider of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json | -| [openIdConnectProviderGetEntityTagSample.ts][openidconnectprovidergetentitytagsample] | Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json | -| [openIdConnectProviderGetSample.ts][openidconnectprovidergetsample] | Gets specific OpenID Connect Provider without secrets. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json | -| [openIdConnectProviderListByServiceSample.ts][openidconnectproviderlistbyservicesample] | Lists of all the OpenId Connect Providers. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json | -| [openIdConnectProviderListSecretsSample.ts][openidconnectproviderlistsecretssample] | Gets the client secret details of the OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json | -| [openIdConnectProviderUpdateSample.ts][openidconnectproviderupdatesample] | Updates the specific OpenID Connect Provider. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json | -| [operationListByTagsSample.ts][operationlistbytagssample] | Lists a collection of operations associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json | -| [operationStatusGetSample.ts][operationstatusgetsample] | Returns the current status of an async operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json | -| [operationsResultsGetSample.ts][operationsresultsgetsample] | Returns operation results for long running operations executing DELETE or PATCH on the resource. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json | -| [outboundNetworkDependenciesEndpointsListByServiceSample.ts][outboundnetworkdependenciesendpointslistbyservicesample] | Gets the network endpoints of all outbound dependencies of a ApiManagement service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json | -| [performConnectivityCheckAsyncSample.ts][performconnectivitycheckasyncsample] | Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json | -| [policyCreateOrUpdateSample.ts][policycreateorupdatesample] | Creates or updates the global policy configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json | -| [policyDeleteSample.ts][policydeletesample] | Deletes the global policy configuration of the Api Management Service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json | -| [policyDescriptionListByServiceSample.ts][policydescriptionlistbyservicesample] | Lists all policy descriptions. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json | -| [policyFragmentCreateOrUpdateSample.ts][policyfragmentcreateorupdatesample] | Creates or updates a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json | -| [policyFragmentDeleteSample.ts][policyfragmentdeletesample] | Deletes a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json | -| [policyFragmentGetEntityTagSample.ts][policyfragmentgetentitytagsample] | Gets the entity state (Etag) version of a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json | -| [policyFragmentGetSample.ts][policyfragmentgetsample] | Gets a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json | -| [policyFragmentListByServiceSample.ts][policyfragmentlistbyservicesample] | Gets all policy fragments. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json | -| [policyFragmentListReferencesSample.ts][policyfragmentlistreferencessample] | Lists policy resources that reference the policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json | -| [policyGetEntityTagSample.ts][policygetentitytagsample] | Gets the entity state (Etag) version of the Global policy definition in the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json | -| [policyGetSample.ts][policygetsample] | Get the Global policy definition of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json | -| [policyListByServiceSample.ts][policylistbyservicesample] | Lists all the Global Policy definitions of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json | -| [policyRestrictionCreateOrUpdateSample.ts][policyrestrictioncreateorupdatesample] | Creates or updates the policy restriction configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json | -| [policyRestrictionDeleteSample.ts][policyrestrictiondeletesample] | Deletes the policy restriction configuration of the Api Management Service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json | -| [policyRestrictionGetEntityTagSample.ts][policyrestrictiongetentitytagsample] | Gets the entity state (Etag) version of the policy restriction in the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json | -| [policyRestrictionGetSample.ts][policyrestrictiongetsample] | Get the policy restriction of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json | -| [policyRestrictionListByServiceSample.ts][policyrestrictionlistbyservicesample] | Gets all policy restrictions of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json | -| [policyRestrictionUpdateSample.ts][policyrestrictionupdatesample] | Updates the policy restriction configuration of the Api Management service. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json | -| [policyRestrictionValidationsByServiceSample.ts][policyrestrictionvalidationsbyservicesample] | Validate all policies of API Management services. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json | -| [portalConfigCreateOrUpdateSample.ts][portalconfigcreateorupdatesample] | Create or update the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json | -| [portalConfigGetEntityTagSample.ts][portalconfiggetentitytagsample] | Gets the entity state (Etag) version of the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json | -| [portalConfigGetSample.ts][portalconfiggetsample] | Get the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json | -| [portalConfigListByServiceSample.ts][portalconfiglistbyservicesample] | Lists the developer portal configurations. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json | -| [portalConfigUpdateSample.ts][portalconfigupdatesample] | Update the developer portal configuration. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json | -| [portalRevisionCreateOrUpdateSample.ts][portalrevisioncreateorupdatesample] | Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json | -| [portalRevisionGetEntityTagSample.ts][portalrevisiongetentitytagsample] | Gets the developer portal revision specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json | -| [portalRevisionGetSample.ts][portalrevisiongetsample] | Gets the developer portal's revision specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json | -| [portalRevisionListByServiceSample.ts][portalrevisionlistbyservicesample] | Lists developer portal's revisions. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json | -| [portalRevisionUpdateSample.ts][portalrevisionupdatesample] | Updates the description of specified portal revision or makes it current. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json | -| [portalSettingsListByServiceSample.ts][portalsettingslistbyservicesample] | Lists a collection of portalsettings defined within a service instance.. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json | -| [privateEndpointConnectionCreateOrUpdateSample.ts][privateendpointconnectioncreateorupdatesample] | Creates a new Private Endpoint Connection or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json | -| [privateEndpointConnectionDeleteSample.ts][privateendpointconnectiondeletesample] | Deletes the specified Private Endpoint Connection. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionGetByNameSample.ts][privateendpointconnectiongetbynamesample] | Gets the details of the Private Endpoint Connection specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json | -| [privateEndpointConnectionGetPrivateLinkResourceSample.ts][privateendpointconnectiongetprivatelinkresourcesample] | Gets the private link resources x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json | -| [privateEndpointConnectionListByServiceSample.ts][privateendpointconnectionlistbyservicesample] | Lists all private endpoint connections of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json | -| [privateEndpointConnectionListPrivateLinkResourcesSample.ts][privateendpointconnectionlistprivatelinkresourcessample] | Gets the private link resources x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json | -| [productApiCheckEntityExistsSample.ts][productapicheckentityexistssample] | Checks that API entity specified by identifier is associated with the Product entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json | -| [productApiCreateOrUpdateSample.ts][productapicreateorupdatesample] | Adds an API to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json | -| [productApiDeleteSample.ts][productapideletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json | -| [productApiLinkCreateOrUpdateSample.ts][productapilinkcreateorupdatesample] | Adds an API to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json | -| [productApiLinkDeleteSample.ts][productapilinkdeletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json | -| [productApiLinkGetSample.ts][productapilinkgetsample] | Gets the API link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json | -| [productApiLinkListByProductSample.ts][productapilinklistbyproductsample] | Lists a collection of the API links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json | -| [productApiListByProductSample.ts][productapilistbyproductsample] | Lists a collection of the APIs associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json | -| [productCreateOrUpdateSample.ts][productcreateorupdatesample] | Creates or Updates a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json | -| [productDeleteSample.ts][productdeletesample] | Delete product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json | -| [productGetEntityTagSample.ts][productgetentitytagsample] | Gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json | -| [productGetSample.ts][productgetsample] | Gets the details of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json | -| [productGroupCheckEntityExistsSample.ts][productgroupcheckentityexistssample] | Checks that Group entity specified by identifier is associated with the Product entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json | -| [productGroupCreateOrUpdateSample.ts][productgroupcreateorupdatesample] | Adds the association between the specified developer group with the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json | -| [productGroupDeleteSample.ts][productgroupdeletesample] | Deletes the association between the specified group and product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json | -| [productGroupLinkCreateOrUpdateSample.ts][productgrouplinkcreateorupdatesample] | Adds a group to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json | -| [productGroupLinkDeleteSample.ts][productgrouplinkdeletesample] | Deletes the specified group from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json | -| [productGroupLinkGetSample.ts][productgrouplinkgetsample] | Gets the group link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json | -| [productGroupLinkListByProductSample.ts][productgrouplinklistbyproductsample] | Lists a collection of the group links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json | -| [productGroupListByProductSample.ts][productgrouplistbyproductsample] | Lists the collection of developer groups associated with the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json | -| [productListByServiceSample.ts][productlistbyservicesample] | Lists a collection of products in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json | -| [productListByTagsSample.ts][productlistbytagssample] | Lists a collection of products associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json | -| [productPolicyCreateOrUpdateSample.ts][productpolicycreateorupdatesample] | Creates or updates policy configuration for the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json | -| [productPolicyDeleteSample.ts][productpolicydeletesample] | Deletes the policy configuration at the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json | -| [productPolicyGetEntityTagSample.ts][productpolicygetentitytagsample] | Get the ETag of the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json | -| [productPolicyGetSample.ts][productpolicygetsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json | -| [productPolicyListByProductSample.ts][productpolicylistbyproductsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json | -| [productSubscriptionsListSample.ts][productsubscriptionslistsample] | Lists the collection of subscriptions to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json | -| [productUpdateSample.ts][productupdatesample] | Update existing product details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json | -| [productWikiCreateOrUpdateSample.ts][productwikicreateorupdatesample] | Creates a new Wiki for a Product or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json | -| [productWikiDeleteSample.ts][productwikideletesample] | Deletes the specified Wiki from a Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json | -| [productWikiGetEntityTagSample.ts][productwikigetentitytagsample] | Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json | -| [productWikiGetSample.ts][productwikigetsample] | Gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json | -| [productWikiUpdateSample.ts][productwikiupdatesample] | Updates the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json | -| [productWikisListSample.ts][productwikislistsample] | Gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json | -| [quotaByCounterKeysListByServiceSample.ts][quotabycounterkeyslistbyservicesample] | Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json | -| [quotaByCounterKeysUpdateSample.ts][quotabycounterkeysupdatesample] | Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json | -| [quotaByPeriodKeysGetSample.ts][quotabyperiodkeysgetsample] | Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json | -| [quotaByPeriodKeysUpdateSample.ts][quotabyperiodkeysupdatesample] | Updates an existing quota counter value in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json | -| [regionListByServiceSample.ts][regionlistbyservicesample] | Lists all azure regions in which the service exists. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json | -| [reportsListByApiSample.ts][reportslistbyapisample] | Lists report records by API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json | -| [reportsListByGeoSample.ts][reportslistbygeosample] | Lists report records by geography. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json | -| [reportsListByOperationSample.ts][reportslistbyoperationsample] | Lists report records by API Operations. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json | -| [reportsListByProductSample.ts][reportslistbyproductsample] | Lists report records by Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json | -| [reportsListByRequestSample.ts][reportslistbyrequestsample] | Lists report records by Request. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json | -| [reportsListBySubscriptionSample.ts][reportslistbysubscriptionsample] | Lists report records by subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json | -| [reportsListByTimeSample.ts][reportslistbytimesample] | Lists report records by Time. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json | -| [reportsListByUserSample.ts][reportslistbyusersample] | Lists report records by User. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json | -| [signInSettingsCreateOrUpdateSample.ts][signinsettingscreateorupdatesample] | Create or Update Sign-In settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json | -| [signInSettingsGetEntityTagSample.ts][signinsettingsgetentitytagsample] | Gets the entity state (Etag) version of the SignInSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json | -| [signInSettingsGetSample.ts][signinsettingsgetsample] | Get Sign In Settings for the Portal x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json | -| [signInSettingsUpdateSample.ts][signinsettingsupdatesample] | Update Sign-In settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json | -| [signUpSettingsCreateOrUpdateSample.ts][signupsettingscreateorupdatesample] | Create or Update Sign-Up settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json | -| [signUpSettingsGetEntityTagSample.ts][signupsettingsgetentitytagsample] | Gets the entity state (Etag) version of the SignUpSettings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json | -| [signUpSettingsGetSample.ts][signupsettingsgetsample] | Get Sign Up Settings for the Portal x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json | -| [signUpSettingsUpdateSample.ts][signupsettingsupdatesample] | Update Sign-Up settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json | -| [subscriptionCreateOrUpdateSample.ts][subscriptioncreateorupdatesample] | Creates or updates the subscription of specified user to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json | -| [subscriptionDeleteSample.ts][subscriptiondeletesample] | Deletes the specified subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json | -| [subscriptionGetEntityTagSample.ts][subscriptiongetentitytagsample] | Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json | -| [subscriptionGetSample.ts][subscriptiongetsample] | Gets the specified Subscription entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json | -| [subscriptionListSample.ts][subscriptionlistsample] | Lists all subscriptions of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json | -| [subscriptionListSecretsSample.ts][subscriptionlistsecretssample] | Gets the specified Subscription keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json | -| [subscriptionRegeneratePrimaryKeySample.ts][subscriptionregenerateprimarykeysample] | Regenerates primary key of existing subscription of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json | -| [subscriptionRegenerateSecondaryKeySample.ts][subscriptionregeneratesecondarykeysample] | Regenerates secondary key of existing subscription of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json | -| [subscriptionUpdateSample.ts][subscriptionupdatesample] | Updates the details of a subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json | -| [tagApiLinkCreateOrUpdateSample.ts][tagapilinkcreateorupdatesample] | Adds an API to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json | -| [tagApiLinkDeleteSample.ts][tagapilinkdeletesample] | Deletes the specified API from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json | -| [tagApiLinkGetSample.ts][tagapilinkgetsample] | Gets the API link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json | -| [tagApiLinkListByProductSample.ts][tagapilinklistbyproductsample] | Lists a collection of the API links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json | -| [tagAssignToApiSample.ts][tagassigntoapisample] | Assign tag to the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json | -| [tagAssignToOperationSample.ts][tagassigntooperationsample] | Assign tag to the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json | -| [tagAssignToProductSample.ts][tagassigntoproductsample] | Assign tag to the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json | -| [tagCreateOrUpdateSample.ts][tagcreateorupdatesample] | Creates a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json | -| [tagDeleteSample.ts][tagdeletesample] | Deletes specific tag of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json | -| [tagDetachFromApiSample.ts][tagdetachfromapisample] | Detach the tag from the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json | -| [tagDetachFromOperationSample.ts][tagdetachfromoperationsample] | Detach the tag from the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json | -| [tagDetachFromProductSample.ts][tagdetachfromproductsample] | Detach the tag from the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json | -| [tagGetByApiSample.ts][taggetbyapisample] | Get tag associated with the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json | -| [tagGetByOperationSample.ts][taggetbyoperationsample] | Get tag associated with the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json | -| [tagGetByProductSample.ts][taggetbyproductsample] | Get tag associated with the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json | -| [tagGetEntityStateByApiSample.ts][taggetentitystatebyapisample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json | -| [tagGetEntityStateByOperationSample.ts][taggetentitystatebyoperationsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json | -| [tagGetEntityStateByProductSample.ts][taggetentitystatebyproductsample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json | -| [tagGetEntityStateSample.ts][taggetentitystatesample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json | -| [tagGetSample.ts][taggetsample] | Gets the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json | -| [tagListByApiSample.ts][taglistbyapisample] | Lists all Tags associated with the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json | -| [tagListByOperationSample.ts][taglistbyoperationsample] | Lists all Tags associated with the Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json | -| [tagListByProductSample.ts][taglistbyproductsample] | Lists all Tags associated with the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json | -| [tagListByServiceSample.ts][taglistbyservicesample] | Lists a collection of tags defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json | -| [tagOperationLinkCreateOrUpdateSample.ts][tagoperationlinkcreateorupdatesample] | Adds an operation to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json | -| [tagOperationLinkDeleteSample.ts][tagoperationlinkdeletesample] | Deletes the specified operation from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json | -| [tagOperationLinkGetSample.ts][tagoperationlinkgetsample] | Gets the operation link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json | -| [tagOperationLinkListByProductSample.ts][tagoperationlinklistbyproductsample] | Lists a collection of the operation links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json | -| [tagProductLinkCreateOrUpdateSample.ts][tagproductlinkcreateorupdatesample] | Adds a product to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json | -| [tagProductLinkDeleteSample.ts][tagproductlinkdeletesample] | Deletes the specified product from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json | -| [tagProductLinkGetSample.ts][tagproductlinkgetsample] | Gets the product link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json | -| [tagProductLinkListByProductSample.ts][tagproductlinklistbyproductsample] | Lists a collection of the product links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json | -| [tagResourceListByServiceSample.ts][tagresourcelistbyservicesample] | Lists a collection of resources associated with tags. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json | -| [tagUpdateSample.ts][tagupdatesample] | Updates the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json | -| [tenantAccessCreateSample.ts][tenantaccesscreatesample] | Update tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json | -| [tenantAccessGetEntityTagSample.ts][tenantaccessgetentitytagsample] | Tenant access metadata x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json | -| [tenantAccessGetSample.ts][tenantaccessgetsample] | Get tenant access information details without secrets. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json | -| [tenantAccessGitRegeneratePrimaryKeySample.ts][tenantaccessgitregenerateprimarykeysample] | Regenerate primary access key for GIT. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessGitRegenerateSecondaryKeySample.ts][tenantaccessgitregeneratesecondarykeysample] | Regenerate secondary access key for GIT. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessListByServiceSample.ts][tenantaccesslistbyservicesample] | Returns list of access infos - for Git and Management endpoints. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json | -| [tenantAccessListSecretsSample.ts][tenantaccesslistsecretssample] | Get tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json | -| [tenantAccessRegeneratePrimaryKeySample.ts][tenantaccessregenerateprimarykeysample] | Regenerate primary access key x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessRegenerateSecondaryKeySample.ts][tenantaccessregeneratesecondarykeysample] | Regenerate secondary access key x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json | -| [tenantAccessUpdateSample.ts][tenantaccessupdatesample] | Update tenant access information details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json | -| [tenantConfigurationDeploySample.ts][tenantconfigurationdeploysample] | This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json | -| [tenantConfigurationGetSyncStateSample.ts][tenantconfigurationgetsyncstatesample] | Gets the status of the most recent synchronization between the configuration database and the Git repository. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json | -| [tenantConfigurationSaveSample.ts][tenantconfigurationsavesample] | This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json | -| [tenantConfigurationValidateSample.ts][tenantconfigurationvalidatesample] | This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json | -| [tenantSettingsGetSample.ts][tenantsettingsgetsample] | Get tenant settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json | -| [tenantSettingsListByServiceSample.ts][tenantsettingslistbyservicesample] | Public settings. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json | -| [userConfirmationPasswordSendSample.ts][userconfirmationpasswordsendsample] | Sends confirmation x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json | -| [userCreateOrUpdateSample.ts][usercreateorupdatesample] | Creates or Updates a user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json | -| [userDeleteSample.ts][userdeletesample] | Deletes specific user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json | -| [userGenerateSsoUrlSample.ts][usergeneratessourlsample] | Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json | -| [userGetEntityTagSample.ts][usergetentitytagsample] | Gets the entity state (Etag) version of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json | -| [userGetSample.ts][usergetsample] | Gets the details of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json | -| [userGetSharedAccessTokenSample.ts][usergetsharedaccesstokensample] | Gets the Shared Access Authorization Token for the User. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json | -| [userGroupListSample.ts][usergrouplistsample] | Lists all user groups. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json | -| [userIdentitiesListSample.ts][useridentitieslistsample] | List of all user identities. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json | -| [userListByServiceSample.ts][userlistbyservicesample] | Lists a collection of registered users in the specified service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json | -| [userSubscriptionGetSample.ts][usersubscriptiongetsample] | Gets the specified Subscription entity associated with a particular user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json | -| [userSubscriptionListSample.ts][usersubscriptionlistsample] | Lists the collection of subscriptions of the specified user. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json | -| [userUpdateSample.ts][userupdatesample] | Updates the details of the user specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json | -| [workspaceApiCreateOrUpdateSample.ts][workspaceapicreateorupdatesample] | Creates new or updates existing specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json | -| [workspaceApiDeleteSample.ts][workspaceapideletesample] | Deletes the specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json | -| [workspaceApiDiagnosticCreateOrUpdateSample.ts][workspaceapidiagnosticcreateorupdatesample] | Creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticDeleteSample.ts][workspaceapidiagnosticdeletesample] | Deletes the specified Diagnostic from an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticGetEntityTagSample.ts][workspaceapidiagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticGetSample.ts][workspaceapidiagnosticgetsample] | Gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json | -| [workspaceApiDiagnosticListByWorkspaceSample.ts][workspaceapidiagnosticlistbyworkspacesample] | Lists all diagnostics of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json | -| [workspaceApiDiagnosticUpdateSample.ts][workspaceapidiagnosticupdatesample] | Updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json | -| [workspaceApiExportGetSample.ts][workspaceapiexportgetsample] | Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json | -| [workspaceApiGetEntityTagSample.ts][workspaceapigetentitytagsample] | Gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json | -| [workspaceApiGetSample.ts][workspaceapigetsample] | Gets the details of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json | -| [workspaceApiListByServiceSample.ts][workspaceapilistbyservicesample] | Lists all APIs of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json | -| [workspaceApiOperationCreateOrUpdateSample.ts][workspaceapioperationcreateorupdatesample] | Creates a new operation in the API or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json | -| [workspaceApiOperationDeleteSample.ts][workspaceapioperationdeletesample] | Deletes the specified operation in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json | -| [workspaceApiOperationGetEntityTagSample.ts][workspaceapioperationgetentitytagsample] | Gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json | -| [workspaceApiOperationGetSample.ts][workspaceapioperationgetsample] | Gets the details of the API Operation specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json | -| [workspaceApiOperationListByApiSample.ts][workspaceapioperationlistbyapisample] | Lists a collection of the operations for the specified API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json | -| [workspaceApiOperationPolicyCreateOrUpdateSample.ts][workspaceapioperationpolicycreateorupdatesample] | Creates or updates policy configuration for the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyDeleteSample.ts][workspaceapioperationpolicydeletesample] | Deletes the policy configuration at the Api Operation. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyGetEntityTagSample.ts][workspaceapioperationpolicygetentitytagsample] | Gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyGetSample.ts][workspaceapioperationpolicygetsample] | Get the policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json | -| [workspaceApiOperationPolicyListByOperationSample.ts][workspaceapioperationpolicylistbyoperationsample] | Get the list of policy configuration at the API Operation level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json | -| [workspaceApiOperationUpdateSample.ts][workspaceapioperationupdatesample] | Updates the details of the operation in the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json | -| [workspaceApiPolicyCreateOrUpdateSample.ts][workspaceapipolicycreateorupdatesample] | Creates or updates policy configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json | -| [workspaceApiPolicyDeleteSample.ts][workspaceapipolicydeletesample] | Deletes the policy configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json | -| [workspaceApiPolicyGetEntityTagSample.ts][workspaceapipolicygetentitytagsample] | Gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json | -| [workspaceApiPolicyGetSample.ts][workspaceapipolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json | -| [workspaceApiPolicyListByApiSample.ts][workspaceapipolicylistbyapisample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json | -| [workspaceApiReleaseCreateOrUpdateSample.ts][workspaceapireleasecreateorupdatesample] | Creates a new Release for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json | -| [workspaceApiReleaseDeleteSample.ts][workspaceapireleasedeletesample] | Deletes the specified release in the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json | -| [workspaceApiReleaseGetEntityTagSample.ts][workspaceapireleasegetentitytagsample] | Returns the etag of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json | -| [workspaceApiReleaseGetSample.ts][workspaceapireleasegetsample] | Returns the details of an API release. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json | -| [workspaceApiReleaseListByServiceSample.ts][workspaceapireleaselistbyservicesample] | Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json | -| [workspaceApiReleaseUpdateSample.ts][workspaceapireleaseupdatesample] | Updates the details of the release of the API specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json | -| [workspaceApiRevisionListByServiceSample.ts][workspaceapirevisionlistbyservicesample] | Lists all revisions of an API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json | -| [workspaceApiSchemaCreateOrUpdateSample.ts][workspaceapischemacreateorupdatesample] | Creates or updates schema configuration for the API. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json | -| [workspaceApiSchemaDeleteSample.ts][workspaceapischemadeletesample] | Deletes the schema configuration at the Api. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json | -| [workspaceApiSchemaGetEntityTagSample.ts][workspaceapischemagetentitytagsample] | Gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json | -| [workspaceApiSchemaGetSample.ts][workspaceapischemagetsample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json | -| [workspaceApiSchemaListByApiSample.ts][workspaceapischemalistbyapisample] | Get the schema configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json | -| [workspaceApiUpdateSample.ts][workspaceapiupdatesample] | Updates the specified API of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json | -| [workspaceApiVersionSetCreateOrUpdateSample.ts][workspaceapiversionsetcreateorupdatesample] | Creates or Updates a Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetDeleteSample.ts][workspaceapiversionsetdeletesample] | Deletes specific Api Version Set. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetGetEntityTagSample.ts][workspaceapiversionsetgetentitytagsample] | Gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetGetSample.ts][workspaceapiversionsetgetsample] | Gets the details of the Api Version Set specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json | -| [workspaceApiVersionSetListByServiceSample.ts][workspaceapiversionsetlistbyservicesample] | Lists a collection of API Version Sets in the specified workspace with a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json | -| [workspaceApiVersionSetUpdateSample.ts][workspaceapiversionsetupdatesample] | Updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json | -| [workspaceBackendCreateOrUpdateSample.ts][workspacebackendcreateorupdatesample] | Creates or Updates a backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json | -| [workspaceBackendDeleteSample.ts][workspacebackenddeletesample] | Deletes the specified backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json | -| [workspaceBackendGetEntityTagSample.ts][workspacebackendgetentitytagsample] | Gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json | -| [workspaceBackendGetSample.ts][workspacebackendgetsample] | Gets the details of the backend specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json | -| [workspaceBackendListByWorkspaceSample.ts][workspacebackendlistbyworkspacesample] | Lists a collection of backends in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json | -| [workspaceBackendUpdateSample.ts][workspacebackendupdatesample] | Updates an existing backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json | -| [workspaceCertificateCreateOrUpdateSample.ts][workspacecertificatecreateorupdatesample] | Creates or updates the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json | -| [workspaceCertificateDeleteSample.ts][workspacecertificatedeletesample] | Deletes specific certificate. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json | -| [workspaceCertificateGetEntityTagSample.ts][workspacecertificategetentitytagsample] | Gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json | -| [workspaceCertificateGetSample.ts][workspacecertificategetsample] | Gets the details of the certificate specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json | -| [workspaceCertificateListByWorkspaceSample.ts][workspacecertificatelistbyworkspacesample] | Lists a collection of all certificates in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json | -| [workspaceCertificateRefreshSecretSample.ts][workspacecertificaterefreshsecretsample] | From KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json | -| [workspaceCreateOrUpdateSample.ts][workspacecreateorupdatesample] | Creates a new workspace or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json | -| [workspaceDeleteSample.ts][workspacedeletesample] | Deletes the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json | -| [workspaceDiagnosticCreateOrUpdateSample.ts][workspacediagnosticcreateorupdatesample] | Creates a new Diagnostic or updates an existing one. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json | -| [workspaceDiagnosticDeleteSample.ts][workspacediagnosticdeletesample] | Deletes the specified Diagnostic. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json | -| [workspaceDiagnosticGetEntityTagSample.ts][workspacediagnosticgetentitytagsample] | Gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json | -| [workspaceDiagnosticGetSample.ts][workspacediagnosticgetsample] | Gets the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json | -| [workspaceDiagnosticListByWorkspaceSample.ts][workspacediagnosticlistbyworkspacesample] | Lists all diagnostics in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json | -| [workspaceDiagnosticUpdateSample.ts][workspacediagnosticupdatesample] | Updates the details of the Diagnostic specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json | -| [workspaceGetEntityTagSample.ts][workspacegetentitytagsample] | Gets the entity state (Etag) version of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json | -| [workspaceGetSample.ts][workspacegetsample] | Gets the details of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json | -| [workspaceGlobalSchemaCreateOrUpdateSample.ts][workspaceglobalschemacreateorupdatesample] | Creates new or updates existing specified Schema of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json | -| [workspaceGlobalSchemaDeleteSample.ts][workspaceglobalschemadeletesample] | Deletes specific Schema. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json | -| [workspaceGlobalSchemaGetEntityTagSample.ts][workspaceglobalschemagetentitytagsample] | Gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json | -| [workspaceGlobalSchemaGetSample.ts][workspaceglobalschemagetsample] | Gets the details of the Schema specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json | -| [workspaceGlobalSchemaListByServiceSample.ts][workspaceglobalschemalistbyservicesample] | Lists a collection of schemas registered with workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json | -| [workspaceGroupCreateOrUpdateSample.ts][workspacegroupcreateorupdatesample] | Creates or Updates a group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json | -| [workspaceGroupDeleteSample.ts][workspacegroupdeletesample] | Deletes specific group of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json | -| [workspaceGroupGetEntityTagSample.ts][workspacegroupgetentitytagsample] | Gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json | -| [workspaceGroupGetSample.ts][workspacegroupgetsample] | Gets the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json | -| [workspaceGroupListByServiceSample.ts][workspacegrouplistbyservicesample] | Lists a collection of groups defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json | -| [workspaceGroupUpdateSample.ts][workspacegroupupdatesample] | Updates the details of the group specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json | -| [workspaceGroupUserCheckEntityExistsSample.ts][workspacegroupusercheckentityexistssample] | Checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json | -| [workspaceGroupUserCreateSample.ts][workspacegroupusercreatesample] | Add existing user to existing group x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json | -| [workspaceGroupUserDeleteSample.ts][workspacegroupuserdeletesample] | Remove existing user from existing group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json | -| [workspaceGroupUserListSample.ts][workspacegroupuserlistsample] | Lists a collection of user entities associated with the group. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json | -| [workspaceListByServiceSample.ts][workspacelistbyservicesample] | Lists all workspaces of the API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json | -| [workspaceLoggerCreateOrUpdateSample.ts][workspaceloggercreateorupdatesample] | Creates or Updates a logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json | -| [workspaceLoggerDeleteSample.ts][workspaceloggerdeletesample] | Deletes the specified logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json | -| [workspaceLoggerGetEntityTagSample.ts][workspaceloggergetentitytagsample] | Gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json | -| [workspaceLoggerGetSample.ts][workspaceloggergetsample] | Gets the details of the logger specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json | -| [workspaceLoggerListByWorkspaceSample.ts][workspaceloggerlistbyworkspacesample] | Lists a collection of loggers in the specified workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json | -| [workspaceLoggerUpdateSample.ts][workspaceloggerupdatesample] | Updates an existing logger. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json | -| [workspaceNamedValueCreateOrUpdateSample.ts][workspacenamedvaluecreateorupdatesample] | Creates or updates named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json | -| [workspaceNamedValueDeleteSample.ts][workspacenamedvaluedeletesample] | Deletes specific named value from the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json | -| [workspaceNamedValueGetEntityTagSample.ts][workspacenamedvaluegetentitytagsample] | Gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json | -| [workspaceNamedValueGetSample.ts][workspacenamedvaluegetsample] | Gets the details of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json | -| [workspaceNamedValueListByServiceSample.ts][workspacenamedvaluelistbyservicesample] | Lists a collection of named values defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json | -| [workspaceNamedValueListValueSample.ts][workspacenamedvaluelistvaluesample] | Gets the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json | -| [workspaceNamedValueRefreshSecretSample.ts][workspacenamedvaluerefreshsecretsample] | Refresh the secret of the named value specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json | -| [workspaceNamedValueUpdateSample.ts][workspacenamedvalueupdatesample] | Updates the specific named value. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json | -| [workspaceNotificationCreateOrUpdateSample.ts][workspacenotificationcreateorupdatesample] | Create or Update API Management publisher notification for the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json | -| [workspaceNotificationGetSample.ts][workspacenotificationgetsample] | Gets the details of the Notification specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json | -| [workspaceNotificationListByServiceSample.ts][workspacenotificationlistbyservicesample] | Lists a collection of properties defined within a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json | -| [workspaceNotificationRecipientEmailCheckEntityExistsSample.ts][workspacenotificationrecipientemailcheckentityexistssample] | Determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailCreateOrUpdateSample.ts][workspacenotificationrecipientemailcreateorupdatesample] | Adds the Email address to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailDeleteSample.ts][workspacenotificationrecipientemaildeletesample] | Removes the email from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json | -| [workspaceNotificationRecipientEmailListByNotificationSample.ts][workspacenotificationrecipientemaillistbynotificationsample] | Gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json | -| [workspaceNotificationRecipientUserCheckEntityExistsSample.ts][workspacenotificationrecipientusercheckentityexistssample] | Determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserCreateOrUpdateSample.ts][workspacenotificationrecipientusercreateorupdatesample] | Adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserDeleteSample.ts][workspacenotificationrecipientuserdeletesample] | Removes the API Management user from the list of Notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json | -| [workspaceNotificationRecipientUserListByNotificationSample.ts][workspacenotificationrecipientuserlistbynotificationsample] | Gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json | -| [workspacePolicyCreateOrUpdateSample.ts][workspacepolicycreateorupdatesample] | Creates or updates policy configuration for the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json | -| [workspacePolicyDeleteSample.ts][workspacepolicydeletesample] | Deletes the policy configuration at the workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json | -| [workspacePolicyFragmentCreateOrUpdateSample.ts][workspacepolicyfragmentcreateorupdatesample] | Creates or updates a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json | -| [workspacePolicyFragmentDeleteSample.ts][workspacepolicyfragmentdeletesample] | Deletes a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json | -| [workspacePolicyFragmentGetEntityTagSample.ts][workspacepolicyfragmentgetentitytagsample] | Gets the entity state (Etag) version of a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json | -| [workspacePolicyFragmentGetSample.ts][workspacepolicyfragmentgetsample] | Gets a policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json | -| [workspacePolicyFragmentListByServiceSample.ts][workspacepolicyfragmentlistbyservicesample] | Gets all policy fragments defined within a workspace. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json | -| [workspacePolicyFragmentListReferencesSample.ts][workspacepolicyfragmentlistreferencessample] | Lists policy resources that reference the policy fragment. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json | -| [workspacePolicyGetEntityTagSample.ts][workspacepolicygetentitytagsample] | Gets the entity state (Etag) version of the workspace policy specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json | -| [workspacePolicyGetSample.ts][workspacepolicygetsample] | Get the policy configuration at the API level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json | -| [workspacePolicyListByApiSample.ts][workspacepolicylistbyapisample] | Get the policy configuration at the workspace level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json | -| [workspaceProductApiLinkCreateOrUpdateSample.ts][workspaceproductapilinkcreateorupdatesample] | Adds an API to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json | -| [workspaceProductApiLinkDeleteSample.ts][workspaceproductapilinkdeletesample] | Deletes the specified API from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json | -| [workspaceProductApiLinkGetSample.ts][workspaceproductapilinkgetsample] | Gets the API link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json | -| [workspaceProductApiLinkListByProductSample.ts][workspaceproductapilinklistbyproductsample] | Lists a collection of the API links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json | -| [workspaceProductCreateOrUpdateSample.ts][workspaceproductcreateorupdatesample] | Creates or Updates a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json | -| [workspaceProductDeleteSample.ts][workspaceproductdeletesample] | Delete product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json | -| [workspaceProductGetEntityTagSample.ts][workspaceproductgetentitytagsample] | Gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json | -| [workspaceProductGetSample.ts][workspaceproductgetsample] | Gets the details of the product specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json | -| [workspaceProductGroupLinkCreateOrUpdateSample.ts][workspaceproductgrouplinkcreateorupdatesample] | Adds a group to the specified product via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkDeleteSample.ts][workspaceproductgrouplinkdeletesample] | Deletes the specified group from the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkGetSample.ts][workspaceproductgrouplinkgetsample] | Gets the group link for the product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json | -| [workspaceProductGroupLinkListByProductSample.ts][workspaceproductgrouplinklistbyproductsample] | Lists a collection of the group links associated with a product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json | -| [workspaceProductListByServiceSample.ts][workspaceproductlistbyservicesample] | Lists a collection of products in the specified workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json | -| [workspaceProductPolicyCreateOrUpdateSample.ts][workspaceproductpolicycreateorupdatesample] | Creates or updates policy configuration for the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json | -| [workspaceProductPolicyDeleteSample.ts][workspaceproductpolicydeletesample] | Deletes the policy configuration at the Product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json | -| [workspaceProductPolicyGetEntityTagSample.ts][workspaceproductpolicygetentitytagsample] | Get the ETag of the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json | -| [workspaceProductPolicyGetSample.ts][workspaceproductpolicygetsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json | -| [workspaceProductPolicyListByProductSample.ts][workspaceproductpolicylistbyproductsample] | Get the policy configuration at the Product level. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json | -| [workspaceProductUpdateSample.ts][workspaceproductupdatesample] | Update existing product details. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json | -| [workspaceSubscriptionCreateOrUpdateSample.ts][workspacesubscriptioncreateorupdatesample] | Creates or updates the subscription of specified user to the specified product. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json | -| [workspaceSubscriptionDeleteSample.ts][workspacesubscriptiondeletesample] | Deletes the specified subscription. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json | -| [workspaceSubscriptionGetEntityTagSample.ts][workspacesubscriptiongetentitytagsample] | Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json | -| [workspaceSubscriptionGetSample.ts][workspacesubscriptiongetsample] | Gets the specified Subscription entity. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json | -| [workspaceSubscriptionListSample.ts][workspacesubscriptionlistsample] | Lists all subscriptions of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json | -| [workspaceSubscriptionListSecretsSample.ts][workspacesubscriptionlistsecretssample] | Gets the specified Subscription keys. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json | -| [workspaceSubscriptionRegeneratePrimaryKeySample.ts][workspacesubscriptionregenerateprimarykeysample] | Regenerates primary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json | -| [workspaceSubscriptionRegenerateSecondaryKeySample.ts][workspacesubscriptionregeneratesecondarykeysample] | Regenerates secondary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json | -| [workspaceSubscriptionUpdateSample.ts][workspacesubscriptionupdatesample] | Updates the details of a subscription specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json | -| [workspaceTagApiLinkCreateOrUpdateSample.ts][workspacetagapilinkcreateorupdatesample] | Adds an API to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json | -| [workspaceTagApiLinkDeleteSample.ts][workspacetagapilinkdeletesample] | Deletes the specified API from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json | -| [workspaceTagApiLinkGetSample.ts][workspacetagapilinkgetsample] | Gets the API link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json | -| [workspaceTagApiLinkListByProductSample.ts][workspacetagapilinklistbyproductsample] | Lists a collection of the API links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json | -| [workspaceTagCreateOrUpdateSample.ts][workspacetagcreateorupdatesample] | Creates a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json | -| [workspaceTagDeleteSample.ts][workspacetagdeletesample] | Deletes specific tag of the workspace in an API Management service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json | -| [workspaceTagGetEntityStateSample.ts][workspacetaggetentitystatesample] | Gets the entity state version of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json | -| [workspaceTagGetSample.ts][workspacetaggetsample] | Gets the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json | -| [workspaceTagListByServiceSample.ts][workspacetaglistbyservicesample] | Lists a collection of tags defined within a workspace in a service instance. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json | -| [workspaceTagOperationLinkCreateOrUpdateSample.ts][workspacetagoperationlinkcreateorupdatesample] | Adds an operation to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkDeleteSample.ts][workspacetagoperationlinkdeletesample] | Deletes the specified operation from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkGetSample.ts][workspacetagoperationlinkgetsample] | Gets the operation link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json | -| [workspaceTagOperationLinkListByProductSample.ts][workspacetagoperationlinklistbyproductsample] | Lists a collection of the operation links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json | -| [workspaceTagProductLinkCreateOrUpdateSample.ts][workspacetagproductlinkcreateorupdatesample] | Adds a product to the specified tag via link. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json | -| [workspaceTagProductLinkDeleteSample.ts][workspacetagproductlinkdeletesample] | Deletes the specified product from the specified tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json | -| [workspaceTagProductLinkGetSample.ts][workspacetagproductlinkgetsample] | Gets the product link for the tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json | -| [workspaceTagProductLinkListByProductSample.ts][workspacetagproductlinklistbyproductsample] | Lists a collection of the product links associated with a tag. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json | -| [workspaceTagUpdateSample.ts][workspacetagupdatesample] | Updates the details of the tag specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json | -| [workspaceUpdateSample.ts][workspaceupdatesample] | Updates the details of the workspace specified by its identifier. x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/allPoliciesListByServiceSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -cross-env APIMANAGEMENT_SUBSCRIPTION_ID="" APIMANAGEMENT_RESOURCE_GROUP="" node dist/allPoliciesListByServiceSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[allpolicieslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/allPoliciesListByServiceSample.ts -[apicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiCreateOrUpdateSample.ts -[apideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDeleteSample.ts -[apidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticCreateOrUpdateSample.ts -[apidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticDeleteSample.ts -[apidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetEntityTagSample.ts -[apidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetSample.ts -[apidiagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticListByServiceSample.ts -[apidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticUpdateSample.ts -[apiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiExportGetSample.ts -[apigatewayconfigconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts -[apigatewayconfigconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionDeleteSample.ts -[apigatewayconfigconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionGetSample.ts -[apigatewayconfigconnectionlistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts -[apigatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayCreateOrUpdateSample.ts -[apigatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayDeleteSample.ts -[apigatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayGetSample.ts -[apigatewaylistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListByResourceGroupSample.ts -[apigatewaylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListSample.ts -[apigatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayUpdateSample.ts -[apigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetEntityTagSample.ts -[apigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetSample.ts -[apiissueattachmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts -[apiissueattachmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentDeleteSample.ts -[apiissueattachmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetEntityTagSample.ts -[apiissueattachmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetSample.ts -[apiissueattachmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentListByServiceSample.ts -[apiissuecommentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentCreateOrUpdateSample.ts -[apiissuecommentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentDeleteSample.ts -[apiissuecommentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetEntityTagSample.ts -[apiissuecommentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetSample.ts -[apiissuecommentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentListByServiceSample.ts -[apiissuecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCreateOrUpdateSample.ts -[apiissuedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueDeleteSample.ts -[apiissuegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetEntityTagSample.ts -[apiissuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetSample.ts -[apiissuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueListByServiceSample.ts -[apiissueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueUpdateSample.ts -[apilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByServiceSample.ts -[apilistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByTagsSample.ts -[apimanagementgatewayskuslistavailableskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts -[apimanagementoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementOperationsListSample.ts -[apimanagementserviceapplynetworkconfigurationupdatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts -[apimanagementservicebackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceBackupSample.ts -[apimanagementservicechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts -[apimanagementservicecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCreateOrUpdateSample.ts -[apimanagementservicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceDeleteSample.ts -[apimanagementservicegetdomainownershipidentifiersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts -[apimanagementservicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSample.ts -[apimanagementservicegetssotokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSsoTokenSample.ts -[apimanagementservicelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListByResourceGroupSample.ts -[apimanagementservicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListSample.ts -[apimanagementservicemigratetostv2sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceMigrateToStv2Sample.ts -[apimanagementservicerestoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceRestoreSample.ts -[apimanagementserviceskuslistavailableserviceskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts -[apimanagementserviceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceUpdateSample.ts -[apimanagementskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementSkusListSample.ts -[apimanagementworkspacelinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinkGetSample.ts -[apimanagementworkspacelinkslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts -[apioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationCreateOrUpdateSample.ts -[apioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationDeleteSample.ts -[apioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetEntityTagSample.ts -[apioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetSample.ts -[apioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationListByApiSample.ts -[apioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts -[apioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyDeleteSample.ts -[apioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetEntityTagSample.ts -[apioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetSample.ts -[apioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyListByOperationSample.ts -[apioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationUpdateSample.ts -[apipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyCreateOrUpdateSample.ts -[apipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyDeleteSample.ts -[apipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetEntityTagSample.ts -[apipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetSample.ts -[apipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyListByApiSample.ts -[apiproductlistbyapissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiProductListByApisSample.ts -[apireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseCreateOrUpdateSample.ts -[apireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseDeleteSample.ts -[apireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetEntityTagSample.ts -[apireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetSample.ts -[apireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseListByServiceSample.ts -[apireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseUpdateSample.ts -[apirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiRevisionListByServiceSample.ts -[apischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaCreateOrUpdateSample.ts -[apischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaDeleteSample.ts -[apischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetEntityTagSample.ts -[apischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetSample.ts -[apischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaListByApiSample.ts -[apitagdescriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts -[apitagdescriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionDeleteSample.ts -[apitagdescriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetEntityTagSample.ts -[apitagdescriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetSample.ts -[apitagdescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionListByServiceSample.ts -[apiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiUpdateSample.ts -[apiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetCreateOrUpdateSample.ts -[apiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetDeleteSample.ts -[apiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetEntityTagSample.ts -[apiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetSample.ts -[apiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetListByServiceSample.ts -[apiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetUpdateSample.ts -[apiwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiCreateOrUpdateSample.ts -[apiwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiDeleteSample.ts -[apiwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetEntityTagSample.ts -[apiwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetSample.ts -[apiwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiUpdateSample.ts -[apiwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikisListSample.ts -[authorizationaccesspolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts -[authorizationaccesspolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyDeleteSample.ts -[authorizationaccesspolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyGetSample.ts -[authorizationaccesspolicylistbyauthorizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts -[authorizationconfirmconsentcodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationConfirmConsentCodeSample.ts -[authorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationCreateOrUpdateSample.ts -[authorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationDeleteSample.ts -[authorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationGetSample.ts -[authorizationlistbyauthorizationprovidersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationListByAuthorizationProviderSample.ts -[authorizationloginlinkspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationLoginLinksPostSample.ts -[authorizationprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderCreateOrUpdateSample.ts -[authorizationproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderDeleteSample.ts -[authorizationprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderGetSample.ts -[authorizationproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderListByServiceSample.ts -[authorizationservercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerCreateOrUpdateSample.ts -[authorizationserverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerDeleteSample.ts -[authorizationservergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetEntityTagSample.ts -[authorizationservergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetSample.ts -[authorizationserverlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListByServiceSample.ts -[authorizationserverlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListSecretsSample.ts -[authorizationserverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerUpdateSample.ts -[backendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendCreateOrUpdateSample.ts -[backenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendDeleteSample.ts -[backendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetEntityTagSample.ts -[backendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetSample.ts -[backendlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendListByServiceSample.ts -[backendreconnectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendReconnectSample.ts -[backendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendUpdateSample.ts -[cachecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheCreateOrUpdateSample.ts -[cachedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheDeleteSample.ts -[cachegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetEntityTagSample.ts -[cachegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetSample.ts -[cachelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheListByServiceSample.ts -[cacheupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheUpdateSample.ts -[certificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateCreateOrUpdateSample.ts -[certificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateDeleteSample.ts -[certificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetEntityTagSample.ts -[certificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetSample.ts -[certificatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateListByServiceSample.ts -[certificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateRefreshSecretSample.ts -[contentitemcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemCreateOrUpdateSample.ts -[contentitemdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemDeleteSample.ts -[contentitemgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetEntityTagSample.ts -[contentitemgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetSample.ts -[contentitemlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemListByServiceSample.ts -[contenttypecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeCreateOrUpdateSample.ts -[contenttypedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeDeleteSample.ts -[contenttypegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeGetSample.ts -[contenttypelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeListByServiceSample.ts -[delegationsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsCreateOrUpdateSample.ts -[delegationsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetEntityTagSample.ts -[delegationsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetSample.ts -[delegationsettingslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsListSecretsSample.ts -[delegationsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsUpdateSample.ts -[deletedservicesgetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesGetByNameSample.ts -[deletedserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesListBySubscriptionSample.ts -[deletedservicespurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesPurgeSample.ts -[diagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticCreateOrUpdateSample.ts -[diagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticDeleteSample.ts -[diagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetEntityTagSample.ts -[diagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetSample.ts -[diagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticListByServiceSample.ts -[diagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticUpdateSample.ts -[documentationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationCreateOrUpdateSample.ts -[documentationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationDeleteSample.ts -[documentationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetEntityTagSample.ts -[documentationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetSample.ts -[documentationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationListByServiceSample.ts -[documentationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationUpdateSample.ts -[emailtemplatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateCreateOrUpdateSample.ts -[emailtemplatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateDeleteSample.ts -[emailtemplategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetEntityTagSample.ts -[emailtemplategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetSample.ts -[emailtemplatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateListByServiceSample.ts -[emailtemplateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateUpdateSample.ts -[gatewayapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiCreateOrUpdateSample.ts -[gatewayapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiDeleteSample.ts -[gatewayapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiGetEntityTagSample.ts -[gatewayapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiListByServiceSample.ts -[gatewaycertificateauthoritycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts -[gatewaycertificateauthoritydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityDeleteSample.ts -[gatewaycertificateauthoritygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts -[gatewaycertificateauthoritygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetSample.ts -[gatewaycertificateauthoritylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts -[gatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCreateOrUpdateSample.ts -[gatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayDeleteSample.ts -[gatewaygeneratetokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGenerateTokenSample.ts -[gatewaygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetEntityTagSample.ts -[gatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetSample.ts -[gatewayhostnameconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts -[gatewayhostnameconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationDeleteSample.ts -[gatewayhostnameconfigurationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts -[gatewayhostnameconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetSample.ts -[gatewayhostnameconfigurationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts -[gatewayinvalidatedebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayInvalidateDebugCredentialsSample.ts -[gatewaylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListByServiceSample.ts -[gatewaylistdebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListDebugCredentialsSample.ts -[gatewaylistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListKeysSample.ts -[gatewaylisttracesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListTraceSample.ts -[gatewayregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayRegenerateKeySample.ts -[gatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayUpdateSample.ts -[globalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaCreateOrUpdateSample.ts -[globalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaDeleteSample.ts -[globalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetEntityTagSample.ts -[globalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetSample.ts -[globalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaListByServiceSample.ts -[graphqlapiresolvercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts -[graphqlapiresolverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverDeleteSample.ts -[graphqlapiresolvergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetEntityTagSample.ts -[graphqlapiresolvergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetSample.ts -[graphqlapiresolverlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverListByApiSample.ts -[graphqlapiresolverpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts -[graphqlapiresolverpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyDeleteSample.ts -[graphqlapiresolverpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts -[graphqlapiresolverpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetSample.ts -[graphqlapiresolverpolicylistbyresolversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts -[graphqlapiresolverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverUpdateSample.ts -[groupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupCreateOrUpdateSample.ts -[groupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupDeleteSample.ts -[groupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetEntityTagSample.ts -[groupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetSample.ts -[grouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupListByServiceSample.ts -[groupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUpdateSample.ts -[groupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCheckEntityExistsSample.ts -[groupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCreateSample.ts -[groupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserDeleteSample.ts -[groupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserListSample.ts -[identityprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderCreateOrUpdateSample.ts -[identityproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderDeleteSample.ts -[identityprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetEntityTagSample.ts -[identityprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetSample.ts -[identityproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListByServiceSample.ts -[identityproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListSecretsSample.ts -[identityproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderUpdateSample.ts -[issuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueGetSample.ts -[issuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueListByServiceSample.ts -[loggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerCreateOrUpdateSample.ts -[loggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerDeleteSample.ts -[loggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetEntityTagSample.ts -[loggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetSample.ts -[loggerlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerListByServiceSample.ts -[loggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerUpdateSample.ts -[namedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueCreateOrUpdateSample.ts -[namedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueDeleteSample.ts -[namedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetEntityTagSample.ts -[namedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetSample.ts -[namedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListByServiceSample.ts -[namedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListValueSample.ts -[namedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueRefreshSecretSample.ts -[namedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueUpdateSample.ts -[networkstatuslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByLocationSample.ts -[networkstatuslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByServiceSample.ts -[notificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationCreateOrUpdateSample.ts -[notificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationGetSample.ts -[notificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationListByServiceSample.ts -[notificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts -[notificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts -[notificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailDeleteSample.ts -[notificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailListByNotificationSample.ts -[notificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts -[notificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts -[notificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserDeleteSample.ts -[notificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserListByNotificationSample.ts -[openidconnectprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts -[openidconnectproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderDeleteSample.ts -[openidconnectprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetEntityTagSample.ts -[openidconnectprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetSample.ts -[openidconnectproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListByServiceSample.ts -[openidconnectproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListSecretsSample.ts -[openidconnectproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderUpdateSample.ts -[operationlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationListByTagsSample.ts -[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationStatusGetSample.ts -[operationsresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationsResultsGetSample.ts -[outboundnetworkdependenciesendpointslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts -[performconnectivitycheckasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/performConnectivityCheckAsyncSample.ts -[policycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyCreateOrUpdateSample.ts -[policydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDeleteSample.ts -[policydescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDescriptionListByServiceSample.ts -[policyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentCreateOrUpdateSample.ts -[policyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentDeleteSample.ts -[policyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetEntityTagSample.ts -[policyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetSample.ts -[policyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListByServiceSample.ts -[policyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListReferencesSample.ts -[policygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetEntityTagSample.ts -[policygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetSample.ts -[policylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyListByServiceSample.ts -[policyrestrictioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionCreateOrUpdateSample.ts -[policyrestrictiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionDeleteSample.ts -[policyrestrictiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetEntityTagSample.ts -[policyrestrictiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetSample.ts -[policyrestrictionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionListByServiceSample.ts -[policyrestrictionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionUpdateSample.ts -[policyrestrictionvalidationsbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionValidationsByServiceSample.ts -[portalconfigcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigCreateOrUpdateSample.ts -[portalconfiggetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetEntityTagSample.ts -[portalconfiggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetSample.ts -[portalconfiglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigListByServiceSample.ts -[portalconfigupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigUpdateSample.ts -[portalrevisioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionCreateOrUpdateSample.ts -[portalrevisiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetEntityTagSample.ts -[portalrevisiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetSample.ts -[portalrevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionListByServiceSample.ts -[portalrevisionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionUpdateSample.ts -[portalsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalSettingsListByServiceSample.ts -[privateendpointconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts -[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionDeleteSample.ts -[privateendpointconnectiongetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetByNameSample.ts -[privateendpointconnectiongetprivatelinkresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts -[privateendpointconnectionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListByServiceSample.ts -[privateendpointconnectionlistprivatelinkresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts -[productapicheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCheckEntityExistsSample.ts -[productapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCreateOrUpdateSample.ts -[productapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiDeleteSample.ts -[productapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkCreateOrUpdateSample.ts -[productapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkDeleteSample.ts -[productapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkGetSample.ts -[productapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkListByProductSample.ts -[productapilistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiListByProductSample.ts -[productcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productCreateOrUpdateSample.ts -[productdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productDeleteSample.ts -[productgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetEntityTagSample.ts -[productgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetSample.ts -[productgroupcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCheckEntityExistsSample.ts -[productgroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCreateOrUpdateSample.ts -[productgroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupDeleteSample.ts -[productgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkCreateOrUpdateSample.ts -[productgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkDeleteSample.ts -[productgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkGetSample.ts -[productgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkListByProductSample.ts -[productgrouplistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupListByProductSample.ts -[productlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByServiceSample.ts -[productlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByTagsSample.ts -[productpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyCreateOrUpdateSample.ts -[productpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyDeleteSample.ts -[productpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetEntityTagSample.ts -[productpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetSample.ts -[productpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyListByProductSample.ts -[productsubscriptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productSubscriptionsListSample.ts -[productupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productUpdateSample.ts -[productwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiCreateOrUpdateSample.ts -[productwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiDeleteSample.ts -[productwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetEntityTagSample.ts -[productwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetSample.ts -[productwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiUpdateSample.ts -[productwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikisListSample.ts -[quotabycounterkeyslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysListByServiceSample.ts -[quotabycounterkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysUpdateSample.ts -[quotabyperiodkeysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysGetSample.ts -[quotabyperiodkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysUpdateSample.ts -[regionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/regionListByServiceSample.ts -[reportslistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByApiSample.ts -[reportslistbygeosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByGeoSample.ts -[reportslistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByOperationSample.ts -[reportslistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByProductSample.ts -[reportslistbyrequestsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByRequestSample.ts -[reportslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListBySubscriptionSample.ts -[reportslistbytimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByTimeSample.ts -[reportslistbyusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByUserSample.ts -[signinsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsCreateOrUpdateSample.ts -[signinsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetEntityTagSample.ts -[signinsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetSample.ts -[signinsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsUpdateSample.ts -[signupsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsCreateOrUpdateSample.ts -[signupsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetEntityTagSample.ts -[signupsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetSample.ts -[signupsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsUpdateSample.ts -[subscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionCreateOrUpdateSample.ts -[subscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionDeleteSample.ts -[subscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetEntityTagSample.ts -[subscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetSample.ts -[subscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSample.ts -[subscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSecretsSample.ts -[subscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegeneratePrimaryKeySample.ts -[subscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegenerateSecondaryKeySample.ts -[subscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionUpdateSample.ts -[tagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkCreateOrUpdateSample.ts -[tagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkDeleteSample.ts -[tagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkGetSample.ts -[tagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkListByProductSample.ts -[tagassigntoapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToApiSample.ts -[tagassigntooperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToOperationSample.ts -[tagassigntoproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToProductSample.ts -[tagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagCreateOrUpdateSample.ts -[tagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDeleteSample.ts -[tagdetachfromapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromApiSample.ts -[tagdetachfromoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromOperationSample.ts -[tagdetachfromproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromProductSample.ts -[taggetbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByApiSample.ts -[taggetbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByOperationSample.ts -[taggetbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByProductSample.ts -[taggetentitystatebyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByApiSample.ts -[taggetentitystatebyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByOperationSample.ts -[taggetentitystatebyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByProductSample.ts -[taggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateSample.ts -[taggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetSample.ts -[taglistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByApiSample.ts -[taglistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByOperationSample.ts -[taglistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByProductSample.ts -[taglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByServiceSample.ts -[tagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkCreateOrUpdateSample.ts -[tagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkDeleteSample.ts -[tagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkGetSample.ts -[tagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkListByProductSample.ts -[tagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkCreateOrUpdateSample.ts -[tagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkDeleteSample.ts -[tagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkGetSample.ts -[tagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkListByProductSample.ts -[tagresourcelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagResourceListByServiceSample.ts -[tagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagUpdateSample.ts -[tenantaccesscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessCreateSample.ts -[tenantaccessgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetEntityTagSample.ts -[tenantaccessgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetSample.ts -[tenantaccessgitregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts -[tenantaccessgitregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts -[tenantaccesslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListByServiceSample.ts -[tenantaccesslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListSecretsSample.ts -[tenantaccessregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts -[tenantaccessregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts -[tenantaccessupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessUpdateSample.ts -[tenantconfigurationdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationDeploySample.ts -[tenantconfigurationgetsyncstatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationGetSyncStateSample.ts -[tenantconfigurationsavesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationSaveSample.ts -[tenantconfigurationvalidatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationValidateSample.ts -[tenantsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsGetSample.ts -[tenantsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsListByServiceSample.ts -[userconfirmationpasswordsendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userConfirmationPasswordSendSample.ts -[usercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userCreateOrUpdateSample.ts -[userdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userDeleteSample.ts -[usergeneratessourlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGenerateSsoUrlSample.ts -[usergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetEntityTagSample.ts -[usergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSample.ts -[usergetsharedaccesstokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSharedAccessTokenSample.ts -[usergrouplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGroupListSample.ts -[useridentitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userIdentitiesListSample.ts -[userlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userListByServiceSample.ts -[usersubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionGetSample.ts -[usersubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionListSample.ts -[userupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userUpdateSample.ts -[workspaceapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiCreateOrUpdateSample.ts -[workspaceapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDeleteSample.ts -[workspaceapidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts -[workspaceapidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticDeleteSample.ts -[workspaceapidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts -[workspaceapidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetSample.ts -[workspaceapidiagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts -[workspaceapidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticUpdateSample.ts -[workspaceapiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiExportGetSample.ts -[workspaceapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetEntityTagSample.ts -[workspaceapigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetSample.ts -[workspaceapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiListByServiceSample.ts -[workspaceapioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts -[workspaceapioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationDeleteSample.ts -[workspaceapioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetEntityTagSample.ts -[workspaceapioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetSample.ts -[workspaceapioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationListByApiSample.ts -[workspaceapioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts -[workspaceapioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyDeleteSample.ts -[workspaceapioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts -[workspaceapioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetSample.ts -[workspaceapioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts -[workspaceapioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationUpdateSample.ts -[workspaceapipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts -[workspaceapipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyDeleteSample.ts -[workspaceapipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetEntityTagSample.ts -[workspaceapipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetSample.ts -[workspaceapipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyListByApiSample.ts -[workspaceapireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts -[workspaceapireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseDeleteSample.ts -[workspaceapireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetEntityTagSample.ts -[workspaceapireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetSample.ts -[workspaceapireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseListByServiceSample.ts -[workspaceapireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseUpdateSample.ts -[workspaceapirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiRevisionListByServiceSample.ts -[workspaceapischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts -[workspaceapischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaDeleteSample.ts -[workspaceapischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetEntityTagSample.ts -[workspaceapischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetSample.ts -[workspaceapischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaListByApiSample.ts -[workspaceapiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiUpdateSample.ts -[workspaceapiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts -[workspaceapiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetDeleteSample.ts -[workspaceapiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts -[workspaceapiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetSample.ts -[workspaceapiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetListByServiceSample.ts -[workspaceapiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetUpdateSample.ts -[workspacebackendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendCreateOrUpdateSample.ts -[workspacebackenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendDeleteSample.ts -[workspacebackendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetEntityTagSample.ts -[workspacebackendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetSample.ts -[workspacebackendlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendListByWorkspaceSample.ts -[workspacebackendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendUpdateSample.ts -[workspacecertificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateCreateOrUpdateSample.ts -[workspacecertificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateDeleteSample.ts -[workspacecertificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetEntityTagSample.ts -[workspacecertificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetSample.ts -[workspacecertificatelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateListByWorkspaceSample.ts -[workspacecertificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateRefreshSecretSample.ts -[workspacecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCreateOrUpdateSample.ts -[workspacedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDeleteSample.ts -[workspacediagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts -[workspacediagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticDeleteSample.ts -[workspacediagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetEntityTagSample.ts -[workspacediagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetSample.ts -[workspacediagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts -[workspacediagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticUpdateSample.ts -[workspacegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetEntityTagSample.ts -[workspacegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetSample.ts -[workspaceglobalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts -[workspaceglobalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaDeleteSample.ts -[workspaceglobalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts -[workspaceglobalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetSample.ts -[workspaceglobalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaListByServiceSample.ts -[workspacegroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupCreateOrUpdateSample.ts -[workspacegroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupDeleteSample.ts -[workspacegroupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetEntityTagSample.ts -[workspacegroupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetSample.ts -[workspacegrouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupListByServiceSample.ts -[workspacegroupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUpdateSample.ts -[workspacegroupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts -[workspacegroupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCreateSample.ts -[workspacegroupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserDeleteSample.ts -[workspacegroupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserListSample.ts -[workspacelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceListByServiceSample.ts -[workspaceloggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerCreateOrUpdateSample.ts -[workspaceloggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerDeleteSample.ts -[workspaceloggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetEntityTagSample.ts -[workspaceloggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetSample.ts -[workspaceloggerlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerListByWorkspaceSample.ts -[workspaceloggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerUpdateSample.ts -[workspacenamedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts -[workspacenamedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueDeleteSample.ts -[workspacenamedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetEntityTagSample.ts -[workspacenamedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetSample.ts -[workspacenamedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListByServiceSample.ts -[workspacenamedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListValueSample.ts -[workspacenamedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueRefreshSecretSample.ts -[workspacenamedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueUpdateSample.ts -[workspacenotificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationCreateOrUpdateSample.ts -[workspacenotificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationGetSample.ts -[workspacenotificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationListByServiceSample.ts -[workspacenotificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts -[workspacenotificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts -[workspacenotificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts -[workspacenotificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts -[workspacenotificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts -[workspacenotificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts -[workspacenotificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts -[workspacenotificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts -[workspacepolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyCreateOrUpdateSample.ts -[workspacepolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyDeleteSample.ts -[workspacepolicyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts -[workspacepolicyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentDeleteSample.ts -[workspacepolicyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts -[workspacepolicyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetSample.ts -[workspacepolicyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListByServiceSample.ts -[workspacepolicyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListReferencesSample.ts -[workspacepolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetEntityTagSample.ts -[workspacepolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetSample.ts -[workspacepolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyListByApiSample.ts -[workspaceproductapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts -[workspaceproductapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkDeleteSample.ts -[workspaceproductapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkGetSample.ts -[workspaceproductapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkListByProductSample.ts -[workspaceproductcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductCreateOrUpdateSample.ts -[workspaceproductdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductDeleteSample.ts -[workspaceproductgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetEntityTagSample.ts -[workspaceproductgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetSample.ts -[workspaceproductgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts -[workspaceproductgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkDeleteSample.ts -[workspaceproductgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkGetSample.ts -[workspaceproductgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkListByProductSample.ts -[workspaceproductlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductListByServiceSample.ts -[workspaceproductpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts -[workspaceproductpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyDeleteSample.ts -[workspaceproductpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetEntityTagSample.ts -[workspaceproductpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetSample.ts -[workspaceproductpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyListByProductSample.ts -[workspaceproductupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductUpdateSample.ts -[workspacesubscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts -[workspacesubscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionDeleteSample.ts -[workspacesubscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetEntityTagSample.ts -[workspacesubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetSample.ts -[workspacesubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSample.ts -[workspacesubscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSecretsSample.ts -[workspacesubscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts -[workspacesubscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts -[workspacesubscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionUpdateSample.ts -[workspacetagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts -[workspacetagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkDeleteSample.ts -[workspacetagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkGetSample.ts -[workspacetagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkListByProductSample.ts -[workspacetagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagCreateOrUpdateSample.ts -[workspacetagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagDeleteSample.ts -[workspacetaggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetEntityStateSample.ts -[workspacetaggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetSample.ts -[workspacetaglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagListByServiceSample.ts -[workspacetagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts -[workspacetagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkDeleteSample.ts -[workspacetagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkGetSample.ts -[workspacetagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkListByProductSample.ts -[workspacetagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts -[workspacetagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkDeleteSample.ts -[workspacetagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkGetSample.ts -[workspacetagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkListByProductSample.ts -[workspacetagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagUpdateSample.ts -[workspaceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceUpdateSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/package.json b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/package.json deleted file mode 100644 index 1a565d2391b5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-apimanagement-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=20.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/apimanagement/arm-apimanagement" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement", - "dependencies": { - "@azure/arm-apimanagement": "latest", - "dotenv": "latest", - "@azure/identity": "^4.9.0" - }, - "devDependencies": { - "@types/node": "^20.0.0", - "typescript": "~5.8.2", - "rimraf": "latest" - } -} diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/allPoliciesListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/allPoliciesListByServiceSample.ts deleted file mode 100644 index aff3bbd77ef0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/allPoliciesListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Status of all policies of API Management services. - * - * @summary Status of all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json - */ -async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.allPolicies.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiCreateOrUpdateSample.ts deleted file mode 100644 index 97ce2d905e0f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiCreateOrUpdateSample.ts +++ /dev/null @@ -1,680 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiCreateOrUpdateParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json - */ -async function apiManagementCreateApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiClone.json - */ -async function apiManagementCreateApiClone(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api2"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: "Copy of Existing Echo Api including Operations.", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", - subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json - */ -async function apiManagementCreateApiNewVersionUsingExistingApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echoapiv3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo2", - description: - "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", - apiVersion: "v4", - apiVersionSetId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", - displayName: "Echo API2", - isCurrent: true, - protocols: ["http", "https"], - serviceUrl: "http://echoapi.cloudapp.net/api", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", - subscriptionRequired: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json - */ -async function apiManagementCreateApiRevisionFromExistingApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const parameters: ApiCreateOrUpdateParameter = { - path: "echo", - apiRevisionDescription: "Creating a Revision of an existing API", - serviceUrl: "http://echoapi.cloudapp.net/apiv3", - sourceApiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json - */ -async function apiManagementCreateApiUsingImportOverrideServiceUrl(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "apidocs"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link", - path: "petstoreapi123", - serviceUrl: "http://petstore.swagger.wordnik.com/api", - value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3Import.json - */ -async function apiManagementCreateApiUsingOai3Import(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json - */ -async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "openapi-link", - path: "petstore", - translateRequiredQueryParametersConduct: "template", - value: - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingSwaggerImport.json - */ -async function apiManagementCreateApiUsingSwaggerImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "swagger-link-json", - path: "petstore", - value: "http://petstore.swagger.io/v2/swagger.json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingWadlImport.json - */ -async function apiManagementCreateApiUsingWadlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "petstore"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wadl-link-json", - path: "collector", - value: - "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json - */ -async function apiManagementCreateApiWithMultipleAuthServers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2AuthenticationSettings: [ - { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - { - authorizationServerId: "authorizationServerId2284", - scope: "oauth2scope2581", - }, - ], - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json - */ -async function apiManagementCreateApiWithMultipleOpenIdConnectProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - openidAuthenticationSettings: [ - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2283", - }, - { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "openidProviderId2284", - }, - ], - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithOpenIdConnect.json - */ -async function apiManagementCreateApiWithOpenIdConnect(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "petstore", - description: - "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - authenticationSettings: { - openid: { - bearerTokenSendingMethods: ["authorizationHeader"], - openidProviderId: "testopenid", - }, - }, - displayName: "Swagger Petstore", - protocols: ["https"], - serviceUrl: "http://petstore.swagger.io/v2", - subscriptionKeyParameterNames: { - header: "Ocp-Apim-Subscription-Key", - query: "subscription-key", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApi.json - */ -async function apiManagementCreateGraphQlApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "graphql", - path: "graphql-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://api.spacex.land/graphql", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGrpcApi.json - */ -async function apiManagementCreateGrpcApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "grpc", - format: "grpc-link", - path: "grpc-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["https"], - serviceUrl: "https://your-api-hostname/samples", - value: - "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateODataApi.json - */ -async function apiManagementCreateODataApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "odata", - format: "odata-link", - path: "odata-api", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["http", "https"], - serviceUrl: "https://services.odata.org/TripPinWebApiService", - value: "https://services.odata.org/TripPinWebApiService/$metadata", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json - */ -async function apiManagementCreateSoapPassThroughApiUsingWsdlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - soapApiType: "soap", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json - */ -async function apiManagementCreateSoapToRestApiUsingWsdlImport(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "soapApi"; - const parameters: ApiCreateOrUpdateParameter = { - format: "wsdl-link", - path: "currency", - value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", - wsdlSelector: { - wsdlEndpointName: "CurrencyConvertorSoap", - wsdlServiceName: "CurrencyConvertor", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the API Management service instance. - * - * @summary Creates new or updates existing specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWebsocketApi.json - */ -async function apiManagementCreateWebSocketApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - apiType: "websocket", - path: "newapiPath", - description: "apidescription5200", - displayName: "apiname1463", - protocols: ["wss", "ws"], - serviceUrl: "wss://echo.websocket.org", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApi(); - await apiManagementCreateApiClone(); - await apiManagementCreateApiNewVersionUsingExistingApi(); - await apiManagementCreateApiRevisionFromExistingApi(); - await apiManagementCreateApiUsingImportOverrideServiceUrl(); - await apiManagementCreateApiUsingOai3Import(); - await apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); - await apiManagementCreateApiUsingSwaggerImport(); - await apiManagementCreateApiUsingWadlImport(); - await apiManagementCreateApiWithMultipleAuthServers(); - await apiManagementCreateApiWithMultipleOpenIdConnectProviders(); - await apiManagementCreateApiWithOpenIdConnect(); - await apiManagementCreateGraphQlApi(); - await apiManagementCreateGrpcApi(); - await apiManagementCreateODataApi(); - await apiManagementCreateSoapPassThroughApiUsingWsdlImport(); - await apiManagementCreateSoapToRestApiUsingWsdlImport(); - await apiManagementCreateWebSocketApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDeleteSample.ts deleted file mode 100644 index 98b49260a5fc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API of the API Management service instance. - * - * @summary Deletes the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json - */ -async function apiManagementDeleteApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.beginDeleteAndWait( - resourceGroupName, - serviceName, - apiId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticCreateOrUpdateSample.ts deleted file mode 100644 index 8372ffd274d1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. - * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json - */ -async function apiManagementCreateApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticDeleteSample.ts deleted file mode 100644 index 03aadc740db3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json - */ -async function apiManagementDeleteApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.delete( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetEntityTagSample.ts deleted file mode 100644 index 58e6376ba004..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json - */ -async function apiManagementHeadApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetSample.ts deleted file mode 100644 index 00b42c72b5ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json - */ -async function apiManagementGetApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.get( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticListByServiceSample.ts deleted file mode 100644 index f84c8ddc510f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json - */ -async function apiManagementListApiDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiDiagnostic.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticUpdateSample.ts deleted file mode 100644 index 3a829e21d914..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiDiagnosticUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. - * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json - */ -async function apiManagementUpdateApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiDiagnostic.update( - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiExportGetSample.ts deleted file mode 100644 index 05ee98886755..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiExportGetSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json - */ -async function apiManagementGetApiExportInOpenApi2Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json - */ -async function apiManagementGetApiExportInOpenApi3Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiExport.get( - resourceGroupName, - serviceName, - apiId, - format, - exportParam, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiExportInOpenApi2Dot0(); - await apiManagementGetApiExportInOpenApi3Dot0(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts deleted file mode 100644 index 854a17705329..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementGatewayConfigConnectionResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json - */ -async function apiManagementCreateGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const parameters: ApiManagementGatewayConfigConnectionResource = { - sourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiGatewayConfigConnection.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionDeleteSample.ts deleted file mode 100644 index c10133a8fa3f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an existing API Management gateway config connection. - * - * @summary Deletes an existing API Management gateway config connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json - */ -async function apiManagementGatewayDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.beginDeleteAndWait( - resourceGroupName, - gatewayName, - configConnectionName, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionGetSample.ts deleted file mode 100644 index 9976fabf95fb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets an API Management gateway config connection resource description. - * - * @summary Gets an API Management gateway config connection resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json - */ -async function apiManagementGetGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-01"; - const configConnectionName = "gcc-01"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGatewayConfigConnection.get( - resourceGroupName, - gatewayName, - configConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts deleted file mode 100644 index 4f9989f8add1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all API Management gateway config connections within a gateway. - * - * @summary List all API Management gateway config connections within a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json - */ -async function apiManagementListGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "standard-gw-1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGatewayConfigConnection.listByGateway( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayCreateOrUpdateSample.ts deleted file mode 100644 index c4a69ce6a2ec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayCreateOrUpdateSample.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementGatewayResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json - */ -async function apiManagementCreateStandardGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayResource = { - backend: { - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", - }, - }, - location: "South Central US", - sku: { name: "Standard", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePremiumGateway.json - */ -async function apiManagementCreateWorkspacePremiumGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayResource = { - backend: { - subnet: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", - }, - }, - location: "South Central US", - sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - virtualNetworkType: "External", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginCreateOrUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateStandardGateway(); - await apiManagementCreateWorkspacePremiumGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayDeleteSample.ts deleted file mode 100644 index 4478c9a95cbf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayDeleteSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an existing API Management gateway. - * - * @summary Deletes an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json - */ -async function apiManagementGatewayDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "example-gateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginDeleteAndWait( - resourceGroupName, - gatewayName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayGetSample.ts deleted file mode 100644 index f82d63861e09..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets an API Management gateway resource description. - * - * @summary Gets an API Management gateway resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json - */ -async function apiManagementGatewayGetGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.get(resourceGroupName, gatewayName); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListByResourceGroupSample.ts deleted file mode 100644 index 147f7607a55b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListByResourceGroupSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all API Management gateways within a resource group. - * - * @summary List all API Management gateways within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json - */ -async function apiManagementListGatewaysBySubscriptionAndResourceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGateway.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewaysBySubscriptionAndResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListSample.ts deleted file mode 100644 index 5f1b76fed898..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all API Management gateways within a subscription. - * - * @summary List all API Management gateways within a subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json - */ -async function apiManagementListGatewaysBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiGateway.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewaysBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayUpdateSample.ts deleted file mode 100644 index c5c3890ec662..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGatewayUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementGatewayUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing API Management gateway. - * - * @summary Updates an existing API Management gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json - */ -async function apiManagementUpdateStandardGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimGateway1"; - const parameters: ApiManagementGatewayUpdateParameters = { - sku: { name: "Standard", capacity: 10 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiGateway.beginUpdateAndWait( - resourceGroupName, - gatewayName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateStandardGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetEntityTagSample.ts deleted file mode 100644 index 74de19060e8f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json - */ -async function apiManagementHeadApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.getEntityTag( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetSample.ts deleted file mode 100644 index 8b1ea36e6874..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiGetSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json - */ -async function apiManagementGetApiContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json - */ -async function apiManagementGetApiRevisionContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.get(resourceGroupName, serviceName, apiId); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiContract(); - await apiManagementGetApiRevisionContract(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts deleted file mode 100644 index 067b8cdb6ec3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - IssueAttachmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Attachment for the Issue in an API or updates an existing one. - * - * @summary Creates a new Attachment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json - */ -async function apiManagementCreateApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const parameters: IssueAttachmentContract = { - content: "IEJhc2U2NA==", - contentFormat: "image/jpeg", - title: "Issue attachment.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentDeleteSample.ts deleted file mode 100644 index 7d579fefb443..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json - */ -async function apiManagementDeleteApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetEntityTagSample.ts deleted file mode 100644 index 0ff71cadd741..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json - */ -async function apiManagementHeadApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetSample.ts deleted file mode 100644 index bbb2a22995af..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the issue Attachment for an API specified by its identifier. - * - * @summary Gets the details of the issue Attachment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json - */ -async function apiManagementGetApiIssueAttachment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const attachmentId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueAttachment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiIssueAttachment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentListByServiceSample.ts deleted file mode 100644 index 11073b6bf20d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueAttachmentListByServiceSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all attachments for the Issue associated with the specified API. - * - * @summary Lists all attachments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json - */ -async function apiManagementListApiIssueAttachments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssueAttachment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiIssueAttachments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentCreateOrUpdateSample.ts deleted file mode 100644 index 97b3a399dd55..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - IssueCommentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Comment for the Issue in an API or updates an existing one. - * - * @summary Creates a new Comment for the Issue in an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json - */ -async function apiManagementCreateApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const parameters: IssueCommentContract = { - createdDate: new Date("2018-02-01T22:21:20.467Z"), - text: "Issue comment.", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentDeleteSample.ts deleted file mode 100644 index 2cf987ca6b8d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified comment from an Issue. - * - * @summary Deletes the specified comment from an Issue. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json - */ -async function apiManagementDeleteApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetEntityTagSample.ts deleted file mode 100644 index a605dc6131c4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json - */ -async function apiManagementHeadApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetSample.ts deleted file mode 100644 index 46c0bf167e19..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the issue Comment for an API specified by its identifier. - * - * @summary Gets the details of the issue Comment for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json - */ -async function apiManagementGetApiIssueComment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const commentId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssueComment.get( - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiIssueComment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentListByServiceSample.ts deleted file mode 100644 index 0c0d6f41648d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCommentListByServiceSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all comments for the Issue associated with the specified API. - * - * @summary Lists all comments for the Issue associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json - */ -async function apiManagementListApiIssueComments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssueComment.listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiIssueComments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCreateOrUpdateSample.ts deleted file mode 100644 index 5d751084c125..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { IssueContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Issue for an API or updates an existing one. - * - * @summary Creates a new Issue for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json - */ -async function apiManagementCreateApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const parameters: IssueContract = { - description: "New API issue description", - createdDate: new Date("2018-02-01T22:21:20.467Z"), - state: "open", - title: "New API issue", - userId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - issueId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueDeleteSample.ts deleted file mode 100644 index 76ce5d0af020..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Issue from an API. - * - * @summary Deletes the specified Issue from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json - */ -async function apiManagementDeleteApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.delete( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetEntityTagSample.ts deleted file mode 100644 index 572f4c55a369..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json - */ -async function apiManagementHeadApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.getEntityTag( - resourceGroupName, - serviceName, - apiId, - issueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetSample.ts deleted file mode 100644 index 2d2d233f639a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Issue for an API specified by its identifier. - * - * @summary Gets the details of the Issue for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json - */ -async function apiManagementGetApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.get( - resourceGroupName, - serviceName, - apiId, - issueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueListByServiceSample.ts deleted file mode 100644 index 6cc62d066fe5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all issues associated with the specified API. - * - * @summary Lists all issues associated with the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json - */ -async function apiManagementListApiIssues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiIssue.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiIssues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueUpdateSample.ts deleted file mode 100644 index d1d3abc99949..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiIssueUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - IssueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing issue for an API. - * - * @summary Updates an existing issue for an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json - */ -async function apiManagementUpdateApiIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const parameters: IssueUpdateContract = { state: "closed" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiIssue.update( - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByServiceSample.ts deleted file mode 100644 index b25324df2094..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all APIs of the API Management service instance. - * - * @summary Lists all APIs of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json - */ -async function apiManagementListApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.api.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByTagsSample.ts deleted file mode 100644 index 1eadadca7d0b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiListByTagsSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of apis associated with tags. - * - * @summary Lists a collection of apis associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json - */ -async function apiManagementListApisByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.api.listByTags( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApisByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts deleted file mode 100644 index 51168dbb2986..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management gateway - * - * @summary Gets all available SKU for a given API Management gateway - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json - */ -async function apiManagementListSkUsGateways(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const gatewayName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementGatewaySkus.listAvailableSkus( - resourceGroupName, - gatewayName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListSkUsGateways(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementOperationsListSample.ts deleted file mode 100644 index 0dc6504810b0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementOperationsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * - * @summary Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOperations.json - */ -async function apiManagementListOperations(): Promise { - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential); - const resArray = new Array(); - for await (const item of client.apiManagementOperations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts deleted file mode 100644 index 8f145a0a0c82..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - * - * @summary Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json - */ -async function apiManagementApplyNetworkConfigurationUpdates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceApplyNetworkConfigurationParameters = { - location: "west us", - }; - const options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = - { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementApplyNetworkConfigurationUpdates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceBackupSample.ts deleted file mode 100644 index 332cc674914e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceBackupSample.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json - */ -async function apiManagementBackupWithAccessKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithSystemManagedIdentity.json - */ -async function apiManagementBackupWithSystemManagedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "SystemAssignedManagedIdentity", - backupName: "backup5", - containerName: "apim-backups", - storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * - * @summary Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json - */ -async function apiManagementBackupWithUserAssignedManagedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessType: "UserAssignedManagedIdentity", - backupName: "backup5", - clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", - containerName: "apim-backups", - storageAccount: "contosorpstorage", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginBackupAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementBackupWithAccessKey(); - await apiManagementBackupWithSystemManagedIdentity(); - await apiManagementBackupWithUserAssignedManagedIdentity(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts deleted file mode 100644 index 0d05d2fa5fe5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks availability and correctness of a name for an API Management service. - * - * @summary Checks availability and correctness of a name for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json - */ -async function apiManagementServiceCheckNameAvailability(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const parameters: ApiManagementServiceCheckNameAvailabilityParameters = { - name: "apimService1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.checkNameAvailability(parameters); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCreateOrUpdateSample.ts deleted file mode 100644 index 917c68fb399d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceCreateOrUpdateSample.ts +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceResource, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json - */ -async function apiManagementCreateMultiRegionServiceWithCustomHostname(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - additionalLocations: [ - { - disableGateway: true, - location: "East US", - sku: { name: "Premium", capacity: 1 }, - }, - ], - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - certificatePassword: "Password", - defaultSslBinding: true, - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "gateway1.msitesting.net", - }, - { - type: "Management", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "mgmt.msitesting.net", - }, - { - type: "Portal", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "portal1.msitesting.net", - }, - { - type: "ConfigurationApi", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "configuration-api.msitesting.net", - }, - ], - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateService.json - */ -async function apiManagementCreateService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceHavingMsi.json - */ -async function apiManagementCreateServiceHavingMsi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json - */ -async function apiManagementCreateServiceInVnetWithPublicIP(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US 2 EUAP", - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant", - }, - virtualNetworkType: "External", - zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInZones.json - */ -async function apiManagementCreateServiceInZones(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "North europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 2 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - zones: ["1", "2"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceSkuv2Service.json - */ -async function apiManagementCreateServiceSkuv2Service(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { type: "SystemAssigned" }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "StandardV2", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json - */ -async function apiManagementCreateServiceWithCustomHostnameKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - apiVersionConstraint: { minApiVersion: "2019-01-01" }, - hostnameConfigurations: [ - { - type: "Proxy", - defaultSslBinding: true, - hostName: "gateway1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "Management", - hostName: "mgmt.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "Portal", - hostName: "portal1.msitesting.net", - identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", - keyVaultId: - "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", - }, - { - type: "ConfigurationApi", - certificatePassword: "Password", - encodedCertificate: "****** Base 64 Encoded Certificate ************", - hostName: "configuration-api.msitesting.net", - }, - ], - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": - {}, - }, - }, - location: "North Europe", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - virtualNetworkType: "None", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithDeveloperPortal.json - */ -async function apiManagementCreateServiceWithDeveloperPortal(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - developerPortalStatus: "Enabled", - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - sku: { name: "Developer", capacity: 1 }, - tags: { name: "Contoso", test: "User" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json - */ -async function apiManagementCreateServiceWithNatGatewayEnabled(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "East US", - natGatewayState: "Enabled", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Premium", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithSystemCertificates.json - */ -async function apiManagementCreateServiceWithSystemCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - certificates: [ - { - certificatePassword: "Password", - encodedCertificate: - "*******Base64 encoded Certificate******************", - storeName: "CertificateAuthority", - }, - ], - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json - */ -async function apiManagementCreateServiceWithUserAssignedIdentity(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - identity: { - type: "UserAssigned", - userAssignedIdentities: { - "/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/apimService1": - {}, - }, - }, - location: "West US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Consumption", capacity: 0 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json - */ -async function apiManagementCreateServiceWithoutLegacyConfigurationApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - configurationApi: { legacyApi: "Disabled" }, - location: "Central US", - publisherEmail: "apim@autorestsdk.com", - publisherName: "autorestsdk", - sku: { name: "Basic", capacity: 1 }, - tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * - * @summary Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUndelete.json - */ -async function apiManagementUndelete(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceResource = { - location: "South Central US", - publisherEmail: "foo@contoso.com", - publisherName: "foo", - restore: true, - sku: { name: "Developer", capacity: 1 }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateMultiRegionServiceWithCustomHostname(); - await apiManagementCreateService(); - await apiManagementCreateServiceHavingMsi(); - await apiManagementCreateServiceInVnetWithPublicIP(); - await apiManagementCreateServiceInZones(); - await apiManagementCreateServiceSkuv2Service(); - await apiManagementCreateServiceWithCustomHostnameKeyVault(); - await apiManagementCreateServiceWithDeveloperPortal(); - await apiManagementCreateServiceWithNatGatewayEnabled(); - await apiManagementCreateServiceWithSystemCertificates(); - await apiManagementCreateServiceWithUserAssignedIdentity(); - await apiManagementCreateServiceWithoutLegacyConfigurationApi(); - await apiManagementUndelete(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceDeleteSample.ts deleted file mode 100644 index ef30555132e5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceDeleteSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes an existing API Management service. - * - * @summary Deletes an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json - */ -async function apiManagementServiceDeleteService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginDeleteAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceDeleteService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts deleted file mode 100644 index bd1c321f0615..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the custom domain ownership identifier for an API Management service. - * - * @summary Get the custom domain ownership identifier for an API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json - */ -async function apiManagementServiceGetDomainOwnershipIdentifier(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.apiManagementService.getDomainOwnershipIdentifier(); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetDomainOwnershipIdentifier(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSample.ts deleted file mode 100644 index dd75c41376a4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json - */ -async function apiManagementServiceGetMultiRegionInternalVnet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json - */ -async function apiManagementServiceGetService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets an API Management service resource description. - * - * @summary Gets an API Management service resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json - */ -async function apiManagementServiceGetServiceHavingMsi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetMultiRegionInternalVnet(); - await apiManagementServiceGetService(); - await apiManagementServiceGetServiceHavingMsi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSsoTokenSample.ts deleted file mode 100644 index 97f7be92e40d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceGetSsoTokenSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * - * @summary Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json - */ -async function apiManagementServiceGetSsoToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.getSsoToken( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetSsoToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListByResourceGroupSample.ts deleted file mode 100644 index 88f2503457ce..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListByResourceGroupSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all API Management services within a resource group. - * - * @summary List all API Management services within a resource group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json - */ -async function apiManagementListServiceBySubscriptionAndResourceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementService.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListServiceBySubscriptionAndResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListSample.ts deleted file mode 100644 index a33dc30a0163..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all API Management services within an Azure subscription. - * - * @summary Lists all API Management services within an Azure subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json - */ -async function apiManagementListServiceBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementService.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListServiceBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceMigrateToStv2Sample.ts deleted file mode 100644 index f3f370cf589b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceMigrateToStv2Sample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - MigrateToStv2Contract, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. - * - * @summary Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json - */ -async function apiManagementMigrateService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: MigrateToStv2Contract = { mode: "PreserveIp" }; - const options: ApiManagementServiceMigrateToStv2OptionalParams = { - parameters, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginMigrateToStv2AndWait( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementMigrateService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceRestoreSample.ts deleted file mode 100644 index 2a3e8f7ea165..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceRestoreSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceBackupRestoreParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * - * @summary Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json - */ -async function apiManagementRestoreService(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceBackupRestoreParameters = { - accessKey: "**************************************************", - accessType: "AccessKey", - backupName: "apimService1backup_2017_03_19", - containerName: "backupContainer", - storageAccount: "teststorageaccount", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginRestoreAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementRestoreService(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts deleted file mode 100644 index 4fffe22e1355..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management service - * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json - */ -async function apiManagementListSkUsConsumption(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Gets all available SKU for a given API Management service - * - * @summary Gets all available SKU for a given API Management service - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Dedicated.json - */ -async function apiManagementListSkUsDedicated(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListSkUsConsumption(); - await apiManagementListSkUsDedicated(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceUpdateSample.ts deleted file mode 100644 index 98f06233eac2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementServiceUpdateSample.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiManagementServiceUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json - */ -async function apiManagementUpdateServiceDisableTls10(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - customProperties: { - microsoftWindowsAzureApiManagementGatewaySecurityProtocolsTls10: "false", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServicePublisherDetails.json - */ -async function apiManagementUpdateServicePublisherDetails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - publisherEmail: "foobar@live.com", - publisherName: "Contoso Vnext", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates an existing API Management service. - * - * @summary Updates an existing API Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json - */ -async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const parameters: ApiManagementServiceUpdateParameters = { - additionalLocations: [ - { - location: "Australia East", - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default", - }, - zones: ["1", "2", "3"], - }, - ], - publicIpAddressId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", - sku: { name: "Premium", capacity: 3 }, - virtualNetworkConfiguration: { - subnetResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2", - }, - virtualNetworkType: "External", - zones: ["1", "2", "3"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementService.beginUpdateAndWait( - resourceGroupName, - serviceName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateServiceDisableTls10(); - await apiManagementUpdateServicePublisherDetails(); - await apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementSkusListSample.ts deleted file mode 100644 index 163bf66e74bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementSkusListSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * - * @summary Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json - */ -async function listsAllAvailableResourceSkUs(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementSkus.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await listsAllAvailableResourceSkUs(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinkGetSample.ts deleted file mode 100644 index c763fca93a55..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinkGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets an API Management WorkspaceLink resource description. - * - * @summary Gets an API Management WorkspaceLink resource description. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json - */ -async function apiManagementGetWorkspaceLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; - const workspaceId = "wk-1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiManagementWorkspaceLink.get( - resourceGroupName, - serviceName, - workspaceId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts deleted file mode 100644 index 4cfe038f350b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List all API Management workspaceLinks for a service. - * - * @summary List all API Management workspaceLinks for a service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json - */ -async function apiManagementListGatewayConfigConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "service1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiManagementWorkspaceLinks.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewayConfigConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationCreateOrUpdateSample.ts deleted file mode 100644 index 23b8ef75655d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationCreateOrUpdateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OperationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. - * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json - */ -async function apiManagementCreateApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" }, - ], - statusCode: 200, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationDeleteSample.ts deleted file mode 100644 index 8844619d86bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json - */ -async function apiManagementDeleteApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetEntityTagSample.ts deleted file mode 100644 index ca4fb03e5fdb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json - */ -async function apiManagementHeadApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetSample.ts deleted file mode 100644 index cb033390d0dd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationGetSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json - */ -async function apiManagementGetApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json - */ -async function apiManagementGetApiOperationPetStore(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "swagger-petstore"; - const operationId = "loginUser"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.get( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiOperation(); - await apiManagementGetApiOperationPetStore(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationListByApiSample.ts deleted file mode 100644 index d91170db0c85..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationListByApiSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json - */ -async function apiManagementListApiOperations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiOperation.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 6afdfbecb29a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. - * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json - */ -async function apiManagementCreateApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: ApiOperationPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyDeleteSample.ts deleted file mode 100644 index 833a2b7cc893..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json - */ -async function apiManagementDeleteApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.delete( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetEntityTagSample.ts deleted file mode 100644 index ac56b4b7faf0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json - */ -async function apiManagementHeadApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetSample.ts deleted file mode 100644 index 8393cea200af..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json - */ -async function apiManagementGetApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.get( - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyListByOperationSample.ts deleted file mode 100644 index 979e3dd31bde..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationPolicyListByOperationSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json - */ -async function apiManagementListApiOperationPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListApiOperationPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationUpdateSample.ts deleted file mode 100644 index 32f8ca6fe1e9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiOperationUpdateSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OperationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. - * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json - */ -async function apiManagementUpdateApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], - }, - ], - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiOperation.update( - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 0a9f8c047c32..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json - */ -async function apiManagementCreateApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json - */ -async function apiManagementCreateApiPolicyNonXmlEncoded(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options: ApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiPolicy(); - await apiManagementCreateApiPolicyNonXmlEncoded(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyDeleteSample.ts deleted file mode 100644 index 34f35a877ce8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json - */ -async function apiManagementDeleteApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.delete( - resourceGroupName, - serviceName, - apiId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetEntityTagSample.ts deleted file mode 100644 index 0c92e78a8a71..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json - */ -async function apiManagementHeadApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetSample.ts deleted file mode 100644 index 63fe1b79446c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json - */ -async function apiManagementGetApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.get( - resourceGroupName, - serviceName, - apiId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyListByApiSample.ts deleted file mode 100644 index 3c6efc4a6ed2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiPolicyListByApiSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json - */ -async function apiManagementListApiPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiPolicy.listByApi( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListApiPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiProductListByApisSample.ts deleted file mode 100644 index d15c8eac8d95..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiProductListByApisSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Products, which the API is part of. - * - * @summary Lists all Products, which the API is part of. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiProducts.json - */ -async function apiManagementListApiProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiProduct.listByApis( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseCreateOrUpdateSample.ts deleted file mode 100644 index a286a7737f32..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Release for the API. - * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json - */ -async function apiManagementCreateApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - releaseId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseDeleteSample.ts deleted file mode 100644 index 1c72ff448e98..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json - */ -async function apiManagementDeleteApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.delete( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetEntityTagSample.ts deleted file mode 100644 index b494d1364027..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json - */ -async function apiManagementHeadApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.getEntityTag( - resourceGroupName, - serviceName, - apiId, - releaseId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetSample.ts deleted file mode 100644 index 1b263998cca6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json - */ -async function apiManagementGetApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.get( - resourceGroupName, - serviceName, - apiId, - releaseId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseListByServiceSample.ts deleted file mode 100644 index 59dd7f13a2dd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json - */ -async function apiManagementListApiReleases(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiRelease.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiReleases(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseUpdateSample.ts deleted file mode 100644 index dfe928fe6fc0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiReleaseUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. - * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json - */ -async function apiManagementUpdateApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiRelease.update( - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiRevisionListByServiceSample.ts deleted file mode 100644 index f3ee3596e745..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiRevisionListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json - */ -async function apiManagementListApiRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiRevision.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaCreateOrUpdateSample.ts deleted file mode 100644 index d84f9225041c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates schema configuration for the API. - * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json - */ -async function apiManagementCreateApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaDeleteSample.ts deleted file mode 100644 index b6af0e61890e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json - */ -async function apiManagementDeleteApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.delete( - resourceGroupName, - serviceName, - apiId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetEntityTagSample.ts deleted file mode 100644 index 4bae10b64153..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json - */ -async function apiManagementHeadApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.getEntityTag( - resourceGroupName, - serviceName, - apiId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetSample.ts deleted file mode 100644 index 0c0d33858443..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json - */ -async function apiManagementGetApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiSchema.get( - resourceGroupName, - serviceName, - apiId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaListByApiSample.ts deleted file mode 100644 index 6173a6f61fd8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiSchemaListByApiSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json - */ -async function apiManagementListApiSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiSchema.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts deleted file mode 100644 index 0b3473f138f4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagDescriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create/Update tag description in scope of the Api. - * - * @summary Create/Update tag description in scope of the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json - */ -async function apiManagementCreateApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagDescriptionId = "tagId1"; - const parameters: TagDescriptionCreateParameters = { - description: - "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", - externalDocsDescription: "Description of the external docs resource", - externalDocsUrl: "http://some.url/additionaldoc", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionDeleteSample.ts deleted file mode 100644 index 701b22a3414d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete tag description for the Api. - * - * @summary Delete tag description for the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json - */ -async function apiManagementDeleteApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagDescriptionId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.delete( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetEntityTagSample.ts deleted file mode 100644 index 1d362ef4ac85..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json - */ -async function apiManagementHeadApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.getEntityTag( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetSample.ts deleted file mode 100644 index e8acf53e2206..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Tag description in scope of API - * - * @summary Get Tag description in scope of API - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json - */ -async function apiManagementGetApiTagDescription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagDescriptionId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiTagDescription.get( - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiTagDescription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionListByServiceSample.ts deleted file mode 100644 index 11397d7e8743..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiTagDescriptionListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * - * @summary Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json - */ -async function apiManagementListApiTagDescriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiTagDescription.listByService( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiTagDescriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiUpdateSample.ts deleted file mode 100644 index 5929ed6ce72b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified API of the API Management service instance. - * - * @summary Updates the specified API of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json - */ -async function apiManagementUpdateApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.api.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetCreateOrUpdateSample.ts deleted file mode 100644 index 3c670e54c880..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiVersionSetContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a Api Version Set. - * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json - */ -async function apiManagementCreateApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - versionSetId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetDeleteSample.ts deleted file mode 100644 index b44693da4674..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json - */ -async function apiManagementDeleteApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.delete( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetEntityTagSample.ts deleted file mode 100644 index a489980f4f82..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json - */ -async function apiManagementHeadApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - versionSetId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetSample.ts deleted file mode 100644 index a50f2c9cec07..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json - */ -async function apiManagementGetApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.get( - resourceGroupName, - serviceName, - versionSetId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetListByServiceSample.ts deleted file mode 100644 index 1c9bf388d1e6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified service instance. - * - * @summary Lists a collection of API Version Sets in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json - */ -async function apiManagementListApiVersionSets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiVersionSet.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiVersionSets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetUpdateSample.ts deleted file mode 100644 index 0167a723dbe9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiVersionSetUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiVersionSetUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. - * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json - */ -async function apiManagementUpdateApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiVersionSet.update( - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiCreateOrUpdateSample.ts deleted file mode 100644 index 523f9ef0d0bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiCreateOrUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Wiki for an API or updates an existing one. - * - * @summary Creates a new Wiki for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json - */ -async function apiManagementCreateApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiDeleteSample.ts deleted file mode 100644 index a2a3cc739dfb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Wiki from an API. - * - * @summary Deletes the specified Wiki from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json - */ -async function apiManagementDeleteApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.delete( - resourceGroupName, - serviceName, - apiId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetEntityTagSample.ts deleted file mode 100644 index 6cd9141f7606..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json - */ -async function apiManagementHeadApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.getEntityTag( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetSample.ts deleted file mode 100644 index 3840c902ece6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Wiki for an API specified by its identifier. - * - * @summary Gets the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json - */ -async function apiManagementGetApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.get( - resourceGroupName, - serviceName, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiUpdateSample.ts deleted file mode 100644 index 3937460fef3f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikiUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WikiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Wiki for an API specified by its identifier. - * - * @summary Updates the details of the Wiki for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json - */ -async function apiManagementUpdateApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.apiWiki.update( - resourceGroupName, - serviceName, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikisListSample.ts deleted file mode 100644 index b66f60b7ccac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/apiWikisListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the wikis for an API specified by its identifier. - * - * @summary Gets the wikis for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiWikis.json - */ -async function apiManagementListApiWikis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.apiWikis.list( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiWikis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 34045226bb96..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationAccessPolicyContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates Authorization Access Policy. - * - * @summary Creates or updates Authorization Access Policy. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json - */ -async function apiManagementCreateAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const parameters: AuthorizationAccessPolicyContract = { - appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], - objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", - tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyDeleteSample.ts deleted file mode 100644 index c5a90c714856..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific access policy from the Authorization. - * - * @summary Deletes specific access policy from the Authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json - */ -async function apiManagementDeleteAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyGetSample.ts deleted file mode 100644 index ff00d35729d8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the authorization access policy specified by its identifier. - * - * @summary Gets the details of the authorization access policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json - */ -async function apiManagementGetAuthorizationAccessPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationAccessPolicy.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetAuthorizationAccessPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts deleted file mode 100644 index 0f2fb04af839..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of authorization access policy defined within a authorization. - * - * @summary Lists a collection of authorization access policy defined within a authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json - */ -async function apiManagementListAuthorizationAccessPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationAccessPolicy.listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListAuthorizationAccessPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationConfirmConsentCodeSample.ts deleted file mode 100644 index 1cb3b8a5db8e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationConfirmConsentCodeSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationConfirmConsentCodeRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Confirm valid consent code to suppress Authorizations anti-phishing page. - * - * @summary Confirm valid consent code to suppress Authorizations anti-phishing page. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json - */ -async function apiManagementPostAuthorizationConfirmConsentCodeRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationConfirmConsentCodeRequestContract = { - consentCode: "theconsentcode", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.confirmConsentCode( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPostAuthorizationConfirmConsentCodeRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationCreateOrUpdateSample.ts deleted file mode 100644 index 02e25a7c82c4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationCreateOrUpdateSample.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates authorization. - * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json - */ -async function apiManagementCreateAuthorizationAadAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz2"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization. - * - * @summary Creates or updates authorization. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json - */ -async function apiManagementCreateAuthorizationAadClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const authorizationId = "authz1"; - const parameters: AuthorizationContract = { - authorizationType: "OAuth2", - oAuth2GrantType: "AuthorizationCode", - parameters: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateAuthorizationAadAuthCode(); - await apiManagementCreateAuthorizationAadClientCred(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationDeleteSample.ts deleted file mode 100644 index 3c1185addc84..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Authorization from the Authorization provider. - * - * @summary Deletes specific Authorization from the Authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json - */ -async function apiManagementDeleteAuthorization(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationGetSample.ts deleted file mode 100644 index e57de1ad8a1b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the authorization specified by its identifier. - * - * @summary Gets the details of the authorization specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json - */ -async function apiManagementGetAuthorization(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorization.get( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetAuthorization(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationListByAuthorizationProviderSample.ts deleted file mode 100644 index 35267bf32265..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationListByAuthorizationProviderSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. - * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json - */ -async function apiManagementListAuthorizationsAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a authorization provider. - * - * @summary Lists a collection of authorization providers defined within a authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsClientCred.json - */ -async function apiManagementListAuthorizationsClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorization.listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListAuthorizationsAuthCode(); - await apiManagementListAuthorizationsClientCred(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationLoginLinksPostSample.ts deleted file mode 100644 index 0cd39d3ececb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationLoginLinksPostSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationLoginRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets authorization login links. - * - * @summary Gets authorization login links. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json - */ -async function apiManagementGetAuthorizationLoginRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const authorizationId = "authz1"; - const parameters: AuthorizationLoginRequestContract = { - postLoginRedirectUrl: "https://www.bing.com/", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationLoginLinks.post( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetAuthorizationLoginRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderCreateOrUpdateSample.ts deleted file mode 100644 index bee2d03360db..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderCreateOrUpdateSample.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationProviderContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json - */ -async function apiManagementCreateAuthorizationProviderAadAuthCode(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithauthcode", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: "clientsecretid", - clientSecret: "clientsecretvalue", - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json - */ -async function apiManagementCreateAuthorizationProviderAadClientCred(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithclientcred"; - const parameters: AuthorizationProviderContract = { - displayName: "aadwithclientcred", - identityProvider: "aad", - oauth2: { - grantTypes: { - authorizationCode: { - resourceUri: "https://graph.microsoft.com", - scopes: "User.Read.All Group.Read.All", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json - */ -async function apiManagementCreateAuthorizationProviderGenericOAuth2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "eventbrite"; - const parameters: AuthorizationProviderContract = { - displayName: "eventbrite", - identityProvider: "oauth2", - oauth2: { - grantTypes: { - authorizationCode: { - authorizationUrl: "https://www.eventbrite.com/oauth/authorize", - clientId: "clientid", - clientSecret: "clientsecretvalue", - refreshUrl: "https://www.eventbrite.com/oauth/token", - scopes: undefined, - tokenUrl: "https://www.eventbrite.com/oauth/token", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates authorization provider. - * - * @summary Creates or updates authorization provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json - */ -async function apiManagementCreateAuthorizationProviderOobGoogle(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "google"; - const parameters: AuthorizationProviderContract = { - displayName: "google", - identityProvider: "google", - oauth2: { - grantTypes: { - authorizationCode: { - clientId: - "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", - clientSecret: "clientsecretvalue", - scopes: - "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", - }, - }, - redirectUrl: - "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.createOrUpdate( - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateAuthorizationProviderAadAuthCode(); - await apiManagementCreateAuthorizationProviderAadClientCred(); - await apiManagementCreateAuthorizationProviderGenericOAuth2(); - await apiManagementCreateAuthorizationProviderOobGoogle(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderDeleteSample.ts deleted file mode 100644 index 4977245d8850..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific authorization provider from the API Management service instance. - * - * @summary Deletes specific authorization provider from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json - */ -async function apiManagementDeleteAuthorizationProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.delete( - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteAuthorizationProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderGetSample.ts deleted file mode 100644 index d8c637bbb093..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the authorization provider specified by its identifier. - * - * @summary Gets the details of the authorization provider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json - */ -async function apiManagementGetAuthorizationProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authorizationProviderId = "aadwithauthcode"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationProvider.get( - resourceGroupName, - serviceName, - authorizationProviderId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetAuthorizationProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderListByServiceSample.ts deleted file mode 100644 index 59208647ab39..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationProviderListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of authorization providers defined within a service instance. - * - * @summary Lists a collection of authorization providers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json - */ -async function apiManagementListAuthorizationProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationProvider.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListAuthorizationProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerCreateOrUpdateSample.ts deleted file mode 100644 index efde5f2369b0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerCreateOrUpdateSample.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationServerContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates new authorization server or updates an existing authorization server. - * - * @summary Creates new authorization server or updates an existing authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json - */ -async function apiManagementCreateAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const parameters: AuthorizationServerContract = { - description: "test server", - authorizationEndpoint: "https://www.contoso.com/oauth2/auth", - authorizationMethods: ["GET"], - bearerTokenSendingMethods: ["authorizationHeader"], - clientId: "1", - clientRegistrationEndpoint: "https://www.contoso.com/apps", - clientSecret: "2", - defaultScope: "read write", - displayName: "test2", - grantTypes: ["authorizationCode", "implicit"], - resourceOwnerPassword: "pwd", - resourceOwnerUsername: "un", - supportState: true, - tokenEndpoint: "https://www.contoso.com/oauth2/token", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.createOrUpdate( - resourceGroupName, - serviceName, - authsid, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerDeleteSample.ts deleted file mode 100644 index 43837a3c73c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific authorization server instance. - * - * @summary Deletes specific authorization server instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json - */ -async function apiManagementDeleteAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.delete( - resourceGroupName, - serviceName, - authsid, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetEntityTagSample.ts deleted file mode 100644 index 2ebac91ac31b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json - */ -async function apiManagementHeadAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.getEntityTag( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetSample.ts deleted file mode 100644 index e2b74c993243..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the authorization server specified by its identifier. - * - * @summary Gets the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json - */ -async function apiManagementGetAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.get( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListByServiceSample.ts deleted file mode 100644 index 811662a3e8a0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of authorization servers defined within a service instance. - * - * @summary Lists a collection of authorization servers defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json - */ -async function apiManagementListAuthorizationServers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.authorizationServer.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListAuthorizationServers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListSecretsSample.ts deleted file mode 100644 index 1463f7a74ac9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerListSecretsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the client secret details of the authorization server. - * - * @summary Gets the client secret details of the authorization server. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json - */ -async function apiManagementAuthorizationServerListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.listSecrets( - resourceGroupName, - serviceName, - authsid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementAuthorizationServerListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerUpdateSample.ts deleted file mode 100644 index 33fa52702863..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/authorizationServerUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AuthorizationServerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the authorization server specified by its identifier. - * - * @summary Updates the details of the authorization server specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json - */ -async function apiManagementUpdateAuthorizationServer(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const authsid = "newauthServer"; - const ifMatch = "*"; - const parameters: AuthorizationServerUpdateContract = { - clientId: "update", - clientSecret: "updated", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.authorizationServer.update( - resourceGroupName, - serviceName, - authsid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateAuthorizationServer(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendCreateOrUpdateSample.ts deleted file mode 100644 index 0dfe99ec01f6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendCreateOrUpdateSample.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json - */ -async function apiManagementCreateBackendProxyBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] }, - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendServiceFabric.json - */ -async function apiManagementCreateBackendServiceFabric(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1", - }, - ], - }, - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - backendId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateBackendProxyBackend(); - await apiManagementCreateBackendServiceFabric(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendDeleteSample.ts deleted file mode 100644 index 8f9ad0946032..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json - */ -async function apiManagementDeleteBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.delete( - resourceGroupName, - serviceName, - backendId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetEntityTagSample.ts deleted file mode 100644 index f0f8063beb2f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json - */ -async function apiManagementHeadBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.getEntityTag( - resourceGroupName, - serviceName, - backendId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetSample.ts deleted file mode 100644 index 923523f9484d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json - */ -async function apiManagementGetBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.get( - resourceGroupName, - serviceName, - backendId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendListByServiceSample.ts deleted file mode 100644 index b8e8b4d1b13c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of backends in the specified service instance. - * - * @summary Lists a collection of backends in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json - */ -async function apiManagementListBackends(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.backend.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListBackends(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendReconnectSample.ts deleted file mode 100644 index 9521a37e6b96..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendReconnectSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BackendReconnectContract, - BackendReconnectOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * - * @summary Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json - */ -async function apiManagementBackendReconnect(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const parameters: BackendReconnectContract = { after: "PT3S" }; - const options: BackendReconnectOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.reconnect( - resourceGroupName, - serviceName, - backendId, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementBackendReconnect(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendUpdateSample.ts deleted file mode 100644 index 4022fd1bd2ee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/backendUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BackendUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing backend. - * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json - */ -async function apiManagementUpdateBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.backend.update( - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheCreateOrUpdateSample.ts deleted file mode 100644 index 29bacb102aae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { CacheContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates an External Cache to be used in Api Management instance. - * - * @summary Creates or updates an External Cache to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json - */ -async function apiManagementCreateCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const parameters: CacheContract = { - description: "Redis cache instances in West India", - connectionString: - "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", - resourceId: - "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", - useFromLocation: "default", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.createOrUpdate( - resourceGroupName, - serviceName, - cacheId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheDeleteSample.ts deleted file mode 100644 index ec0437780388..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Cache. - * - * @summary Deletes specific Cache. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json - */ -async function apiManagementDeleteCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "southindia"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.delete( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetEntityTagSample.ts deleted file mode 100644 index 33a6bfd1ae04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Cache specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json - */ -async function apiManagementHeadCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.getEntityTag( - resourceGroupName, - serviceName, - cacheId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetSample.ts deleted file mode 100644 index 941c354f6795..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Cache specified by its identifier. - * - * @summary Gets the details of the Cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json - */ -async function apiManagementGetCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.get( - resourceGroupName, - serviceName, - cacheId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheListByServiceSample.ts deleted file mode 100644 index cd091887a90d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of all external Caches in the specified service instance. - * - * @summary Lists a collection of all external Caches in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json - */ -async function apiManagementListCaches(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.cache.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListCaches(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheUpdateSample.ts deleted file mode 100644 index 7be97546c0d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/cacheUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CacheUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the cache specified by its identifier. - * - * @summary Updates the details of the cache specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json - */ -async function apiManagementUpdateCache(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const cacheId = "c1"; - const ifMatch = "*"; - const parameters: CacheUpdateParameters = { useFromLocation: "westindia" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.cache.update( - resourceGroupName, - serviceName, - cacheId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateCache(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateCreateOrUpdateSample.ts deleted file mode 100644 index 8cf9ea1fa4ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateCreateOrUpdateSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificateCreateOrUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json - */ -async function apiManagementCreateCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json - */ -async function apiManagementCreateCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.createOrUpdate( - resourceGroupName, - serviceName, - certificateId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateCertificate(); - await apiManagementCreateCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateDeleteSample.ts deleted file mode 100644 index 1e04afd3da2b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json - */ -async function apiManagementDeleteCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.delete( - resourceGroupName, - serviceName, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetEntityTagSample.ts deleted file mode 100644 index bb850b2cda7d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json - */ -async function apiManagementHeadCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.getEntityTag( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetSample.ts deleted file mode 100644 index 4293e427405d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateGetSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json - */ -async function apiManagementGetCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json - */ -async function apiManagementGetCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.get( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetCertificate(); - await apiManagementGetCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateListByServiceSample.ts deleted file mode 100644 index 2dd516c88326..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified service instance. - * - * @summary Lists a collection of all certificates in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json - */ -async function apiManagementListCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.certificate.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListCertificates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateRefreshSecretSample.ts deleted file mode 100644 index 5d1cbfca769a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/certificateRefreshSecretSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json - */ -async function apiManagementRefreshCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.certificate.refreshSecret( - resourceGroupName, - serviceName, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementRefreshCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemCreateOrUpdateSample.ts deleted file mode 100644 index 53fb718f739f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemCreateOrUpdateSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContentItemContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new developer portal's content item specified by the provided content type. - * - * @summary Creates a new developer portal's content item specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json - */ -async function apiManagementCreateContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const parameters: ContentItemContract = { - properties: { - enUs: { - description: "Short story about the company.", - documentId: - "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", - keywords: "company, about", - permalink: "/about", - title: "About", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemDeleteSample.ts deleted file mode 100644 index c8778fad9ebb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the specified developer portal's content item. - * - * @summary Removes the specified developer portal's content item. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json - */ -async function apiManagementDeleteContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.delete( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetEntityTagSample.ts deleted file mode 100644 index 215132f18060..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * - * @summary Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json - */ -async function apiManagementHeadContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.getEntityTag( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetSample.ts deleted file mode 100644 index 1ec28b44bac4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the developer portal's content item specified by its identifier. - * - * @summary Returns the developer portal's content item specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json - */ -async function apiManagementGetContentTypeContentItem(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const contentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentItem.get( - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetContentTypeContentItem(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemListByServiceSample.ts deleted file mode 100644 index 1ad3e9ba2b4d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentItemListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists developer portal's content items specified by the provided content type. - * - * @summary Lists developer portal's content items specified by the provided content type. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json - */ -async function apiManagementListContentTypeContentItems(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.contentItem.listByService( - resourceGroupName, - serviceName, - contentTypeId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListContentTypeContentItems(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeCreateOrUpdateSample.ts deleted file mode 100644 index bc1d6d1e5583..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeCreateOrUpdateSample.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContentTypeContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - * - * @summary Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json - */ -async function apiManagementCreateContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const parameters: ContentTypeContract = { - namePropertiesName: "Page", - schema: { - additionalProperties: false, - properties: { - en_us: { - type: "object", - additionalProperties: false, - properties: { - description: { - type: "string", - description: - "Page description. This property gets included in SEO attributes.", - indexed: true, - title: "Description", - }, - documentId: { - type: "string", - description: "Reference to page content document.", - title: "Document ID", - }, - keywords: { - type: "string", - description: - "Page keywords. This property gets included in SEO attributes.", - indexed: true, - title: "Keywords", - }, - permalink: { - type: "string", - description: "Page permalink, e.g. '/about'.", - indexed: true, - title: "Permalink", - }, - title: { - type: "string", - description: - "Page title. This property gets included in SEO attributes.", - indexed: true, - title: "Title", - }, - }, - required: ["title", "permalink", "documentId"], - }, - }, - }, - description: "A regular page", - version: "1.0.0", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.createOrUpdate( - resourceGroupName, - serviceName, - contentTypeId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeDeleteSample.ts deleted file mode 100644 index b87edccbe9c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * - * @summary Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json - */ -async function apiManagementDeleteContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.delete( - resourceGroupName, - serviceName, - contentTypeId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeGetSample.ts deleted file mode 100644 index 14cd597f434f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json - */ -async function apiManagementGetContentType(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const contentTypeId = "page"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.contentType.get( - resourceGroupName, - serviceName, - contentTypeId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetContentType(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeListByServiceSample.ts deleted file mode 100644 index 1de5bbb80780..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/contentTypeListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * - * @summary Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json - */ -async function apiManagementListContentTypes(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.contentType.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListContentTypes(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 79ddf17691ab..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalDelegationSettings, - DelegationSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Delegation settings. - * - * @summary Create or Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json - */ -async function apiManagementPortalSettingsUpdateDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "", - }; - const options: DelegationSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetEntityTagSample.ts deleted file mode 100644 index d811803b767e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetEntityTagSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the DelegationSettings. - * - * @summary Gets the entity state (Etag) version of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json - */ -async function apiManagementHeadDelegationSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadDelegationSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetSample.ts deleted file mode 100644 index d7f4709d4b71..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Delegation Settings for the Portal. - * - * @summary Get Delegation Settings for the Portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json - */ -async function apiManagementPortalSettingsGetDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsGetDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsListSecretsSample.ts deleted file mode 100644 index b0e9a0eed63e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsListSecretsSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the secret validation key of the DelegationSettings. - * - * @summary Gets the secret validation key of the DelegationSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json - */ -async function apiManagementListSecretsPortalSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.listSecrets( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListSecretsPortalSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsUpdateSample.ts deleted file mode 100644 index 9317011be727..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/delegationSettingsUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalDelegationSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update Delegation settings. - * - * @summary Update Delegation settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json - */ -async function apiManagementPortalSettingsUpdateDelegation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalDelegationSettings = { - subscriptions: { enabled: true }, - url: "http://contoso.com/delegation", - userRegistration: { enabled: true }, - validationKey: "", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.delegationSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateDelegation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesGetByNameSample.ts deleted file mode 100644 index c25547209be5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesGetByNameSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get soft-deleted Api Management Service by name. - * - * @summary Get soft-deleted Api Management Service by name. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json - */ -async function apiManagementGetDeletedServiceByName(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.getByName(serviceName, location); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetDeletedServiceByName(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesListBySubscriptionSample.ts deleted file mode 100644 index 031d7acf9971..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesListBySubscriptionSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all soft-deleted services available for undelete for the given subscription. - * - * @summary Lists all soft-deleted services available for undelete for the given subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json - */ -async function apiManagementDeletedServicesListBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.deletedServices.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementDeletedServicesListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesPurgeSample.ts deleted file mode 100644 index c63c19e66e9c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/deletedServicesPurgeSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Purges Api Management Service (deletes it with no option to undelete). - * - * @summary Purges Api Management Service (deletes it with no option to undelete). - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json - */ -async function apiManagementDeletedServicesPurge(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const serviceName = "apimService3"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.deletedServices.beginPurgeAndWait( - serviceName, - location, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeletedServicesPurge(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticCreateOrUpdateSample.ts deleted file mode 100644 index 6c2ca49b6bca..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. - * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.json - */ -async function apiManagementCreateDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.createOrUpdate( - resourceGroupName, - serviceName, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticDeleteSample.ts deleted file mode 100644 index a777a6b4e44b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.json - */ -async function apiManagementDeleteDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.delete( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetEntityTagSample.ts deleted file mode 100644 index 4850d23315a6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json - */ -async function apiManagementHeadDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.getEntityTag( - resourceGroupName, - serviceName, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetSample.ts deleted file mode 100644 index 0556ceeb7fe5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.json - */ -async function apiManagementGetDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.get( - resourceGroupName, - serviceName, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticListByServiceSample.ts deleted file mode 100644 index 636713e8df81..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all diagnostics of the API Management service instance. - * - * @summary Lists all diagnostics of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json - */ -async function apiManagementListDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.diagnostic.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticUpdateSample.ts deleted file mode 100644 index 53275ff5e80b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/diagnosticUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. - * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.json - */ -async function apiManagementUpdateDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.diagnostic.update( - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationCreateOrUpdateSample.ts deleted file mode 100644 index 106bbf4980fd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DocumentationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Documentation or updates an existing one. - * - * @summary Creates a new Documentation or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json - */ -async function apiManagementCreateDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationContract = { - content: "content", - title: "Title", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.createOrUpdate( - resourceGroupName, - serviceName, - documentationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationDeleteSample.ts deleted file mode 100644 index 3470bf215d35..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Documentation from an API. - * - * @summary Deletes the specified Documentation from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json - */ -async function apiManagementDeleteDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.delete( - resourceGroupName, - serviceName, - documentationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetEntityTagSample.ts deleted file mode 100644 index 08b5d62a4d21..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Documentation by its identifier. - * - * @summary Gets the entity state (Etag) version of the Documentation by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json - */ -async function apiManagementHeadDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.getEntityTag( - resourceGroupName, - serviceName, - documentationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetSample.ts deleted file mode 100644 index 55f123499813..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Documentation specified by its identifier. - * - * @summary Gets the details of the Documentation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json - */ -async function apiManagementGetDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.get( - resourceGroupName, - serviceName, - documentationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationListByServiceSample.ts deleted file mode 100644 index 7c2125f6de8a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Documentations of the API Management service instance. - * - * @summary Lists all Documentations of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json - */ -async function apiManagementListApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.documentation.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationUpdateSample.ts deleted file mode 100644 index 81650d84e541..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/documentationUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DocumentationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Documentation for an API specified by its identifier. - * - * @summary Updates the details of the Documentation for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json - */ -async function apiManagementUpdateDocumentation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const documentationId = "57d1f7558aa04f15146d9d8a"; - const parameters: DocumentationUpdateContract = { - content: "content updated", - title: "Title updated", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.documentation.update( - resourceGroupName, - serviceName, - documentationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateDocumentation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateCreateOrUpdateSample.ts deleted file mode 100644 index a2cd4568dba0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EmailTemplateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an Email Template. - * - * @summary Updates an Email Template. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json - */ -async function apiManagementCreateTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const parameters: EmailTemplateUpdateParameters = { - subject: "Your request for $IssueName was successfully received.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.createOrUpdate( - resourceGroupName, - serviceName, - templateName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateDeleteSample.ts deleted file mode 100644 index e74d7282b49b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Reset the Email Template to default template provided by the API Management service instance. - * - * @summary Reset the Email Template to default template provided by the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json - */ -async function apiManagementDeleteTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.delete( - resourceGroupName, - serviceName, - templateName, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetEntityTagSample.ts deleted file mode 100644 index 1d39bb789615..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the email template specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json - */ -async function apiManagementHeadEmailTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.getEntityTag( - resourceGroupName, - serviceName, - templateName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadEmailTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetSample.ts deleted file mode 100644 index 76375a14c3a4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the email template specified by its identifier. - * - * @summary Gets the details of the email template specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json - */ -async function apiManagementGetTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.get( - resourceGroupName, - serviceName, - templateName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateListByServiceSample.ts deleted file mode 100644 index 27a4072295b7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all email templates - * - * @summary Gets all email templates - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json - */ -async function apiManagementListTemplates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.emailTemplate.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTemplates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateUpdateSample.ts deleted file mode 100644 index 04865baae43f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/emailTemplateUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - EmailTemplateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates API Management email template - * - * @summary Updates API Management email template - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json - */ -async function apiManagementUpdateTemplate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const templateName = "newIssueNotificationMessage"; - const ifMatch = "*"; - const parameters: EmailTemplateUpdateParameters = { - body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', - subject: "Your request $IssueName was received", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.emailTemplate.update( - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateTemplate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiCreateOrUpdateSample.ts deleted file mode 100644 index 978ab8317cf0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiCreateOrUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AssociationContract, - GatewayApiCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified Gateway. - * - * @summary Adds an API to the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json - */ -async function apiManagementCreateGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const parameters: AssociationContract = { provisioningState: "created" }; - const options: GatewayApiCreateOrUpdateOptionalParams = { parameters }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - apiId, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiDeleteSample.ts deleted file mode 100644 index f4ef9164769e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified Gateway. - * - * @summary Deletes the specified API from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json - */ -async function apiManagementDeleteGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.delete( - resourceGroupName, - serviceName, - gatewayId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiGetEntityTagSample.ts deleted file mode 100644 index 72464904594d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Gateway entity. - * - * @summary Checks that API entity specified by identifier is associated with the Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json - */ -async function apiManagementHeadGatewayApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const apiId = "api1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayApi.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGatewayApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiListByServiceSample.ts deleted file mode 100644 index 336281a29208..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayApiListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a gateway. - * - * @summary Lists a collection of the APIs associated with a gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json - */ -async function apiManagementListGatewayApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayApi.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewayApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts deleted file mode 100644 index fe09ab6d69f4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayCertificateAuthorityContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Assign Certificate entity to Gateway entity as Certificate Authority. - * - * @summary Assign Certificate entity to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json - */ -async function apiManagementCreateGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const parameters: GatewayCertificateAuthorityContract = { isTrusted: false }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityDeleteSample.ts deleted file mode 100644 index 90adc0d86b68..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Remove relationship between Certificate Authority and Gateway entity. - * - * @summary Remove relationship between Certificate Authority and Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json - */ -async function apiManagementDeleteGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.delete( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts deleted file mode 100644 index a333ee2add00..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * - * @summary Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json - */ -async function apiManagementHeadGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetSample.ts deleted file mode 100644 index 9fceb3b0cda5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get assigned Gateway Certificate Authority details. - * - * @summary Get assigned Gateway Certificate Authority details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json - */ -async function apiManagementGetGatewayCertificateAuthority(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const certificateId = "cert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayCertificateAuthority.get( - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGatewayCertificateAuthority(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts deleted file mode 100644 index eda03c13a04f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the collection of Certificate Authorities for the specified Gateway entity. - * - * @summary Lists the collection of Certificate Authorities for the specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json - */ -async function apiManagementListGatewaycertificateAuthorities(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayCertificateAuthority.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewaycertificateAuthorities(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCreateOrUpdateSample.ts deleted file mode 100644 index dec906dffa7f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a Gateway to be used in Api Management instance. - * - * @summary Creates or updates a Gateway to be used in Api Management instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json - */ -async function apiManagementCreateGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayDeleteSample.ts deleted file mode 100644 index c0b1f4afb928..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Gateway. - * - * @summary Deletes specific Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json - */ -async function apiManagementDeleteGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.delete( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGenerateTokenSample.ts deleted file mode 100644 index ced272cac8ae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGenerateTokenSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayTokenRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the gateway. - * - * @summary Gets the Shared Access Authorization Token for the gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json - */ -async function apiManagementGatewayGenerateToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayTokenRequestContract = { - expiry: new Date("2020-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.generateToken( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayGenerateToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetEntityTagSample.ts deleted file mode 100644 index b00b8d5e1f51..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Gateway specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json - */ -async function apiManagementHeadGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "mygateway"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetSample.ts deleted file mode 100644 index 4fbfac18df90..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Gateway specified by its identifier. - * - * @summary Gets the details of the Gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json - */ -async function apiManagementGetGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.get( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts deleted file mode 100644 index 47671cb7917e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayHostnameConfigurationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates of updates hostname configuration for a Gateway. - * - * @summary Creates of updates hostname configuration for a Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json - */ -async function apiManagementCreateGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const parameters: GatewayHostnameConfigurationContract = { - certificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", - hostname: "*", - http2Enabled: true, - negotiateClientCertificate: false, - tls10Enabled: false, - tls11Enabled: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.createOrUpdate( - resourceGroupName, - serviceName, - gatewayId, - hcId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationDeleteSample.ts deleted file mode 100644 index c001945e3fd6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified hostname configuration from the specified Gateway. - * - * @summary Deletes the specified hostname configuration from the specified Gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json - */ -async function apiManagementDeleteGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.delete( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts deleted file mode 100644 index d9823fa04452..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * - * @summary Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json - */ -async function apiManagementHeadGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.getEntityTag( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetSample.ts deleted file mode 100644 index 7d25e866d6f8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get details of a hostname configuration - * - * @summary Get details of a hostname configuration - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json - */ -async function apiManagementGetGatewayHostnameConfiguration(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const hcId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gatewayHostnameConfiguration.get( - resourceGroupName, - serviceName, - gatewayId, - hcId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGatewayHostnameConfiguration(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts deleted file mode 100644 index 915910501252..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the collection of hostname configurations for the specified gateway. - * - * @summary Lists the collection of hostname configurations for the specified gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json - */ -async function apiManagementListGatewayHostnameConfigurations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gatewayHostnameConfiguration.listByService( - resourceGroupName, - serviceName, - gatewayId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGatewayHostnameConfigurations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayInvalidateDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayInvalidateDebugCredentialsSample.ts deleted file mode 100644 index 569b69192ddd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayInvalidateDebugCredentialsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Action is invalidating all debug credentials issued for gateway. - * - * @summary Action is invalidating all debug credentials issued for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json - */ -async function apiManagementGatewayInvalidateDebugCredentials(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.invalidateDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayInvalidateDebugCredentials(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListByServiceSample.ts deleted file mode 100644 index be1ff4be47a3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of gateways registered with service instance. - * - * @summary Lists a collection of gateways registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json - */ -async function apiManagementListGateways(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.gateway.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGateways(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListDebugCredentialsSample.ts deleted file mode 100644 index 2ba53b2ee717..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListDebugCredentialsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayListDebugCredentialsContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create new debug credentials for gateway. - * - * @summary Create new debug credentials for gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json - */ -async function apiManagementGatewayListDebugCredentials(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayListDebugCredentialsContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", - credentialsExpireAfter: "PT1H", - purposes: ["tracing"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listDebugCredentials( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayListDebugCredentials(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListKeysSample.ts deleted file mode 100644 index 5518f91afbcc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListKeysSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves gateway keys. - * - * @summary Retrieves gateway keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json - */ -async function apiManagementGatewayListKeys(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listKeys( - resourceGroupName, - serviceName, - gatewayId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayListKeys(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListTraceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListTraceSample.ts deleted file mode 100644 index e92c90c9e23c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayListTraceSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayListTraceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Fetches trace collected by gateway. - * - * @summary Fetches trace collected by gateway. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json - */ -async function apiManagementGatewayListTrace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const parameters: GatewayListTraceContract = { - traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.listTrace( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayListTrace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayRegenerateKeySample.ts deleted file mode 100644 index a6c27b8e3e5c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayRegenerateKeySample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GatewayKeyRegenerationRequestContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerates specified gateway key invalidating any tokens created with it. - * - * @summary Regenerates specified gateway key invalidating any tokens created with it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json - */ -async function apiManagementGatewayRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gwId"; - const parameters: GatewayKeyRegenerationRequestContract = { - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.regenerateKey( - resourceGroupName, - serviceName, - gatewayId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGatewayRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayUpdateSample.ts deleted file mode 100644 index 22b3e97c7933..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/gatewayUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { GatewayContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the gateway specified by its identifier. - * - * @summary Updates the details of the gateway specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json - */ -async function apiManagementUpdateGateway(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const gatewayId = "gw1"; - const ifMatch = "*"; - const parameters: GatewayContract = { - description: "my gateway 1", - locationData: { name: "my location" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.gateway.update( - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateGateway(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaCreateOrUpdateSample.ts deleted file mode 100644 index 1367bab53d18..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaCreateOrUpdateSample.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GlobalSchemaContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json - */ -async function apiManagementCreateSchema1(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json - */ -async function apiManagementCreateSchema2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - document: { - type: "object", - $id: "https://example.com/person.schema.json", - $schema: "https://json-schema.org/draft/2020-12/schema", - properties: { - age: { - type: "integer", - description: - "Age in years which must be equal to or greater than zero.", - minimum: 0, - }, - firstName: { type: "string", description: "The person's first name." }, - lastName: { type: "string", description: "The person's last name." }, - }, - title: "Person", - }, - schemaType: "json", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - schemaId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateSchema1(); - await apiManagementCreateSchema2(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaDeleteSample.ts deleted file mode 100644 index ca7f9c6a3af9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json - */ -async function apiManagementDeleteSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.delete( - resourceGroupName, - serviceName, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetEntityTagSample.ts deleted file mode 100644 index 923729d10a61..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json - */ -async function apiManagementHeadApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.getEntityTag( - resourceGroupName, - serviceName, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetSample.ts deleted file mode 100644 index db159bfbcd59..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaGetSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json - */ -async function apiManagementGetSchema1(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json - */ -async function apiManagementGetSchema2(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const schemaId = "schema2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.globalSchema.get( - resourceGroupName, - serviceName, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetSchema1(); - await apiManagementGetSchema2(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaListByServiceSample.ts deleted file mode 100644 index 183f9e233ffd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/globalSchemaListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of schemas registered with service instance. - * - * @summary Lists a collection of schemas registered with service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json - */ -async function apiManagementListSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.globalSchema.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts deleted file mode 100644 index d32818780763..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResolverContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new resolver in the GraphQL API or updates an existing one. - * - * @summary Creates a new resolver in the GraphQL API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json - */ -async function apiManagementCreateGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "someAPI"; - const resolverId = "newResolver"; - const parameters: ResolverContract = { - path: "Query/users", - description: "A GraphQL Resolver example", - displayName: "Query Users", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverDeleteSample.ts deleted file mode 100644 index 332cca8851fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified resolver in the GraphQL API. - * - * @summary Deletes the specified resolver in the GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json - */ -async function apiManagementDeleteGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetEntityTagSample.ts deleted file mode 100644 index 42c706a3bec9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json - */ -async function apiManagementHeadGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetSample.ts deleted file mode 100644 index ae284661c34c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the GraphQL API Resolver specified by its identifier. - * - * @summary Gets the details of the GraphQL API Resolver specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json - */ -async function apiManagementGetGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const resolverId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverListByApiSample.ts deleted file mode 100644 index 3ddd2ef1fe81..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverListByApiSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the resolvers for the specified GraphQL API. - * - * @summary Lists a collection of the resolvers for the specified GraphQL API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json - */ -async function apiManagementListGraphQlApiResolvers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolver.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGraphQlApiResolvers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 17905d3f1e95..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the GraphQL API Resolver level. - * - * @summary Creates or updates policy configuration for the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json - */ -async function apiManagementCreateGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b57e7e8880006a040001"; - const resolverId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - 'GET/api/users', - }; - const options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { - ifMatch, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.createOrUpdate( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyDeleteSample.ts deleted file mode 100644 index caeacb0e365a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the GraphQL Api Resolver. - * - * @summary Deletes the policy configuration at the GraphQL Api Resolver. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json - */ -async function apiManagementDeleteGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "testapi"; - const resolverId = "testResolver"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.delete( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts deleted file mode 100644 index ad63a590160d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json - */ -async function apiManagementHeadGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.getEntityTag( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetSample.ts deleted file mode 100644 index 8914a19c6fe7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the GraphQL API Resolver level. - * - * @summary Get the policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json - */ -async function apiManagementGetGraphQlApiResolverPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5600b539c53f5b0062040001"; - const resolverId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolverPolicy.get( - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGraphQlApiResolverPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts deleted file mode 100644 index 7a4fbd50ec1e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverPolicyListByResolverSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the list of policy configuration at the GraphQL API Resolver level. - * - * @summary Get the list of policy configuration at the GraphQL API Resolver level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json - */ -async function apiManagementListGraphQlApiResolverPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const resolverId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.graphQLApiResolverPolicy.listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGraphQlApiResolverPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverUpdateSample.ts deleted file mode 100644 index 4554e758a2ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/graphQlApiResolverUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ResolverUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the resolver in the GraphQL API specified by its identifier. - * - * @summary Updates the details of the resolver in the GraphQL API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json - */ -async function apiManagementUpdateGraphQlApiResolver(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "echo-api"; - const resolverId = "resolverId"; - const ifMatch = "*"; - const parameters: ResolverUpdateContract = { - path: "Query/adminUsers", - description: "A GraphQL Resolver example", - displayName: "Query AdminUsers", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.graphQLApiResolver.update( - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateGraphQlApiResolver(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupCreateOrUpdateSample.ts deleted file mode 100644 index 6f61b836cdc9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GroupCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json - */ -async function apiManagementCreateGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupExternal.json - */ -async function apiManagementCreateGroupExternal(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.createOrUpdate( - resourceGroupName, - serviceName, - groupId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGroup(); - await apiManagementCreateGroupExternal(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupDeleteSample.ts deleted file mode 100644 index de463a7b1bf5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific group of the API Management service instance. - * - * @summary Deletes specific group of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json - */ -async function apiManagementDeleteGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.delete( - resourceGroupName, - serviceName, - groupId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetEntityTagSample.ts deleted file mode 100644 index fea5c6904030..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json - */ -async function apiManagementHeadGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.getEntityTag( - resourceGroupName, - serviceName, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetSample.ts deleted file mode 100644 index 2f1c70f860f7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json - */ -async function apiManagementGetGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.get( - resourceGroupName, - serviceName, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupListByServiceSample.ts deleted file mode 100644 index 0e1579d550f2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of groups defined within a service instance. - * - * @summary Lists a collection of groups defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json - */ -async function apiManagementListGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.group.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUpdateSample.ts deleted file mode 100644 index 6d6c40a767ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GroupUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the group specified by its identifier. - * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json - */ -async function apiManagementUpdateGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.group.update( - resourceGroupName, - serviceName, - groupId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCheckEntityExistsSample.ts deleted file mode 100644 index 157adae39597..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCheckEntityExistsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json - */ -async function apiManagementHeadGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.checkEntityExists( - resourceGroupName, - serviceName, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCreateSample.ts deleted file mode 100644 index dbd16fe87d81..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserCreateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json - */ -async function apiManagementCreateGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.create( - resourceGroupName, - serviceName, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserDeleteSample.ts deleted file mode 100644 index aff2c69443d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json - */ -async function apiManagementDeleteGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.groupUser.delete( - resourceGroupName, - serviceName, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserListSample.ts deleted file mode 100644 index 4b84b173b358..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/groupUserListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json - */ -async function apiManagementListGroupUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.groupUser.list( - resourceGroupName, - serviceName, - groupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListGroupUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderCreateOrUpdateSample.ts deleted file mode 100644 index 69d6502eaec0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - IdentityProviderCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates the IdentityProvider configuration. - * - * @summary Creates or Updates the IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json - */ -async function apiManagementCreateIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const parameters: IdentityProviderCreateContract = { - clientId: "facebookid", - clientSecret: "facebookapplicationsecret", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.createOrUpdate( - resourceGroupName, - serviceName, - identityProviderName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderDeleteSample.ts deleted file mode 100644 index 9a6c5463c851..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified identity provider configuration. - * - * @summary Deletes the specified identity provider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json - */ -async function apiManagementDeleteIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aad"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.delete( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetEntityTagSample.ts deleted file mode 100644 index f01eaa2e90bc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json - */ -async function apiManagementHeadIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.getEntityTag( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetSample.ts deleted file mode 100644 index c34e63fe82f0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the configuration details of the identity Provider configured in specified service instance. - * - * @summary Gets the configuration details of the identity Provider configured in specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json - */ -async function apiManagementGetIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.get( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListByServiceSample.ts deleted file mode 100644 index 82e3839c5202..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of Identity Provider configured in the specified service instance. - * - * @summary Lists a collection of Identity Provider configured in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json - */ -async function apiManagementListIdentityProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.identityProvider.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListIdentityProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListSecretsSample.ts deleted file mode 100644 index 90c6508434c3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderListSecretsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the client secret details of the Identity Provider. - * - * @summary Gets the client secret details of the Identity Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json - */ -async function apiManagementIdentityProviderListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "aadB2C"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.listSecrets( - resourceGroupName, - serviceName, - identityProviderName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementIdentityProviderListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderUpdateSample.ts deleted file mode 100644 index d7c490efa8b9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/identityProviderUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - IdentityProviderUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing IdentityProvider configuration. - * - * @summary Updates an existing IdentityProvider configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json - */ -async function apiManagementUpdateIdentityProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const identityProviderName = "facebook"; - const ifMatch = "*"; - const parameters: IdentityProviderUpdateParameters = { - clientId: "updatedfacebookid", - clientSecret: "updatedfacebooksecret", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.identityProvider.update( - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateIdentityProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueGetSample.ts deleted file mode 100644 index 075d02e3ec02..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets API Management issue details - * - * @summary Gets API Management issue details - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json - */ -async function apiManagementGetIssue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const issueId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.issue.get( - resourceGroupName, - serviceName, - issueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetIssue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueListByServiceSample.ts deleted file mode 100644 index 1a29e2e2839f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/issueListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of issues in the specified service instance. - * - * @summary Lists a collection of issues in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json - */ -async function apiManagementListIssues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.issue.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListIssues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerCreateOrUpdateSample.ts deleted file mode 100644 index 5a63662ff4c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerCreateOrUpdateSample.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json - */ -async function apiManagementCreateAiLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateEHLogger.json - */ -async function apiManagementCreateEhLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", - }, - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.createOrUpdate( - resourceGroupName, - serviceName, - loggerId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateAiLogger(); - await apiManagementCreateEhLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerDeleteSample.ts deleted file mode 100644 index 6306251d9408..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json - */ -async function apiManagementDeleteLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.delete( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetEntityTagSample.ts deleted file mode 100644 index 2cfc4052acfd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json - */ -async function apiManagementHeadLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.getEntityTag( - resourceGroupName, - serviceName, - loggerId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetSample.ts deleted file mode 100644 index b11aeea1c5fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json - */ -async function apiManagementGetLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.get( - resourceGroupName, - serviceName, - loggerId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerListByServiceSample.ts deleted file mode 100644 index f43ba38b78f7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of loggers in the specified service instance. - * - * @summary Lists a collection of loggers in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json - */ -async function apiManagementListLoggers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.logger.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListLoggers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerUpdateSample.ts deleted file mode 100644 index 3b0dc030c7cd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/loggerUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - LoggerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing logger. - * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json - */ -async function apiManagementUpdateLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.logger.update( - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueCreateOrUpdateSample.ts deleted file mode 100644 index e4e5de712c3a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueCreateOrUpdateSample.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NamedValueCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json - */ -async function apiManagementCreateNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValueWithKeyVault.json - */ -async function apiManagementCreateNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", - }, - secret: true, - tags: ["foo", "bar"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateNamedValue(); - await apiManagementCreateNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueDeleteSample.ts deleted file mode 100644 index 890fcc2e2365..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific named value from the API Management service instance. - * - * @summary Deletes specific named value from the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json - */ -async function apiManagementDeleteNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.delete( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetEntityTagSample.ts deleted file mode 100644 index 90763aef85a5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json - */ -async function apiManagementHeadNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.getEntityTag( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetSample.ts deleted file mode 100644 index 6b5a6962d0eb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueGetSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json - */ -async function apiManagementGetNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json - */ -async function apiManagementGetNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.get( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetNamedValue(); - await apiManagementGetNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListByServiceSample.ts deleted file mode 100644 index 93ffc4025bfe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of named values defined within a service instance. - * - * @summary Lists a collection of named values defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json - */ -async function apiManagementListNamedValues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.namedValue.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListNamedValues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListValueSample.ts deleted file mode 100644 index ea68bb057adf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueListValueSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json - */ -async function apiManagementNamedValueListValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.listValue( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementNamedValueListValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueRefreshSecretSample.ts deleted file mode 100644 index c1974d60feb1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueRefreshSecretSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json - */ -async function apiManagementRefreshNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementRefreshNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueUpdateSample.ts deleted file mode 100644 index d2a12da483f8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/namedValueUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NamedValueUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specific named value. - * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json - */ -async function apiManagementUpdateNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.namedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByLocationSample.ts deleted file mode 100644 index b1d2d9100db2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByLocationSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json - */ -async function apiManagementServiceGetNetworkStatusByLocation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const locationName = "North Central US"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByLocation( - resourceGroupName, - serviceName, - locationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetNetworkStatusByLocation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByServiceSample.ts deleted file mode 100644 index 8738546fb6ea..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/networkStatusListByServiceSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * - * @summary Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json - */ -async function apiManagementServiceGetNetworkStatus(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.networkStatus.listByService( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetNetworkStatus(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationCreateOrUpdateSample.ts deleted file mode 100644 index 5a019602bcc8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationCreateOrUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update API Management publisher notification. - * - * @summary Create or Update API Management publisher notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json - */ -async function apiManagementCreateNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationGetSample.ts deleted file mode 100644 index 681997a47587..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json - */ -async function apiManagementGetNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notification.get( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationListByServiceSample.ts deleted file mode 100644 index 2c136cb8782d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json - */ -async function apiManagementListNotifications(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.notification.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListNotifications(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts deleted file mode 100644 index 4761ea365dc1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json - */ -async function apiManagementHeadNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts deleted file mode 100644 index 69e4e3a4957f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json - */ -async function apiManagementCreateNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailDeleteSample.ts deleted file mode 100644 index 101457a2fae4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json - */ -async function apiManagementDeleteNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.delete( - resourceGroupName, - serviceName, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailListByNotificationSample.ts deleted file mode 100644 index 735227c9b369..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientEmailListByNotificationSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json - */ -async function apiManagementListNotificationRecipientEmails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListNotificationRecipientEmails(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts deleted file mode 100644 index 1bc40b2d4d10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json - */ -async function apiManagementHeadNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts deleted file mode 100644 index c4a596aa1960..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json - */ -async function apiManagementCreateNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserDeleteSample.ts deleted file mode 100644 index 65205b4f8d6b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json - */ -async function apiManagementDeleteNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.delete( - resourceGroupName, - serviceName, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserListByNotificationSample.ts deleted file mode 100644 index 15ed25298863..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/notificationRecipientUserListByNotificationSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json - */ -async function apiManagementListNotificationRecipientUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.notificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListNotificationRecipientUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts deleted file mode 100644 index 9773cc457cd1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OpenidConnectProviderContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the OpenID Connect Provider. - * - * @summary Creates or updates the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json - */ -async function apiManagementCreateOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const parameters: OpenidConnectProviderContract = { - clientId: "oidprovidertemplate3", - clientSecret: "x", - displayName: "templateoidprovider3", - metadataEndpoint: "https://oidprovider-template3.net", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.createOrUpdate( - resourceGroupName, - serviceName, - opid, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderDeleteSample.ts deleted file mode 100644 index 831884c7e074..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific OpenID Connect Provider of the API Management service instance. - * - * @summary Deletes specific OpenID Connect Provider of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json - */ -async function apiManagementDeleteOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect3"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.delete( - resourceGroupName, - serviceName, - opid, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetEntityTagSample.ts deleted file mode 100644 index 0d545f1b4968..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json - */ -async function apiManagementHeadOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.getEntityTag( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetSample.ts deleted file mode 100644 index ccbe0b967ac6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets specific OpenID Connect Provider without secrets. - * - * @summary Gets specific OpenID Connect Provider without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json - */ -async function apiManagementGetOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.get( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListByServiceSample.ts deleted file mode 100644 index bb8e99668dbc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists of all the OpenId Connect Providers. - * - * @summary Lists of all the OpenId Connect Providers. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json - */ -async function apiManagementListOpenIdConnectProviders(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.openIdConnectProvider.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListOpenIdConnectProviders(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListSecretsSample.ts deleted file mode 100644 index 3cc701b0f5fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderListSecretsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the client secret details of the OpenID Connect Provider. - * - * @summary Gets the client secret details of the OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json - */ -async function apiManagementOpenidConnectProviderListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.listSecrets( - resourceGroupName, - serviceName, - opid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementOpenidConnectProviderListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderUpdateSample.ts deleted file mode 100644 index 7b8ec5523e18..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/openIdConnectProviderUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OpenidConnectProviderUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specific OpenID Connect Provider. - * - * @summary Updates the specific OpenID Connect Provider. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json - */ -async function apiManagementUpdateOpenIdConnectProvider(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const opid = "templateOpenIdConnect2"; - const ifMatch = "*"; - const parameters: OpenidConnectProviderUpdateContract = { - clientSecret: "updatedsecret", - useInApiDocumentation: true, - useInTestConsole: false, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.openIdConnectProvider.update( - resourceGroupName, - serviceName, - opid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateOpenIdConnectProvider(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationListByTagsSample.ts deleted file mode 100644 index 1d34c499d29a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationListByTagsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of operations associated with tags. - * - * @summary Lists a collection of operations associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json - */ -async function apiManagementListApiOperationsByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operationOperations.listByTags( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiOperationsByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationStatusGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationStatusGetSample.ts deleted file mode 100644 index a459e91709d2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationStatusGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the current status of an async operation. - * - * @summary Returns the current status of an async operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationStatus.json - */ -async function getOperationStatus(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "testLocation"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationStatus.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - await getOperationStatus(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationsResultsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationsResultsGetSample.ts deleted file mode 100644 index 9dc833997832..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/operationsResultsGetSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns operation results for long running operations executing DELETE or PATCH on the resource. - * - * @summary Returns operation results for long running operations executing DELETE or PATCH on the resource. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json - */ -async function apiManagementGetOperationResult(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const location = "westus2"; - const operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.operationsResults.get(location, operationId); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetOperationResult(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts deleted file mode 100644 index 3febece3509b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * - * @summary Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json - */ -async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.outboundNetworkDependenciesEndpoints.listByService( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/performConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/performConnectivityCheckAsyncSample.ts deleted file mode 100644 index b04b9ea99ae9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/performConnectivityCheckAsyncSample.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ConnectivityCheckRequest, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json - */ -async function httpConnectivityCheck(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "https://microsoft.com", port: 3306 }, - protocolConfiguration: { - httpConfiguration: { - method: "GET", - headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], - validStatusCodes: [200, 204], - }, - }, - source: { region: "northeurope" }, - protocol: "HTTPS", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * - * @summary Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheck.json - */ -async function tcpConnectivityCheck(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const connectivityCheckRequestParams: ConnectivityCheckRequest = { - destination: { address: "8.8.8.8", port: 53 }, - preferredIPVersion: "IPv4", - source: { region: "northeurope" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - ); - console.log(result); -} - -async function main(): Promise { - await httpConnectivityCheck(); - await tcpConnectivityCheck(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyCreateOrUpdateSample.ts deleted file mode 100644 index 5e806b7d20fd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the global policy configuration of the Api Management service. - * - * @summary Creates or updates the global policy configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json - */ -async function apiManagementCreatePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - "\r\n \r\n \r\n \r\n \r\n \r\n", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.createOrUpdate( - resourceGroupName, - serviceName, - policyId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreatePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDeleteSample.ts deleted file mode 100644 index 3d9fdb54cc9b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the global policy configuration of the Api Management Service. - * - * @summary Deletes the global policy configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json - */ -async function apiManagementDeletePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.delete( - resourceGroupName, - serviceName, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeletePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDescriptionListByServiceSample.ts deleted file mode 100644 index b5438f38473e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyDescriptionListByServiceSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyDescriptionListByServiceOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all policy descriptions. - * - * @summary Lists all policy descriptions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json - */ -async function apiManagementListPolicyDescriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const scope = "Api"; - const options: PolicyDescriptionListByServiceOptionalParams = { scope }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyDescription.listByService( - resourceGroupName, - serviceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListPolicyDescriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentCreateOrUpdateSample.ts deleted file mode 100644 index 8f3f9f999e04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyFragmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a policy fragment. - * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json - */ -async function apiManagementCreatePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - id, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreatePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentDeleteSample.ts deleted file mode 100644 index 1a3d9343808d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json - */ -async function apiManagementDeletePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.delete( - resourceGroupName, - serviceName, - id, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeletePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetEntityTagSample.ts deleted file mode 100644 index 370b70f84818..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json - */ -async function apiManagementHeadPolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.getEntityTag( - resourceGroupName, - serviceName, - id, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadPolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetSample.ts deleted file mode 100644 index 2b962ae475a9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentGetSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyFragmentGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json - */ -async function apiManagementGetPolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json - */ -async function apiManagementGetPolicyFragmentFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: PolicyFragmentGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.get( - resourceGroupName, - serviceName, - id, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPolicyFragment(); - await apiManagementGetPolicyFragmentFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListByServiceSample.ts deleted file mode 100644 index ddbeda2eb477..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all policy fragments. - * - * @summary Gets all policy fragments. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json - */ -async function apiManagementListPolicyFragments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policyFragment.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPolicyFragments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListReferencesSample.ts deleted file mode 100644 index c9cc211e6e5b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyFragmentListReferencesSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json - */ -async function apiManagementListPolicyFragmentReferences(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyFragment.listReferences( - resourceGroupName, - serviceName, - id, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListPolicyFragmentReferences(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetEntityTagSample.ts deleted file mode 100644 index 3720f6e636e5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json - */ -async function apiManagementHeadPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.getEntityTag( - resourceGroupName, - serviceName, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetSample.ts deleted file mode 100644 index fe9aa9ea1c7b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyGetSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. - * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json - */ -async function apiManagementGetPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get the Global policy definition of the Api Management service. - * - * @summary Get the Global policy definition of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json - */ -async function apiManagementGetPolicyFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyId = "policy"; - const format = "rawxml"; - const options: PolicyGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policy.get( - resourceGroupName, - serviceName, - policyId, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPolicy(); - await apiManagementGetPolicyFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyListByServiceSample.ts deleted file mode 100644 index 22dae0991f47..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the Global Policy definitions of the Api Management service. - * - * @summary Lists all the Global Policy definitions of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json - */ -async function apiManagementListPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policy.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionCreateOrUpdateSample.ts deleted file mode 100644 index 06576732516e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyRestrictionContract, - PolicyRestrictionCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the policy restriction configuration of the Api Management service. - * - * @summary Creates or updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json - */ -async function apiManagementCreatePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters: PolicyRestrictionContract = { - requireBase: "true", - scope: "Sample Path to the policy document.", - }; - const options: PolicyRestrictionCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.createOrUpdate( - resourceGroupName, - serviceName, - policyRestrictionId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreatePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionDeleteSample.ts deleted file mode 100644 index 37326231251f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyRestrictionDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy restriction configuration of the Api Management Service. - * - * @summary Deletes the policy restriction configuration of the Api Management Service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json - */ -async function apiManagementDeletePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const options: PolicyRestrictionDeleteOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.delete( - resourceGroupName, - serviceName, - policyRestrictionId, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeletePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetEntityTagSample.ts deleted file mode 100644 index 214dc8fe46a3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * - * @summary Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json - */ -async function apiManagementHeadPolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.getEntityTag( - resourceGroupName, - serviceName, - policyRestrictionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadPolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetSample.ts deleted file mode 100644 index 5d71d6c6dda4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy restriction of the Api Management service. - * - * @summary Get the policy restriction of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json - */ -async function apiManagementGetPolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.get( - resourceGroupName, - serviceName, - policyRestrictionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionListByServiceSample.ts deleted file mode 100644 index eb9d94d3f4af..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all policy restrictions of API Management services. - * - * @summary Gets all policy restrictions of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json - */ -async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.policyRestriction.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionUpdateSample.ts deleted file mode 100644 index 634020e92bd3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyRestrictionUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the policy restriction configuration of the Api Management service. - * - * @summary Updates the policy restriction configuration of the Api Management service. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json - */ -async function apiManagementUpdatePolicyRestriction(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const policyRestrictionId = "policyRestriction1"; - const ifMatch = "*"; - const parameters: PolicyRestrictionUpdateContract = { - scope: "Sample Path 2 to the policy document.", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.policyRestriction.update( - resourceGroupName, - serviceName, - policyRestrictionId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdatePolicyRestriction(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionValidationsByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionValidationsByServiceSample.ts deleted file mode 100644 index 8cdafdcee6fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/policyRestrictionValidationsByServiceSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Validate all policies of API Management services. - * - * @summary Validate all policies of API Management services. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json - */ -async function apiManagementListPolicyRestrictions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.policyRestrictionValidations.beginByServiceAndWait( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListPolicyRestrictions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigCreateOrUpdateSample.ts deleted file mode 100644 index 3175fe55d996..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigCreateOrUpdateSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalConfigContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or update the developer portal configuration. - * - * @summary Create or update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json - */ -async function apiManagementCreatePortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"], - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions.", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.createOrUpdate( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreatePortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetEntityTagSample.ts deleted file mode 100644 index 06303c5ab142..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the developer portal configuration. - * - * @summary Gets the entity state (Etag) version of the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json - */ -async function apiManagementHeadPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.getEntityTag( - resourceGroupName, - serviceName, - portalConfigId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetSample.ts deleted file mode 100644 index b114edb80fe9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the developer portal configuration. - * - * @summary Get the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json - */ -async function apiManagementPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.get( - resourceGroupName, - serviceName, - portalConfigId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigListByServiceSample.ts deleted file mode 100644 index 7bbb1a5dfbf9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the developer portal configurations. - * - * @summary Lists the developer portal configurations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json - */ -async function apiManagementListPortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.portalConfig.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigUpdateSample.ts deleted file mode 100644 index f0d2ecb010f9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalConfigUpdateSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalConfigContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update the developer portal configuration. - * - * @summary Update the developer portal configuration. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json - */ -async function apiManagementUpdatePortalConfig(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalConfigId = "default"; - const ifMatch = "*"; - const parameters: PortalConfigContract = { - cors: { allowedOrigins: ["https://contoso.com"] }, - csp: { - allowedSources: ["*.contoso.com"], - mode: "reportOnly", - reportUri: ["https://report.contoso.com"], - }, - delegation: { - delegateRegistration: false, - delegateSubscription: false, - delegationUrl: undefined, - validationKey: undefined, - }, - enableBasicAuth: true, - signin: { require: false }, - signup: { - termsOfService: { - requireConsent: false, - text: "I agree to the service terms and conditions.", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalConfig.update( - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdatePortalConfig(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionCreateOrUpdateSample.ts deleted file mode 100644 index a283c5a5ee22..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalRevisionContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - * - * @summary Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json - */ -async function apiManagementCreatePortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const parameters: PortalRevisionContract = { - description: "portal revision 1", - isCurrent: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreatePortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetEntityTagSample.ts deleted file mode 100644 index 070a0e85f19d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the developer portal revision specified by its identifier. - * - * @summary Gets the developer portal revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json - */ -async function apiManagementHeadPortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.getEntityTag( - resourceGroupName, - serviceName, - portalRevisionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadPortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetSample.ts deleted file mode 100644 index bdd4fa19321a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the developer portal's revision specified by its identifier. - * - * @summary Gets the developer portal's revision specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json - */ -async function apiManagementGetPortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.get( - resourceGroupName, - serviceName, - portalRevisionId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionListByServiceSample.ts deleted file mode 100644 index cc400eb178ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists developer portal's revisions. - * - * @summary Lists developer portal's revisions. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json - */ -async function apiManagementListPortalRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.portalRevision.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPortalRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionUpdateSample.ts deleted file mode 100644 index c615d7b58bf3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalRevisionUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalRevisionContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the description of specified portal revision or makes it current. - * - * @summary Updates the description of specified portal revision or makes it current. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json - */ -async function apiManagementUpdatePortalRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const portalRevisionId = "20201112101010"; - const ifMatch = "*"; - const parameters: PortalRevisionContract = { - description: "portal revision update", - isCurrent: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalRevision.beginUpdateAndWait( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdatePortalRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalSettingsListByServiceSample.ts deleted file mode 100644 index cc3ac678a9f4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/portalSettingsListByServiceSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of portalsettings defined within a service instance.. - * - * @summary Lists a collection of portalsettings defined within a service instance.. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json - */ -async function apiManagementListPortalSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.portalSettings.listByService( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListPortalSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts deleted file mode 100644 index eebfd6bde494..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PrivateEndpointConnectionRequest, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Private Endpoint Connection or updates an existing one. - * - * @summary Creates a new Private Endpoint Connection or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json - */ -async function apiManagementApproveOrRejectPrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const privateEndpointConnectionRequest: PrivateEndpointConnectionRequest = { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", - properties: { - privateLinkServiceConnectionState: { - description: "The Private Endpoint Connection is approved.", - status: "Approved", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementApproveOrRejectPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionDeleteSample.ts deleted file mode 100644 index b66049e3e895..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionDeleteSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Private Endpoint Connection. - * - * @summary Deletes the specified Private Endpoint Connection. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json - */ -async function apiManagementDeletePrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.beginDeleteAndWait( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeletePrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetByNameSample.ts deleted file mode 100644 index cebdaecae658..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetByNameSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Private Endpoint Connection specified by its identifier. - * - * @summary Gets the details of the Private Endpoint Connection specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json - */ -async function apiManagementGetPrivateEndpointConnection(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateEndpointConnectionName = "privateEndpointConnectionName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.privateEndpointConnectionOperations.getByName( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPrivateEndpointConnection(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts deleted file mode 100644 index 88748ba90281..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json - */ -async function apiManagementGetPrivateLinkGroupResource(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const privateLinkSubResourceName = "privateLinkSubResourceName"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.getPrivateLinkResource( - resourceGroupName, - serviceName, - privateLinkSubResourceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetPrivateLinkGroupResource(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListByServiceSample.ts deleted file mode 100644 index adb5d725d141..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all private endpoint connections of the API Management service instance. - * - * @summary Lists all private endpoint connections of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json - */ -async function apiManagementListPrivateEndpointConnections(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.privateEndpointConnectionOperations.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListPrivateEndpointConnections(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts deleted file mode 100644 index 1c76aab5794f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the private link resources - * - * @summary Gets the private link resources - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json - */ -async function apiManagementListPrivateLinkGroupResources(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.privateEndpointConnectionOperations.listPrivateLinkResources( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListPrivateLinkGroupResources(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCheckEntityExistsSample.ts deleted file mode 100644 index 5f722c8248c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCheckEntityExistsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that API entity specified by identifier is associated with the Product entity. - * - * @summary Checks that API entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json - */ -async function apiManagementHeadProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const apiId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.checkEntityExists( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCreateOrUpdateSample.ts deleted file mode 100644 index 73ffa875933f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified product. - * - * @summary Adds an API to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json - */ -async function apiManagementCreateProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiDeleteSample.ts deleted file mode 100644 index ad44ddc9bfb3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json - */ -async function apiManagementDeleteProductApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApi.delete( - resourceGroupName, - serviceName, - productId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkCreateOrUpdateSample.ts deleted file mode 100644 index c7e93894d8a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified product via link. - * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json - */ -async function apiManagementCreateProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters: ProductApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkDeleteSample.ts deleted file mode 100644 index 891ba34dab6c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json - */ -async function apiManagementDeleteProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.delete( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkGetSample.ts deleted file mode 100644 index 5f20eb5f075b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json - */ -async function apiManagementGetProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productApiLink.get( - resourceGroupName, - serviceName, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkListByProductSample.ts deleted file mode 100644 index 246cec51ce07..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiLinkListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json - */ -async function apiManagementListProductApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productApiLink.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiListByProductSample.ts deleted file mode 100644 index c14648cd2f17..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productApiListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the APIs associated with a product. - * - * @summary Lists a collection of the APIs associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json - */ -async function apiManagementListProductApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5768181ea40f7eb6c49f6ac7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productApi.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productCreateOrUpdateSample.ts deleted file mode 100644 index 2b4da8a53afe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productCreateOrUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a product. - * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json - */ -async function apiManagementCreateProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productDeleteSample.ts deleted file mode 100644 index f0501cc91a10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productDeleteSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete product. - * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json - */ -async function apiManagementDeleteProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: ProductDeleteOptionalParams = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetEntityTagSample.ts deleted file mode 100644 index 8cdb948fd35e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json - */ -async function apiManagementHeadProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.getEntityTag( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetSample.ts deleted file mode 100644 index 0d2804e13314..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json - */ -async function apiManagementGetProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.get( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCheckEntityExistsSample.ts deleted file mode 100644 index 963ba8d4beb5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCheckEntityExistsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that Group entity specified by identifier is associated with the Product entity. - * - * @summary Checks that Group entity specified by identifier is associated with the Product entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json - */ -async function apiManagementHeadProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.checkEntityExists( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCreateOrUpdateSample.ts deleted file mode 100644 index 71a8e789f697..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds the association between the specified developer group with the specified product. - * - * @summary Adds the association between the specified developer group with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json - */ -async function apiManagementCreateProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupDeleteSample.ts deleted file mode 100644 index fb0ed0a29120..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the association between the specified group and product. - * - * @summary Deletes the association between the specified group and product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json - */ -async function apiManagementDeleteProductGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupId = "templateGroup"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroup.delete( - resourceGroupName, - serviceName, - productId, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkCreateOrUpdateSample.ts deleted file mode 100644 index c6c5f79b2f14..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductGroupLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds a group to the specified product via link. - * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json - */ -async function apiManagementCreateProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters: ProductGroupLinkContract = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - productId, - groupLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkDeleteSample.ts deleted file mode 100644 index d5844f78743c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json - */ -async function apiManagementDeleteProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.delete( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkGetSample.ts deleted file mode 100644 index b82a835bcbc9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json - */ -async function apiManagementGetProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productGroupLink.get( - resourceGroupName, - serviceName, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkListByProductSample.ts deleted file mode 100644 index 4ec3231f44c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupLinkListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json - */ -async function apiManagementListProductGroupLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productGroupLink.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductGroupLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupListByProductSample.ts deleted file mode 100644 index fe5bb9100d93..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productGroupListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the collection of developer groups associated with the specified product. - * - * @summary Lists the collection of developer groups associated with the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json - */ -async function apiManagementListProductGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productGroup.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByServiceSample.ts deleted file mode 100644 index 8e492076c1f4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of products in the specified service instance. - * - * @summary Lists a collection of products in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json - */ -async function apiManagementListProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.product.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByTagsSample.ts deleted file mode 100644 index be20a95e7d97..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productListByTagsSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of products associated with tags. - * - * @summary Lists a collection of products associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json - */ -async function apiManagementListProductsByTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.product.listByTags( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductsByTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 91cb83531bc6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the Product. - * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json - */ -async function apiManagementCreateProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.createOrUpdate( - resourceGroupName, - serviceName, - productId, - policyId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyDeleteSample.ts deleted file mode 100644 index a0b5bc454fe1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json - */ -async function apiManagementDeleteProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.delete( - resourceGroupName, - serviceName, - productId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetEntityTagSample.ts deleted file mode 100644 index 91a8d7cccc8c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json - */ -async function apiManagementHeadProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.getEntityTag( - resourceGroupName, - serviceName, - productId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetSample.ts deleted file mode 100644 index f43931bda29d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json - */ -async function apiManagementGetProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productPolicy.get( - resourceGroupName, - serviceName, - productId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyListByProductSample.ts deleted file mode 100644 index af12c7149662..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productPolicyListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json - */ -async function apiManagementListProductPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productPolicy.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productSubscriptionsListSample.ts deleted file mode 100644 index b0bf114112c5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productSubscriptionsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the collection of subscriptions to the specified product. - * - * @summary Lists the collection of subscriptions to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json - */ -async function apiManagementListProductSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5600b57e7e8880006a060002"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productSubscriptions.list( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productUpdateSample.ts deleted file mode 100644 index 678d44845983..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update existing product details. - * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json - */ -async function apiManagementUpdateProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.product.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiCreateOrUpdateSample.ts deleted file mode 100644 index 5dd38ffa663d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiCreateOrUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { WikiContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Wiki for a Product or updates an existing one. - * - * @summary Creates a new Wiki for a Product or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json - */ -async function apiManagementCreateProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const parameters: WikiContract = { - documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.createOrUpdate( - resourceGroupName, - serviceName, - productId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiDeleteSample.ts deleted file mode 100644 index 55696bc6de30..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Wiki from a Product. - * - * @summary Deletes the specified Wiki from a Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json - */ -async function apiManagementDeleteProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.delete( - resourceGroupName, - serviceName, - productId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetEntityTagSample.ts deleted file mode 100644 index 3f7665bd8982..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json - */ -async function apiManagementHeadProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.getEntityTag( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetSample.ts deleted file mode 100644 index 6b67263f0caf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json - */ -async function apiManagementGetProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.get( - resourceGroupName, - serviceName, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiUpdateSample.ts deleted file mode 100644 index b45d3ac476d8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikiUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WikiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Wiki for a Product specified by its identifier. - * - * @summary Updates the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json - */ -async function apiManagementUpdateProductWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const ifMatch = "*"; - const parameters: WikiUpdateContract = { - documents: [{ documentationId: "docId1" }], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.productWiki.update( - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateProductWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikisListSample.ts deleted file mode 100644 index b45b3ab3692e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/productWikisListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Wiki for a Product specified by its identifier. - * - * @summary Gets the details of the Wiki for a Product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductWikis.json - */ -async function apiManagementGetApiWiki(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.productWikis.list( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetApiWiki(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysListByServiceSample.ts deleted file mode 100644 index 208396ee967f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysListByServiceSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * - * @summary Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json - */ -async function apiManagementGetQuotaCounterKeys(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.listByService( - resourceGroupName, - serviceName, - quotaCounterKey, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetQuotaCounterKeys(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysUpdateSample.ts deleted file mode 100644 index 59a5f0691fea..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByCounterKeysUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - QuotaCounterValueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * - * @summary Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json - */ -async function apiManagementUpdateQuotaCounterKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 2.5630078125, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByCounterKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateQuotaCounterKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysGetSample.ts deleted file mode 100644 index 224c2255ff8c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * - * @summary Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json - */ -async function apiManagementGetQuotaCounterKeysByQuotaPeriod(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.get( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetQuotaCounterKeysByQuotaPeriod(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysUpdateSample.ts deleted file mode 100644 index 346fa79c5d55..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/quotaByPeriodKeysUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - QuotaCounterValueUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing quota counter value in the specified service instance. - * - * @summary Updates an existing quota counter value in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json - */ -async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const quotaCounterKey = "ba"; - const quotaPeriodKey = "0_P3Y6M4DT12H30M5S"; - const parameters: QuotaCounterValueUpdateContract = { - callsCount: 0, - kbTransferred: 0, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.quotaByPeriodKeys.update( - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/regionListByServiceSample.ts deleted file mode 100644 index ac73c0385632..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/regionListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all azure regions in which the service exists. - * - * @summary Lists all azure regions in which the service exists. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json - */ -async function apiManagementListRegions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.region.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListRegions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByApiSample.ts deleted file mode 100644 index 130e49e540df..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByApiSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by API. - * - * @summary Lists report records by API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json - */ -async function apiManagementGetReportsByApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByApi( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByGeoSample.ts deleted file mode 100644 index 01b9efbab47a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByGeoSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by geography. - * - * @summary Lists report records by geography. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json - */ -async function apiManagementGetReportsByGeo(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByGeo( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByGeo(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByOperationSample.ts deleted file mode 100644 index 45ca2bc4d356..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByOperationSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by API Operations. - * - * @summary Lists report records by API Operations. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json - */ -async function apiManagementGetReportsByOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByOperation( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByProductSample.ts deleted file mode 100644 index f44794910ebf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByProductSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by Product. - * - * @summary Lists report records by Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json - */ -async function apiManagementGetReportsByProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByProduct( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByRequestSample.ts deleted file mode 100644 index 2c86bcb1083a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByRequestSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by Request. - * - * @summary Lists report records by Request. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json - */ -async function apiManagementGetReportsByRequest(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByRequest( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByRequest(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListBySubscriptionSample.ts deleted file mode 100644 index 0eb28e7836b3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListBySubscriptionSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by subscription. - * - * @summary Lists report records by subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json - */ -async function apiManagementGetReportsBySubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listBySubscription( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByTimeSample.ts deleted file mode 100644 index 0c9991f648cc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByTimeSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by Time. - * - * @summary Lists report records by Time. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json - */ -async function apiManagementGetReportsByTime(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const interval = "PT15M"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByTime( - resourceGroupName, - serviceName, - filter, - interval, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByTime(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByUserSample.ts deleted file mode 100644 index 774e2957909d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/reportsListByUserSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists report records by User. - * - * @summary Lists report records by User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json - */ -async function apiManagementGetReportsByUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const filter = - "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.reports.listByUser( - resourceGroupName, - serviceName, - filter, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementGetReportsByUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsCreateOrUpdateSample.ts deleted file mode 100644 index d63005bd4732..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalSigninSettings, - SignInSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Sign-In settings. - * - * @summary Create or Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json - */ -async function apiManagementPortalSettingsUpdateSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const options: SignInSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetEntityTagSample.ts deleted file mode 100644 index bc7d2cc6196f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetEntityTagSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignInSettings. - * - * @summary Gets the entity state (Etag) version of the SignInSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json - */ -async function apiManagementHeadSignInSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadSignInSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetSample.ts deleted file mode 100644 index f1f6f9eabec2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Sign In Settings for the Portal - * - * @summary Get Sign In Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json - */ -async function apiManagementPortalSettingsGetSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsGetSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsUpdateSample.ts deleted file mode 100644 index 9d863f8b0542..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signInSettingsUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalSigninSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update Sign-In settings. - * - * @summary Update Sign-In settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json - */ -async function apiManagementPortalSettingsUpdateSignIn(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSigninSettings = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signInSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateSignIn(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsCreateOrUpdateSample.ts deleted file mode 100644 index 6efca63b228a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalSignupSettings, - SignUpSettingsCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update Sign-Up settings. - * - * @summary Create or Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json - */ -async function apiManagementPortalSettingsUpdateSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; - const options: SignUpSettingsCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.createOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetEntityTagSample.ts deleted file mode 100644 index 6a26caf4d8b5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetEntityTagSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the SignUpSettings. - * - * @summary Gets the entity state (Etag) version of the SignUpSettings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json - */ -async function apiManagementHeadSignUpSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.getEntityTag( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadSignUpSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetSample.ts deleted file mode 100644 index 2ea3cf00d064..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get Sign Up Settings for the Portal - * - * @summary Get Sign Up Settings for the Portal - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json - */ -async function apiManagementPortalSettingsGetSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.get( - resourceGroupName, - serviceName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsGetSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsUpdateSample.ts deleted file mode 100644 index 827d580813de..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/signUpSettingsUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PortalSignupSettings, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update Sign-Up settings. - * - * @summary Update Sign-Up settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json - */ -async function apiManagementPortalSettingsUpdateSignUp(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const ifMatch = "*"; - const parameters: PortalSignupSettings = { - enabled: true, - termsOfService: { - consentRequired: true, - enabled: true, - text: "Terms of service text.", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.signUpSettings.update( - resourceGroupName, - serviceName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementPortalSettingsUpdateSignUp(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionCreateOrUpdateSample.ts deleted file mode 100644 index dd15309b135c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SubscriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. - * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json - */ -async function apiManagementCreateSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { - displayName: "testsub", - ownerId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.createOrUpdate( - resourceGroupName, - serviceName, - sid, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionDeleteSample.ts deleted file mode 100644 index e3c1105dc251..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json - */ -async function apiManagementDeleteSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.delete( - resourceGroupName, - serviceName, - sid, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetEntityTagSample.ts deleted file mode 100644 index 2bf18864242b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json - */ -async function apiManagementHeadSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.getEntityTag( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetSample.ts deleted file mode 100644 index 5c9565edc078..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json - */ -async function apiManagementGetSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.get( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSample.ts deleted file mode 100644 index 906fcb8f18d4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all subscriptions of the API Management service instance. - * - * @summary Lists all subscriptions of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json - */ -async function apiManagementListSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.subscription.list( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSecretsSample.ts deleted file mode 100644 index 422f7b9e55d1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionListSecretsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json - */ -async function apiManagementSubscriptionListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.listSecrets( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementSubscriptionListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegeneratePrimaryKeySample.ts deleted file mode 100644 index 7b8c967803d7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegeneratePrimaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json - */ -async function apiManagementSubscriptionRegeneratePrimaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementSubscriptionRegeneratePrimaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegenerateSecondaryKeySample.ts deleted file mode 100644 index 8e5a65a23bd8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionRegenerateSecondaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json - */ -async function apiManagementSubscriptionRegenerateSecondaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementSubscriptionRegenerateSecondaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionUpdateSample.ts deleted file mode 100644 index 9af4e626d2ae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/subscriptionUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SubscriptionUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. - * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json - */ -async function apiManagementUpdateSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.subscription.update( - resourceGroupName, - serviceName, - sid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkCreateOrUpdateSample.ts deleted file mode 100644 index f314b2e955ae..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified tag via link. - * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json - */ -async function apiManagementCreateTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters: TagApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkDeleteSample.ts deleted file mode 100644 index 335d94fc23a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json - */ -async function apiManagementDeleteTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.delete( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkGetSample.ts deleted file mode 100644 index 0645a5fae1d0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json - */ -async function apiManagementGetTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagApiLink.get( - resourceGroupName, - serviceName, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkListByProductSample.ts deleted file mode 100644 index 875ad7a1285c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagApiLinkListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json - */ -async function apiManagementListTagApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagApiLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTagApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToApiSample.ts deleted file mode 100644 index 6d8c083703b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToApiSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Assign tag to the Api. - * - * @summary Assign tag to the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json - */ -async function apiManagementCreateApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToApi( - resourceGroupName, - serviceName, - apiId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToOperationSample.ts deleted file mode 100644 index db48fac9e6bc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToOperationSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Assign tag to the Operation. - * - * @summary Assign tag to the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json - */ -async function apiManagementCreateApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "5931a75ae4bbd512a88c680b"; - const operationId = "5931a75ae4bbd512a88c680a"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToProductSample.ts deleted file mode 100644 index b415cf3f91bc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagAssignToProductSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Assign tag to the Product. - * - * @summary Assign tag to the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json - */ -async function apiManagementCreateProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "5931a75ae4bbd512a88c680b"; - const tagId = "tagId1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.assignToProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagCreateOrUpdateSample.ts deleted file mode 100644 index 855736e8e6ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a tag. - * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json - */ -async function apiManagementCreateTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDeleteSample.ts deleted file mode 100644 index 97e46a020d5d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific tag of the API Management service instance. - * - * @summary Deletes specific tag of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json - */ -async function apiManagementDeleteTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.delete( - resourceGroupName, - serviceName, - tagId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromApiSample.ts deleted file mode 100644 index 4df4ff6374a5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromApiSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Detach the tag from the Api. - * - * @summary Detach the tag from the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json - */ -async function apiManagementDeleteApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromApi( - resourceGroupName, - serviceName, - apiId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromOperationSample.ts deleted file mode 100644 index bf9adf205e54..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromOperationSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Detach the tag from the Operation. - * - * @summary Detach the tag from the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json - */ -async function apiManagementDeleteApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d5b28d1f7fab116c282650"; - const operationId = "59d5b28d1f7fab116c282651"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromProductSample.ts deleted file mode 100644 index 8c21ea0fbf70..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagDetachFromProductSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Detach the tag from the Product. - * - * @summary Detach the tag from the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json - */ -async function apiManagementDeleteProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d5b28d1f7fab116c282650"; - const tagId = "59d5b28e1f7fab116402044e"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.detachFromProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByApiSample.ts deleted file mode 100644 index 72fb31975047..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByApiSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tag associated with the API. - * - * @summary Get tag associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json - */ -async function apiManagementGetApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByApi( - resourceGroupName, - serviceName, - apiId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByOperationSample.ts deleted file mode 100644 index b3c822212c24..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByOperationSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tag associated with the Operation. - * - * @summary Get tag associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json - */ -async function apiManagementGetApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByProductSample.ts deleted file mode 100644 index 6d70ba913c59..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetByProductSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tag associated with the Product. - * - * @summary Get tag associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json - */ -async function apiManagementGetProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getByProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByApiSample.ts deleted file mode 100644 index 167894e9f9e0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByApiSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json - */ -async function apiManagementHeadApiTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByApi( - resourceGroupName, - serviceName, - apiId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByOperationSample.ts deleted file mode 100644 index 90d952d45f06..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByOperationSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json - */ -async function apiManagementHeadApiOperationTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const operationId = "59d6bb8f1f7fab13dc67ec9a"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadApiOperationTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByProductSample.ts deleted file mode 100644 index ef9cd9c1fc7f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateByProductSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json - */ -async function apiManagementHeadProductTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "59306a29e4bbd510dc24e5f8"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityStateByProduct( - resourceGroupName, - serviceName, - productId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadProductTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateSample.ts deleted file mode 100644 index 5bc7f1a02674..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetEntityStateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json - */ -async function apiManagementHeadTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.getEntityState( - resourceGroupName, - serviceName, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetSample.ts deleted file mode 100644 index 77eb3f916bb2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json - */ -async function apiManagementGetTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.get(resourceGroupName, serviceName, tagId); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByApiSample.ts deleted file mode 100644 index 8b528dced630..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByApiSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Tags associated with the API. - * - * @summary Lists all Tags associated with the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json - */ -async function apiManagementListApiTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByApi( - resourceGroupName, - serviceName, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByOperationSample.ts deleted file mode 100644 index 3ad69383c756..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByOperationSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Tags associated with the Operation. - * - * @summary Lists all Tags associated with the Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json - */ -async function apiManagementListApiOperationTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0888cba3f6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListApiOperationTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByProductSample.ts deleted file mode 100644 index bdf1b1719811..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all Tags associated with the Product. - * - * @summary Lists all Tags associated with the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json - */ -async function apiManagementListProductTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const productId = "57d2ef278aa04f0888cba3f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByProduct( - resourceGroupName, - serviceName, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListProductTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByServiceSample.ts deleted file mode 100644 index f63e23e22ddf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of tags defined within a service instance. - * - * @summary Lists a collection of tags defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json - */ -async function apiManagementListTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tag.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkCreateOrUpdateSample.ts deleted file mode 100644 index bb5a093602e6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagOperationLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an operation to the specified tag via link. - * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json - */ -async function apiManagementCreateTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters: TagOperationLinkContract = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkDeleteSample.ts deleted file mode 100644 index c7068656cc18..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json - */ -async function apiManagementDeleteTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.delete( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkGetSample.ts deleted file mode 100644 index 9014bd492178..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json - */ -async function apiManagementGetTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagOperationLink.get( - resourceGroupName, - serviceName, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkListByProductSample.ts deleted file mode 100644 index 06726ce0e618..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagOperationLinkListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json - */ -async function apiManagementListTagOperationLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagOperationLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTagOperationLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkCreateOrUpdateSample.ts deleted file mode 100644 index 20f18d7c4b04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagProductLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds a product to the specified tag via link. - * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json - */ -async function apiManagementCreateTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters: TagProductLinkContract = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - tagId, - productLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkDeleteSample.ts deleted file mode 100644 index 7586ce3c3168..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json - */ -async function apiManagementDeleteTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.delete( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkGetSample.ts deleted file mode 100644 index 2b358879704b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json - */ -async function apiManagementGetTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tagProductLink.get( - resourceGroupName, - serviceName, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkListByProductSample.ts deleted file mode 100644 index ad312454af80..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagProductLinkListByProductSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json - */ -async function apiManagementListTagProductLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagProductLink.listByProduct( - resourceGroupName, - serviceName, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTagProductLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagResourceListByServiceSample.ts deleted file mode 100644 index a6558216f2ac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagResourceListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of resources associated with tags. - * - * @summary Lists a collection of resources associated with tags. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json - */ -async function apiManagementListTagResources(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tagResource.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTagResources(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagUpdateSample.ts deleted file mode 100644 index a367d3c801b1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tagUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. - * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json - */ -async function apiManagementUpdateTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tag.update( - resourceGroupName, - serviceName, - tagId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessCreateSample.ts deleted file mode 100644 index 6c22ba203ad1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessCreateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AccessInformationCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tenant access information details. - * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json - */ -async function apiManagementCreateTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationCreateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.create( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetEntityTagSample.ts deleted file mode 100644 index cd3358bdb2f9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Tenant access metadata - * - * @summary Tenant access metadata - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json - */ -async function apiManagementHeadTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.getEntityTag( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetSample.ts deleted file mode 100644 index cd33b6a15eab..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGetSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tenant access information details without secrets. - * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json - */ -async function apiManagementGetTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Get tenant access information details without secrets. - * - * @summary Get tenant access information details without secrets. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json - */ -async function apiManagementGetTenantGitAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "gitAccess"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.get( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTenantAccess(); - await apiManagementGetTenantGitAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts deleted file mode 100644 index 606c073ab367..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerate primary access key for GIT. - * - * @summary Regenerate primary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts deleted file mode 100644 index c4e90b00f878..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerate secondary access key for GIT. - * - * @summary Regenerate secondary access key for GIT. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccessGit.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListByServiceSample.ts deleted file mode 100644 index b43004056287..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns list of access infos - for Git and Management endpoints. - * - * @summary Returns list of access infos - for Git and Management endpoints. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json - */ -async function apiManagementListTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tenantAccess.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListSecretsSample.ts deleted file mode 100644 index b7bd3c74e94a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessListSecretsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tenant access information details. - * - * @summary Get tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json - */ -async function apiManagementListSecretsTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.listSecrets( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListSecretsTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts deleted file mode 100644 index dabe5575a753..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerate primary access key - * - * @summary Regenerate primary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regeneratePrimaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts deleted file mode 100644 index 656012319ce5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerate secondary access key - * - * @summary Regenerate secondary access key - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json - */ -async function apiManagementTenantAccessRegenerateKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.regenerateSecondaryKey( - resourceGroupName, - serviceName, - accessName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantAccessRegenerateKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessUpdateSample.ts deleted file mode 100644 index 0dfa2d4cd062..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantAccessUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - AccessInformationUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update tenant access information details. - * - * @summary Update tenant access information details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json - */ -async function apiManagementUpdateTenantAccess(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const accessName = "access"; - const ifMatch = "*"; - const parameters: AccessInformationUpdateParameters = { enabled: true }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantAccess.update( - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateTenantAccess(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationDeploySample.ts deleted file mode 100644 index 9129a43775c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationDeploySample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DeployConfigurationParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * - * @summary This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json - */ -async function apiManagementTenantConfigurationDeploy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginDeployAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantConfigurationDeploy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationGetSyncStateSample.ts deleted file mode 100644 index 44e1c9b3bff2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationGetSyncStateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the status of the most recent synchronization between the configuration database and the Git repository. - * - * @summary Gets the status of the most recent synchronization between the configuration database and the Git repository. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json - */ -async function apiManagementTenantAccessSyncState(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.getSyncState( - resourceGroupName, - serviceName, - configurationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantAccessSyncState(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationSaveSample.ts deleted file mode 100644 index d44227ad246f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationSaveSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SaveConfigurationParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * - * @summary This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json - */ -async function apiManagementTenantConfigurationSave(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: SaveConfigurationParameter = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginSaveAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantConfigurationSave(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationValidateSample.ts deleted file mode 100644 index 5f6a3f58d818..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantConfigurationValidateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DeployConfigurationParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * - * @summary This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json - */ -async function apiManagementTenantConfigurationValidate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const configurationName = "configuration"; - const parameters: DeployConfigurationParameters = { branch: "master" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantConfiguration.beginValidateAndWait( - resourceGroupName, - serviceName, - configurationName, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementTenantConfigurationValidate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsGetSample.ts deleted file mode 100644 index cff76d044010..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get tenant settings. - * - * @summary Get tenant settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json - */ -async function apiManagementGetTenantSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const settingsType = "public"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.tenantSettings.get( - resourceGroupName, - serviceName, - settingsType, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetTenantSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsListByServiceSample.ts deleted file mode 100644 index 3280996f4a80..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/tenantSettingsListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Public settings. - * - * @summary Public settings. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json - */ -async function apiManagementListTenantSettings(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.tenantSettings.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListTenantSettings(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userConfirmationPasswordSendSample.ts deleted file mode 100644 index 9926cc280e13..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userConfirmationPasswordSendSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Sends confirmation - * - * @summary Sends confirmation - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json - */ -async function apiManagementUserConfirmationPasswordSend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userConfirmationPassword.send( - resourceGroupName, - serviceName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUserConfirmationPasswordSend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userCreateOrUpdateSample.ts deleted file mode 100644 index c13cf19abe6f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - UserCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a user. - * - * @summary Creates or Updates a user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json - */ -async function apiManagementCreateUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const parameters: UserCreateParameters = { - confirmation: "signup", - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.createOrUpdate( - resourceGroupName, - serviceName, - userId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userDeleteSample.ts deleted file mode 100644 index 705dd9f90c04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific user. - * - * @summary Deletes specific user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json - */ -async function apiManagementDeleteUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512288c680b"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.beginDeleteAndWait( - resourceGroupName, - serviceName, - userId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGenerateSsoUrlSample.ts deleted file mode 100644 index c18f8e7919a3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGenerateSsoUrlSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * - * @summary Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json - */ -async function apiManagementUserGenerateSsoUrl(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57127d485157a511ace86ae7"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.generateSsoUrl( - resourceGroupName, - serviceName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUserGenerateSsoUrl(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetEntityTagSample.ts deleted file mode 100644 index f0cef09dffef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the user specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json - */ -async function apiManagementHeadUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getEntityTag( - resourceGroupName, - serviceName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSample.ts deleted file mode 100644 index 5af101289ff2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the user specified by its identifier. - * - * @summary Gets the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json - */ -async function apiManagementGetUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.get(resourceGroupName, serviceName, userId); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSharedAccessTokenSample.ts deleted file mode 100644 index 79871513e073..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGetSharedAccessTokenSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - UserTokenParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the Shared Access Authorization Token for the User. - * - * @summary Gets the Shared Access Authorization Token for the User. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json - */ -async function apiManagementUserToken(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "userId1718"; - const parameters: UserTokenParameters = { - expiry: new Date("2019-04-21T00:44:24.2845269Z"), - keyType: "primary", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.getSharedAccessToken( - resourceGroupName, - serviceName, - userId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUserToken(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGroupListSample.ts deleted file mode 100644 index f19487640ac6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userGroupListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all user groups. - * - * @summary Lists all user groups. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserGroups.json - */ -async function apiManagementListUserGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userGroup.list( - resourceGroupName, - serviceName, - userId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListUserGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userIdentitiesListSample.ts deleted file mode 100644 index d8a26555c194..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userIdentitiesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to List of all user identities. - * - * @summary List of all user identities. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json - */ -async function apiManagementListUserIdentities(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57f2af53bb17172280f44057"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userIdentities.list( - resourceGroupName, - serviceName, - userId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListUserIdentities(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userListByServiceSample.ts deleted file mode 100644 index 00dcf783d493..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of registered users in the specified service instance. - * - * @summary Lists a collection of registered users in the specified service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json - */ -async function apiManagementListUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.user.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionGetSample.ts deleted file mode 100644 index 713cf650b386..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Subscription entity associated with a particular user. - * - * @summary Gets the specified Subscription entity associated with a particular user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json - */ -async function apiManagementGetUserSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "1"; - const sid = "5fa9b096f3df14003c070001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.userSubscription.get( - resourceGroupName, - serviceName, - userId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetUserSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionListSample.ts deleted file mode 100644 index f3e091cead11..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userSubscriptionListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the collection of subscriptions of the specified user. - * - * @summary Lists the collection of subscriptions of the specified user. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json - */ -async function apiManagementListUserSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "57681833a40f7eb6c49f6acf"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.userSubscription.list( - resourceGroupName, - serviceName, - userId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListUserSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userUpdateSample.ts deleted file mode 100644 index 58e6d9fa4b36..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/userUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - UserUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the user specified by its identifier. - * - * @summary Updates the details of the user specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json - */ -async function apiManagementUpdateUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const userId = "5931a75ae4bbd512a88c680b"; - const ifMatch = "*"; - const parameters: UserUpdateParameters = { - email: "foobar@outlook.com", - firstName: "foo", - lastName: "bar", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.user.update( - resourceGroupName, - serviceName, - userId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiCreateOrUpdateSample.ts deleted file mode 100644 index f75bff062006..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiCreateOrUpdateParameter, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates new or updates existing specified API of the workspace in an API Management service instance. - * - * @summary Creates new or updates existing specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json - */ -async function apiManagementCreateWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "tempgroup"; - const parameters: ApiCreateOrUpdateParameter = { - path: "newapiPath", - description: "apidescription5200", - authenticationSettings: { - oAuth2: { - authorizationServerId: "authorizationServerId2283", - scope: "oauth2scope2580", - }, - }, - displayName: "apiname1463", - protocols: ["https", "http"], - serviceUrl: "http://newechoapi.cloudapp.net/api", - subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDeleteSample.ts deleted file mode 100644 index 3c587a34e204..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API of the workspace in an API Management service instance. - * - * @summary Deletes the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json - */ -async function apiManagementDeleteWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts deleted file mode 100644 index b1bb89713378..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Diagnostic for an API or updates an existing one. - * - * @summary Creates a new Diagnostic for an API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json - */ -async function apiManagementCreateWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticDeleteSample.ts deleted file mode 100644 index 4a2da7a91946..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Diagnostic from an API. - * - * @summary Deletes the specified Diagnostic from an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json - */ -async function apiManagementDeleteWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts deleted file mode 100644 index d0276edd8a63..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json - */ -async function apiManagementHeadWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetSample.ts deleted file mode 100644 index d74373771ac5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Diagnostic for an API specified by its identifier. - * - * @summary Gets the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json - */ -async function apiManagementGetWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts deleted file mode 100644 index e8a2414db3c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all diagnostics of an API. - * - * @summary Lists all diagnostics of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json - */ -async function apiManagementListWorkspaceApiDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticUpdateSample.ts deleted file mode 100644 index ba5524b9fcfe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiDiagnosticUpdateSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Diagnostic for an API specified by its identifier. - * - * @summary Updates the details of the Diagnostic for an API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json - */ -async function apiManagementUpdateWorkspaceApiDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticUpdateContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceApiDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiExportGetSample.ts deleted file mode 100644 index 8f65615f5b33..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiExportGetSample.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json - */ -async function apiManagementGetWorkspaceApiExportInOpenApi2Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const format = "swagger-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * - * @summary Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json - */ -async function apiManagementGetWorkspaceApiExportInOpenApi3Dot0(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "aid9676"; - const format = "openapi-link"; - const exportParam = "true"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiExport.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiExportInOpenApi2Dot0(); - await apiManagementGetWorkspaceApiExportInOpenApi3Dot0(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetEntityTagSample.ts deleted file mode 100644 index 6de8289b7c77..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json - */ -async function apiManagementHeadWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetSample.ts deleted file mode 100644 index e814326c6f06..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiGetSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json - */ -async function apiManagementGetWorkspaceApiContract(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the API specified by its identifier. - * - * @summary Gets the details of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json - */ -async function apiManagementGetWorkspaceApiRevision(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api;rev=3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiContract(); - await apiManagementGetWorkspaceApiRevision(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiListByServiceSample.ts deleted file mode 100644 index a7c12f9369a5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all APIs of the workspace in an API Management service instance. - * - * @summary Lists all APIs of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json - */ -async function apiManagementListWorkspaceApis(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApi.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApis(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts deleted file mode 100644 index a78aac2767e6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OperationContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new operation in the API or updates an existing one. - * - * @summary Creates a new operation in the API or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json - */ -async function apiManagementCreateWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "PetStoreTemplate2"; - const operationId = "newoperations"; - const parameters: OperationContract = { - method: "POST", - description: "This can only be done by the logged in user.", - displayName: "createUser2", - templateParameters: [], - urlTemplate: "/user1", - request: { - description: "Created user object", - headers: [], - queryParameters: [], - representations: [ - { - contentType: "application/json", - schemaId: "592f6c1d0af5840ca8897f0c", - typeName: "User", - }, - ], - }, - responses: [ - { - description: "successful operation", - headers: [], - representations: [ - { contentType: "application/xml" }, - { contentType: "application/json" }, - ], - statusCode: 200, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationDeleteSample.ts deleted file mode 100644 index 75daefb52b67..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified operation in the API. - * - * @summary Deletes the specified operation in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json - */ -async function apiManagementDeleteWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetEntityTagSample.ts deleted file mode 100644 index 2e390d99405f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json - */ -async function apiManagementHeadWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetSample.ts deleted file mode 100644 index cacbdb501a38..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the API Operation specified by its identifier. - * - * @summary Gets the details of the API Operation specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json - */ -async function apiManagementGetWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const operationId = "57d2ef278aa04f0ad01d6cdc"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationListByApiSample.ts deleted file mode 100644 index 155e0e827b9d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationListByApiSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the operations for the specified API. - * - * @summary Lists a collection of the operations for the specified API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json - */ -async function apiManagementListWorkspaceApiOperations(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiOperation.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiOperations(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 7a005e0661d0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API Operation level. - * - * @summary Creates or updates policy configuration for the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json - */ -async function apiManagementCreateWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const operationId = "5600b57e7e8880006a080001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams = { - ifMatch, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyDeleteSample.ts deleted file mode 100644 index d26a8f4b4a75..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyDeleteSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api Operation. - * - * @summary Deletes the policy configuration at the Api Operation. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json - */ -async function apiManagementDeleteWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "testapi"; - const operationId = "testoperation"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts deleted file mode 100644 index 2facdcf883a9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json - */ -async function apiManagementHeadWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetSample.ts deleted file mode 100644 index 1124dc1b5e4c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyGetSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API Operation level. - * - * @summary Get the policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json - */ -async function apiManagementGetWorkspaceApiOperationPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b539c53f5b0062040001"; - const operationId = "5600b53ac53f5b0062080006"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperationPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiOperationPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts deleted file mode 100644 index 9efd9af813e1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the list of policy configuration at the API Operation level. - * - * @summary Get the list of policy configuration at the API Operation level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json - */ -async function apiManagementListWorkspaceApiOperationPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "599e2953193c3c0bd0b3e2fa"; - const operationId = "599e29ab193c3c0bd0b3e2fb"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiOperationPolicy.listByOperation( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiOperationPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationUpdateSample.ts deleted file mode 100644 index 3652f15b08f3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiOperationUpdateSample.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - OperationUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the operation in the API specified by its identifier. - * - * @summary Updates the details of the operation in the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json - */ -async function apiManagementUpdateWorkspaceApiOperation(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const operationId = "operationId"; - const ifMatch = "*"; - const parameters: OperationUpdateContract = { - method: "GET", - displayName: "Retrieve resource", - templateParameters: [], - urlTemplate: "/resource", - request: { - queryParameters: [ - { - name: "param1", - type: "string", - description: - 'A sample parameter that is required and has a default value of "sample".', - defaultValue: "sample", - required: true, - values: ["sample"], - }, - ], - }, - responses: [ - { - description: "Returned in all cases.", - headers: [], - representations: [], - statusCode: 200, - }, - { - description: "Server Error.", - headers: [], - representations: [], - statusCode: 500, - }, - ], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiOperation.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceApiOperation(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts deleted file mode 100644 index 3f0e76970095..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - WorkspaceApiPolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the API. - * - * @summary Creates or updates policy configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json - */ -async function apiManagementCreateWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b57e7e8880006a040001"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspaceApiPolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyDeleteSample.ts deleted file mode 100644 index 467edf70b0d6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Api. - * - * @summary Deletes the policy configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json - */ -async function apiManagementDeleteWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "loggerId"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetEntityTagSample.ts deleted file mode 100644 index 446786338a91..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the API policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the API policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json - */ -async function apiManagementHeadWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetSample.ts deleted file mode 100644 index 1144aaedc243..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json - */ -async function apiManagementGetWorkspaceApiPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyListByApiSample.ts deleted file mode 100644 index e3d02635da57..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiPolicyListByApiSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json - */ -async function apiManagementListWorkspaceApiPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5600b59475ff190048040001"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiPolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts deleted file mode 100644 index 9f813191808d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Release for the API. - * - * @summary Creates a new Release for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json - */ -async function apiManagementCreateWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseDeleteSample.ts deleted file mode 100644 index 79254e36b9bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified release in the API. - * - * @summary Deletes the specified release in the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json - */ -async function apiManagementDeleteWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "5a5fcc09124a7fa9b89f2f1d"; - const releaseId = "testrev"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetEntityTagSample.ts deleted file mode 100644 index 7eb8b0db4bee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the etag of an API release. - * - * @summary Returns the etag of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json - */ -async function apiManagementHeadWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetSample.ts deleted file mode 100644 index ceeecdc75041..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Returns the details of an API release. - * - * @summary Returns the details of an API release. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json - */ -async function apiManagementGetWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "5a7cb545298324c53224a799"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseListByServiceSample.ts deleted file mode 100644 index ec52c0fea1d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseListByServiceSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * - * @summary Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json - */ -async function apiManagementListWorkspaceApiReleases(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiRelease.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiReleases(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseUpdateSample.ts deleted file mode 100644 index fea2e6d525c1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiReleaseUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiReleaseContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the release of the API specified by its identifier. - * - * @summary Updates the details of the release of the API specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json - */ -async function apiManagementUpdateWorkspaceApiRelease(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "a1"; - const releaseId = "testrev"; - const ifMatch = "*"; - const parameters: ApiReleaseContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", - notes: "yahooagain", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiRelease.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceApiRelease(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiRevisionListByServiceSample.ts deleted file mode 100644 index e3b9dd268d9a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiRevisionListByServiceSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all revisions of an API. - * - * @summary Lists all revisions of an API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json - */ -async function apiManagementListWorkspaceApiRevisions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiRevision.listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiRevisions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts deleted file mode 100644 index 89d27b757f7d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { SchemaContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates schema configuration for the API. - * - * @summary Creates or updates schema configuration for the API. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json - */ -async function apiManagementCreateWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const parameters: SchemaContract = { - contentType: "application/vnd.ms-azure-apim.xsd+xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaDeleteSample.ts deleted file mode 100644 index c19133ee1c73..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the schema configuration at the Api. - * - * @summary Deletes the schema configuration at the Api. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json - */ -async function apiManagementDeleteWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; - const schemaId = "59d5b28e1f7fab116402044e"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetEntityTagSample.ts deleted file mode 100644 index 8c58c5647c50..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json - */ -async function apiManagementHeadWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "57d1f7558aa04f15146d9d8a"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetSample.ts deleted file mode 100644 index e7adceb38ede..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json - */ -async function apiManagementGetWorkspaceApiSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d6bb8f1f7fab13dc67ec9b"; - const schemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiSchema.get( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaListByApiSample.ts deleted file mode 100644 index ed8945d8a9d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiSchemaListByApiSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the schema configuration at the API level. - * - * @summary Get the schema configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json - */ -async function apiManagementListWorkspaceApiSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "59d5b28d1f7fab116c282650"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiSchema.listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiUpdateSample.ts deleted file mode 100644 index ab55f63e7ea4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specified API of the workspace in an API Management service instance. - * - * @summary Updates the specified API of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json - */ -async function apiManagementUpdateWorkspaceApi(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const apiId = "echo-api"; - const ifMatch = "*"; - const parameters: ApiUpdateContract = { - path: "newecho", - displayName: "Echo API New", - serviceUrl: "http://echoapi.cloudapp.net/api2", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApi.update( - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceApi(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts deleted file mode 100644 index 7c960e66dc34..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiVersionSetContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a Api Version Set. - * - * @summary Creates or Updates a Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json - */ -async function apiManagementCreateWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "api1"; - const parameters: ApiVersionSetContract = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetDeleteSample.ts deleted file mode 100644 index 7764354bfa04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Api Version Set. - * - * @summary Deletes specific Api Version Set. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json - */ -async function apiManagementDeleteWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "a1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.delete( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts deleted file mode 100644 index c6070ef07465..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json - */ -async function apiManagementHeadWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetSample.ts deleted file mode 100644 index 56460a2f6a24..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Api Version Set specified by its identifier. - * - * @summary Gets the details of the Api Version Set specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json - */ -async function apiManagementGetWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.get( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetListByServiceSample.ts deleted file mode 100644 index 9348c47ca6fe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of API Version Sets in the specified workspace with a service instance. - * - * @summary Lists a collection of API Version Sets in the specified workspace with a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json - */ -async function apiManagementListWorkspaceApiVersionSets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceApiVersionSet.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceApiVersionSets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetUpdateSample.ts deleted file mode 100644 index d901082877ce..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceApiVersionSetUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ApiVersionSetUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Api VersionSet specified by its identifier. - * - * @summary Updates the details of the Api VersionSet specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json - */ -async function apiManagementUpdateWorkspaceApiVersionSet(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const versionSetId = "vs1"; - const ifMatch = "*"; - const parameters: ApiVersionSetUpdateParameters = { - description: "Version configuration", - displayName: "api set 1", - versioningScheme: "Segment", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceApiVersionSet.update( - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceApiVersionSet(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendCreateOrUpdateSample.ts deleted file mode 100644 index e4a720239aa8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendCreateOrUpdateSample.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { BackendContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json - */ -async function apiManagementCreateWorkspaceBackendProxyBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const parameters: BackendContract = { - description: "description5308", - credentials: { - authorization: { parameter: "opensesma", scheme: "Basic" }, - header: { xMy1: ["val1", "val2"] }, - query: { sv: ["xx", "bb", "cc"] }, - }, - proxy: { - password: "", - url: "http://192.168.1.1:8080", - username: "Contoso\\admin", - }, - tls: { validateCertificateChain: true, validateCertificateName: true }, - url: "https://backendname2644/", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a backend. - * - * @summary Creates or Updates a backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json - */ -async function apiManagementCreateWorkspaceBackendServiceFabric(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const parameters: BackendContract = { - description: "Service Fabric Test App 1", - properties: { - serviceFabricCluster: { - clientCertificateId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", - managementEndpoints: ["https://somecluster.com"], - maxPartitionResolutionRetries: 5, - serverX509Names: [ - { - name: "ServerCommonName1", - issuerCertificateThumbprint: "IssuerCertificateThumbprint1", - }, - ], - }, - }, - url: "fabric:/mytestapp/mytestservice", - protocol: "http", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceBackendProxyBackend(); - await apiManagementCreateWorkspaceBackendServiceFabric(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendDeleteSample.ts deleted file mode 100644 index 37f33cdc616e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified backend. - * - * @summary Deletes the specified backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json - */ -async function apiManagementDeleteWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.delete( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetEntityTagSample.ts deleted file mode 100644 index bd2039df34e9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the backend specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json - */ -async function apiManagementHeadWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetSample.ts deleted file mode 100644 index 3261f3ea91b1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the backend specified by its identifier. - * - * @summary Gets the details of the backend specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json - */ -async function apiManagementGetWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "sfbackend"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.get( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendListByWorkspaceSample.ts deleted file mode 100644 index 55902ef748fd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendListByWorkspaceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of backends in the specified workspace. - * - * @summary Lists a collection of backends in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json - */ -async function apiManagementListWorkspaceBackends(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceBackend.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceBackends(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendUpdateSample.ts deleted file mode 100644 index 29ea1622691c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceBackendUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - BackendUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing backend. - * - * @summary Updates an existing backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json - */ -async function apiManagementUpdateWorkspaceBackend(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const backendId = "proxybackend"; - const ifMatch = "*"; - const parameters: BackendUpdateParameters = { - description: "description5308", - tls: { validateCertificateChain: false, validateCertificateName: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceBackend.update( - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceBackend(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateCreateOrUpdateSample.ts deleted file mode 100644 index a80a0c00f53e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateCreateOrUpdateSample.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificateCreateOrUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json - */ -async function apiManagementCreateWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const parameters: CertificateCreateOrUpdateParameters = { - data: "****************Base 64 Encoded Certificate *******************************", - password: "****Certificate Password******", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates the certificate being used for authentication with the backend. - * - * @summary Creates or updates the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json - */ -async function apiManagementCreateWorkspaceCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const parameters: CertificateCreateOrUpdateParameters = { - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: - "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceCertificate(); - await apiManagementCreateWorkspaceCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateDeleteSample.ts deleted file mode 100644 index 24278e93be1b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific certificate. - * - * @summary Deletes specific certificate. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json - */ -async function apiManagementDeleteWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "tempcert"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.delete( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetEntityTagSample.ts deleted file mode 100644 index bd9ee88c75d6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the certificate specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json - */ -async function apiManagementWorkspaceHeadCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementWorkspaceHeadCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetSample.ts deleted file mode 100644 index a262a6b3baa1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateGetSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json - */ -async function apiManagementGetWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCert1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the certificate specified by its identifier. - * - * @summary Gets the details of the certificate specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json - */ -async function apiManagementGetWorkspaceCertificateWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.get( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceCertificate(); - await apiManagementGetWorkspaceCertificateWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateListByWorkspaceSample.ts deleted file mode 100644 index 6c8713480f3b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateListByWorkspaceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of all certificates in the specified workspace. - * - * @summary Lists a collection of all certificates in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json - */ -async function apiManagementListWorkspaceCertificates(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceCertificate.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceCertificates(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateRefreshSecretSample.ts deleted file mode 100644 index 16db6cb8ada8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCertificateRefreshSecretSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to From KeyVault, Refresh the certificate being used for authentication with the backend. - * - * @summary From KeyVault, Refresh the certificate being used for authentication with the backend. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json - */ -async function apiManagementRefreshWorkspaceCertificate(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const certificateId = "templateCertkv"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceCertificate.refreshSecret( - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementRefreshWorkspaceCertificate(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCreateOrUpdateSample.ts deleted file mode 100644 index 4f93c16a0853..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceCreateOrUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkspaceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new workspace or updates an existing one. - * - * @summary Creates a new workspace or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json - */ -async function apiManagementCreateWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const parameters: WorkspaceContract = { - description: "workspace 1", - displayName: "my workspace", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDeleteSample.ts deleted file mode 100644 index c239f03c65bf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified workspace. - * - * @summary Deletes the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json - */ -async function apiManagementDeleteWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.delete( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts deleted file mode 100644 index e98f48577328..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a new Diagnostic or updates an existing one. - * - * @summary Creates a new Diagnostic or updates an existing one. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json - */ -async function apiManagementCreateWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const parameters: DiagnosticContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/azuremonitor", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticDeleteSample.ts deleted file mode 100644 index f8521aa2f919..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified Diagnostic. - * - * @summary Deletes the specified Diagnostic. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json - */ -async function apiManagementDeleteWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.delete( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetEntityTagSample.ts deleted file mode 100644 index 534b7e8b84bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json - */ -async function apiManagementHeadWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetSample.ts deleted file mode 100644 index a7f6a8efa0cd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Diagnostic specified by its identifier. - * - * @summary Gets the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json - */ -async function apiManagementGetWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.get( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts deleted file mode 100644 index f33c7ca97c47..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all diagnostics in the specified workspace. - * - * @summary Lists all diagnostics in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json - */ -async function apiManagementListWorkspaceDiagnostics(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceDiagnostic.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceDiagnostics(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticUpdateSample.ts deleted file mode 100644 index ae2e61cda818..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceDiagnosticUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DiagnosticUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the Diagnostic specified by its identifier. - * - * @summary Updates the details of the Diagnostic specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json - */ -async function apiManagementUpdateWorkspaceDiagnostic(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const diagnosticId = "applicationinsights"; - const ifMatch = "*"; - const parameters: DiagnosticUpdateContract = { - alwaysLog: "allErrors", - backend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - frontend: { - response: { body: { bytes: 512 }, headers: ["Content-type"] }, - request: { body: { bytes: 512 }, headers: ["Content-type"] }, - }, - loggerId: "/workspaces/wks1/loggers/applicationinsights", - sampling: { percentage: 50, samplingType: "fixed" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceDiagnostic.update( - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceDiagnostic(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetEntityTagSample.ts deleted file mode 100644 index ffea70dd1f0e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetEntityTagSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json - */ -async function apiManagementHeadWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetSample.ts deleted file mode 100644 index ff7ed9d9cb56..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the workspace specified by its identifier. - * - * @summary Gets the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json - */ -async function apiManagementGetWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.get( - resourceGroupName, - serviceName, - workspaceId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts deleted file mode 100644 index dc3ad9743821..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GlobalSchemaContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates new or updates existing specified Schema of the workspace in an API Management service instance. - * - * @summary Creates new or updates existing specified Schema of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json - */ -async function apiManagementCreateWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const parameters: GlobalSchemaContract = { - description: "sample schema description", - schemaType: "xml", - value: - '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaDeleteSample.ts deleted file mode 100644 index 15bb60495baa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific Schema. - * - * @summary Deletes specific Schema. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json - */ -async function apiManagementDeleteWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.delete( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts deleted file mode 100644 index 3db363c643fa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the Schema specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json - */ -async function apiManagementHeadWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "myschema"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetSample.ts deleted file mode 100644 index 74b278d1e0b4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Schema specified by its identifier. - * - * @summary Gets the details of the Schema specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json - */ -async function apiManagementGetWorkspaceSchema(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const schemaId = "schema1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGlobalSchema.get( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceSchema(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaListByServiceSample.ts deleted file mode 100644 index 403557ee3070..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGlobalSchemaListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of schemas registered with workspace in a service instance. - * - * @summary Lists a collection of schemas registered with workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json - */ -async function apiManagementListWorkspaceSchemas(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGlobalSchema.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceSchemas(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupCreateOrUpdateSample.ts deleted file mode 100644 index b020b08be037..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupCreateOrUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GroupCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json - */ -async function apiManagementCreateWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const parameters: GroupCreateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a group. - * - * @summary Creates or Updates a group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupExternal.json - */ -async function apiManagementCreateWorkspaceGroupExternal(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const parameters: GroupCreateParameters = { - type: "external", - description: "new group to test", - displayName: "NewGroup (samiraad.onmicrosoft.com)", - externalId: - "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceGroup(); - await apiManagementCreateWorkspaceGroupExternal(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupDeleteSample.ts deleted file mode 100644 index bb8435a8b043..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific group of the workspace in an API Management service instance. - * - * @summary Deletes specific group of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json - */ -async function apiManagementDeleteWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "aadGroup"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetEntityTagSample.ts deleted file mode 100644 index 8bed1b188e33..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the group specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json - */ -async function apiManagementHeadWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetSample.ts deleted file mode 100644 index 1408507fd2ca..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the group specified by its identifier. - * - * @summary Gets the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json - */ -async function apiManagementGetWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.get( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupListByServiceSample.ts deleted file mode 100644 index 2521fcc41bfe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of groups defined within a workspace in a service instance. - * - * @summary Lists a collection of groups defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json - */ -async function apiManagementListWorkspaceGroups(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGroup.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceGroups(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUpdateSample.ts deleted file mode 100644 index 79dada091cf3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - GroupUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the group specified by its identifier. - * - * @summary Updates the details of the group specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json - */ -async function apiManagementUpdateWorkspaceGroup(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const ifMatch = "*"; - const parameters: GroupUpdateParameters = { displayName: "temp group" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroup.update( - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceGroup(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts deleted file mode 100644 index 23cafa255aac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Checks that user entity specified by identifier is associated with the group entity. - * - * @summary Checks that user entity specified by identifier is associated with the group entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json - */ -async function apiManagementHeadWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "59306a29e4bbd510dc24e5f9"; - const userId = "5931a75ae4bbd512a88c680b"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCreateSample.ts deleted file mode 100644 index f9ad2a74c31f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserCreateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Add existing user to existing group - * - * @summary Add existing user to existing group - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json - */ -async function apiManagementCreateWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "tempgroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.create( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserDeleteSample.ts deleted file mode 100644 index 231c1f942db9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Remove existing user from existing group. - * - * @summary Remove existing user from existing group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json - */ -async function apiManagementDeleteWorkspaceGroupUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "templategroup"; - const userId = "59307d350af58404d8a26300"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceGroupUser.delete( - resourceGroupName, - serviceName, - workspaceId, - groupId, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceGroupUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserListSample.ts deleted file mode 100644 index 60fd3d39b0ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceGroupUserListSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of user entities associated with the group. - * - * @summary Lists a collection of user entities associated with the group. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json - */ -async function apiManagementListWorkspaceGroupUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const groupId = "57d2ef278aa04f0888cba3f3"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceGroupUser.list( - resourceGroupName, - serviceName, - workspaceId, - groupId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceGroupUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceListByServiceSample.ts deleted file mode 100644 index d223fca5a368..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceListByServiceSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all workspaces of the API Management service instance. - * - * @summary Lists all workspaces of the API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json - */ -async function apiManagementListWorkspaces(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspace.listByService( - resourceGroupName, - serviceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaces(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerCreateOrUpdateSample.ts deleted file mode 100644 index 8dd3a064dd59..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerCreateOrUpdateSample.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { LoggerContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json - */ -async function apiManagementCreateWorkspaceAiLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { instrumentationKey: "11................a1" }, - loggerType: "applicationInsights", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or Updates a logger. - * - * @summary Creates or Updates a logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceEHLogger.json - */ -async function apiManagementCreateWorkspaceEhLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const parameters: LoggerContract = { - description: "adding a new logger", - credentials: { - name: "hydraeventhub", - connectionString: - "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", - }, - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceAiLogger(); - await apiManagementCreateWorkspaceEhLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerDeleteSample.ts deleted file mode 100644 index 4f58b4ded9b9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified logger. - * - * @summary Deletes the specified logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json - */ -async function apiManagementDeleteWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "loggerId"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.delete( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetEntityTagSample.ts deleted file mode 100644 index 9ef22daddd07..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the logger specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json - */ -async function apiManagementHeadWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetSample.ts deleted file mode 100644 index 4197ef3842bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the logger specified by its identifier. - * - * @summary Gets the details of the logger specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json - */ -async function apiManagementGetWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "templateLogger"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.get( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerListByWorkspaceSample.ts deleted file mode 100644 index 1dbdbca3da63..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerListByWorkspaceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of loggers in the specified workspace. - * - * @summary Lists a collection of loggers in the specified workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json - */ -async function apiManagementListWorkspaceLoggers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceLogger.listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceLoggers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerUpdateSample.ts deleted file mode 100644 index 20ddc926adad..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceLoggerUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - LoggerUpdateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates an existing logger. - * - * @summary Updates an existing logger. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json - */ -async function apiManagementUpdateWorkspaceLogger(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const loggerId = "eh1"; - const ifMatch = "*"; - const parameters: LoggerUpdateContract = { - description: "updating description", - loggerType: "azureEventHub", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceLogger.update( - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceLogger(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts deleted file mode 100644 index 8b9b566e2535..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NamedValueCreateContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json - */ -async function apiManagementCreateWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const parameters: NamedValueCreateContract = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates named value. - * - * @summary Creates or updates named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json - */ -async function apiManagementCreateWorkspaceNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; - const parameters: NamedValueCreateContract = { - displayName: "prop6namekv", - keyVault: { - identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", - secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", - }, - secret: true, - tags: ["foo", "bar"], - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceNamedValue(); - await apiManagementCreateWorkspaceNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueDeleteSample.ts deleted file mode 100644 index a526b1e09a5e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific named value from the workspace in an API Management service instance. - * - * @summary Deletes specific named value from the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json - */ -async function apiManagementDeleteWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.delete( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetEntityTagSample.ts deleted file mode 100644 index 06ab97d7df20..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the named value specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json - */ -async function apiManagementHeadWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetSample.ts deleted file mode 100644 index 6889d147e79c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueGetSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json - */ -async function apiManagementGetWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets the details of the named value specified by its identifier. - * - * @summary Gets the details of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json - */ -async function apiManagementGetWorkspaceNamedValueWithKeyVault(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop6"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.get( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceNamedValue(); - await apiManagementGetWorkspaceNamedValueWithKeyVault(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListByServiceSample.ts deleted file mode 100644 index 26fa20fcbfbe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of named values defined within a workspace in a service instance. - * - * @summary Lists a collection of named values defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json - */ -async function apiManagementListWorkspaceNamedValues(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceNamedValue.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceNamedValues(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListValueSample.ts deleted file mode 100644 index 1089a02806b9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueListValueSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the secret of the named value specified by its identifier. - * - * @summary Gets the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json - */ -async function apiManagementWorkspaceNamedValueListValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testarmTemplateproperties2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.listValue( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementWorkspaceNamedValueListValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueRefreshSecretSample.ts deleted file mode 100644 index 2b734e23e0db..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueRefreshSecretSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Refresh the secret of the named value specified by its identifier. - * - * @summary Refresh the secret of the named value specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json - */ -async function apiManagementRefreshWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginRefreshSecretAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementRefreshWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueUpdateSample.ts deleted file mode 100644 index 4afc5866f561..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNamedValueUpdateSample.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - NamedValueUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the specific named value. - * - * @summary Updates the specific named value. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json - */ -async function apiManagementUpdateWorkspaceNamedValue(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const namedValueId = "testprop2"; - const ifMatch = "*"; - const parameters: NamedValueUpdateParameters = { - displayName: "prop3name", - secret: false, - tags: ["foo", "bar2"], - value: "propValue", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNamedValue.beginUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceNamedValue(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationCreateOrUpdateSample.ts deleted file mode 100644 index 08652c32a4df..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Create or Update API Management publisher notification for the workspace. - * - * @summary Create or Update API Management publisher notification for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json - */ -async function apiManagementCreateWorkspaceNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotification.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationGetSample.ts deleted file mode 100644 index 81eda54a64c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the Notification specified by its identifier. - * - * @summary Gets the details of the Notification specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json - */ -async function apiManagementGetWorkspaceNotification(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotification.get( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceNotification(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationListByServiceSample.ts deleted file mode 100644 index 0f674bf96c99..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of properties defined within a service instance. - * - * @summary Lists a collection of properties defined within a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json - */ -async function apiManagementListWorkspaceNotifications(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceNotification.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceNotifications(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts deleted file mode 100644 index 0d05f80080c2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Determine if Notification Recipient Email subscribed to the notification. - * - * @summary Determine if Notification Recipient Email subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementHeadWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts deleted file mode 100644 index ea256722051a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds the Email address to the list of Recipients for the Notification. - * - * @summary Adds the Email address to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementCreateWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "foobar@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts deleted file mode 100644 index 310d73aee830..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the email from the list of Notification. - * - * @summary Removes the email from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json - */ -async function apiManagementDeleteWorkspaceNotificationRecipientEmail(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const email = "contoso@live.com"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientEmail.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceNotificationRecipientEmail(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts deleted file mode 100644 index bb2113a0f176..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient Emails subscribed to a notification. - * - * @summary Gets the list of the Notification Recipient Emails subscribed to a notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json - */ -async function apiManagementListWorkspaceNotificationRecipientEmails(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientEmail.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListWorkspaceNotificationRecipientEmails(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts deleted file mode 100644 index f0340fb3f1c5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Determine if the Notification Recipient User is subscribed to the notification. - * - * @summary Determine if the Notification Recipient User is subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json - */ -async function apiManagementHeadWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientUser.checkEntityExists( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts deleted file mode 100644 index 1f4e0c0b430c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds the API Management User to the list of Recipients for the Notification. - * - * @summary Adds the API Management User to the list of Recipients for the Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json - */ -async function apiManagementCreateWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts deleted file mode 100644 index 87fcbfe3b206..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Removes the API Management user from the list of Notification. - * - * @summary Removes the API Management user from the list of Notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json - */ -async function apiManagementDeleteWorkspaceNotificationRecipientUser(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const userId = "576823d0a40f7e74ec07d642"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceNotificationRecipientUser.delete( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceNotificationRecipientUser(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts deleted file mode 100644 index 42a0bec7c5ba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the list of the Notification Recipient User subscribed to the notification. - * - * @summary Gets the list of the Notification Recipient User subscribed to the notification. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json - */ -async function apiManagementListWorkspaceNotificationRecipientUsers(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const notificationName = "RequestPublisherNotificationMessage"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspaceNotificationRecipientUser.listByNotification( - resourceGroupName, - serviceName, - workspaceId, - notificationName, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListWorkspaceNotificationRecipientUsers(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyCreateOrUpdateSample.ts deleted file mode 100644 index 054ebd6e9ec7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyContract, - WorkspacePolicyCreateOrUpdateOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. - * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json - */ -async function apiManagementCreateWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "xml", - value: - " ", - }; - const options: WorkspacePolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates policy configuration for the workspace. - * - * @summary Creates or updates policy configuration for the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json - */ -async function apiManagementCreateWorkspacePolicyNonXmlEncoded(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const parameters: PolicyContract = { - format: "rawxml", - value: - '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', - }; - const options: WorkspacePolicyCreateOrUpdateOptionalParams = { ifMatch }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspacePolicy(); - await apiManagementCreateWorkspacePolicyNonXmlEncoded(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyDeleteSample.ts deleted file mode 100644 index 080e887e3c3c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the workspace. - * - * @summary Deletes the policy configuration at the workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json - */ -async function apiManagementDeleteWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts deleted file mode 100644 index 7325d6601144..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - PolicyFragmentContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates a policy fragment. - * - * @summary Creates or updates a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json - */ -async function apiManagementCreateWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const parameters: PolicyFragmentContract = { - format: "xml", - description: "A policy fragment example", - value: - '', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = - await client.workspacePolicyFragment.beginCreateOrUpdateAndWait( - resourceGroupName, - serviceName, - workspaceId, - id, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentDeleteSample.ts deleted file mode 100644 index 39d937b1d333..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a policy fragment. - * - * @summary Deletes a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json - */ -async function apiManagementDeleteWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.delete( - resourceGroupName, - serviceName, - workspaceId, - id, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts deleted file mode 100644 index 53faa2565a40..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of a policy fragment. - * - * @summary Gets the entity state (Etag) version of a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json - */ -async function apiManagementHeadWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspacePolicyFragment(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetSample.ts deleted file mode 100644 index 5ecefc3bfc29..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentGetSample.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkspacePolicyFragmentGetOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json - */ -async function apiManagementGetWorkspacePolicyFragment(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a policy fragment. - * - * @summary Gets a policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json - */ -async function apiManagementGetWorkspacePolicyFragmentFormat(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const format = "rawxml"; - const options: WorkspacePolicyFragmentGetOptionalParams = { format }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.get( - resourceGroupName, - serviceName, - workspaceId, - id, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspacePolicyFragment(); - await apiManagementGetWorkspacePolicyFragmentFormat(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListByServiceSample.ts deleted file mode 100644 index cfe05be06ff4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all policy fragments defined within a workspace. - * - * @summary Gets all policy fragments defined within a workspace. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json - */ -async function apiManagementListWorkspacePolicyFragments(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspacePolicyFragment.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspacePolicyFragments(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListReferencesSample.ts deleted file mode 100644 index 818e02ee5cde..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyFragmentListReferencesSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists policy resources that reference the policy fragment. - * - * @summary Lists policy resources that reference the policy fragment. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json - */ -async function apiManagementListWorkspacePolicyFragmentReferences(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const id = "policyFragment1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicyFragment.listReferences( - resourceGroupName, - serviceName, - workspaceId, - id, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListWorkspacePolicyFragmentReferences(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetEntityTagSample.ts deleted file mode 100644 index 357f4f2400d5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json - */ -async function apiManagementHeadWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetSample.ts deleted file mode 100644 index 9ceef1d07c6d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the API level. - * - * @summary Get the policy configuration at the API level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json - */ -async function apiManagementGetWorkspacePolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspacePolicy.get( - resourceGroupName, - serviceName, - workspaceId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspacePolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyListByApiSample.ts deleted file mode 100644 index d16e29bc14d1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspacePolicyListByApiSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the workspace level. - * - * @summary Get the policy configuration at the workspace level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json - */ -async function apiManagementListWorkspacePolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspacePolicy.listByApi( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspacePolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts deleted file mode 100644 index 2595730734b0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified product via link. - * - * @summary Adds an API to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json - */ -async function apiManagementCreateWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const parameters: ProductApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkDeleteSample.ts deleted file mode 100644 index 66499df02a0c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified product. - * - * @summary Deletes the specified API from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json - */ -async function apiManagementDeleteWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkGetSample.ts deleted file mode 100644 index 3662403b0f83..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the API link for the product. - * - * @summary Gets the API link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json - */ -async function apiManagementGetWorkspaceProductApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceProductApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkListByProductSample.ts deleted file mode 100644 index 1fdd2f46cd72..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductApiLinkListByProductSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a product. - * - * @summary Lists a collection of the API links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json - */ -async function apiManagementListWorkspaceProductApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProductApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceProductApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductCreateOrUpdateSample.ts deleted file mode 100644 index befa45682509..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ProductContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or Updates a product. - * - * @summary Creates or Updates a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json - */ -async function apiManagementCreateWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const parameters: ProductContract = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductDeleteSample.ts deleted file mode 100644 index 88e3e65d251f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductDeleteSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkspaceProductDeleteOptionalParams, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Delete product. - * - * @summary Delete product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json - */ -async function apiManagementDeleteWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const deleteSubscriptions = true; - const options: WorkspaceProductDeleteOptionalParams = { deleteSubscriptions }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - options, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetEntityTagSample.ts deleted file mode 100644 index 8dbe15b49eca..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the product specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json - */ -async function apiManagementHeadWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetSample.ts deleted file mode 100644 index 889997190bf0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the product specified by its identifier. - * - * @summary Gets the details of the product specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json - */ -async function apiManagementGetWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts deleted file mode 100644 index 3a3bdb790cfd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductGroupLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds a group to the specified product via link. - * - * @summary Adds a group to the specified product via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json - */ -async function apiManagementCreateWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const parameters: ProductGroupLinkContract = { - groupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkDeleteSample.ts deleted file mode 100644 index d22c2c49389c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified group from the specified product. - * - * @summary Deletes the specified group from the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json - */ -async function apiManagementDeleteWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkGetSample.ts deleted file mode 100644 index 19172ea624df..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the group link for the product. - * - * @summary Gets the group link for the product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json - */ -async function apiManagementGetWorkspaceProductGroupLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const groupLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductGroupLink.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceProductGroupLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkListByProductSample.ts deleted file mode 100644 index a2a13bff99cc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductGroupLinkListByProductSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the group links associated with a product. - * - * @summary Lists a collection of the group links associated with a product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json - */ -async function apiManagementListWorkspaceProductGroupLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "product1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProductGroupLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceProductGroupLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductListByServiceSample.ts deleted file mode 100644 index 2a1ddf4e4aa8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of products in the specified workspace in a service instance. - * - * @summary Lists a collection of products in the specified workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json - */ -async function apiManagementListWorkspaceProducts(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceProduct.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceProducts(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts deleted file mode 100644 index e8e646ccdc82..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { PolicyContract, ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates policy configuration for the Product. - * - * @summary Creates or updates policy configuration for the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json - */ -async function apiManagementCreateWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "5702e97e5157a50f48dce801"; - const policyId = "policy"; - const parameters: PolicyContract = { - format: "xml", - value: - '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyDeleteSample.ts deleted file mode 100644 index 1d8da465bea4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyDeleteSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the policy configuration at the Product. - * - * @summary Deletes the policy configuration at the Product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json - */ -async function apiManagementDeleteWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const policyId = "policy"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.delete( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetEntityTagSample.ts deleted file mode 100644 index bca5c1d494bd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetEntityTagSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the ETag of the policy configuration at the Product level. - * - * @summary Get the ETag of the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json - */ -async function apiManagementHeadWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "unlimited"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetSample.ts deleted file mode 100644 index 0ed91c64b17c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json - */ -async function apiManagementGetWorkspaceProductPolicy(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "kjoshiarmTemplateProduct4"; - const policyId = "policy"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.get( - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceProductPolicy(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyListByProductSample.ts deleted file mode 100644 index ec45a72d01c0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductPolicyListByProductSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the policy configuration at the Product level. - * - * @summary Get the policy configuration at the Product level. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json - */ -async function apiManagementListWorkspaceProductPolicies(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "armTemplateProduct4"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProductPolicy.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementListWorkspaceProductPolicies(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductUpdateSample.ts deleted file mode 100644 index 1a655b596b61..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceProductUpdateSample.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ProductUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Update existing product details. - * - * @summary Update existing product details. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json - */ -async function apiManagementUpdateWorkspaceProduct(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const productId = "testproduct"; - const ifMatch = "*"; - const parameters: ProductUpdateParameters = { - displayName: "Test Template ProductName 4", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceProduct.update( - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceProduct(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts deleted file mode 100644 index c5d6dd233d35..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SubscriptionCreateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates or updates the subscription of specified user to the specified product. - * - * @summary Creates or updates the subscription of specified user to the specified product. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json - */ -async function apiManagementCreateWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const parameters: SubscriptionCreateParameters = { - displayName: "testsub", - ownerId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", - scope: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - sid, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionDeleteSample.ts deleted file mode 100644 index 3725d12aa483..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified subscription. - * - * @summary Deletes the specified subscription. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json - */ -async function apiManagementDeleteWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.delete( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetEntityTagSample.ts deleted file mode 100644 index 1109da836bdf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetEntityTagSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * - * @summary Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json - */ -async function apiManagementHeadWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.getEntityTag( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetSample.ts deleted file mode 100644 index 98c9df1372cf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Subscription entity. - * - * @summary Gets the specified Subscription entity. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json - */ -async function apiManagementGetWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.get( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSample.ts deleted file mode 100644 index a11d5c3e4d95..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all subscriptions of the workspace in an API Management service instance. - * - * @summary Lists all subscriptions of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json - */ -async function apiManagementListWorkspaceSubscriptions(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceSubscription.list( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceSubscriptions(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSecretsSample.ts deleted file mode 100644 index 8be787c5bab0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the specified Subscription keys. - * - * @summary Gets the specified Subscription keys. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json - */ -async function apiManagementWorkspaceSubscriptionListSecrets(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "5931a769d8d14f0ad8ce13b8"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.listSecrets( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementWorkspaceSubscriptionListSecrets(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts deleted file mode 100644 index 8eb7250ca34c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates primary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json - */ -async function apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regeneratePrimaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts deleted file mode 100644 index 8e109c0926f0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * - * @summary Regenerates secondary key of existing subscription of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json - */ -async function apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.regenerateSecondaryKey( - resourceGroupName, - serviceName, - workspaceId, - sid, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionUpdateSample.ts deleted file mode 100644 index 0ba8e44a3db3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceSubscriptionUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SubscriptionUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of a subscription specified by its identifier. - * - * @summary Updates the details of a subscription specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json - */ -async function apiManagementUpdateWorkspaceSubscription(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const sid = "testsub"; - const ifMatch = "*"; - const parameters: SubscriptionUpdateParameters = { displayName: "testsub" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceSubscription.update( - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceSubscription(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts deleted file mode 100644 index ff5d7bcd7a2b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagApiLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an API to the specified tag via link. - * - * @summary Adds an API to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json - */ -async function apiManagementCreateWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const parameters: TagApiLinkContract = { - apiId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkDeleteSample.ts deleted file mode 100644 index f676658eb77f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified API from the specified tag. - * - * @summary Deletes the specified API from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json - */ -async function apiManagementDeleteWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkGetSample.ts deleted file mode 100644 index 8a41f2ce771e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the API link for the tag. - * - * @summary Gets the API link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json - */ -async function apiManagementGetWorkspaceTagApiLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const apiLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagApiLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceTagApiLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkListByProductSample.ts deleted file mode 100644 index acd264795c83..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagApiLinkListByProductSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the API links associated with a tag. - * - * @summary Lists a collection of the API links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json - */ -async function apiManagementListWorkspaceTagApiLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagApiLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceTagApiLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagCreateOrUpdateSample.ts deleted file mode 100644 index 78f4de5d42d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a tag. - * - * @summary Creates a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json - */ -async function apiManagementCreateWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const parameters: TagCreateUpdateParameters = { displayName: "tag1" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagDeleteSample.ts deleted file mode 100644 index c30139aae179..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes specific tag of the workspace in an API Management service instance. - * - * @summary Deletes specific tag of the workspace in an API Management service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json - */ -async function apiManagementDeleteWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tagId1"; - const ifMatch = "*"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetEntityStateSample.ts deleted file mode 100644 index 6fe76849d850..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetEntityStateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the entity state version of the tag specified by its identifier. - * - * @summary Gets the entity state version of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json - */ -async function apiManagementHeadWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.getEntityState( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementHeadWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetSample.ts deleted file mode 100644 index 85a76042a532..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the details of the tag specified by its identifier. - * - * @summary Gets the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json - */ -async function apiManagementGetWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "59306a29e4bbd510dc24e5f9"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagListByServiceSample.ts deleted file mode 100644 index 850e174792d7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagListByServiceSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of tags defined within a workspace in a service instance. - * - * @summary Lists a collection of tags defined within a workspace in a service instance. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json - */ -async function apiManagementListWorkspaceTags(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTag.listByService( - resourceGroupName, - serviceName, - workspaceId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceTags(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts deleted file mode 100644 index 081e7c9e3451..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagOperationLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds an operation to the specified tag via link. - * - * @summary Adds an operation to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json - */ -async function apiManagementCreateWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const parameters: TagOperationLinkContract = { - operationId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkDeleteSample.ts deleted file mode 100644 index 4dad09875621..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified operation from the specified tag. - * - * @summary Deletes the specified operation from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json - */ -async function apiManagementDeleteWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkGetSample.ts deleted file mode 100644 index 75a2bc189af7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the operation link for the tag. - * - * @summary Gets the operation link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json - */ -async function apiManagementGetWorkspaceTagOperationLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const operationLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagOperationLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceTagOperationLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkListByProductSample.ts deleted file mode 100644 index 2db9063a4e7e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagOperationLinkListByProductSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the operation links associated with a tag. - * - * @summary Lists a collection of the operation links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json - */ -async function apiManagementListWorkspaceTagOperationLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagOperationLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceTagOperationLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts deleted file mode 100644 index e564e9e39e42..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagProductLinkContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Adds a product to the specified tag via link. - * - * @summary Adds a product to the specified tag via link. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json - */ -async function apiManagementCreateWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const parameters: TagProductLinkContract = { - productId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.createOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementCreateWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkDeleteSample.ts deleted file mode 100644 index 5c6c5d26ba17..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkDeleteSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the specified product from the specified tag. - * - * @summary Deletes the specified product from the specified tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json - */ -async function apiManagementDeleteWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.delete( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementDeleteWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkGetSample.ts deleted file mode 100644 index 14c8895f8fba..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkGetSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the product link for the tag. - * - * @summary Gets the product link for the tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json - */ -async function apiManagementGetWorkspaceTagProductLink(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const productLinkId = "link1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTagProductLink.get( - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementGetWorkspaceTagProductLink(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkListByProductSample.ts deleted file mode 100644 index e56c9c255756..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagProductLinkListByProductSample.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ApiManagementClient } from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists a collection of the product links associated with a tag. - * - * @summary Lists a collection of the product links associated with a tag. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json - */ -async function apiManagementListWorkspaceTagProductLinks(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "tag1"; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.workspaceTagProductLink.listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await apiManagementListWorkspaceTagProductLinks(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagUpdateSample.ts deleted file mode 100644 index b0dd198ff54a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceTagUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - TagCreateUpdateParameters, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the tag specified by its identifier. - * - * @summary Updates the details of the tag specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json - */ -async function apiManagementUpdateWorkspaceTag(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const tagId = "temptag"; - const ifMatch = "*"; - const parameters: TagCreateUpdateParameters = { displayName: "temp tag" }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspaceTag.update( - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspaceTag(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceUpdateSample.ts deleted file mode 100644 index c69b9400f082..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/src/workspaceUpdateSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - WorkspaceContract, - ApiManagementClient, -} from "@azure/arm-apimanagement"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the details of the workspace specified by its identifier. - * - * @summary Updates the details of the workspace specified by its identifier. - * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json - */ -async function apiManagementUpdateWorkspace(): Promise { - const subscriptionId = - process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const resourceGroupName = - process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1"; - const serviceName = "apimService1"; - const workspaceId = "wks1"; - const ifMatch = "*"; - const parameters: WorkspaceContract = { - description: "workspace 1", - displayName: "my workspace", - }; - const credential = new DefaultAzureCredential(); - const client = new ApiManagementClient(credential, subscriptionId); - const result = await client.workspace.update( - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - parameters, - ); - console.log(result); -} - -async function main(): Promise { - await apiManagementUpdateWorkspace(); -} - -main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/tsconfig.json b/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/tsconfig.json deleted file mode 100644 index 400db87cf648..000000000000 --- a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2023", - "module": "commonjs", - "lib": [], - "importHelpers": true, - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node10", - "esModuleInterop": true, - "outDir": "./dist", - "resolveJsonModule": true - }, - "include": [ - "./src" - ] -} diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/README.md b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/README.md new file mode 100644 index 000000000000..71805b56378f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/README.md @@ -0,0 +1,1320 @@ +# @azure/arm-apimanagement client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for @azure/arm-apimanagement in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [allPoliciesListByServiceSample.js][allpolicieslistbyservicesample] | status of all policies of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementAllPolicies.json | +| [apiCreateOrUpdateSample.js][apicreateorupdatesample] | creates new or updates existing specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApi.json | +| [apiDeleteSample.js][apideletesample] | deletes the specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApi.json | +| [apiDiagnosticCreateOrUpdateSample.js][apidiagnosticcreateorupdatesample] | creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiDiagnostic.json | +| [apiDiagnosticDeleteSample.js][apidiagnosticdeletesample] | deletes the specified Diagnostic from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiDiagnostic.json | +| [apiDiagnosticGetEntityTagSample.js][apidiagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiDiagnostic.json | +| [apiDiagnosticGetSample.js][apidiagnosticgetsample] | gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiDiagnostic.json | +| [apiDiagnosticListByServiceSample.js][apidiagnosticlistbyservicesample] | lists all diagnostics of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiDiagnostics.json | +| [apiDiagnosticUpdateSample.js][apidiagnosticupdatesample] | updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiDiagnostic.json | +| [apiExportGetSample.js][apiexportgetsample] | gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json | +| [apiGatewayConfigConnectionCreateOrUpdateSample.js][apigatewayconfigconnectioncreateorupdatesample] | creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayConfigConnection.json | +| [apiGatewayConfigConnectionDeleteSample.js][apigatewayconfigconnectiondeletesample] | deletes an existing API Management gateway config connection. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayConfigConnection.json | +| [apiGatewayConfigConnectionGetSample.js][apigatewayconfigconnectiongetsample] | gets an API Management gateway config connection resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayConfigConnection.json | +| [apiGatewayConfigConnectionListByGatewaySample.js][apigatewayconfigconnectionlistbygatewaysample] | list all API Management gateway config connections within a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayConfigConnection.json | +| [apiGatewayCreateOrUpdateSample.js][apigatewaycreateorupdatesample] | creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateStandardGateway.json | +| [apiGatewayDeleteSample.js][apigatewaydeletesample] | deletes an existing API Management gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayDeleteGateway.json | +| [apiGatewayGetSample.js][apigatewaygetsample] | gets an API Management gateway resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGetGateway.json | +| [apiGatewayHostnameBindingCreateOrUpdateSample.js][apigatewayhostnamebindingcreateorupdatesample] | creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingDeleteSample.js][apigatewayhostnamebindingdeletesample] | deletes an existing API Management gateway hostname binding. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingGetSample.js][apigatewayhostnamebindinggetsample] | gets an API Management gateway hostname binding resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingListByGatewaySample.js][apigatewayhostnamebindinglistbygatewaysample] | list all API Management gateway hostname bindings within a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameBindings.json | +| [apiGatewayHostnameBindingRefreshSecretSample.js][apigatewayhostnamebindingrefreshsecretsample] | refresh the secret for an API Management gateway hostname binding. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json | +| [apiGatewayListByResourceGroupSample.js][apigatewaylistbyresourcegroupsample] | list all API Management gateways within a resource group. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json | +| [apiGatewayListSample.js][apigatewaylistsample] | list all API Management gateways within a subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscription.json | +| [apiGatewayUpdateSample.js][apigatewayupdatesample] | updates an existing API Management gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateStandardGateway.json | +| [apiGetEntityTagSample.js][apigetentitytagsample] | gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApi.json | +| [apiGetSample.js][apigetsample] | gets the details of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiContract.json | +| [apiIssueAttachmentCreateOrUpdateSample.js][apiissueattachmentcreateorupdatesample] | creates a new Attachment for the Issue in an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueAttachment.json | +| [apiIssueAttachmentDeleteSample.js][apiissueattachmentdeletesample] | deletes the specified comment from an Issue. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueAttachment.json | +| [apiIssueAttachmentGetEntityTagSample.js][apiissueattachmentgetentitytagsample] | gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueAttachment.json | +| [apiIssueAttachmentGetSample.js][apiissueattachmentgetsample] | gets the details of the issue Attachment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueAttachment.json | +| [apiIssueAttachmentListByServiceSample.js][apiissueattachmentlistbyservicesample] | lists all attachments for the Issue associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueAttachments.json | +| [apiIssueCommentCreateOrUpdateSample.js][apiissuecommentcreateorupdatesample] | creates a new Comment for the Issue in an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueComment.json | +| [apiIssueCommentDeleteSample.js][apiissuecommentdeletesample] | deletes the specified comment from an Issue. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueComment.json | +| [apiIssueCommentGetEntityTagSample.js][apiissuecommentgetentitytagsample] | gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueComment.json | +| [apiIssueCommentGetSample.js][apiissuecommentgetsample] | gets the details of the issue Comment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueComment.json | +| [apiIssueCommentListByServiceSample.js][apiissuecommentlistbyservicesample] | lists all comments for the Issue associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueComments.json | +| [apiIssueCreateOrUpdateSample.js][apiissuecreateorupdatesample] | creates a new Issue for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssue.json | +| [apiIssueDeleteSample.js][apiissuedeletesample] | deletes the specified Issue from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssue.json | +| [apiIssueGetEntityTagSample.js][apiissuegetentitytagsample] | gets the entity state (Etag) version of the Issue for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssue.json | +| [apiIssueGetSample.js][apiissuegetsample] | gets the details of the Issue for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssue.json | +| [apiIssueListByServiceSample.js][apiissuelistbyservicesample] | lists all issues associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssues.json | +| [apiIssueUpdateSample.js][apiissueupdatesample] | updates an existing issue for an API. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiIssue.json | +| [apiListByServiceSample.js][apilistbyservicesample] | lists all APIs of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListApis.json | +| [apiListByTagsSample.js][apilistbytagssample] | lists a collection of apis associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListApisByTags.json | +| [apiManagementGatewaySkusListAvailableSkusSample.js][apimanagementgatewayskuslistavailableskussample] | gets all available SKU for a given API Management gateway x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Gateways.json | +| [apiManagementOperationsListSample.js][apimanagementoperationslistsample] | lists all of the available REST API operations of the Microsoft.ApiManagement provider. x-ms-original-file: 2025-09-01-preview/ApiManagementListOperations.json | +| [apiManagementServiceApplyNetworkConfigurationUpdatesSample.js][apimanagementserviceapplynetworkconfigurationupdatessample] | updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. x-ms-original-file: 2025-09-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json | +| [apiManagementServiceBackupSample.js][apimanagementservicebackupsample] | creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithAccessKey.json | +| [apiManagementServiceCheckNameAvailabilitySample.js][apimanagementservicechecknameavailabilitysample] | checks availability and correctness of a name for an API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceCheckNameAvailability.json | +| [apiManagementServiceCreateOrUpdateSample.js][apimanagementservicecreateorupdatesample] | creates or updates an API Management service. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json | +| [apiManagementServiceDeleteSample.js][apimanagementservicedeletesample] | deletes an existing API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceDeleteService.json | +| [apiManagementServiceGetDomainOwnershipIdentifierSample.js][apimanagementservicegetdomainownershipidentifiersample] | get the custom domain ownership identifier for an API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json | +| [apiManagementServiceGetSample.js][apimanagementservicegetsample] | gets an API Management service resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json | +| [apiManagementServiceGetSsoTokenSample.js][apimanagementservicegetssotokensample] | gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetSsoToken.json | +| [apiManagementServiceListByResourceGroupSample.js][apimanagementservicelistbyresourcegroupsample] | list all API Management services within a resource group. x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json | +| [apiManagementServiceListSample.js][apimanagementservicelistsample] | lists all API Management services within an Azure subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscription.json | +| [apiManagementServiceMigrateToStv2Sample.js][apimanagementservicemigratetostv2sample] | upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceMigrateToStv2.json | +| [apiManagementServiceRefreshHostnamesSample.js][apimanagementservicerefreshhostnamessample] | force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json | +| [apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js][apimanagementserviceresourcesperformconnectivitycheckasyncsample] | performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheck.json | +| [apiManagementServiceRestoreSample.js][apimanagementservicerestoresample] | restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementRestoreWithAccessKey.json | +| [apiManagementServiceSkusListAvailableServiceSkusSample.js][apimanagementserviceskuslistavailableserviceskussample] | gets all available SKU for a given API Management service x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Consumption.json | +| [apiManagementServiceUpdateSample.js][apimanagementserviceupdatesample] | updates an existing API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceDisableTls10.json | +| [apiManagementSkusListSample.js][apimanagementskuslistsample] | gets the list of Microsoft.ApiManagement SKUs available for your Subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListSku.json | +| [apiManagementWorkspaceLinkGetSample.js][apimanagementworkspacelinkgetsample] | gets an API Management WorkspaceLink resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLink.json | +| [apiManagementWorkspaceLinksListByServiceSample.js][apimanagementworkspacelinkslistbyservicesample] | list all API Management workspaceLinks for a service. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLinks.json | +| [apiOperationCreateOrUpdateSample.js][apioperationcreateorupdatesample] | creates a new operation in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperation.json | +| [apiOperationDeleteSample.js][apioperationdeletesample] | deletes the specified operation in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperation.json | +| [apiOperationGetEntityTagSample.js][apioperationgetentitytagsample] | gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperation.json | +| [apiOperationGetSample.js][apioperationgetsample] | gets the details of the API Operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperation.json | +| [apiOperationListByApiSample.js][apioperationlistbyapisample] | lists a collection of the operations for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperations.json | +| [apiOperationPolicyCreateOrUpdateSample.js][apioperationpolicycreateorupdatesample] | creates or updates policy configuration for the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationPolicy.json | +| [apiOperationPolicyDeleteSample.js][apioperationpolicydeletesample] | deletes the policy configuration at the Api Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationPolicy.json | +| [apiOperationPolicyGetEntityTagSample.js][apioperationpolicygetentitytagsample] | gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationPolicy.json | +| [apiOperationPolicyGetSample.js][apioperationpolicygetsample] | get the policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPolicy.json | +| [apiOperationPolicyListByOperationSample.js][apioperationpolicylistbyoperationsample] | get the list of policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationPolicies.json | +| [apiOperationUpdateSample.js][apioperationupdatesample] | updates the details of the operation in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiOperation.json | +| [apiPolicyCreateOrUpdateSample.js][apipolicycreateorupdatesample] | creates or updates policy configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicy.json | +| [apiPolicyDeleteSample.js][apipolicydeletesample] | deletes the policy configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiPolicy.json | +| [apiPolicyGetEntityTagSample.js][apipolicygetentitytagsample] | gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiPolicy.json | +| [apiPolicyGetSample.js][apipolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiPolicy.json | +| [apiPolicyListByApiSample.js][apipolicylistbyapisample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiPolicies.json | +| [apiProductListByApisSample.js][apiproductlistbyapissample] | lists all Products, which the API is part of. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiProducts.json | +| [apiReleaseCreateOrUpdateSample.js][apireleasecreateorupdatesample] | creates a new Release for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRelease.json | +| [apiReleaseDeleteSample.js][apireleasedeletesample] | deletes the specified release in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiRelease.json | +| [apiReleaseGetEntityTagSample.js][apireleasegetentitytagsample] | returns the etag of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiRelease.json | +| [apiReleaseGetSample.js][apireleasegetsample] | returns the details of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRelease.json | +| [apiReleaseListByServiceSample.js][apireleaselistbyservicesample] | lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiReleases.json | +| [apiReleaseUpdateSample.js][apireleaseupdatesample] | updates the details of the release of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiRelease.json | +| [apiRevisionListByServiceSample.js][apirevisionlistbyservicesample] | lists all revisions of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiRevisions.json | +| [apiSchemaCreateOrUpdateSample.js][apischemacreateorupdatesample] | creates or updates schema configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiSchema.json | +| [apiSchemaDeleteSample.js][apischemadeletesample] | deletes the schema configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiSchema.json | +| [apiSchemaGetEntityTagSample.js][apischemagetentitytagsample] | gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiSchema.json | +| [apiSchemaGetSample.js][apischemagetsample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiSchema.json | +| [apiSchemaListByApiSample.js][apischemalistbyapisample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiSchemas.json | +| [apiTagDescriptionCreateOrUpdateSample.js][apitagdescriptioncreateorupdatesample] | create/Update tag description in scope of the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTagDescription.json | +| [apiTagDescriptionDeleteSample.js][apitagdescriptiondeletesample] | delete tag description for the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTagDescription.json | +| [apiTagDescriptionGetEntityTagSample.js][apitagdescriptiongetentitytagsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTagDescription.json | +| [apiTagDescriptionGetSample.js][apitagdescriptiongetsample] | get Tag description in scope of API x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTagDescription.json | +| [apiTagDescriptionListByServiceSample.js][apitagdescriptionlistbyservicesample] | lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTagDescriptions.json | +| [apiToolCreateOrUpdateSample.js][apitoolcreateorupdatesample] | creates a new tool in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTool.json | +| [apiToolDeleteSample.js][apitooldeletesample] | deletes the specified tool in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTool.json | +| [apiToolGetEntityTagSample.js][apitoolgetentitytagsample] | gets the entity state (Etag) version of the API tool specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTool.json | +| [apiToolGetSample.js][apitoolgetsample] | gets the details of the API Tool specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTool.json | +| [apiToolListByApiSample.js][apitoollistbyapisample] | lists a collection of the MCP tools for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTools.json | +| [apiToolUpdateSample.js][apitoolupdatesample] | updates the details of the tool in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiTool.json | +| [apiUpdateSample.js][apiupdatesample] | updates the specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApi.json | +| [apiVersionSetCreateOrUpdateSample.js][apiversionsetcreateorupdatesample] | creates or Updates a Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiVersionSet.json | +| [apiVersionSetDeleteSample.js][apiversionsetdeletesample] | deletes specific Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiVersionSet.json | +| [apiVersionSetGetEntityTagSample.js][apiversionsetgetentitytagsample] | gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiVersionSet.json | +| [apiVersionSetGetSample.js][apiversionsetgetsample] | gets the details of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiVersionSet.json | +| [apiVersionSetListByServiceSample.js][apiversionsetlistbyservicesample] | lists a collection of API Version Sets in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiVersionSets.json | +| [apiVersionSetUpdateSample.js][apiversionsetupdatesample] | updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiVersionSet.json | +| [apiWikiCreateOrUpdateSample.js][apiwikicreateorupdatesample] | creates a new Wiki for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWiki.json | +| [apiWikiDeleteSample.js][apiwikideletesample] | deletes the specified Wiki from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiWiki.json | +| [apiWikiGetEntityTagSample.js][apiwikigetentitytagsample] | gets the entity state (Etag) version of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiWiki.json | +| [apiWikiGetSample.js][apiwikigetsample] | gets the details of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiWiki.json | +| [apiWikiUpdateSample.js][apiwikiupdatesample] | updates the details of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiWiki.json | +| [apiWikisListSample.js][apiwikislistsample] | gets the wikis for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiWikis.json | +| [authorizationAccessPolicyCreateOrUpdateSample.js][authorizationaccesspolicycreateorupdatesample] | creates or updates Authorization Access Policy. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyDeleteSample.js][authorizationaccesspolicydeletesample] | deletes specific access policy from the Authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyGetSample.js][authorizationaccesspolicygetsample] | gets the details of the authorization access policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyListByAuthorizationSample.js][authorizationaccesspolicylistbyauthorizationsample] | lists a collection of authorization access policy defined within a authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationAccessPolicies.json | +| [authorizationConfirmConsentCodeSample.js][authorizationconfirmconsentcodesample] | confirm valid consent code to suppress Authorizations anti-phishing page. x-ms-original-file: 2025-09-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json | +| [authorizationCreateOrUpdateSample.js][authorizationcreateorupdatesample] | creates or updates authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json | +| [authorizationDeleteSample.js][authorizationdeletesample] | deletes specific Authorization from the Authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorization.json | +| [authorizationGetSample.js][authorizationgetsample] | gets the details of the authorization specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorization.json | +| [authorizationListByAuthorizationProviderSample.js][authorizationlistbyauthorizationprovidersample] | lists a collection of authorization providers defined within a authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsAuthCode.json | +| [authorizationLoginLinksPostSample.js][authorizationloginlinkspostsample] | gets authorization login links. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationLoginRequest.json | +| [authorizationProviderCreateOrUpdateSample.js][authorizationprovidercreateorupdatesample] | creates or updates authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json | +| [authorizationProviderDeleteSample.js][authorizationproviderdeletesample] | deletes specific authorization provider from the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationProvider.json | +| [authorizationProviderGetSample.js][authorizationprovidergetsample] | gets the details of the authorization provider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationProvider.json | +| [authorizationProviderListByServiceSample.js][authorizationproviderlistbyservicesample] | lists a collection of authorization providers defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationProviders.json | +| [authorizationProviderRefreshSecretSample.js][authorizationproviderrefreshsecretsample] | refreshes the Key Vault reference secret for the specified authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json | +| [authorizationServerCreateOrUpdateSample.js][authorizationservercreateorupdatesample] | creates new authorization server or updates an existing authorization server. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationServer.json | +| [authorizationServerDeleteSample.js][authorizationserverdeletesample] | deletes specific authorization server instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationServer.json | +| [authorizationServerGetEntityTagSample.js][authorizationservergetentitytagsample] | gets the entity state (Etag) version of the authorizationServer specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadAuthorizationServer.json | +| [authorizationServerGetSample.js][authorizationservergetsample] | gets the details of the authorization server specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationServer.json | +| [authorizationServerListByServiceSample.js][authorizationserverlistbyservicesample] | lists a collection of authorization servers defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationServers.json | +| [authorizationServerListSecretsSample.js][authorizationserverlistsecretssample] | gets the client secret details of the authorization server. x-ms-original-file: 2025-09-01-preview/ApiManagementAuthorizationServerListSecrets.json | +| [authorizationServerUpdateSample.js][authorizationserverupdatesample] | updates the details of the authorization server specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateAuthorizationServer.json | +| [backendCreateOrUpdateSample.js][backendcreateorupdatesample] | creates or Updates a backend. x-ms-original-file: 2025-09-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json | +| [backendDeleteSample.js][backenddeletesample] | deletes the specified backend. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteBackend.json | +| [backendGetEntityTagSample.js][backendgetentitytagsample] | gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadBackend.json | +| [backendGetSample.js][backendgetsample] | gets the details of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetBackend.json | +| [backendListByServiceSample.js][backendlistbyservicesample] | lists a collection of backends in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListBackends.json | +| [backendReconnectSample.js][backendreconnectsample] | notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. x-ms-original-file: 2025-09-01-preview/ApiManagementBackendReconnect.json | +| [backendUpdateSample.js][backendupdatesample] | updates an existing backend. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateBackend.json | +| [cacheCreateOrUpdateSample.js][cachecreateorupdatesample] | creates or updates an External Cache to be used in Api Management instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCache.json | +| [cacheDeleteSample.js][cachedeletesample] | deletes specific Cache. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCache.json | +| [cacheGetEntityTagSample.js][cachegetentitytagsample] | gets the entity state (Etag) version of the Cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCache.json | +| [cacheGetSample.js][cachegetsample] | gets the details of the Cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetCache.json | +| [cacheListByServiceSample.js][cachelistbyservicesample] | lists a collection of all external Caches in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListCaches.json | +| [cacheUpdateSample.js][cacheupdatesample] | updates the details of the cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateCache.json | +| [certificateCreateOrUpdateSample.js][certificatecreateorupdatesample] | creates or updates the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificate.json | +| [certificateDeleteSample.js][certificatedeletesample] | deletes specific certificate. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCertificate.json | +| [certificateGetEntityTagSample.js][certificategetentitytagsample] | gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCertificate.json | +| [certificateGetSample.js][certificategetsample] | gets the details of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificate.json | +| [certificateListByServiceSample.js][certificatelistbyservicesample] | lists a collection of all certificates in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListCertificates.json | +| [certificateRefreshSecretSample.js][certificaterefreshsecretsample] | from KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshCertificate.json | +| [clientApplicationCreateOrUpdateSample.js][clientapplicationcreateorupdatesample] | creates or Updates a client application. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplication.json | +| [clientApplicationDeleteSample.js][clientapplicationdeletesample] | delete client application. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplication.json | +| [clientApplicationGetEntityTagSample.js][clientapplicationgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadClientApplication.json | +| [clientApplicationGetSample.js][clientapplicationgetsample] | gets the details of the client application specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplication.json | +| [clientApplicationListByServiceSample.js][clientapplicationlistbyservicesample] | lists a collection of client applications in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplications.json | +| [clientApplicationListSecretsSample.js][clientapplicationlistsecretssample] | retrived client application secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationSecrets.json | +| [clientApplicationProductLinkCreateSample.js][clientapplicationproductlinkcreatesample] | adds an Product to the specified Client Application via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplicationProductLink.json | +| [clientApplicationProductLinkDeleteSample.js][clientapplicationproductlinkdeletesample] | deletes the specified Product from the specified client application. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplicationProductLink.json | +| [clientApplicationProductLinkGetSample.js][clientapplicationproductlinkgetsample] | gets the product link for the client application. x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplicationProductLink.json | +| [clientApplicationProductLinkListByClientApplicationsSample.js][clientapplicationproductlinklistbyclientapplicationssample] | lists a collection of product links associated with the specified client application. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationProductLinks.json | +| [contentItemCreateOrUpdateSample.js][contentitemcreateorupdatesample] | creates a new developer portal's content item specified by the provided content type. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentTypeContentItem.json | +| [contentItemDeleteSample.js][contentitemdeletesample] | removes the specified developer portal's content item. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentTypeContentItem.json | +| [contentItemGetEntityTagSample.js][contentitemgetentitytagsample] | returns the entity state (ETag) version of the developer portal's content item specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadContentTypeContentItem.json | +| [contentItemGetSample.js][contentitemgetsample] | returns the developer portal's content item specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentTypeContentItem.json | +| [contentItemListByServiceSample.js][contentitemlistbyservicesample] | lists developer portal's content items specified by the provided content type. x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypeContentItems.json | +| [contentTypeCreateOrUpdateSample.js][contenttypecreateorupdatesample] | creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentType.json | +| [contentTypeDeleteSample.js][contenttypedeletesample] | removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentType.json | +| [contentTypeGetSample.js][contenttypegetsample] | gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentType.json | +| [contentTypeListByServiceSample.js][contenttypelistbyservicesample] | lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypes.json | +| [delegationSettingsCreateOrUpdateSample.js][delegationsettingscreateorupdatesample] | create or Update Delegation settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutDelegation.json | +| [delegationSettingsGetEntityTagSample.js][delegationsettingsgetentitytagsample] | gets the entity state (Etag) version of the DelegationSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDelegationSettings.json | +| [delegationSettingsGetSample.js][delegationsettingsgetsample] | get Delegation Settings for the Portal. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetDelegation.json | +| [delegationSettingsListSecretsSample.js][delegationsettingslistsecretssample] | gets the secret validation key of the DelegationSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json | +| [delegationSettingsUpdateSample.js][delegationsettingsupdatesample] | update Delegation settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateDelegation.json | +| [deletedServicesGetByNameSample.js][deletedservicesgetbynamesample] | get soft-deleted Api Management Service by name. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDeletedServiceByName.json | +| [deletedServicesListBySubscriptionSample.js][deletedserviceslistbysubscriptionsample] | lists all soft-deleted services available for undelete for the given subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesListBySubscription.json | +| [deletedServicesPurgeSample.js][deletedservicespurgesample] | purges Api Management Service (deletes it with no option to undelete). x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesPurge.json | +| [diagnosticCreateOrUpdateSample.js][diagnosticcreateorupdatesample] | creates a new Diagnostic or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDiagnostic.json | +| [diagnosticDeleteSample.js][diagnosticdeletesample] | deletes the specified Diagnostic. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDiagnostic.json | +| [diagnosticGetEntityTagSample.js][diagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDiagnostic.json | +| [diagnosticGetSample.js][diagnosticgetsample] | gets the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDiagnostic.json | +| [diagnosticListByServiceSample.js][diagnosticlistbyservicesample] | lists all diagnostics of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListDiagnostics.json | +| [diagnosticUpdateSample.js][diagnosticupdatesample] | updates the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDiagnostic.json | +| [documentationCreateOrUpdateSample.js][documentationcreateorupdatesample] | creates a new Documentation or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDocumentation.json | +| [documentationDeleteSample.js][documentationdeletesample] | deletes the specified Documentation from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDocumentation.json | +| [documentationGetEntityTagSample.js][documentationgetentitytagsample] | gets the entity state (Etag) version of the Documentation by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDocumentation.json | +| [documentationGetSample.js][documentationgetsample] | gets the details of the Documentation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDocumentation.json | +| [documentationListByServiceSample.js][documentationlistbyservicesample] | lists all Documentations of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListDocumentations.json | +| [documentationUpdateSample.js][documentationupdatesample] | updates the details of the Documentation for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDocumentation.json | +| [emailTemplateCreateOrUpdateSample.js][emailtemplatecreateorupdatesample] | updates an Email Template. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTemplate.json | +| [emailTemplateDeleteSample.js][emailtemplatedeletesample] | reset the Email Template to default template provided by the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTemplate.json | +| [emailTemplateGetEntityTagSample.js][emailtemplategetentitytagsample] | gets the entity state (Etag) version of the email template specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadEmailTemplate.json | +| [emailTemplateGetSample.js][emailtemplategetsample] | gets the details of the email template specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTemplate.json | +| [emailTemplateListByServiceSample.js][emailtemplatelistbyservicesample] | gets all email templates x-ms-original-file: 2025-09-01-preview/ApiManagementListTemplates.json | +| [emailTemplateUpdateSample.js][emailtemplateupdatesample] | updates API Management email template x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTemplate.json | +| [gatewayApiCreateOrUpdateSample.js][gatewayapicreateorupdatesample] | adds an API to the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayApi.json | +| [gatewayApiDeleteSample.js][gatewayapideletesample] | deletes the specified API from the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayApi.json | +| [gatewayApiGetEntityTagSample.js][gatewayapigetentitytagsample] | checks that API entity specified by identifier is associated with the Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayApi.json | +| [gatewayApiListByServiceSample.js][gatewayapilistbyservicesample] | lists a collection of the APIs associated with a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayApis.json | +| [gatewayCertificateAuthorityCreateOrUpdateSample.js][gatewaycertificateauthoritycreateorupdatesample] | assign Certificate entity to Gateway entity as Certificate Authority. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityDeleteSample.js][gatewaycertificateauthoritydeletesample] | remove relationship between Certificate Authority and Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityGetEntityTagSample.js][gatewaycertificateauthoritygetentitytagsample] | checks if Certificate entity is assigned to Gateway entity as Certificate Authority. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityGetSample.js][gatewaycertificateauthoritygetsample] | get assigned Gateway Certificate Authority details. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityListByServiceSample.js][gatewaycertificateauthoritylistbyservicesample] | lists the collection of Certificate Authorities for the specified Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayCertificateAuthorities.json | +| [gatewayCreateOrUpdateSample.js][gatewaycreateorupdatesample] | creates or updates a Gateway to be used in Api Management instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGateway.json | +| [gatewayDeleteSample.js][gatewaydeletesample] | deletes specific Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGateway.json | +| [gatewayGenerateTokenSample.js][gatewaygeneratetokensample] | gets the Shared Access Authorization Token for the gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGenerateToken.json | +| [gatewayGetEntityTagSample.js][gatewaygetentitytagsample] | gets the entity state (Etag) version of the Gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGateway.json | +| [gatewayGetSample.js][gatewaygetsample] | gets the details of the Gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGateway.json | +| [gatewayHostnameConfigurationCreateOrUpdateSample.js][gatewayhostnameconfigurationcreateorupdatesample] | creates of updates hostname configuration for a Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationDeleteSample.js][gatewayhostnameconfigurationdeletesample] | deletes the specified hostname configuration from the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationGetEntityTagSample.js][gatewayhostnameconfigurationgetentitytagsample] | checks that hostname configuration entity specified by identifier exists for specified Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationGetSample.js][gatewayhostnameconfigurationgetsample] | get details of a hostname configuration x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationListByServiceSample.js][gatewayhostnameconfigurationlistbyservicesample] | lists the collection of hostname configurations for the specified gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameConfigurations.json | +| [gatewayInvalidateDebugCredentialsSample.js][gatewayinvalidatedebugcredentialssample] | action is invalidating all debug credentials issued for gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json | +| [gatewayListByServiceSample.js][gatewaylistbyservicesample] | lists a collection of gateways registered with service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGateways.json | +| [gatewayListDebugCredentialsSample.js][gatewaylistdebugcredentialssample] | create new debug credentials for gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListDebugCredentials.json | +| [gatewayListKeysSample.js][gatewaylistkeyssample] | retrieves gateway keys. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListKeys.json | +| [gatewayListTraceSample.js][gatewaylisttracesample] | fetches trace collected by gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListTrace.json | +| [gatewayRegenerateKeySample.js][gatewayregeneratekeysample] | regenerates specified gateway key invalidating any tokens created with it. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayRegenerateKey.json | +| [gatewayUpdateSample.js][gatewayupdatesample] | updates the details of the gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGateway.json | +| [globalSchemaCreateOrUpdateSample.js][globalschemacreateorupdatesample] | creates new or updates existing specified Schema of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema1.json | +| [globalSchemaDeleteSample.js][globalschemadeletesample] | deletes specific Schema. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGlobalSchema.json | +| [globalSchemaGetEntityTagSample.js][globalschemagetentitytagsample] | gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGlobalSchema.json | +| [globalSchemaGetSample.js][globalschemagetsample] | gets the details of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema1.json | +| [globalSchemaListByServiceSample.js][globalschemalistbyservicesample] | lists a collection of schemas registered with service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGlobalSchemas.json | +| [graphQLApiResolverCreateOrUpdateSample.js][graphqlapiresolvercreateorupdatesample] | creates a new resolver in the GraphQL API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolver.json | +| [graphQLApiResolverDeleteSample.js][graphqlapiresolverdeletesample] | deletes the specified resolver in the GraphQL API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolver.json | +| [graphQLApiResolverGetEntityTagSample.js][graphqlapiresolvergetentitytagsample] | gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolver.json | +| [graphQLApiResolverGetSample.js][graphqlapiresolvergetsample] | gets the details of the GraphQL API Resolver specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolver.json | +| [graphQLApiResolverListByApiSample.js][graphqlapiresolverlistbyapisample] | lists a collection of the resolvers for the specified GraphQL API. x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolvers.json | +| [graphQLApiResolverPolicyCreateOrUpdateSample.js][graphqlapiresolverpolicycreateorupdatesample] | creates or updates policy configuration for the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyDeleteSample.js][graphqlapiresolverpolicydeletesample] | deletes the policy configuration at the GraphQL Api Resolver. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyGetEntityTagSample.js][graphqlapiresolverpolicygetentitytagsample] | gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyGetSample.js][graphqlapiresolverpolicygetsample] | get the policy configuration at the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyListByResolverSample.js][graphqlapiresolverpolicylistbyresolversample] | get the list of policy configuration at the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolverPolicies.json | +| [graphQLApiResolverUpdateSample.js][graphqlapiresolverupdatesample] | updates the details of the resolver in the GraphQL API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGraphQLApiResolver.json | +| [groupCreateOrUpdateSample.js][groupcreateorupdatesample] | creates or Updates a group. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroup.json | +| [groupDeleteSample.js][groupdeletesample] | deletes specific group of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroup.json | +| [groupGetEntityTagSample.js][groupgetentitytagsample] | gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroup.json | +| [groupGetSample.js][groupgetsample] | gets the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGroup.json | +| [groupListByServiceSample.js][grouplistbyservicesample] | lists a collection of groups defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGroups.json | +| [groupUpdateSample.js][groupupdatesample] | updates the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGroup.json | +| [groupUserCheckEntityExistsSample.js][groupusercheckentityexistssample] | checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroupUser.json | +| [groupUserCreateSample.js][groupusercreatesample] | add existing user to existing group x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupUser.json | +| [groupUserDeleteSample.js][groupuserdeletesample] | remove existing user from existing group. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroupUser.json | +| [groupUserListSample.js][groupuserlistsample] | lists a collection of user entities associated with the group. x-ms-original-file: 2025-09-01-preview/ApiManagementListGroupUsers.json | +| [identityProviderCreateOrUpdateSample.js][identityprovidercreateorupdatesample] | creates or Updates the IdentityProvider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateIdentityProvider.json | +| [identityProviderDeleteSample.js][identityproviderdeletesample] | deletes the specified identity provider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteIdentityProvider.json | +| [identityProviderGetEntityTagSample.js][identityprovidergetentitytagsample] | gets the entity state (Etag) version of the identityProvider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadIdentityProvider.json | +| [identityProviderGetSample.js][identityprovidergetsample] | gets the configuration details of the identity Provider configured in specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementGetIdentityProvider.json | +| [identityProviderListByServiceSample.js][identityproviderlistbyservicesample] | lists a collection of Identity Provider configured in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListIdentityProviders.json | +| [identityProviderListSecretsSample.js][identityproviderlistsecretssample] | gets the client secret details of the Identity Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementIdentityProviderListSecrets.json | +| [identityProviderUpdateSample.js][identityproviderupdatesample] | updates an existing IdentityProvider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateIdentityProvider.json | +| [issueGetSample.js][issuegetsample] | gets API Management issue details x-ms-original-file: 2025-09-01-preview/ApiManagementGetIssue.json | +| [issueListByServiceSample.js][issuelistbyservicesample] | lists a collection of issues in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListIssues.json | +| [loggerCreateOrUpdateSample.js][loggercreateorupdatesample] | creates or Updates a logger. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAILogger.json | +| [loggerDeleteSample.js][loggerdeletesample] | deletes the specified logger. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteLogger.json | +| [loggerGetEntityTagSample.js][loggergetentitytagsample] | gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadLogger.json | +| [loggerGetSample.js][loggergetsample] | gets the details of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetLogger.json | +| [loggerListByServiceSample.js][loggerlistbyservicesample] | lists a collection of loggers in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListLoggers.json | +| [loggerUpdateSample.js][loggerupdatesample] | updates an existing logger. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateLogger.json | +| [namedValueCreateOrUpdateSample.js][namedvaluecreateorupdatesample] | creates or updates named value. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValue.json | +| [namedValueDeleteSample.js][namedvaluedeletesample] | deletes specific named value from the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNamedValue.json | +| [namedValueGetEntityTagSample.js][namedvaluegetentitytagsample] | gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNamedValue.json | +| [namedValueGetSample.js][namedvaluegetsample] | gets the details of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValue.json | +| [namedValueListByServiceSample.js][namedvaluelistbyservicesample] | lists a collection of named values defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListNamedValues.json | +| [namedValueListValueSample.js][namedvaluelistvaluesample] | gets the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementNamedValueListValue.json | +| [namedValueRefreshSecretSample.js][namedvaluerefreshsecretsample] | refresh the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshNamedValue.json | +| [namedValueUpdateSample.js][namedvalueupdatesample] | updates the specific named value. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateNamedValue.json | +| [networkStatusListByLocationSample.js][networkstatuslistbylocationsample] | gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json | +| [networkStatusListByServiceSample.js][networkstatuslistbyservicesample] | gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatus.json | +| [notificationCreateOrUpdateSample.js][notificationcreateorupdatesample] | create or Update API Management publisher notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotification.json | +| [notificationGetSample.js][notificationgetsample] | gets the details of the Notification specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetNotification.json | +| [notificationListByServiceSample.js][notificationlistbyservicesample] | lists a collection of properties defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotifications.json | +| [notificationRecipientEmailCheckEntityExistsSample.js][notificationrecipientemailcheckentityexistssample] | determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientEmail.json | +| [notificationRecipientEmailCreateOrUpdateSample.js][notificationrecipientemailcreateorupdatesample] | adds the Email address to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientEmail.json | +| [notificationRecipientEmailDeleteSample.js][notificationrecipientemaildeletesample] | removes the email from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientEmail.json | +| [notificationRecipientEmailListByNotificationSample.js][notificationrecipientemaillistbynotificationsample] | gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientEmails.json | +| [notificationRecipientUserCheckEntityExistsSample.js][notificationrecipientusercheckentityexistssample] | determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientUser.json | +| [notificationRecipientUserCreateOrUpdateSample.js][notificationrecipientusercreateorupdatesample] | adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientUser.json | +| [notificationRecipientUserDeleteSample.js][notificationrecipientuserdeletesample] | removes the API Management user from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientUser.json | +| [notificationRecipientUserListByNotificationSample.js][notificationrecipientuserlistbynotificationsample] | gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientUsers.json | +| [openIdConnectProviderCreateOrUpdateSample.js][openidconnectprovidercreateorupdatesample] | creates or updates the OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateOpenIdConnectProvider.json | +| [openIdConnectProviderDeleteSample.js][openidconnectproviderdeletesample] | deletes specific OpenID Connect Provider of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteOpenIdConnectProvider.json | +| [openIdConnectProviderGetEntityTagSample.js][openidconnectprovidergetentitytagsample] | gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadOpenIdConnectProvider.json | +| [openIdConnectProviderGetSample.js][openidconnectprovidergetsample] | gets specific OpenID Connect Provider without secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOpenIdConnectProvider.json | +| [openIdConnectProviderListByServiceSample.js][openidconnectproviderlistbyservicesample] | lists of all the OpenId Connect Providers. x-ms-original-file: 2025-09-01-preview/ApiManagementListOpenIdConnectProviders.json | +| [openIdConnectProviderListSecretsSample.js][openidconnectproviderlistsecretssample] | gets the client secret details of the OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementOpenidConnectProviderListSecrets.json | +| [openIdConnectProviderUpdateSample.js][openidconnectproviderupdatesample] | updates the specific OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateOpenIdConnectProvider.json | +| [operationListByTagsSample.js][operationlistbytagssample] | lists a collection of operations associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationsByTags.json | +| [operationStatusGetSample.js][operationstatusgetsample] | returns the current status of an async operation. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationStatus.json | +| [operationsResultsGetSample.js][operationsresultsgetsample] | returns operation results for long running operations executing DELETE or PATCH on the resource. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationResult.json | +| [outboundNetworkDependenciesEndpointsListByServiceSample.js][outboundnetworkdependenciesendpointslistbyservicesample] | gets the network endpoints of all outbound dependencies of a ApiManagement service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json | +| [policyCreateOrUpdateSample.js][policycreateorupdatesample] | creates or updates the global policy configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicy.json | +| [policyDeleteSample.js][policydeletesample] | deletes the global policy configuration of the Api Management Service. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicy.json | +| [policyDescriptionListByServiceSample.js][policydescriptionlistbyservicesample] | lists all policy descriptions. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyDescriptions.json | +| [policyFragmentCreateOrUpdateSample.js][policyfragmentcreateorupdatesample] | creates or updates a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyFragment.json | +| [policyFragmentDeleteSample.js][policyfragmentdeletesample] | deletes a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyFragment.json | +| [policyFragmentGetEntityTagSample.js][policyfragmentgetentitytagsample] | gets the entity state (Etag) version of a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyFragment.json | +| [policyFragmentGetSample.js][policyfragmentgetsample] | gets a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragment.json | +| [policyFragmentListByServiceSample.js][policyfragmentlistbyservicesample] | gets all policy fragments. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragments.json | +| [policyFragmentListReferencesSample.js][policyfragmentlistreferencessample] | lists policy resources that reference the policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragmentReferences.json | +| [policyGetEntityTagSample.js][policygetentitytagsample] | gets the entity state (Etag) version of the Global policy definition in the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicy.json | +| [policyGetSample.js][policygetsample] | get the Global policy definition of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicy.json | +| [policyListByServiceSample.js][policylistbyservicesample] | lists all the Global Policy definitions of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicies.json | +| [policyRestrictionCreateOrUpdateSample.js][policyrestrictioncreateorupdatesample] | creates or updates the policy restriction configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyRestriction.json | +| [policyRestrictionDeleteSample.js][policyrestrictiondeletesample] | deletes the policy restriction configuration of the Api Management Service. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyRestriction.json | +| [policyRestrictionGetEntityTagSample.js][policyrestrictiongetentitytagsample] | gets the entity state (Etag) version of the policy restriction in the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyRestriction.json | +| [policyRestrictionGetSample.js][policyrestrictiongetsample] | get the policy restriction of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyRestriction.json | +| [policyRestrictionListByServiceSample.js][policyrestrictionlistbyservicesample] | gets all policy restrictions of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyRestrictions.json | +| [policyRestrictionUpdateSample.js][policyrestrictionupdatesample] | updates the policy restriction configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePolicyRestriction.json | +| [policyRestrictionValidationsByServiceSample.js][policyrestrictionvalidationsbyservicesample] | validate all policies of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementValidatePolicies.json | +| [portalConfigCreateOrUpdateSample.js][portalconfigcreateorupdatesample] | create or update the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalConfig.json | +| [portalConfigGetEntityTagSample.js][portalconfiggetentitytagsample] | gets the entity state (Etag) version of the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalConfig.json | +| [portalConfigGetSample.js][portalconfiggetsample] | get the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalConfig.json | +| [portalConfigListByServiceSample.js][portalconfiglistbyservicesample] | lists the developer portal configurations. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalConfig.json | +| [portalConfigUpdateSample.js][portalconfigupdatesample] | update the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalConfig.json | +| [portalRevisionCreateOrUpdateSample.js][portalrevisioncreateorupdatesample] | creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalRevision.json | +| [portalRevisionGetEntityTagSample.js][portalrevisiongetentitytagsample] | gets the developer portal revision specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalRevision.json | +| [portalRevisionGetSample.js][portalrevisiongetsample] | gets the developer portal's revision specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPortalRevision.json | +| [portalRevisionListByServiceSample.js][portalrevisionlistbyservicesample] | lists developer portal's revisions. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalRevisions.json | +| [portalRevisionUpdateSample.js][portalrevisionupdatesample] | updates the description of specified portal revision or makes it current. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalRevision.json | +| [portalSettingsListByServiceSample.js][portalsettingslistbyservicesample] | lists a collection of portalsettings defined within a service instance.. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalSettings.json | +| [privateEndpointConnectionCreateOrUpdateSample.js][privateendpointconnectioncreateorupdatesample] | creates a new Private Endpoint Connection or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json | +| [privateEndpointConnectionDeleteSample.js][privateendpointconnectiondeletesample] | deletes the specified Private Endpoint Connection. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionGetByNameSample.js][privateendpointconnectiongetbynamesample] | gets the details of the Private Endpoint Connection specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateEndpointConnection.json | +| [privateEndpointConnectionGetPrivateLinkResourceSample.js][privateendpointconnectiongetprivatelinkresourcesample] | gets the private link resources x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateLinkGroupResource.json | +| [privateEndpointConnectionListByServiceSample.js][privateendpointconnectionlistbyservicesample] | lists all private endpoint connections of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateEndpointConnections.json | +| [privateEndpointConnectionListPrivateLinkResourcesSample.js][privateendpointconnectionlistprivatelinkresourcessample] | gets the private link resources x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateLinkGroupResources.json | +| [productApiCheckEntityExistsSample.js][productapicheckentityexistssample] | checks that API entity specified by identifier is associated with the Product entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductApi.json | +| [productApiCreateOrUpdateSample.js][productapicreateorupdatesample] | adds an API to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApi.json | +| [productApiDeleteSample.js][productapideletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApi.json | +| [productApiLinkCreateOrUpdateSample.js][productapilinkcreateorupdatesample] | adds an API to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApiLink.json | +| [productApiLinkDeleteSample.js][productapilinkdeletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApiLink.json | +| [productApiLinkGetSample.js][productapilinkgetsample] | gets the API link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductApiLink.json | +| [productApiLinkListByProductSample.js][productapilinklistbyproductsample] | lists a collection of the API links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApiLinks.json | +| [productApiListByProductSample.js][productapilistbyproductsample] | lists a collection of the APIs associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApis.json | +| [productCreateOrUpdateSample.js][productcreateorupdatesample] | creates or Updates a product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProduct.json | +| [productDeleteSample.js][productdeletesample] | delete product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProduct.json | +| [productGetEntityTagSample.js][productgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProduct.json | +| [productGetSample.js][productgetsample] | gets the details of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProduct.json | +| [productGroupCheckEntityExistsSample.js][productgroupcheckentityexistssample] | checks that Group entity specified by identifier is associated with the Product entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductGroup.json | +| [productGroupCreateOrUpdateSample.js][productgroupcreateorupdatesample] | adds the association between the specified developer group with the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroup.json | +| [productGroupDeleteSample.js][productgroupdeletesample] | deletes the association between the specified group and product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroup.json | +| [productGroupLinkCreateOrUpdateSample.js][productgrouplinkcreateorupdatesample] | adds a group to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroupLink.json | +| [productGroupLinkDeleteSample.js][productgrouplinkdeletesample] | deletes the specified group from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroupLink.json | +| [productGroupLinkGetSample.js][productgrouplinkgetsample] | gets the group link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductGroupLink.json | +| [productGroupLinkListByProductSample.js][productgrouplinklistbyproductsample] | lists a collection of the group links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroupLinks.json | +| [productGroupListByProductSample.js][productgrouplistbyproductsample] | lists the collection of developer groups associated with the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroups.json | +| [productListByServiceSample.js][productlistbyservicesample] | lists a collection of products in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListProducts.json | +| [productListByTagsSample.js][productlistbytagssample] | lists a collection of products associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductsByTags.json | +| [productPolicyCreateOrUpdateSample.js][productpolicycreateorupdatesample] | creates or updates policy configuration for the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductPolicy.json | +| [productPolicyDeleteSample.js][productpolicydeletesample] | deletes the policy configuration at the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductPolicy.json | +| [productPolicyGetEntityTagSample.js][productpolicygetentitytagsample] | get the ETag of the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductPolicy.json | +| [productPolicyGetSample.js][productpolicygetsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductPolicy.json | +| [productPolicyListByProductSample.js][productpolicylistbyproductsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductPolicies.json | +| [productSubscriptionsListSample.js][productsubscriptionslistsample] | lists the collection of subscriptions to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductSubscriptions.json | +| [productUpdateSample.js][productupdatesample] | update existing product details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProduct.json | +| [productWikiCreateOrUpdateSample.js][productwikicreateorupdatesample] | creates a new Wiki for a Product or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductWiki.json | +| [productWikiDeleteSample.js][productwikideletesample] | deletes the specified Wiki from a Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductWiki.json | +| [productWikiGetEntityTagSample.js][productwikigetentitytagsample] | gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductWiki.json | +| [productWikiGetSample.js][productwikigetsample] | gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductWiki.json | +| [productWikiUpdateSample.js][productwikiupdatesample] | updates the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProductWiki.json | +| [productWikisListSample.js][productwikislistsample] | gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductWikis.json | +| [quotaByCounterKeysListByServiceSample.js][quotabycounterkeyslistbyservicesample] | lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeys.json | +| [quotaByCounterKeysUpdateSample.js][quotabycounterkeysupdatesample] | updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKey.json | +| [quotaByPeriodKeysGetSample.js][quotabyperiodkeysgetsample] | gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json | +| [quotaByPeriodKeysUpdateSample.js][quotabyperiodkeysupdatesample] | updates an existing quota counter value in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json | +| [regionListByServiceSample.js][regionlistbyservicesample] | lists all azure regions in which the service exists. x-ms-original-file: 2025-09-01-preview/ApiManagementListRegions.json | +| [reportsListByApiSample.js][reportslistbyapisample] | lists report records by API. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByApi.json | +| [reportsListByGeoSample.js][reportslistbygeosample] | lists report records by geography. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByGeo.json | +| [reportsListByOperationSample.js][reportslistbyoperationsample] | lists report records by API Operations. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByOperation.json | +| [reportsListByProductSample.js][reportslistbyproductsample] | lists report records by Product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByProduct.json | +| [reportsListByRequestSample.js][reportslistbyrequestsample] | lists report records by Request. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByRequest.json | +| [reportsListBySubscriptionSample.js][reportslistbysubscriptionsample] | lists report records by subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsBySubscription.json | +| [reportsListByTimeSample.js][reportslistbytimesample] | lists report records by Time. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByTime.json | +| [reportsListByUserSample.js][reportslistbyusersample] | lists report records by User. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByUser.json | +| [signInSettingsCreateOrUpdateSample.js][signinsettingscreateorupdatesample] | create or Update Sign-In settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignIn.json | +| [signInSettingsGetEntityTagSample.js][signinsettingsgetentitytagsample] | gets the entity state (Etag) version of the SignInSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignInSettings.json | +| [signInSettingsGetSample.js][signinsettingsgetsample] | get Sign In Settings for the Portal x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignIn.json | +| [signInSettingsUpdateSample.js][signinsettingsupdatesample] | update Sign-In settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignIn.json | +| [signUpSettingsCreateOrUpdateSample.js][signupsettingscreateorupdatesample] | create or Update Sign-Up settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignUp.json | +| [signUpSettingsGetEntityTagSample.js][signupsettingsgetentitytagsample] | gets the entity state (Etag) version of the SignUpSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignUpSettings.json | +| [signUpSettingsGetSample.js][signupsettingsgetsample] | get Sign Up Settings for the Portal x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignUp.json | +| [signUpSettingsUpdateSample.js][signupsettingsupdatesample] | update Sign-Up settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignUp.json | +| [subscriptionCreateOrUpdateSample.js][subscriptioncreateorupdatesample] | creates or updates the subscription of specified user to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSubscription.json | +| [subscriptionDeleteSample.js][subscriptiondeletesample] | deletes the specified subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteSubscription.json | +| [subscriptionGetEntityTagSample.js][subscriptiongetentitytagsample] | gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSubscription.json | +| [subscriptionGetSample.js][subscriptiongetsample] | gets the specified Subscription entity. x-ms-original-file: 2025-09-01-preview/ApiManagementGetSubscription.json | +| [subscriptionListSample.js][subscriptionlistsample] | lists all subscriptions of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListSubscriptions.json | +| [subscriptionListSecretsSample.js][subscriptionlistsecretssample] | gets the specified Subscription keys. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionListSecrets.json | +| [subscriptionRegeneratePrimaryKeySample.js][subscriptionregenerateprimarykeysample] | regenerates primary key of existing subscription of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json | +| [subscriptionRegenerateSecondaryKeySample.js][subscriptionregeneratesecondarykeysample] | regenerates secondary key of existing subscription of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json | +| [subscriptionUpdateSample.js][subscriptionupdatesample] | updates the details of a subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateSubscription.json | +| [tagApiLinkCreateOrUpdateSample.js][tagapilinkcreateorupdatesample] | adds an API to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagApiLink.json | +| [tagApiLinkDeleteSample.js][tagapilinkdeletesample] | deletes the specified API from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagApiLink.json | +| [tagApiLinkGetSample.js][tagapilinkgetsample] | gets the API link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagApiLink.json | +| [tagApiLinkListByProductSample.js][tagapilinklistbyproductsample] | lists a collection of the API links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagApiLinks.json | +| [tagAssignToApiSample.js][tagassigntoapisample] | assign tag to the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTag.json | +| [tagAssignToOperationSample.js][tagassigntooperationsample] | assign tag to the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationTag.json | +| [tagAssignToProductSample.js][tagassigntoproductsample] | assign tag to the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductTag.json | +| [tagCreateOrUpdateSample.js][tagcreateorupdatesample] | creates a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTag.json | +| [tagDeleteSample.js][tagdeletesample] | deletes specific tag of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTag.json | +| [tagDetachFromApiSample.js][tagdetachfromapisample] | detach the tag from the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTag.json | +| [tagDetachFromOperationSample.js][tagdetachfromoperationsample] | detach the tag from the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationTag.json | +| [tagDetachFromProductSample.js][tagdetachfromproductsample] | detach the tag from the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductTag.json | +| [tagGetByApiSample.js][taggetbyapisample] | get tag associated with the API. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTag.json | +| [tagGetByOperationSample.js][taggetbyoperationsample] | get tag associated with the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationTag.json | +| [tagGetByProductSample.js][taggetbyproductsample] | get tag associated with the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductTag.json | +| [tagGetEntityStateByApiSample.js][taggetentitystatebyapisample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTag.json | +| [tagGetEntityStateByOperationSample.js][taggetentitystatebyoperationsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationTag.json | +| [tagGetEntityStateByProductSample.js][taggetentitystatebyproductsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductTag.json | +| [tagGetEntityStateSample.js][taggetentitystatesample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTag.json | +| [tagGetSample.js][taggetsample] | gets the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTag.json | +| [tagListByApiSample.js][taglistbyapisample] | lists all Tags associated with the API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTags.json | +| [tagListByOperationSample.js][taglistbyoperationsample] | lists all Tags associated with the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationTags.json | +| [tagListByProductSample.js][taglistbyproductsample] | lists all Tags associated with the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductTags.json | +| [tagListByServiceSample.js][taglistbyservicesample] | lists a collection of tags defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListTags.json | +| [tagOperationLinkCreateOrUpdateSample.js][tagoperationlinkcreateorupdatesample] | adds an operation to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagOperationLink.json | +| [tagOperationLinkDeleteSample.js][tagoperationlinkdeletesample] | deletes the specified operation from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagOperationLink.json | +| [tagOperationLinkGetSample.js][tagoperationlinkgetsample] | gets the operation link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagOperationLink.json | +| [tagOperationLinkListByProductSample.js][tagoperationlinklistbyproductsample] | lists a collection of the operation links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagOperationLinks.json | +| [tagProductLinkCreateOrUpdateSample.js][tagproductlinkcreateorupdatesample] | adds a product to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagProductLink.json | +| [tagProductLinkDeleteSample.js][tagproductlinkdeletesample] | deletes the specified product from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagProductLink.json | +| [tagProductLinkGetSample.js][tagproductlinkgetsample] | gets the product link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagProductLink.json | +| [tagProductLinkListByProductSample.js][tagproductlinklistbyproductsample] | lists a collection of the product links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagProductLinks.json | +| [tagResourceListByServiceSample.js][tagresourcelistbyservicesample] | lists a collection of resources associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagResources.json | +| [tagUpdateSample.js][tagupdatesample] | updates the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTag.json | +| [tenantAccessCreateSample.js][tenantaccesscreatesample] | update tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTenantAccess.json | +| [tenantAccessGetEntityTagSample.js][tenantaccessgetentitytagsample] | tenant access metadata x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTenantAccess.json | +| [tenantAccessGetSample.js][tenantaccessgetsample] | get tenant access information details without secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantAccess.json | +| [tenantAccessGitRegeneratePrimaryKeySample.js][tenantaccessgitregenerateprimarykeysample] | regenerate primary access key for GIT. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json | +| [tenantAccessGitRegenerateSecondaryKeySample.js][tenantaccessgitregeneratesecondarykeysample] | regenerate secondary access key for GIT. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateKey.json | +| [tenantAccessListByServiceSample.js][tenantaccesslistbyservicesample] | returns list of access infos - for Git and Management endpoints. x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantAccess.json | +| [tenantAccessListSecretsSample.js][tenantaccesslistsecretssample] | get tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsTenantAccess.json | +| [tenantAccessRegeneratePrimaryKeySample.js][tenantaccessregenerateprimarykeysample] | regenerate primary access key x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json | +| [tenantAccessRegenerateSecondaryKeySample.js][tenantaccessregeneratesecondarykeysample] | regenerate secondary access key x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json | +| [tenantAccessUpdateSample.js][tenantaccessupdatesample] | update tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTenantAccess.json | +| [tenantConfigurationDeploySample.js][tenantconfigurationdeploysample] | this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationDeploy.json | +| [tenantConfigurationGetSyncStateSample.js][tenantconfigurationgetsyncstatesample] | gets the status of the most recent synchronization between the configuration database and the Git repository. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessSyncState.json | +| [tenantConfigurationSaveSample.js][tenantconfigurationsavesample] | this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationSave.json | +| [tenantConfigurationValidateSample.js][tenantconfigurationvalidatesample] | this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationValidate.json | +| [tenantSettingsGetSample.js][tenantsettingsgetsample] | get tenant settings. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantSettings.json | +| [tenantSettingsListByServiceSample.js][tenantsettingslistbyservicesample] | public settings. x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantSettings.json | +| [userConfirmationPasswordSendSample.js][userconfirmationpasswordsendsample] | sends confirmation x-ms-original-file: 2025-09-01-preview/ApiManagementUserConfirmationPasswordSend.json | +| [userCreateOrUpdateSample.js][usercreateorupdatesample] | creates or Updates a user. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateUser.json | +| [userDeleteSample.js][userdeletesample] | deletes specific user. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteUser.json | +| [userGenerateSsoUrlSample.js][usergeneratessourlsample] | retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. x-ms-original-file: 2025-09-01-preview/ApiManagementUserGenerateSsoUrl.json | +| [userGetEntityTagSample.js][usergetentitytagsample] | gets the entity state (Etag) version of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadUser.json | +| [userGetSample.js][usergetsample] | gets the details of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetUser.json | +| [userGetSharedAccessTokenSample.js][usergetsharedaccesstokensample] | gets the Shared Access Authorization Token for the User. x-ms-original-file: 2025-09-01-preview/ApiManagementUserToken.json | +| [userGroupListSample.js][usergrouplistsample] | lists all user groups. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserGroups.json | +| [userIdentitiesListSample.js][useridentitieslistsample] | list of all user identities. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserIdentities.json | +| [userListByServiceSample.js][userlistbyservicesample] | lists a collection of registered users in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListUsers.json | +| [userSubscriptionGetSample.js][usersubscriptiongetsample] | gets the specified Subscription entity associated with a particular user. x-ms-original-file: 2025-09-01-preview/ApiManagementGetUserSubscription.json | +| [userSubscriptionListSample.js][usersubscriptionlistsample] | lists the collection of subscriptions of the specified user. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserSubscriptions.json | +| [userUpdateSample.js][userupdatesample] | updates the details of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateUser.json | +| [workspaceApiCreateOrUpdateSample.js][workspaceapicreateorupdatesample] | creates new or updates existing specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApi.json | +| [workspaceApiDeleteSample.js][workspaceapideletesample] | deletes the specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApi.json | +| [workspaceApiDiagnosticCreateOrUpdateSample.js][workspaceapidiagnosticcreateorupdatesample] | creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticDeleteSample.js][workspaceapidiagnosticdeletesample] | deletes the specified Diagnostic from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticGetEntityTagSample.js][workspaceapidiagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticGetSample.js][workspaceapidiagnosticgetsample] | gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticListByWorkspaceSample.js][workspaceapidiagnosticlistbyworkspacesample] | lists all diagnostics of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiDiagnostics.json | +| [workspaceApiDiagnosticUpdateSample.js][workspaceapidiagnosticupdatesample] | updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json | +| [workspaceApiExportGetSample.js][workspaceapiexportgetsample] | gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json | +| [workspaceApiGetEntityTagSample.js][workspaceapigetentitytagsample] | gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApi.json | +| [workspaceApiGetSample.js][workspaceapigetsample] | gets the details of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiContract.json | +| [workspaceApiListByServiceSample.js][workspaceapilistbyservicesample] | lists all APIs of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApis.json | +| [workspaceApiOperationCreateOrUpdateSample.js][workspaceapioperationcreateorupdatesample] | creates a new operation in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperation.json | +| [workspaceApiOperationDeleteSample.js][workspaceapioperationdeletesample] | deletes the specified operation in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperation.json | +| [workspaceApiOperationGetEntityTagSample.js][workspaceapioperationgetentitytagsample] | gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperation.json | +| [workspaceApiOperationGetSample.js][workspaceapioperationgetsample] | gets the details of the API Operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperation.json | +| [workspaceApiOperationListByApiSample.js][workspaceapioperationlistbyapisample] | lists a collection of the operations for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperations.json | +| [workspaceApiOperationPolicyCreateOrUpdateSample.js][workspaceapioperationpolicycreateorupdatesample] | creates or updates policy configuration for the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyDeleteSample.js][workspaceapioperationpolicydeletesample] | deletes the policy configuration at the Api Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyGetEntityTagSample.js][workspaceapioperationpolicygetentitytagsample] | gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyGetSample.js][workspaceapioperationpolicygetsample] | get the policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyListByOperationSample.js][workspaceapioperationpolicylistbyoperationsample] | get the list of policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json | +| [workspaceApiOperationUpdateSample.js][workspaceapioperationupdatesample] | updates the details of the operation in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiOperation.json | +| [workspaceApiPolicyCreateOrUpdateSample.js][workspaceapipolicycreateorupdatesample] | creates or updates policy configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiPolicy.json | +| [workspaceApiPolicyDeleteSample.js][workspaceapipolicydeletesample] | deletes the policy configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json | +| [workspaceApiPolicyGetEntityTagSample.js][workspaceapipolicygetentitytagsample] | gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiPolicy.json | +| [workspaceApiPolicyGetSample.js][workspaceapipolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiPolicy.json | +| [workspaceApiPolicyListByApiSample.js][workspaceapipolicylistbyapisample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiPolicies.json | +| [workspaceApiReleaseCreateOrUpdateSample.js][workspaceapireleasecreateorupdatesample] | creates a new Release for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiRelease.json | +| [workspaceApiReleaseDeleteSample.js][workspaceapireleasedeletesample] | deletes the specified release in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiRelease.json | +| [workspaceApiReleaseGetEntityTagSample.js][workspaceapireleasegetentitytagsample] | returns the etag of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiRelease.json | +| [workspaceApiReleaseGetSample.js][workspaceapireleasegetsample] | returns the details of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRelease.json | +| [workspaceApiReleaseListByServiceSample.js][workspaceapireleaselistbyservicesample] | lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiReleases.json | +| [workspaceApiReleaseUpdateSample.js][workspaceapireleaseupdatesample] | updates the details of the release of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiRelease.json | +| [workspaceApiRevisionListByServiceSample.js][workspaceapirevisionlistbyservicesample] | lists all revisions of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiRevisions.json | +| [workspaceApiSchemaCreateOrUpdateSample.js][workspaceapischemacreateorupdatesample] | creates or updates schema configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiSchema.json | +| [workspaceApiSchemaDeleteSample.js][workspaceapischemadeletesample] | deletes the schema configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiSchema.json | +| [workspaceApiSchemaGetEntityTagSample.js][workspaceapischemagetentitytagsample] | gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiSchema.json | +| [workspaceApiSchemaGetSample.js][workspaceapischemagetsample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiSchema.json | +| [workspaceApiSchemaListByApiSample.js][workspaceapischemalistbyapisample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiSchemas.json | +| [workspaceApiUpdateSample.js][workspaceapiupdatesample] | updates the specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApi.json | +| [workspaceApiVersionSetCreateOrUpdateSample.js][workspaceapiversionsetcreateorupdatesample] | creates or Updates a Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetDeleteSample.js][workspaceapiversionsetdeletesample] | deletes specific Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetGetEntityTagSample.js][workspaceapiversionsetgetentitytagsample] | gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetGetSample.js][workspaceapiversionsetgetsample] | gets the details of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetListByServiceSample.js][workspaceapiversionsetlistbyservicesample] | lists a collection of API Version Sets in the specified workspace with a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiVersionSets.json | +| [workspaceApiVersionSetUpdateSample.js][workspaceapiversionsetupdatesample] | updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json | +| [workspaceBackendCreateOrUpdateSample.js][workspacebackendcreateorupdatesample] | creates or Updates a backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json | +| [workspaceBackendDeleteSample.js][workspacebackenddeletesample] | deletes the specified backend. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceBackend.json | +| [workspaceBackendGetEntityTagSample.js][workspacebackendgetentitytagsample] | gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceBackend.json | +| [workspaceBackendGetSample.js][workspacebackendgetsample] | gets the details of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceBackend.json | +| [workspaceBackendListByWorkspaceSample.js][workspacebackendlistbyworkspacesample] | lists a collection of backends in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceBackends.json | +| [workspaceBackendUpdateSample.js][workspacebackendupdatesample] | updates an existing backend. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceBackend.json | +| [workspaceCertificateCreateOrUpdateSample.js][workspacecertificatecreateorupdatesample] | creates or updates the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificate.json | +| [workspaceCertificateDeleteSample.js][workspacecertificatedeletesample] | deletes specific certificate. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceCertificate.json | +| [workspaceCertificateGetEntityTagSample.js][workspacecertificategetentitytagsample] | gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceCertificate.json | +| [workspaceCertificateGetSample.js][workspacecertificategetsample] | gets the details of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificate.json | +| [workspaceCertificateListByWorkspaceSample.js][workspacecertificatelistbyworkspacesample] | lists a collection of all certificates in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceCertificates.json | +| [workspaceCertificateRefreshSecretSample.js][workspacecertificaterefreshsecretsample] | from KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceCertificate.json | +| [workspaceCreateOrUpdateSample.js][workspacecreateorupdatesample] | creates a new workspace or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspace.json | +| [workspaceDeleteSample.js][workspacedeletesample] | deletes the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspace.json | +| [workspaceDiagnosticCreateOrUpdateSample.js][workspacediagnosticcreateorupdatesample] | creates a new Diagnostic or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceDiagnostic.json | +| [workspaceDiagnosticDeleteSample.js][workspacediagnosticdeletesample] | deletes the specified Diagnostic. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json | +| [workspaceDiagnosticGetEntityTagSample.js][workspacediagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceDiagnostic.json | +| [workspaceDiagnosticGetSample.js][workspacediagnosticgetsample] | gets the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceDiagnostic.json | +| [workspaceDiagnosticListByWorkspaceSample.js][workspacediagnosticlistbyworkspacesample] | lists all diagnostics in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceDiagnostics.json | +| [workspaceDiagnosticUpdateSample.js][workspacediagnosticupdatesample] | updates the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json | +| [workspaceGetEntityTagSample.js][workspacegetentitytagsample] | gets the entity state (Etag) version of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspace.json | +| [workspaceGetSample.js][workspacegetsample] | gets the details of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspace.json | +| [workspaceGlobalSchemaCreateOrUpdateSample.js][workspaceglobalschemacreateorupdatesample] | creates new or updates existing specified Schema of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSchema.json | +| [workspaceGlobalSchemaDeleteSample.js][workspaceglobalschemadeletesample] | deletes specific Schema. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSchema.json | +| [workspaceGlobalSchemaGetEntityTagSample.js][workspaceglobalschemagetentitytagsample] | gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSchema.json | +| [workspaceGlobalSchemaGetSample.js][workspaceglobalschemagetsample] | gets the details of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSchema.json | +| [workspaceGlobalSchemaListByServiceSample.js][workspaceglobalschemalistbyservicesample] | lists a collection of schemas registered with workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSchemas.json | +| [workspaceGroupCreateOrUpdateSample.js][workspacegroupcreateorupdatesample] | creates or Updates a group. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroup.json | +| [workspaceGroupDeleteSample.js][workspacegroupdeletesample] | deletes specific group of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroup.json | +| [workspaceGroupGetEntityTagSample.js][workspacegroupgetentitytagsample] | gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroup.json | +| [workspaceGroupGetSample.js][workspacegroupgetsample] | gets the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceGroup.json | +| [workspaceGroupListByServiceSample.js][workspacegrouplistbyservicesample] | lists a collection of groups defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroups.json | +| [workspaceGroupUpdateSample.js][workspacegroupupdatesample] | updates the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceGroup.json | +| [workspaceGroupUserCheckEntityExistsSample.js][workspacegroupusercheckentityexistssample] | checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroupUser.json | +| [workspaceGroupUserCreateSample.js][workspacegroupusercreatesample] | add existing user to existing group x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupUser.json | +| [workspaceGroupUserDeleteSample.js][workspacegroupuserdeletesample] | remove existing user from existing group. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroupUser.json | +| [workspaceGroupUserListSample.js][workspacegroupuserlistsample] | lists a collection of user entities associated with the group. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroupUsers.json | +| [workspaceListByServiceSample.js][workspacelistbyservicesample] | lists all workspaces of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaces.json | +| [workspaceLoggerCreateOrUpdateSample.js][workspaceloggercreateorupdatesample] | creates or Updates a logger. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceAILogger.json | +| [workspaceLoggerDeleteSample.js][workspaceloggerdeletesample] | deletes the specified logger. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceLogger.json | +| [workspaceLoggerGetEntityTagSample.js][workspaceloggergetentitytagsample] | gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceLogger.json | +| [workspaceLoggerGetSample.js][workspaceloggergetsample] | gets the details of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLogger.json | +| [workspaceLoggerListByWorkspaceSample.js][workspaceloggerlistbyworkspacesample] | lists a collection of loggers in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLoggers.json | +| [workspaceLoggerUpdateSample.js][workspaceloggerupdatesample] | updates an existing logger. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceLogger.json | +| [workspaceNamedValueCreateOrUpdateSample.js][workspacenamedvaluecreateorupdatesample] | creates or updates named value. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValue.json | +| [workspaceNamedValueDeleteSample.js][workspacenamedvaluedeletesample] | deletes specific named value from the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNamedValue.json | +| [workspaceNamedValueGetEntityTagSample.js][workspacenamedvaluegetentitytagsample] | gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNamedValue.json | +| [workspaceNamedValueGetSample.js][workspacenamedvaluegetsample] | gets the details of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValue.json | +| [workspaceNamedValueListByServiceSample.js][workspacenamedvaluelistbyservicesample] | lists a collection of named values defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNamedValues.json | +| [workspaceNamedValueListValueSample.js][workspacenamedvaluelistvaluesample] | gets the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceNamedValueListValue.json | +| [workspaceNamedValueRefreshSecretSample.js][workspacenamedvaluerefreshsecretsample] | refresh the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceNamedValue.json | +| [workspaceNamedValueUpdateSample.js][workspacenamedvalueupdatesample] | updates the specific named value. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceNamedValue.json | +| [workspaceNotificationCreateOrUpdateSample.js][workspacenotificationcreateorupdatesample] | create or Update API Management publisher notification for the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotification.json | +| [workspaceNotificationGetSample.js][workspacenotificationgetsample] | gets the details of the Notification specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNotification.json | +| [workspaceNotificationListByServiceSample.js][workspacenotificationlistbyservicesample] | lists a collection of properties defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotifications.json | +| [workspaceNotificationRecipientEmailCheckEntityExistsSample.js][workspacenotificationrecipientemailcheckentityexistssample] | determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailCreateOrUpdateSample.js][workspacenotificationrecipientemailcreateorupdatesample] | adds the Email address to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailDeleteSample.js][workspacenotificationrecipientemaildeletesample] | removes the email from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailListByNotificationSample.js][workspacenotificationrecipientemaillistbynotificationsample] | gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json | +| [workspaceNotificationRecipientUserCheckEntityExistsSample.js][workspacenotificationrecipientusercheckentityexistssample] | determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserCreateOrUpdateSample.js][workspacenotificationrecipientusercreateorupdatesample] | adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserDeleteSample.js][workspacenotificationrecipientuserdeletesample] | removes the API Management user from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserListByNotificationSample.js][workspacenotificationrecipientuserlistbynotificationsample] | gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json | +| [workspacePolicyCreateOrUpdateSample.js][workspacepolicycreateorupdatesample] | creates or updates policy configuration for the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicy.json | +| [workspacePolicyDeleteSample.js][workspacepolicydeletesample] | deletes the policy configuration at the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicy.json | +| [workspacePolicyFragmentCreateOrUpdateSample.js][workspacepolicyfragmentcreateorupdatesample] | creates or updates a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyFragment.json | +| [workspacePolicyFragmentDeleteSample.js][workspacepolicyfragmentdeletesample] | deletes a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json | +| [workspacePolicyFragmentGetEntityTagSample.js][workspacepolicyfragmentgetentitytagsample] | gets the entity state (Etag) version of a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicyFragment.json | +| [workspacePolicyFragmentGetSample.js][workspacepolicyfragmentgetsample] | gets a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragment.json | +| [workspacePolicyFragmentListByServiceSample.js][workspacepolicyfragmentlistbyservicesample] | gets all policy fragments defined within a workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragments.json | +| [workspacePolicyFragmentListReferencesSample.js][workspacepolicyfragmentlistreferencessample] | lists policy resources that reference the policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json | +| [workspacePolicyGetEntityTagSample.js][workspacepolicygetentitytagsample] | gets the entity state (Etag) version of the workspace policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicy.json | +| [workspacePolicyGetSample.js][workspacepolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicy.json | +| [workspacePolicyListByApiSample.js][workspacepolicylistbyapisample] | get the policy configuration at the workspace level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicies.json | +| [workspaceProductApiLinkCreateOrUpdateSample.js][workspaceproductapilinkcreateorupdatesample] | adds an API to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductApiLink.json | +| [workspaceProductApiLinkDeleteSample.js][workspaceproductapilinkdeletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json | +| [workspaceProductApiLinkGetSample.js][workspaceproductapilinkgetsample] | gets the API link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductApiLink.json | +| [workspaceProductApiLinkListByProductSample.js][workspaceproductapilinklistbyproductsample] | lists a collection of the API links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductApiLinks.json | +| [workspaceProductCreateOrUpdateSample.js][workspaceproductcreateorupdatesample] | creates or Updates a product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProduct.json | +| [workspaceProductDeleteSample.js][workspaceproductdeletesample] | delete product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProduct.json | +| [workspaceProductGetEntityTagSample.js][workspaceproductgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProduct.json | +| [workspaceProductGetSample.js][workspaceproductgetsample] | gets the details of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProduct.json | +| [workspaceProductGroupLinkCreateOrUpdateSample.js][workspaceproductgrouplinkcreateorupdatesample] | adds a group to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkDeleteSample.js][workspaceproductgrouplinkdeletesample] | deletes the specified group from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkGetSample.js][workspaceproductgrouplinkgetsample] | gets the group link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkListByProductSample.js][workspaceproductgrouplinklistbyproductsample] | lists a collection of the group links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductGroupLinks.json | +| [workspaceProductListByServiceSample.js][workspaceproductlistbyservicesample] | lists a collection of products in the specified workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProducts.json | +| [workspaceProductPolicyCreateOrUpdateSample.js][workspaceproductpolicycreateorupdatesample] | creates or updates policy configuration for the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductPolicy.json | +| [workspaceProductPolicyDeleteSample.js][workspaceproductpolicydeletesample] | deletes the policy configuration at the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json | +| [workspaceProductPolicyGetEntityTagSample.js][workspaceproductpolicygetentitytagsample] | get the ETag of the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProductPolicy.json | +| [workspaceProductPolicyGetSample.js][workspaceproductpolicygetsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductPolicy.json | +| [workspaceProductPolicyListByProductSample.js][workspaceproductpolicylistbyproductsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductPolicies.json | +| [workspaceProductUpdateSample.js][workspaceproductupdatesample] | update existing product details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceProduct.json | +| [workspaceSubscriptionCreateOrUpdateSample.js][workspacesubscriptioncreateorupdatesample] | creates or updates the subscription of specified user to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSubscription.json | +| [workspaceSubscriptionDeleteSample.js][workspacesubscriptiondeletesample] | deletes the specified subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSubscription.json | +| [workspaceSubscriptionGetEntityTagSample.js][workspacesubscriptiongetentitytagsample] | gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSubscription.json | +| [workspaceSubscriptionGetSample.js][workspacesubscriptiongetsample] | gets the specified Subscription entity. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSubscription.json | +| [workspaceSubscriptionListSample.js][workspacesubscriptionlistsample] | lists all subscriptions of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSubscriptions.json | +| [workspaceSubscriptionListSecretsSample.js][workspacesubscriptionlistsecretssample] | gets the specified Subscription keys. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json | +| [workspaceSubscriptionRegeneratePrimaryKeySample.js][workspacesubscriptionregenerateprimarykeysample] | regenerates primary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json | +| [workspaceSubscriptionRegenerateSecondaryKeySample.js][workspacesubscriptionregeneratesecondarykeysample] | regenerates secondary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json | +| [workspaceSubscriptionUpdateSample.js][workspacesubscriptionupdatesample] | updates the details of a subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceSubscription.json | +| [workspaceTagApiLinkCreateOrUpdateSample.js][workspacetagapilinkcreateorupdatesample] | adds an API to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagApiLink.json | +| [workspaceTagApiLinkDeleteSample.js][workspacetagapilinkdeletesample] | deletes the specified API from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json | +| [workspaceTagApiLinkGetSample.js][workspacetagapilinkgetsample] | gets the API link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagApiLink.json | +| [workspaceTagApiLinkListByProductSample.js][workspacetagapilinklistbyproductsample] | lists a collection of the API links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagApiLinks.json | +| [workspaceTagCreateOrUpdateSample.js][workspacetagcreateorupdatesample] | creates a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTag.json | +| [workspaceTagDeleteSample.js][workspacetagdeletesample] | deletes specific tag of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTag.json | +| [workspaceTagGetEntityStateSample.js][workspacetaggetentitystatesample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceTag.json | +| [workspaceTagGetSample.js][workspacetaggetsample] | gets the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTag.json | +| [workspaceTagListByServiceSample.js][workspacetaglistbyservicesample] | lists a collection of tags defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTags.json | +| [workspaceTagOperationLinkCreateOrUpdateSample.js][workspacetagoperationlinkcreateorupdatesample] | adds an operation to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkDeleteSample.js][workspacetagoperationlinkdeletesample] | deletes the specified operation from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkGetSample.js][workspacetagoperationlinkgetsample] | gets the operation link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkListByProductSample.js][workspacetagoperationlinklistbyproductsample] | lists a collection of the operation links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagOperationLinks.json | +| [workspaceTagProductLinkCreateOrUpdateSample.js][workspacetagproductlinkcreateorupdatesample] | adds a product to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagProductLink.json | +| [workspaceTagProductLinkDeleteSample.js][workspacetagproductlinkdeletesample] | deletes the specified product from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json | +| [workspaceTagProductLinkGetSample.js][workspacetagproductlinkgetsample] | gets the product link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagProductLink.json | +| [workspaceTagProductLinkListByProductSample.js][workspacetagproductlinklistbyproductsample] | lists a collection of the product links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagProductLinks.json | +| [workspaceTagUpdateSample.js][workspacetagupdatesample] | updates the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceTag.json | +| [workspaceUpdateSample.js][workspaceupdatesample] | updates the details of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspace.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node allPoliciesListByServiceSample.js +``` + +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +node allPoliciesListByServiceSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[allpolicieslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/allPoliciesListByServiceSample.js +[apicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiCreateOrUpdateSample.js +[apideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDeleteSample.js +[apidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticCreateOrUpdateSample.js +[apidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticDeleteSample.js +[apidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetEntityTagSample.js +[apidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetSample.js +[apidiagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticListByServiceSample.js +[apidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticUpdateSample.js +[apiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiExportGetSample.js +[apigatewayconfigconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js +[apigatewayconfigconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionDeleteSample.js +[apigatewayconfigconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionGetSample.js +[apigatewayconfigconnectionlistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionListByGatewaySample.js +[apigatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayCreateOrUpdateSample.js +[apigatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayDeleteSample.js +[apigatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayGetSample.js +[apigatewayhostnamebindingcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingCreateOrUpdateSample.js +[apigatewayhostnamebindingdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingDeleteSample.js +[apigatewayhostnamebindinggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingGetSample.js +[apigatewayhostnamebindinglistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingListByGatewaySample.js +[apigatewayhostnamebindingrefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingRefreshSecretSample.js +[apigatewaylistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListByResourceGroupSample.js +[apigatewaylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListSample.js +[apigatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayUpdateSample.js +[apigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetEntityTagSample.js +[apigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetSample.js +[apiissueattachmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentCreateOrUpdateSample.js +[apiissueattachmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentDeleteSample.js +[apiissueattachmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetEntityTagSample.js +[apiissueattachmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetSample.js +[apiissueattachmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentListByServiceSample.js +[apiissuecommentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentCreateOrUpdateSample.js +[apiissuecommentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentDeleteSample.js +[apiissuecommentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetEntityTagSample.js +[apiissuecommentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetSample.js +[apiissuecommentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentListByServiceSample.js +[apiissuecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCreateOrUpdateSample.js +[apiissuedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueDeleteSample.js +[apiissuegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetEntityTagSample.js +[apiissuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetSample.js +[apiissuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueListByServiceSample.js +[apiissueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueUpdateSample.js +[apilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByServiceSample.js +[apilistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByTagsSample.js +[apimanagementgatewayskuslistavailableskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementGatewaySkusListAvailableSkusSample.js +[apimanagementoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementOperationsListSample.js +[apimanagementserviceapplynetworkconfigurationupdatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js +[apimanagementservicebackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceBackupSample.js +[apimanagementservicechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCheckNameAvailabilitySample.js +[apimanagementservicecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCreateOrUpdateSample.js +[apimanagementservicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceDeleteSample.js +[apimanagementservicegetdomainownershipidentifiersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js +[apimanagementservicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSample.js +[apimanagementservicegetssotokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSsoTokenSample.js +[apimanagementservicelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListByResourceGroupSample.js +[apimanagementservicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListSample.js +[apimanagementservicemigratetostv2sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceMigrateToStv2Sample.js +[apimanagementservicerefreshhostnamessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRefreshHostnamesSample.js +[apimanagementserviceresourcesperformconnectivitycheckasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js +[apimanagementservicerestoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRestoreSample.js +[apimanagementserviceskuslistavailableserviceskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js +[apimanagementserviceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceUpdateSample.js +[apimanagementskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementSkusListSample.js +[apimanagementworkspacelinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinkGetSample.js +[apimanagementworkspacelinkslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinksListByServiceSample.js +[apioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationCreateOrUpdateSample.js +[apioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationDeleteSample.js +[apioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetEntityTagSample.js +[apioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetSample.js +[apioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationListByApiSample.js +[apioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyCreateOrUpdateSample.js +[apioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyDeleteSample.js +[apioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetEntityTagSample.js +[apioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetSample.js +[apioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyListByOperationSample.js +[apioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationUpdateSample.js +[apipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyCreateOrUpdateSample.js +[apipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyDeleteSample.js +[apipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetEntityTagSample.js +[apipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetSample.js +[apipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyListByApiSample.js +[apiproductlistbyapissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiProductListByApisSample.js +[apireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseCreateOrUpdateSample.js +[apireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseDeleteSample.js +[apireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetEntityTagSample.js +[apireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetSample.js +[apireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseListByServiceSample.js +[apireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseUpdateSample.js +[apirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiRevisionListByServiceSample.js +[apischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaCreateOrUpdateSample.js +[apischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaDeleteSample.js +[apischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetEntityTagSample.js +[apischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetSample.js +[apischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaListByApiSample.js +[apitagdescriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionCreateOrUpdateSample.js +[apitagdescriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionDeleteSample.js +[apitagdescriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetEntityTagSample.js +[apitagdescriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetSample.js +[apitagdescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionListByServiceSample.js +[apitoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolCreateOrUpdateSample.js +[apitooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolDeleteSample.js +[apitoolgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetEntityTagSample.js +[apitoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetSample.js +[apitoollistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolListByApiSample.js +[apitoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolUpdateSample.js +[apiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiUpdateSample.js +[apiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetCreateOrUpdateSample.js +[apiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetDeleteSample.js +[apiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetEntityTagSample.js +[apiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetSample.js +[apiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetListByServiceSample.js +[apiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetUpdateSample.js +[apiwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiCreateOrUpdateSample.js +[apiwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiDeleteSample.js +[apiwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetEntityTagSample.js +[apiwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetSample.js +[apiwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiUpdateSample.js +[apiwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikisListSample.js +[authorizationaccesspolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyCreateOrUpdateSample.js +[authorizationaccesspolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyDeleteSample.js +[authorizationaccesspolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyGetSample.js +[authorizationaccesspolicylistbyauthorizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyListByAuthorizationSample.js +[authorizationconfirmconsentcodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationConfirmConsentCodeSample.js +[authorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationCreateOrUpdateSample.js +[authorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationDeleteSample.js +[authorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationGetSample.js +[authorizationlistbyauthorizationprovidersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationListByAuthorizationProviderSample.js +[authorizationloginlinkspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationLoginLinksPostSample.js +[authorizationprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderCreateOrUpdateSample.js +[authorizationproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderDeleteSample.js +[authorizationprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderGetSample.js +[authorizationproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderListByServiceSample.js +[authorizationproviderrefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderRefreshSecretSample.js +[authorizationservercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerCreateOrUpdateSample.js +[authorizationserverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerDeleteSample.js +[authorizationservergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetEntityTagSample.js +[authorizationservergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetSample.js +[authorizationserverlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListByServiceSample.js +[authorizationserverlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListSecretsSample.js +[authorizationserverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerUpdateSample.js +[backendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendCreateOrUpdateSample.js +[backenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendDeleteSample.js +[backendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetEntityTagSample.js +[backendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetSample.js +[backendlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendListByServiceSample.js +[backendreconnectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendReconnectSample.js +[backendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendUpdateSample.js +[cachecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheCreateOrUpdateSample.js +[cachedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheDeleteSample.js +[cachegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetEntityTagSample.js +[cachegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetSample.js +[cachelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheListByServiceSample.js +[cacheupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheUpdateSample.js +[certificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateCreateOrUpdateSample.js +[certificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateDeleteSample.js +[certificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetEntityTagSample.js +[certificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetSample.js +[certificatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateListByServiceSample.js +[certificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateRefreshSecretSample.js +[clientapplicationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationCreateOrUpdateSample.js +[clientapplicationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationDeleteSample.js +[clientapplicationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetEntityTagSample.js +[clientapplicationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetSample.js +[clientapplicationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListByServiceSample.js +[clientapplicationlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListSecretsSample.js +[clientapplicationproductlinkcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkCreateSample.js +[clientapplicationproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkDeleteSample.js +[clientapplicationproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkGetSample.js +[clientapplicationproductlinklistbyclientapplicationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkListByClientApplicationsSample.js +[contentitemcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemCreateOrUpdateSample.js +[contentitemdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemDeleteSample.js +[contentitemgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetEntityTagSample.js +[contentitemgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetSample.js +[contentitemlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemListByServiceSample.js +[contenttypecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeCreateOrUpdateSample.js +[contenttypedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeDeleteSample.js +[contenttypegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeGetSample.js +[contenttypelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeListByServiceSample.js +[delegationsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsCreateOrUpdateSample.js +[delegationsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetEntityTagSample.js +[delegationsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetSample.js +[delegationsettingslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsListSecretsSample.js +[delegationsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsUpdateSample.js +[deletedservicesgetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesGetByNameSample.js +[deletedserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesListBySubscriptionSample.js +[deletedservicespurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesPurgeSample.js +[diagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticCreateOrUpdateSample.js +[diagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticDeleteSample.js +[diagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetEntityTagSample.js +[diagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetSample.js +[diagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticListByServiceSample.js +[diagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticUpdateSample.js +[documentationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationCreateOrUpdateSample.js +[documentationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationDeleteSample.js +[documentationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetEntityTagSample.js +[documentationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetSample.js +[documentationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationListByServiceSample.js +[documentationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationUpdateSample.js +[emailtemplatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateCreateOrUpdateSample.js +[emailtemplatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateDeleteSample.js +[emailtemplategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetEntityTagSample.js +[emailtemplategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetSample.js +[emailtemplatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateListByServiceSample.js +[emailtemplateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateUpdateSample.js +[gatewayapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiCreateOrUpdateSample.js +[gatewayapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiDeleteSample.js +[gatewayapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiGetEntityTagSample.js +[gatewayapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiListByServiceSample.js +[gatewaycertificateauthoritycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js +[gatewaycertificateauthoritydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityDeleteSample.js +[gatewaycertificateauthoritygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetEntityTagSample.js +[gatewaycertificateauthoritygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetSample.js +[gatewaycertificateauthoritylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityListByServiceSample.js +[gatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCreateOrUpdateSample.js +[gatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayDeleteSample.js +[gatewaygeneratetokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGenerateTokenSample.js +[gatewaygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetEntityTagSample.js +[gatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetSample.js +[gatewayhostnameconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js +[gatewayhostnameconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationDeleteSample.js +[gatewayhostnameconfigurationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetEntityTagSample.js +[gatewayhostnameconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetSample.js +[gatewayhostnameconfigurationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationListByServiceSample.js +[gatewayinvalidatedebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayInvalidateDebugCredentialsSample.js +[gatewaylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListByServiceSample.js +[gatewaylistdebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListDebugCredentialsSample.js +[gatewaylistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListKeysSample.js +[gatewaylisttracesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListTraceSample.js +[gatewayregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayRegenerateKeySample.js +[gatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayUpdateSample.js +[globalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaCreateOrUpdateSample.js +[globalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaDeleteSample.js +[globalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetEntityTagSample.js +[globalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetSample.js +[globalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaListByServiceSample.js +[graphqlapiresolvercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverCreateOrUpdateSample.js +[graphqlapiresolverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverDeleteSample.js +[graphqlapiresolvergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetEntityTagSample.js +[graphqlapiresolvergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetSample.js +[graphqlapiresolverlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverListByApiSample.js +[graphqlapiresolverpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyCreateOrUpdateSample.js +[graphqlapiresolverpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyDeleteSample.js +[graphqlapiresolverpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetEntityTagSample.js +[graphqlapiresolverpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetSample.js +[graphqlapiresolverpolicylistbyresolversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyListByResolverSample.js +[graphqlapiresolverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverUpdateSample.js +[groupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupCreateOrUpdateSample.js +[groupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupDeleteSample.js +[groupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetEntityTagSample.js +[groupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetSample.js +[grouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupListByServiceSample.js +[groupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUpdateSample.js +[groupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCheckEntityExistsSample.js +[groupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCreateSample.js +[groupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserDeleteSample.js +[groupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserListSample.js +[identityprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderCreateOrUpdateSample.js +[identityproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderDeleteSample.js +[identityprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetEntityTagSample.js +[identityprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetSample.js +[identityproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListByServiceSample.js +[identityproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListSecretsSample.js +[identityproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderUpdateSample.js +[issuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueGetSample.js +[issuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueListByServiceSample.js +[loggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerCreateOrUpdateSample.js +[loggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerDeleteSample.js +[loggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetEntityTagSample.js +[loggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetSample.js +[loggerlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerListByServiceSample.js +[loggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerUpdateSample.js +[namedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueCreateOrUpdateSample.js +[namedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueDeleteSample.js +[namedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetEntityTagSample.js +[namedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetSample.js +[namedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListByServiceSample.js +[namedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListValueSample.js +[namedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueRefreshSecretSample.js +[namedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueUpdateSample.js +[networkstatuslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByLocationSample.js +[networkstatuslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByServiceSample.js +[notificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationCreateOrUpdateSample.js +[notificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationGetSample.js +[notificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationListByServiceSample.js +[notificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCheckEntityExistsSample.js +[notificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCreateOrUpdateSample.js +[notificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailDeleteSample.js +[notificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailListByNotificationSample.js +[notificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCheckEntityExistsSample.js +[notificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCreateOrUpdateSample.js +[notificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserDeleteSample.js +[notificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserListByNotificationSample.js +[openidconnectprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderCreateOrUpdateSample.js +[openidconnectproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderDeleteSample.js +[openidconnectprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetEntityTagSample.js +[openidconnectprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetSample.js +[openidconnectproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListByServiceSample.js +[openidconnectproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListSecretsSample.js +[openidconnectproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderUpdateSample.js +[operationlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationListByTagsSample.js +[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationStatusGetSample.js +[operationsresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationsResultsGetSample.js +[outboundnetworkdependenciesendpointslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js +[policycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyCreateOrUpdateSample.js +[policydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDeleteSample.js +[policydescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDescriptionListByServiceSample.js +[policyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentCreateOrUpdateSample.js +[policyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentDeleteSample.js +[policyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetEntityTagSample.js +[policyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetSample.js +[policyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListByServiceSample.js +[policyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListReferencesSample.js +[policygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetEntityTagSample.js +[policygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetSample.js +[policylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyListByServiceSample.js +[policyrestrictioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionCreateOrUpdateSample.js +[policyrestrictiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionDeleteSample.js +[policyrestrictiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetEntityTagSample.js +[policyrestrictiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetSample.js +[policyrestrictionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionListByServiceSample.js +[policyrestrictionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionUpdateSample.js +[policyrestrictionvalidationsbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionValidationsByServiceSample.js +[portalconfigcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigCreateOrUpdateSample.js +[portalconfiggetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetEntityTagSample.js +[portalconfiggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetSample.js +[portalconfiglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigListByServiceSample.js +[portalconfigupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigUpdateSample.js +[portalrevisioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionCreateOrUpdateSample.js +[portalrevisiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetEntityTagSample.js +[portalrevisiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetSample.js +[portalrevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionListByServiceSample.js +[portalrevisionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionUpdateSample.js +[portalsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalSettingsListByServiceSample.js +[privateendpointconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionCreateOrUpdateSample.js +[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionDeleteSample.js +[privateendpointconnectiongetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetByNameSample.js +[privateendpointconnectiongetprivatelinkresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js +[privateendpointconnectionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListByServiceSample.js +[privateendpointconnectionlistprivatelinkresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js +[productapicheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCheckEntityExistsSample.js +[productapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCreateOrUpdateSample.js +[productapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiDeleteSample.js +[productapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkCreateOrUpdateSample.js +[productapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkDeleteSample.js +[productapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkGetSample.js +[productapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkListByProductSample.js +[productapilistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiListByProductSample.js +[productcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productCreateOrUpdateSample.js +[productdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productDeleteSample.js +[productgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetEntityTagSample.js +[productgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetSample.js +[productgroupcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCheckEntityExistsSample.js +[productgroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCreateOrUpdateSample.js +[productgroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupDeleteSample.js +[productgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkCreateOrUpdateSample.js +[productgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkDeleteSample.js +[productgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkGetSample.js +[productgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkListByProductSample.js +[productgrouplistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupListByProductSample.js +[productlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByServiceSample.js +[productlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByTagsSample.js +[productpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyCreateOrUpdateSample.js +[productpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyDeleteSample.js +[productpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetEntityTagSample.js +[productpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetSample.js +[productpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyListByProductSample.js +[productsubscriptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productSubscriptionsListSample.js +[productupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productUpdateSample.js +[productwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiCreateOrUpdateSample.js +[productwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiDeleteSample.js +[productwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetEntityTagSample.js +[productwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetSample.js +[productwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiUpdateSample.js +[productwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikisListSample.js +[quotabycounterkeyslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysListByServiceSample.js +[quotabycounterkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysUpdateSample.js +[quotabyperiodkeysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysGetSample.js +[quotabyperiodkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysUpdateSample.js +[regionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/regionListByServiceSample.js +[reportslistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByApiSample.js +[reportslistbygeosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByGeoSample.js +[reportslistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByOperationSample.js +[reportslistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByProductSample.js +[reportslistbyrequestsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByRequestSample.js +[reportslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListBySubscriptionSample.js +[reportslistbytimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByTimeSample.js +[reportslistbyusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByUserSample.js +[signinsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsCreateOrUpdateSample.js +[signinsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetEntityTagSample.js +[signinsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetSample.js +[signinsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsUpdateSample.js +[signupsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsCreateOrUpdateSample.js +[signupsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetEntityTagSample.js +[signupsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetSample.js +[signupsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsUpdateSample.js +[subscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionCreateOrUpdateSample.js +[subscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionDeleteSample.js +[subscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetEntityTagSample.js +[subscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetSample.js +[subscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSample.js +[subscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSecretsSample.js +[subscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegeneratePrimaryKeySample.js +[subscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegenerateSecondaryKeySample.js +[subscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionUpdateSample.js +[tagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkCreateOrUpdateSample.js +[tagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkDeleteSample.js +[tagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkGetSample.js +[tagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkListByProductSample.js +[tagassigntoapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToApiSample.js +[tagassigntooperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToOperationSample.js +[tagassigntoproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToProductSample.js +[tagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagCreateOrUpdateSample.js +[tagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDeleteSample.js +[tagdetachfromapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromApiSample.js +[tagdetachfromoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromOperationSample.js +[tagdetachfromproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromProductSample.js +[taggetbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByApiSample.js +[taggetbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByOperationSample.js +[taggetbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByProductSample.js +[taggetentitystatebyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByApiSample.js +[taggetentitystatebyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByOperationSample.js +[taggetentitystatebyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByProductSample.js +[taggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateSample.js +[taggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetSample.js +[taglistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByApiSample.js +[taglistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByOperationSample.js +[taglistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByProductSample.js +[taglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByServiceSample.js +[tagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkCreateOrUpdateSample.js +[tagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkDeleteSample.js +[tagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkGetSample.js +[tagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkListByProductSample.js +[tagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkCreateOrUpdateSample.js +[tagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkDeleteSample.js +[tagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkGetSample.js +[tagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkListByProductSample.js +[tagresourcelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagResourceListByServiceSample.js +[tagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagUpdateSample.js +[tenantaccesscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessCreateSample.js +[tenantaccessgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetEntityTagSample.js +[tenantaccessgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetSample.js +[tenantaccessgitregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegeneratePrimaryKeySample.js +[tenantaccessgitregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegenerateSecondaryKeySample.js +[tenantaccesslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListByServiceSample.js +[tenantaccesslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListSecretsSample.js +[tenantaccessregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegeneratePrimaryKeySample.js +[tenantaccessregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegenerateSecondaryKeySample.js +[tenantaccessupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessUpdateSample.js +[tenantconfigurationdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationDeploySample.js +[tenantconfigurationgetsyncstatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationGetSyncStateSample.js +[tenantconfigurationsavesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationSaveSample.js +[tenantconfigurationvalidatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationValidateSample.js +[tenantsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsGetSample.js +[tenantsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsListByServiceSample.js +[userconfirmationpasswordsendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userConfirmationPasswordSendSample.js +[usercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userCreateOrUpdateSample.js +[userdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userDeleteSample.js +[usergeneratessourlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGenerateSsoUrlSample.js +[usergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetEntityTagSample.js +[usergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSample.js +[usergetsharedaccesstokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSharedAccessTokenSample.js +[usergrouplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGroupListSample.js +[useridentitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userIdentitiesListSample.js +[userlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userListByServiceSample.js +[usersubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionGetSample.js +[usersubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionListSample.js +[userupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userUpdateSample.js +[workspaceapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiCreateOrUpdateSample.js +[workspaceapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDeleteSample.js +[workspaceapidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js +[workspaceapidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticDeleteSample.js +[workspaceapidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetEntityTagSample.js +[workspaceapidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetSample.js +[workspaceapidiagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticListByWorkspaceSample.js +[workspaceapidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticUpdateSample.js +[workspaceapiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiExportGetSample.js +[workspaceapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetEntityTagSample.js +[workspaceapigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetSample.js +[workspaceapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiListByServiceSample.js +[workspaceapioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationCreateOrUpdateSample.js +[workspaceapioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationDeleteSample.js +[workspaceapioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetEntityTagSample.js +[workspaceapioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetSample.js +[workspaceapioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationListByApiSample.js +[workspaceapioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js +[workspaceapioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyDeleteSample.js +[workspaceapioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetEntityTagSample.js +[workspaceapioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetSample.js +[workspaceapioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyListByOperationSample.js +[workspaceapioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationUpdateSample.js +[workspaceapipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyCreateOrUpdateSample.js +[workspaceapipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyDeleteSample.js +[workspaceapipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetEntityTagSample.js +[workspaceapipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetSample.js +[workspaceapipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyListByApiSample.js +[workspaceapireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseCreateOrUpdateSample.js +[workspaceapireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseDeleteSample.js +[workspaceapireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetEntityTagSample.js +[workspaceapireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetSample.js +[workspaceapireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseListByServiceSample.js +[workspaceapireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseUpdateSample.js +[workspaceapirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiRevisionListByServiceSample.js +[workspaceapischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaCreateOrUpdateSample.js +[workspaceapischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaDeleteSample.js +[workspaceapischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetEntityTagSample.js +[workspaceapischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetSample.js +[workspaceapischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaListByApiSample.js +[workspaceapiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiUpdateSample.js +[workspaceapiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetCreateOrUpdateSample.js +[workspaceapiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetDeleteSample.js +[workspaceapiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetEntityTagSample.js +[workspaceapiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetSample.js +[workspaceapiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetListByServiceSample.js +[workspaceapiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetUpdateSample.js +[workspacebackendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendCreateOrUpdateSample.js +[workspacebackenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendDeleteSample.js +[workspacebackendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetEntityTagSample.js +[workspacebackendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetSample.js +[workspacebackendlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendListByWorkspaceSample.js +[workspacebackendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendUpdateSample.js +[workspacecertificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateCreateOrUpdateSample.js +[workspacecertificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateDeleteSample.js +[workspacecertificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetEntityTagSample.js +[workspacecertificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetSample.js +[workspacecertificatelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateListByWorkspaceSample.js +[workspacecertificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateRefreshSecretSample.js +[workspacecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCreateOrUpdateSample.js +[workspacedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDeleteSample.js +[workspacediagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticCreateOrUpdateSample.js +[workspacediagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticDeleteSample.js +[workspacediagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetEntityTagSample.js +[workspacediagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetSample.js +[workspacediagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticListByWorkspaceSample.js +[workspacediagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticUpdateSample.js +[workspacegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetEntityTagSample.js +[workspacegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetSample.js +[workspaceglobalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js +[workspaceglobalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaDeleteSample.js +[workspaceglobalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetEntityTagSample.js +[workspaceglobalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetSample.js +[workspaceglobalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaListByServiceSample.js +[workspacegroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupCreateOrUpdateSample.js +[workspacegroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupDeleteSample.js +[workspacegroupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetEntityTagSample.js +[workspacegroupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetSample.js +[workspacegrouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupListByServiceSample.js +[workspacegroupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUpdateSample.js +[workspacegroupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCheckEntityExistsSample.js +[workspacegroupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCreateSample.js +[workspacegroupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserDeleteSample.js +[workspacegroupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserListSample.js +[workspacelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceListByServiceSample.js +[workspaceloggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerCreateOrUpdateSample.js +[workspaceloggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerDeleteSample.js +[workspaceloggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetEntityTagSample.js +[workspaceloggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetSample.js +[workspaceloggerlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerListByWorkspaceSample.js +[workspaceloggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerUpdateSample.js +[workspacenamedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueCreateOrUpdateSample.js +[workspacenamedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueDeleteSample.js +[workspacenamedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetEntityTagSample.js +[workspacenamedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetSample.js +[workspacenamedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListByServiceSample.js +[workspacenamedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListValueSample.js +[workspacenamedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueRefreshSecretSample.js +[workspacenamedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueUpdateSample.js +[workspacenotificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationCreateOrUpdateSample.js +[workspacenotificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationGetSample.js +[workspacenotificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationListByServiceSample.js +[workspacenotificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js +[workspacenotificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js +[workspacenotificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailDeleteSample.js +[workspacenotificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js +[workspacenotificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js +[workspacenotificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js +[workspacenotificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserDeleteSample.js +[workspacenotificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserListByNotificationSample.js +[workspacepolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyCreateOrUpdateSample.js +[workspacepolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyDeleteSample.js +[workspacepolicyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentCreateOrUpdateSample.js +[workspacepolicyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentDeleteSample.js +[workspacepolicyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetEntityTagSample.js +[workspacepolicyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetSample.js +[workspacepolicyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListByServiceSample.js +[workspacepolicyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListReferencesSample.js +[workspacepolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetEntityTagSample.js +[workspacepolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetSample.js +[workspacepolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyListByApiSample.js +[workspaceproductapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkCreateOrUpdateSample.js +[workspaceproductapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkDeleteSample.js +[workspaceproductapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkGetSample.js +[workspaceproductapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkListByProductSample.js +[workspaceproductcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductCreateOrUpdateSample.js +[workspaceproductdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductDeleteSample.js +[workspaceproductgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetEntityTagSample.js +[workspaceproductgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetSample.js +[workspaceproductgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js +[workspaceproductgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkDeleteSample.js +[workspaceproductgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkGetSample.js +[workspaceproductgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkListByProductSample.js +[workspaceproductlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductListByServiceSample.js +[workspaceproductpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyCreateOrUpdateSample.js +[workspaceproductpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyDeleteSample.js +[workspaceproductpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetEntityTagSample.js +[workspaceproductpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetSample.js +[workspaceproductpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyListByProductSample.js +[workspaceproductupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductUpdateSample.js +[workspacesubscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionCreateOrUpdateSample.js +[workspacesubscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionDeleteSample.js +[workspacesubscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetEntityTagSample.js +[workspacesubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetSample.js +[workspacesubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSample.js +[workspacesubscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSecretsSample.js +[workspacesubscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js +[workspacesubscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js +[workspacesubscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionUpdateSample.js +[workspacetagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkCreateOrUpdateSample.js +[workspacetagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkDeleteSample.js +[workspacetagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkGetSample.js +[workspacetagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkListByProductSample.js +[workspacetagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagCreateOrUpdateSample.js +[workspacetagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagDeleteSample.js +[workspacetaggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetEntityStateSample.js +[workspacetaggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetSample.js +[workspacetaglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagListByServiceSample.js +[workspacetagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js +[workspacetagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkDeleteSample.js +[workspacetagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkGetSample.js +[workspacetagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkListByProductSample.js +[workspacetagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkCreateOrUpdateSample.js +[workspacetagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkDeleteSample.js +[workspacetagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkGetSample.js +[workspacetagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkListByProductSample.js +[workspacetagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagUpdateSample.js +[workspaceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceUpdateSample.js +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/README.md diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/allPoliciesListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/allPoliciesListByServiceSample.js new file mode 100644 index 000000000000..cbfe3ec8c29e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/allPoliciesListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to status of all policies of API Management services. + * + * @summary status of all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAllPolicies.json + */ +async function apiManagementListPolicyRestrictions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.allPolicies.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiCreateOrUpdateSample.js new file mode 100644 index 000000000000..215c3b080524 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiCreateOrUpdateSample.js @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApi.json + */ +async function apiManagementCreateApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiClone.json + */ +async function apiManagementCreateApiClone() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api2", { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiNewVersionUsingExistingApi.json + */ +async function apiManagementCreateApiNewVersionUsingExistingApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echoapiv3", { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRevisionFromExistingApi.json + */ +async function apiManagementCreateApiRevisionFromExistingApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api;rev=3", { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + */ +async function apiManagementCreateApiUsingImportOverrideServiceUrl() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "apidocs", { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3Import.json + */ +async function apiManagementCreateApiUsingOai3Import() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + */ +async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingSwaggerImport.json + */ +async function apiManagementCreateApiUsingSwaggerImport() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingWadlImport.json + */ +async function apiManagementCreateApiUsingWadlImport() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleAuthServers.json + */ +async function apiManagementCreateApiWithMultipleAuthServers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + { authorizationServerId: "authorizationServerId2284", scope: "oauth2scope2581" }, + ], + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + */ +async function apiManagementCreateApiWithMultipleOpenIdConnectProviders() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283", + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284", + }, + ], + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithOpenIdConnect.json + */ +async function apiManagementCreateApiWithOpenIdConnect() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid", + }, + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApi.json + */ +async function apiManagementCreateGraphQLApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGrpcApi.json + */ +async function apiManagementCreateGrpcApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "grpc", + format: "grpc-link", + path: "grpc-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["https"], + serviceUrl: "https://your-api-hostname/samples", + value: + "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMcpApi.json + */ +async function apiManagementCreateMcpApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "mcp-api", { + apiType: "mcp", + path: "mcp-api", + description: "MCP API for AI agent tool discovery and invocation", + displayName: "MCP API", + protocols: ["https"], + serviceUrl: "https://mcp-backend.contoso.com", + mcpProperties: { + transportType: "streamable", + endpoints: [{ name: "message", uriTemplate: "/mcp/messages" }], + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateODataApi.json + */ +async function apiManagementCreateODataApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "odata", + format: "odata-link", + path: "odata-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://services.odata.org/TripPinWebApiService", + value: "https://services.odata.org/TripPinWebApiService/$metadata", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + */ +async function apiManagementCreateSoapPassThroughApiUsingWsdlImport() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSoapToRestApiUsingWsdlImport.json + */ +async function apiManagementCreateSoapToRestApiUsingWsdlImport() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWebsocketApi.json + */ +async function apiManagementCreateWebSocketApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateApi(); + await apiManagementCreateApiClone(); + await apiManagementCreateApiNewVersionUsingExistingApi(); + await apiManagementCreateApiRevisionFromExistingApi(); + await apiManagementCreateApiUsingImportOverrideServiceUrl(); + await apiManagementCreateApiUsingOai3Import(); + await apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + await apiManagementCreateApiUsingSwaggerImport(); + await apiManagementCreateApiUsingWadlImport(); + await apiManagementCreateApiWithMultipleAuthServers(); + await apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + await apiManagementCreateApiWithOpenIdConnect(); + await apiManagementCreateGraphQLApi(); + await apiManagementCreateGrpcApi(); + await apiManagementCreateMcpApi(); + await apiManagementCreateODataApi(); + await apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + await apiManagementCreateSoapToRestApiUsingWsdlImport(); + await apiManagementCreateWebSocketApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDeleteSample.js new file mode 100644 index 000000000000..987ea29c892e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API of the API Management service instance. + * + * @summary deletes the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApi.json + */ +async function apiManagementDeleteApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.api.delete("rg1", "apimService1", "echo-api", "*"); +} + +async function main() { + await apiManagementDeleteApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticCreateOrUpdateSample.js new file mode 100644 index 000000000000..72b0f68f35b4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticCreateOrUpdateSample.js @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. + * + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiDiagnostic.json + */ +async function apiManagementCreateApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticDeleteSample.js new file mode 100644 index 000000000000..9664b6cf02f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiDiagnostic.json + */ +async function apiManagementDeleteApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiDiagnostic.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetEntityTagSample.js new file mode 100644 index 000000000000..dcb179c3148b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiDiagnostic.json + */ +async function apiManagementHeadApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); +} + +async function main() { + await apiManagementHeadApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetSample.js new file mode 100644 index 000000000000..e4cc39cb2bf6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiDiagnostic.json + */ +async function apiManagementGetApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticListByServiceSample.js new file mode 100644 index 000000000000..b6e149a74c90 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiDiagnostics.json + */ +async function apiManagementListApiDiagnostics() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiDiagnostic.listByService("rg1", "apimService1", "echo-api")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticUpdateSample.js new file mode 100644 index 000000000000..33233b5e9f19 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiDiagnosticUpdateSample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. + * + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiDiagnostic.json + */ +async function apiManagementUpdateApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + "rg1", + "apimService1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiExportGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiExportGetSample.js new file mode 100644 index 000000000000..985f2c04befd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiExportGetSample.js @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json + */ +async function apiManagementGetApiExportInOpenApi2Dot0() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + "rg1", + "apimService1", + "echo-api", + "swagger-link", + "true", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi3dot0.json + */ +async function apiManagementGetApiExportInOpenApi3Dot0() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + "rg1", + "apimService1", + "aid9676", + "openapi-link", + "true", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiExportInOpenApi2Dot0(); + await apiManagementGetApiExportInOpenApi3Dot0(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js new file mode 100644 index 000000000000..b8ae66346321 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionCreateOrUpdateSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayConfigConnection.json + */ +async function apiManagementCreateGatewayConfigConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayConfigConnection.createOrUpdate( + "rg1", + "standard-gw-01", + "gcc-01", + { + sourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionDeleteSample.js new file mode 100644 index 000000000000..0c12d0969848 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes an existing API Management gateway config connection. + * + * @summary deletes an existing API Management gateway config connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayConfigConnection.json + */ +async function apiManagementGatewayDeleteGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayConfigConnection.delete("rg1", "standard-gw-01", "gcc-01", "*"); +} + +async function main() { + await apiManagementGatewayDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionGetSample.js new file mode 100644 index 000000000000..e68a366c3fd0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets an API Management gateway config connection resource description. + * + * @summary gets an API Management gateway config connection resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayConfigConnection.json + */ +async function apiManagementGetGatewayConfigConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayConfigConnection.get("rg1", "standard-gw-01", "gcc-01"); + console.log(result); +} + +async function main() { + await apiManagementGetGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionListByGatewaySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionListByGatewaySample.js new file mode 100644 index 000000000000..e52d35cc25ff --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayConfigConnectionListByGatewaySample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management gateway config connections within a gateway. + * + * @summary list all API Management gateway config connections within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayConfigConnection.json + */ +async function apiManagementListGatewayConfigConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGatewayConfigConnection.listByGateway( + "rg1", + "standard-gw-1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayCreateOrUpdateSample.js new file mode 100644 index 000000000000..4b3a40a71bc0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayCreateOrUpdateSample.js @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateStandardGateway.json + */ +async function apiManagementCreateStandardGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", + backend: { + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", + }, + }, + sku: { name: "Standard", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePremiumGateway.json + */ +async function apiManagementCreateWorkspacePremiumGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", + backend: { + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", + }, + }, + virtualNetworkType: "External", + sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateStandardGateway(); + await apiManagementCreateWorkspacePremiumGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayDeleteSample.js new file mode 100644 index 000000000000..2403f725e670 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes an existing API Management gateway. + * + * @summary deletes an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayDeleteGateway.json + */ +async function apiManagementGatewayDeleteGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.delete("rg1", "example-gateway"); + console.log(result); +} + +async function main() { + await apiManagementGatewayDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayGetSample.js new file mode 100644 index 000000000000..434c09182a7d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets an API Management gateway resource description. + * + * @summary gets an API Management gateway resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGetGateway.json + */ +async function apiManagementGatewayGetGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.get("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementGatewayGetGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingCreateOrUpdateSample.js new file mode 100644 index 000000000000..577e4f5f0523 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameBinding.json + */ +async function apiManagementCreateGatewayHostnameBinding() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.createOrUpdate( + "rg1", + "apimGateway1", + "hb-1", + { + hostname: "primary.cotoso.com", + keyVault: { + identityClientId: "00000000-0000-0000-0000-000000000000", + secretId: "https://myvault.keyvault.azure.net/secrets/contosoprimarycert", + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingDeleteSample.js new file mode 100644 index 000000000000..ab02c86b8156 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes an existing API Management gateway hostname binding. + * + * @summary deletes an existing API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameBinding.json + */ +async function apiManagementDeleteGatewayHostnameBinding() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.delete("rg1", "standard-gw-01", "gcc-01", "*"); +} + +async function main() { + await apiManagementDeleteGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingGetSample.js new file mode 100644 index 000000000000..bc9ba41ed7ac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets an API Management gateway hostname binding resource description. + * + * @summary gets an API Management gateway hostname binding resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameBinding.json + */ +async function apiManagementGetGatewayHostnameBinding() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.get("rg1", "standard-gw-1", "hb-1"); + console.log(result); +} + +async function main() { + await apiManagementGetGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingListByGatewaySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingListByGatewaySample.js new file mode 100644 index 000000000000..ef998a8a39f7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingListByGatewaySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management gateway hostname bindings within a gateway. + * + * @summary list all API Management gateway hostname bindings within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameBindings.json + */ +async function apiManagementListGatewayHostnameBindings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGatewayHostnameBinding.listByGateway("rg1", "standard-gw-1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewayHostnameBindings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingRefreshSecretSample.js new file mode 100644 index 000000000000..11931675420d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayHostnameBindingRefreshSecretSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to refresh the secret for an API Management gateway hostname binding. + * + * @summary refresh the secret for an API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json + */ +async function apiManagementRefreshGatewayHostnameBindingSecret() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.refreshSecret("rg1", "standard-gw-01", "gcc-01"); +} + +async function main() { + await apiManagementRefreshGatewayHostnameBindingSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListByResourceGroupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListByResourceGroupSample.js new file mode 100644 index 000000000000..3e3892f93942 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management gateways within a resource group. + * + * @summary list all API Management gateways within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json + */ +async function apiManagementListGatewaysBySubscriptionAndResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGateway.listByResourceGroup("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewaysBySubscriptionAndResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListSample.js new file mode 100644 index 000000000000..31922bbd4325 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management gateways within a subscription. + * + * @summary list all API Management gateways within a subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscription.json + */ +async function apiManagementListGatewaysBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGateway.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewaysBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayUpdateSample.js new file mode 100644 index 000000000000..23ab2f43763c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGatewayUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing API Management gateway. + * + * @summary updates an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateStandardGateway.json + */ +async function apiManagementUpdateStandardGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.update("rg1", "apimGateway1", { + sku: { name: "Standard", capacity: 10 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateStandardGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetEntityTagSample.js new file mode 100644 index 000000000000..f41a43501bc6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApi.json + */ +async function apiManagementHeadApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.api.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main() { + await apiManagementHeadApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetSample.js new file mode 100644 index 000000000000..dd5e27b0e8cb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiContract.json + */ +async function apiManagementGetApiContract() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRevision.json + */ +async function apiManagementGetApiRevisionContract() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get("rg1", "apimService1", "echo-api;rev=3"); + console.log(result); +} + +async function main() { + await apiManagementGetApiContract(); + await apiManagementGetApiRevisionContract(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentCreateOrUpdateSample.js new file mode 100644 index 000000000000..31f6839424a3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentCreateOrUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Attachment for the Issue in an API or updates an existing one. + * + * @summary creates a new Attachment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueAttachment.json + */ +async function apiManagementCreateApiIssueAttachment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + { content: "IEJhc2U2NA==", contentFormat: "image/jpeg", title: "Issue attachment." }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentDeleteSample.js new file mode 100644 index 000000000000..a146891bbe1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueAttachment.json + */ +async function apiManagementDeleteApiIssueAttachment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueAttachment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetEntityTagSample.js new file mode 100644 index 000000000000..9c89f8f30068 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueAttachment.json + */ +async function apiManagementHeadApiIssueAttachment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueAttachment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + ); +} + +async function main() { + await apiManagementHeadApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetSample.js new file mode 100644 index 000000000000..4e454ac20777 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the issue Attachment for an API specified by its identifier. + * + * @summary gets the details of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueAttachment.json + */ +async function apiManagementGetApiIssueAttachment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentListByServiceSample.js new file mode 100644 index 000000000000..78e27d9569a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueAttachmentListByServiceSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all attachments for the Issue associated with the specified API. + * + * @summary lists all attachments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueAttachments.json + */ +async function apiManagementListApiIssueAttachments() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssueAttachment.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiIssueAttachments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentCreateOrUpdateSample.js new file mode 100644 index 000000000000..12b700b7de4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Comment for the Issue in an API or updates an existing one. + * + * @summary creates a new Comment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueComment.json + */ +async function apiManagementCreateApiIssueComment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentDeleteSample.js new file mode 100644 index 000000000000..85736743e0d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueComment.json + */ +async function apiManagementDeleteApiIssueComment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueComment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetEntityTagSample.js new file mode 100644 index 000000000000..128007cf2b59 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueComment.json + */ +async function apiManagementHeadApiIssueComment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueComment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + ); +} + +async function main() { + await apiManagementHeadApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetSample.js new file mode 100644 index 000000000000..51fdf8e98bf6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the issue Comment for an API specified by its identifier. + * + * @summary gets the details of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueComment.json + */ +async function apiManagementGetApiIssueComment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentListByServiceSample.js new file mode 100644 index 000000000000..5e36ecca4226 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCommentListByServiceSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all comments for the Issue associated with the specified API. + * + * @summary lists all comments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueComments.json + */ +async function apiManagementListApiIssueComments() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssueComment.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiIssueComments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCreateOrUpdateSample.js new file mode 100644 index 000000000000..21222489c6a0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueCreateOrUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Issue for an API or updates an existing one. + * + * @summary creates a new Issue for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssue.json + */ +async function apiManagementCreateApiIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueDeleteSample.js new file mode 100644 index 000000000000..0d30708ca803 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Issue from an API. + * + * @summary deletes the specified Issue from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssue.json + */ +async function apiManagementDeleteApiIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssue.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetEntityTagSample.js new file mode 100644 index 000000000000..5141208736a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssue.json + */ +async function apiManagementHeadApiIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssue.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementHeadApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetSample.js new file mode 100644 index 000000000000..c8507fc0dc37 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Issue for an API specified by its identifier. + * + * @summary gets the details of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssue.json + */ +async function apiManagementGetApiIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueListByServiceSample.js new file mode 100644 index 000000000000..c73123b95627 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all issues associated with the specified API. + * + * @summary lists all issues associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssues.json + */ +async function apiManagementListApiIssues() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssue.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiIssues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueUpdateSample.js new file mode 100644 index 000000000000..5121f07ce7fc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiIssueUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing issue for an API. + * + * @summary updates an existing issue for an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiIssue.json + */ +async function apiManagementUpdateApiIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", + { state: "closed" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByServiceSample.js new file mode 100644 index 000000000000..3e0cc88646b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all APIs of the API Management service instance. + * + * @summary lists all APIs of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApis.json + */ +async function apiManagementListApis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.api.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByTagsSample.js new file mode 100644 index 000000000000..d75b35dbc1a0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiListByTagsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of apis associated with tags. + * + * @summary lists a collection of apis associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApisByTags.json + */ +async function apiManagementListApisByTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.api.listByTags("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApisByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementGatewaySkusListAvailableSkusSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementGatewaySkusListAvailableSkusSample.js new file mode 100644 index 000000000000..f727c9f6b069 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementGatewaySkusListAvailableSkusSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all available SKU for a given API Management gateway + * + * @summary gets all available SKU for a given API Management gateway + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Gateways.json + */ +async function apiManagementListSKUsGateways() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementGatewaySkus.listAvailableSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListSKUsGateways(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementOperationsListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementOperationsListSample.js new file mode 100644 index 000000000000..7c4ea4aa6a57 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementOperationsListSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * + * @summary lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOperations.json + */ +async function apiManagementListOperations() { + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (const item of client.apiManagementOperations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js new file mode 100644 index 000000000000..eb40061d5877 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceApplyNetworkConfigurationUpdatesSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * + * @summary updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json + */ +async function apiManagementApplyNetworkConfigurationUpdates() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.applyNetworkConfigurationUpdates( + "rg1", + "apimService1", + { parameters: { location: "west us" } }, + ); + console.log(result); +} + +async function main() { + await apiManagementApplyNetworkConfigurationUpdates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceBackupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceBackupSample.js new file mode 100644 index 000000000000..5f3650ca7b41 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceBackupSample.js @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithAccessKey.json + */ +async function apiManagementBackupWithAccessKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithSystemManagedIdentity.json + */ +async function apiManagementBackupWithSystemManagedIdentity() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithUserAssignedManagedIdentity.json + */ +async function apiManagementBackupWithUserAssignedManagedIdentity() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage", + }); + console.log(result); +} + +async function main() { + await apiManagementBackupWithAccessKey(); + await apiManagementBackupWithSystemManagedIdentity(); + await apiManagementBackupWithUserAssignedManagedIdentity(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCheckNameAvailabilitySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCheckNameAvailabilitySample.js new file mode 100644 index 000000000000..75b199a7dfc2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCheckNameAvailabilitySample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks availability and correctness of a name for an API Management service. + * + * @summary checks availability and correctness of a name for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceCheckNameAvailability.json + */ +async function apiManagementServiceCheckNameAvailability() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability({ name: "apimService1" }); + console.log(result); +} + +async function main() { + await apiManagementServiceCheckNameAvailability(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCreateOrUpdateSample.js new file mode 100644 index 000000000000..8de09fe02149 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceCreateOrUpdateSample.js @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + */ +async function apiManagementCreateMultiRegionServiceWithCustomHostname() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "West US", + additionalLocations: [ + { disableGateway: true, location: "East US", sku: { name: "Premium", capacity: 1 } }, + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net", + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net", + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net", + }, + { + type: "ConfigurationApi", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "configuration-api.msitesting.net", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkType: "None", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateService.json + */ +async function apiManagementCreateService() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceHavingMsi.json + */ +async function apiManagementCreateServiceHavingMsi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInVnetWithPublicIP.json + */ +async function apiManagementCreateServiceInVnetWithPublicIP() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant", + }, + virtualNetworkType: "External", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"], + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInZones.json + */ +async function apiManagementCreateServiceInZones() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"], + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceSkuv2Service.json + */ +async function apiManagementCreateServiceSkuv2Service() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "StandardV2", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + */ +async function apiManagementCreateServiceWithCustomHostnameKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + location: "North Europe", + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "ConfigurationApi", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "configuration-api.msitesting.net", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkType: "None", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithDeveloperPortal.json + */ +async function apiManagementCreateServiceWithDeveloperPortal() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + developerPortalStatus: "Enabled", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithNatGatewayEnabled.json + */ +async function apiManagementCreateServiceWithNatGatewayEnabled() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithSystemCertificates.json + */ +async function apiManagementCreateServiceWithSystemCertificates() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "Central US", + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithUserAssignedIdentity.json + */ +async function apiManagementCreateServiceWithUserAssignedIdentity() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": + {}, + }, + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json + */ +async function apiManagementCreateServiceWithoutLegacyConfigurationApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "Central US", + configurationApi: { legacyApi: "Disabled" }, + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUndelete.json + */ +async function apiManagementUndelete() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateMultiRegionServiceWithCustomHostname(); + await apiManagementCreateService(); + await apiManagementCreateServiceHavingMsi(); + await apiManagementCreateServiceInVnetWithPublicIP(); + await apiManagementCreateServiceInZones(); + await apiManagementCreateServiceSkuv2Service(); + await apiManagementCreateServiceWithCustomHostnameKeyVault(); + await apiManagementCreateServiceWithDeveloperPortal(); + await apiManagementCreateServiceWithNatGatewayEnabled(); + await apiManagementCreateServiceWithSystemCertificates(); + await apiManagementCreateServiceWithUserAssignedIdentity(); + await apiManagementCreateServiceWithoutLegacyConfigurationApi(); + await apiManagementUndelete(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceDeleteSample.js new file mode 100644 index 000000000000..738f76f181f2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceDeleteSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes an existing API Management service. + * + * @summary deletes an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceDeleteService.json + */ +async function apiManagementServiceDeleteService() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.delete("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementServiceDeleteService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js new file mode 100644 index 000000000000..9e2e522ad1d2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetDomainOwnershipIdentifierSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the custom domain ownership identifier for an API Management service. + * + * @summary get the custom domain ownership identifier for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json + */ +async function apiManagementServiceGetDomainOwnershipIdentifier() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); +} + +async function main() { + await apiManagementServiceGetDomainOwnershipIdentifier(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSample.js new file mode 100644 index 000000000000..eda5c0539ed5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSample.js @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json + */ +async function apiManagementServiceGetMultiRegionInternalVnet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetService.json + */ +async function apiManagementServiceGetService() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetServiceHavingMsi.json + */ +async function apiManagementServiceGetServiceHavingMsi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementServiceGetMultiRegionInternalVnet(); + await apiManagementServiceGetService(); + await apiManagementServiceGetServiceHavingMsi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSsoTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSsoTokenSample.js new file mode 100644 index 000000000000..962b897e0304 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceGetSsoTokenSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * + * @summary gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetSsoToken.json + */ +async function apiManagementServiceGetSsoToken() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementServiceGetSsoToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListByResourceGroupSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListByResourceGroupSample.js new file mode 100644 index 000000000000..cbb5e0f6fe3f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListByResourceGroupSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management services within a resource group. + * + * @summary list all API Management services within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json + */ +async function apiManagementListServiceBySubscriptionAndResourceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementService.listByResourceGroup("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListServiceBySubscriptionAndResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListSample.js new file mode 100644 index 000000000000..f0ee4ac95276 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all API Management services within an Azure subscription. + * + * @summary lists all API Management services within an Azure subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscription.json + */ +async function apiManagementListServiceBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementService.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListServiceBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceMigrateToStv2Sample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceMigrateToStv2Sample.js new file mode 100644 index 000000000000..3537cb1739c5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceMigrateToStv2Sample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * + * @summary upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceMigrateToStv2.json + */ +async function apiManagementMigrateService() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.migrateToStv2("rg1", "apimService1", { + parameters: { mode: "PreserveIp" }, + }); + console.log(result); +} + +async function main() { + await apiManagementMigrateService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRefreshHostnamesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRefreshHostnamesSample.js new file mode 100644 index 000000000000..c7d1a1401850 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRefreshHostnamesSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * + * @summary force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json + */ +async function apiManagementServiceRefreshKeyVaultHostnames() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.refreshHostnames("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementServiceRefreshKeyVaultHostnames(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js new file mode 100644 index 000000000000..cff515451431 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.js @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheck.json + */ +async function tcpConnectivityCheck() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "8.8.8.8", port: 53 }, + preferredIPVersion: "IPv4", + source: { region: "northeurope" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheckHttpConnect.json + */ +async function httpConnectivityCheck() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "https://microsoft.com", port: 3306 }, + protocolConfiguration: { + httpConfiguration: { + method: "GET", + headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], + validStatusCodes: [200, 204], + }, + }, + source: { region: "northeurope" }, + protocol: "HTTPS", + }, + ); + console.log(result); +} + +async function main() { + await tcpConnectivityCheck(); + await httpConnectivityCheck(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRestoreSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRestoreSample.js new file mode 100644 index 000000000000..1b07ab9cebe4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceRestoreSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * + * @summary restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRestoreWithAccessKey.json + */ +async function apiManagementRestoreService() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.restore("rg1", "apimService1", { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount", + }); + console.log(result); +} + +async function main() { + await apiManagementRestoreService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js new file mode 100644 index 000000000000..ed195a082f92 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceSkusListAvailableServiceSkusSample.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all available SKU for a given API Management service + * + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Consumption.json + */ +async function apiManagementListSKUsConsumption() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +/** + * This sample demonstrates how to gets all available SKU for a given API Management service + * + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Dedicated.json + */ +async function apiManagementListSKUsDedicated() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListSKUsConsumption(); + await apiManagementListSKUsDedicated(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceUpdateSample.js new file mode 100644 index 000000000000..526ef3919ddb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementServiceUpdateSample.js @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceDisableTls10.json + */ +async function apiManagementUpdateServiceDisableTls10() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + customProperties: { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServicePublisherDetails.json + */ +async function apiManagementUpdateServicePublisherDetails() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext", + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceToNewVnetAndAZs.json + */ +async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default", + }, + zones: ["1", "2", "3"], + }, + ], + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2", + }, + virtualNetworkType: "External", + sku: { name: "Premium", capacity: 3 }, + zones: ["1", "2", "3"], + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateServiceDisableTls10(); + await apiManagementUpdateServicePublisherDetails(); + await apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementSkusListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementSkusListSample.js new file mode 100644 index 000000000000..4c9144f71b6c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementSkusListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * + * @summary gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSku.json + */ +async function listsAllAvailableResourceSKUs() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementSkus.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listsAllAvailableResourceSKUs(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinkGetSample.js new file mode 100644 index 000000000000..40975f300632 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets an API Management WorkspaceLink resource description. + * + * @summary gets an API Management WorkspaceLink resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLink.json + */ +async function apiManagementGetWorkspaceLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementWorkspaceLink.get("rg1", "service1", "wk-1"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinksListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinksListByServiceSample.js new file mode 100644 index 000000000000..9295669bfcfc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiManagementWorkspaceLinksListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list all API Management workspaceLinks for a service. + * + * @summary list all API Management workspaceLinks for a service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLinks.json + */ +async function apiManagementListGatewayConfigConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementWorkspaceLinks.listByService("rg1", "service1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationCreateOrUpdateSample.js new file mode 100644 index 000000000000..47d505ac8176 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationCreateOrUpdateSample.js @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new operation in the API or updates an existing one. + * + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperation.json + */ +async function apiManagementCreateApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + "rg1", + "apimService1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, + ], + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationDeleteSample.js new file mode 100644 index 000000000000..8944e7d60c93 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperation.json + */ +async function apiManagementDeleteApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperation.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetEntityTagSample.js new file mode 100644 index 000000000000..b2eba6544c51 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperation.json + */ +async function apiManagementHeadApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperation.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementHeadApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetSample.js new file mode 100644 index 000000000000..202b4f9480a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationGetSample.js @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperation.json + */ +async function apiManagementGetApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPetStore.json + */ +async function apiManagementGetApiOperationPetStore() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + "rg1", + "apimService1", + "swagger-petstore", + "loginUser", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiOperation(); + await apiManagementGetApiOperationPetStore(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationListByApiSample.js new file mode 100644 index 000000000000..1b619f9428ee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationListByApiSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperations.json + */ +async function apiManagementListApiOperations() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiOperation.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..80753117199f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. + * + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationPolicy.json + */ +async function apiManagementCreateApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyDeleteSample.js new file mode 100644 index 000000000000..e979ccdebd87 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationPolicy.json + */ +async function apiManagementDeleteApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperationPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testoperation", + "policy", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..2fe452a9ab6c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationPolicy.json + */ +async function apiManagementHeadApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main() { + await apiManagementHeadApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetSample.js new file mode 100644 index 000000000000..788cbcc87822 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPolicy.json + */ +async function apiManagementGetApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyListByOperationSample.js new file mode 100644 index 000000000000..bf82cb5ec778 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationPolicyListByOperationSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationPolicies.json + */ +async function apiManagementListApiOperationPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + ); + console.log(result); +} + +async function main() { + await apiManagementListApiOperationPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationUpdateSample.js new file mode 100644 index 000000000000..16ef215d0edf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiOperationUpdateSample.js @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. + * + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiOperation.json + */ +async function apiManagementUpdateApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + "rg1", + "apimService1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, + }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, + ], + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..4d0eb3d79289 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyCreateOrUpdateSample.js @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicy.json + */ +async function apiManagementCreateApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicyNonXmlEncoded.json + */ +async function apiManagementCreateApiPolicyNonXmlEncoded() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiPolicy(); + await apiManagementCreateApiPolicyNonXmlEncoded(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyDeleteSample.js new file mode 100644 index 000000000000..297a659b3530 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiPolicy.json + */ +async function apiManagementDeleteApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiPolicy.delete("rg1", "apimService1", "loggerId", "policy", "*"); +} + +async function main() { + await apiManagementDeleteApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..8a1b5b97eaba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiPolicy.json + */ +async function apiManagementHeadApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiPolicy.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "policy"); +} + +async function main() { + await apiManagementHeadApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetSample.js new file mode 100644 index 000000000000..d05ffc5bf0a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiPolicy.json + */ +async function apiManagementGetApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + "rg1", + "apimService1", + "5600b59475ff190048040001", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyListByApiSample.js new file mode 100644 index 000000000000..ccb5b6143517 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiPolicyListByApiSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiPolicies.json + */ +async function apiManagementListApiPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + "rg1", + "apimService1", + "5600b59475ff190048040001", + ); + console.log(result); +} + +async function main() { + await apiManagementListApiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiProductListByApisSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiProductListByApisSample.js new file mode 100644 index 000000000000..26603ecf7954 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiProductListByApisSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Products, which the API is part of. + * + * @summary lists all Products, which the API is part of. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiProducts.json + */ +async function apiManagementListApiProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiProduct.listByApis( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseCreateOrUpdateSample.js new file mode 100644 index 000000000000..ca3b441ea294 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Release for the API. + * + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRelease.json + */ +async function apiManagementCreateApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate("rg1", "apimService1", "a1", "testrev", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseDeleteSample.js new file mode 100644 index 000000000000..f84b0ed4487f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiRelease.json + */ +async function apiManagementDeleteApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiRelease.delete("rg1", "apimService1", "5a5fcc09124a7fa9b89f2f1d", "testrev", "*"); +} + +async function main() { + await apiManagementDeleteApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetEntityTagSample.js new file mode 100644 index 000000000000..0fb3b5bc02e2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiRelease.json + */ +async function apiManagementHeadApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiRelease.getEntityTag("rg1", "apimService1", "a1", "5a7cb545298324c53224a799"); +} + +async function main() { + await apiManagementHeadApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetSample.js new file mode 100644 index 000000000000..283aa50cdbe0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRelease.json + */ +async function apiManagementGetApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + "rg1", + "apimService1", + "a1", + "5a7cb545298324c53224a799", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseListByServiceSample.js new file mode 100644 index 000000000000..d27b157d58ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiReleases.json + */ +async function apiManagementListApiReleases() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiRelease.listByService("rg1", "apimService1", "a1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiReleases(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseUpdateSample.js new file mode 100644 index 000000000000..11652f4fe5bd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiReleaseUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. + * + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiRelease.json + */ +async function apiManagementUpdateApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update("rg1", "apimService1", "a1", "testrev", "*", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiRevisionListByServiceSample.js new file mode 100644 index 000000000000..87f00f9ef687 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiRevisionListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiRevisions.json + */ +async function apiManagementListApiRevisions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiRevision.listByService( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaCreateOrUpdateSample.js new file mode 100644 index 000000000000..099e7651e544 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates schema configuration for the API. + * + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiSchema.json + */ +async function apiManagementCreateApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.createOrUpdate( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaDeleteSample.js new file mode 100644 index 000000000000..10ec326d4cc6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiSchema.json + */ +async function apiManagementDeleteApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiSchema.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetEntityTagSample.js new file mode 100644 index 000000000000..9c46c6f595f6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiSchema.json + */ +async function apiManagementHeadApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiSchema.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); +} + +async function main() { + await apiManagementHeadApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetSample.js new file mode 100644 index 000000000000..027624a06853 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiSchema.json + */ +async function apiManagementGetApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaListByApiSample.js new file mode 100644 index 000000000000..9063e77b5273 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiSchemaListByApiSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiSchemas.json + */ +async function apiManagementListApiSchemas() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiSchema.listByApi( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionCreateOrUpdateSample.js new file mode 100644 index 000000000000..8076d309bd2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create/Update tag description in scope of the Api. + * + * @summary create/Update tag description in scope of the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTagDescription.json + */ +async function apiManagementCreateApiTagDescription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionDeleteSample.js new file mode 100644 index 000000000000..b177b9d208a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete tag description for the Api. + * + * @summary delete tag description for the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTagDescription.json + */ +async function apiManagementDeleteApiTagDescription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTagDescription.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main() { + await apiManagementDeleteApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetEntityTagSample.js new file mode 100644 index 000000000000..22331a84b04f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTagDescription.json + */ +async function apiManagementHeadApiTagDescription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTagDescription.getEntityTag( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetSample.js new file mode 100644 index 000000000000..cc9a2b771fc4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get Tag description in scope of API + * + * @summary get Tag description in scope of API + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTagDescription.json + */ +async function apiManagementGetApiTagDescription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionListByServiceSample.js new file mode 100644 index 000000000000..37a136613ec9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiTagDescriptionListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * + * @summary lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTagDescriptions.json + */ +async function apiManagementListApiTagDescriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiTagDescription.listByService( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiTagDescriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolCreateOrUpdateSample.js new file mode 100644 index 000000000000..6b21b24ea3b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new tool in the API or updates an existing one. + * + * @summary creates a new tool in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTool.json + */ +async function apiManagementCreateApiTool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.createOrUpdate( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/github-rest-api/operations/createIssue", + description: "This is a MCP tool to create an issue in a github repository", + displayName: "createIssue", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolDeleteSample.js new file mode 100644 index 000000000000..7a00623239f5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified tool in the API. + * + * @summary deletes the specified tool in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTool.json + */ +async function apiManagementDeleteApiTool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementDeleteApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetEntityTagSample.js new file mode 100644 index 000000000000..9ba7dfb3ebee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API tool specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTool.json + */ +async function apiManagementHeadApiTool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementHeadApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetSample.js new file mode 100644 index 000000000000..5eb23cd21143 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API Tool specified by its identifier. + * + * @summary gets the details of the API Tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTool.json + */ +async function apiManagementGetApiTool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.get( + "rg1", + "apimService1", + "github-mcp-api", + "findRepositories", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolListByApiSample.js new file mode 100644 index 000000000000..5a74d1b99998 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolListByApiSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the MCP tools for the specified API. + * + * @summary lists a collection of the MCP tools for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTools.json + */ +async function apiManagementListApiTools() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiTool.listByApi("rg1", "apimService1", "github-mcp-api")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiTools(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolUpdateSample.js new file mode 100644 index 000000000000..3545db7b641d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiToolUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the tool in the API specified by its identifier. + * + * @summary updates the details of the tool in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiTool.json + */ +async function apiManagementUpdateApiTool() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.update( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { description: "This is updated description", displayName: "createIssue" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiUpdateSample.js new file mode 100644 index 000000000000..1ba0e4c21297 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the specified API of the API Management service instance. + * + * @summary updates the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApi.json + */ +async function apiManagementUpdateApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update("rg1", "apimService1", "echo-api", "*", { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetCreateOrUpdateSample.js new file mode 100644 index 000000000000..18f41b33a075 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a Api Version Set. + * + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiVersionSet.json + */ +async function apiManagementCreateApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate("rg1", "apimService1", "api1", { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetDeleteSample.js new file mode 100644 index 000000000000..8340d6f9b0fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiVersionSet.json + */ +async function apiManagementDeleteApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiVersionSet.delete("rg1", "apimService1", "a1", "*"); +} + +async function main() { + await apiManagementDeleteApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetEntityTagSample.js new file mode 100644 index 000000000000..6aedf10749e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiVersionSet.json + */ +async function apiManagementHeadApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiVersionSet.getEntityTag("rg1", "apimService1", "vs1"); +} + +async function main() { + await apiManagementHeadApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetSample.js new file mode 100644 index 000000000000..14144251455c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiVersionSet.json + */ +async function apiManagementGetApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get("rg1", "apimService1", "vs1"); + console.log(result); +} + +async function main() { + await apiManagementGetApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetListByServiceSample.js new file mode 100644 index 000000000000..119cfb3c7f20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified service instance. + * + * @summary lists a collection of API Version Sets in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiVersionSets.json + */ +async function apiManagementListApiVersionSets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiVersionSet.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiVersionSets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetUpdateSample.js new file mode 100644 index 000000000000..e74ce128ad47 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiVersionSetUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. + * + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiVersionSet.json + */ +async function apiManagementUpdateApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update("rg1", "apimService1", "vs1", "*", { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiCreateOrUpdateSample.js new file mode 100644 index 000000000000..9f39402b1234 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Wiki for an API or updates an existing one. + * + * @summary creates a new Wiki for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWiki.json + */ +async function apiManagementCreateApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiDeleteSample.js new file mode 100644 index 000000000000..17004c2bc337 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Wiki from an API. + * + * @summary deletes the specified Wiki from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiWiki.json + */ +async function apiManagementDeleteApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main() { + await apiManagementDeleteApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetEntityTagSample.js new file mode 100644 index 000000000000..76e6c5b70f98 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiWiki.json + */ +async function apiManagementHeadApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main() { + await apiManagementHeadApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetSample.js new file mode 100644 index 000000000000..18f7af08045f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Wiki for an API specified by its identifier. + * + * @summary gets the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiWiki.json + */ +async function apiManagementGetApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main() { + await apiManagementGetApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiUpdateSample.js new file mode 100644 index 000000000000..cf8b2c3313a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikiUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Wiki for an API specified by its identifier. + * + * @summary updates the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiWiki.json + */ +async function apiManagementUpdateApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikisListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikisListSample.js new file mode 100644 index 000000000000..574f4ac18250 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/apiWikisListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the wikis for an API specified by its identifier. + * + * @summary gets the wikis for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiWikis.json + */ +async function apiManagementListApiWikis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiWikis.list( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiWikis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..af13d12fc92f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates Authorization Access Policy. + * + * @summary creates or updates Authorization Access Policy. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json + */ +async function apiManagementCreateAuthorizationAccessPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + { + appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyDeleteSample.js new file mode 100644 index 000000000000..d0800b2ac662 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific access policy from the Authorization. + * + * @summary deletes specific access policy from the Authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json + */ +async function apiManagementDeleteAuthorizationAccessPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationAccessPolicy.delete( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + "*", + ); +} + +async function main() { + await apiManagementDeleteAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyGetSample.js new file mode 100644 index 000000000000..1d2cb8fbfe74 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the authorization access policy specified by its identifier. + * + * @summary gets the details of the authorization access policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationAccessPolicy.json + */ +async function apiManagementGetAuthorizationAccessPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + ); + console.log(result); +} + +async function main() { + await apiManagementGetAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyListByAuthorizationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyListByAuthorizationSample.js new file mode 100644 index 000000000000..8f4b243da138 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationAccessPolicyListByAuthorizationSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of authorization access policy defined within a authorization. + * + * @summary lists a collection of authorization access policy defined within a authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationAccessPolicies.json + */ +async function apiManagementListAuthorizationAccessPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationAccessPolicy.listByAuthorization( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListAuthorizationAccessPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationConfirmConsentCodeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationConfirmConsentCodeSample.js new file mode 100644 index 000000000000..32bda3b39eee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationConfirmConsentCodeSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to confirm valid consent code to suppress Authorizations anti-phishing page. + * + * @summary confirm valid consent code to suppress Authorizations anti-phishing page. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + */ +async function apiManagementPostAuthorizationConfirmConsentCodeRequest() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorization.confirmConsentCode( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { consentCode: "theconsentcode" }, + ); +} + +async function main() { + await apiManagementPostAuthorizationConfirmConsentCodeRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationCreateOrUpdateSample.js new file mode 100644 index 000000000000..8ac479d82493 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationCreateOrUpdateSample.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates authorization. + * + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json + */ +async function apiManagementCreateAuthorizationAADAuthCode() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + "authz2", + { authorizationType: "OAuth2", oAuth2GrantType: "AuthorizationCode" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization. + * + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADClientCred.json + */ +async function apiManagementCreateAuthorizationAADClientCred() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + "rg1", + "apimService1", + "aadwithclientcred", + "authz1", + { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { clientId: "clientsecretid", clientSecret: "clientsecretvalue" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateAuthorizationAADAuthCode(); + await apiManagementCreateAuthorizationAADClientCred(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationDeleteSample.js new file mode 100644 index 000000000000..7e15f00f2979 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Authorization from the Authorization provider. + * + * @summary deletes specific Authorization from the Authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorization.json + */ +async function apiManagementDeleteAuthorization() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorization.delete("rg1", "apimService1", "aadwithauthcode", "authz1", "*"); +} + +async function main() { + await apiManagementDeleteAuthorization(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationGetSample.js new file mode 100644 index 000000000000..f23f45b205c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the authorization specified by its identifier. + * + * @summary gets the details of the authorization specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorization.json + */ +async function apiManagementGetAuthorization() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get("rg1", "apimService1", "aadwithauthcode", "authz1"); + console.log(result); +} + +async function main() { + await apiManagementGetAuthorization(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationListByAuthorizationProviderSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationListByAuthorizationProviderSample.js new file mode 100644 index 000000000000..0b7718799235 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationListByAuthorizationProviderSample.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. + * + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsAuthCode.json + */ +async function apiManagementListAuthorizationsAuthCode() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorization.listByAuthorizationProvider( + "rg1", + "apimService1", + "aadwithauthcode", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. + * + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsClientCred.json + */ +async function apiManagementListAuthorizationsClientCred() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorization.listByAuthorizationProvider( + "rg1", + "apimService1", + "aadwithclientcred", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListAuthorizationsAuthCode(); + await apiManagementListAuthorizationsClientCred(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationLoginLinksPostSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationLoginLinksPostSample.js new file mode 100644 index 000000000000..96d6de0918c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationLoginLinksPostSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets authorization login links. + * + * @summary gets authorization login links. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationLoginRequest.json + */ +async function apiManagementGetAuthorizationLoginRequest() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationLoginLinks.post( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { postLoginRedirectUrl: "https://www.bing.com/" }, + ); + console.log(result); +} + +async function main() { + await apiManagementGetAuthorizationLoginRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderCreateOrUpdateSample.js new file mode 100644 index 000000000000..f0de10770e27 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderCreateOrUpdateSample.js @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json + */ +async function apiManagementCreateAuthorizationProviderAADAuthCode() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + { + displayName: "aadwithauthcode", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "clientsecretid", + clientSecret: "clientsecretvalue", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json + */ +async function apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithkeyvault", + { + displayName: "Azure AD with Key Vault", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "53790825-fdd3-4b80-bc7a-4c3aaf25801d", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + keyVault: { secretIdentifier: "https://my.vault.azure.net/secrets/clientSecret" }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADClientCred.json + */ +async function apiManagementCreateAuthorizationProviderAADClientCred() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithclientcred", + { + displayName: "aadwithclientcred", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + */ +async function apiManagementCreateAuthorizationProviderGenericOAuth2() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "eventbrite", + { + displayName: "eventbrite", + identityProvider: "oauth2", + oauth2: { + grantTypes: { + authorizationCode: { + authorizationUrl: "https://www.eventbrite.com/oauth/authorize", + clientId: "clientid", + clientSecret: "clientsecretvalue", + refreshUrl: "https://www.eventbrite.com/oauth/token", + tokenUrl: "https://www.eventbrite.com/oauth/token", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderOOBGoogle.json + */ +async function apiManagementCreateAuthorizationProviderOOBGoogle() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "google", + { + displayName: "google", + identityProvider: "google", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", + clientSecret: "clientsecretvalue", + scopes: + "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateAuthorizationProviderAADAuthCode(); + await apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault(); + await apiManagementCreateAuthorizationProviderAADClientCred(); + await apiManagementCreateAuthorizationProviderGenericOAuth2(); + await apiManagementCreateAuthorizationProviderOOBGoogle(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderDeleteSample.js new file mode 100644 index 000000000000..f157d1473719 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific authorization provider from the API Management service instance. + * + * @summary deletes specific authorization provider from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationProvider.json + */ +async function apiManagementDeleteAuthorizationProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationProvider.delete("rg1", "apimService1", "aadwithauthcode", "*"); +} + +async function main() { + await apiManagementDeleteAuthorizationProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderGetSample.js new file mode 100644 index 000000000000..fa669146ba81 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the authorization provider specified by its identifier. + * + * @summary gets the details of the authorization provider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationProvider.json + */ +async function apiManagementGetAuthorizationProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.get("rg1", "apimService1", "aadwithauthcode"); + console.log(result); +} + +async function main() { + await apiManagementGetAuthorizationProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderListByServiceSample.js new file mode 100644 index 000000000000..2c4ba7f89dd6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a service instance. + * + * @summary lists a collection of authorization providers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationProviders.json + */ +async function apiManagementListAuthorizationProviders() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListAuthorizationProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderRefreshSecretSample.js new file mode 100644 index 000000000000..0b428f9d50f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationProviderRefreshSecretSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to refreshes the Key Vault reference secret for the specified authorization provider. + * + * @summary refreshes the Key Vault reference secret for the specified authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json + */ +async function apiManagementAuthorizationProviderRefreshSecret() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.refreshSecret( + "rg1", + "apimService1", + "aadwithkeyvault", + ); + console.log(result); +} + +async function main() { + await apiManagementAuthorizationProviderRefreshSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerCreateOrUpdateSample.js new file mode 100644 index 000000000000..178845d32bcc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerCreateOrUpdateSample.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates new authorization server or updates an existing authorization server. + * + * @summary creates new authorization server or updates an existing authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationServer.json + */ +async function apiManagementCreateAuthorizationServer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.createOrUpdate( + "rg1", + "apimService1", + "newauthServer", + { + description: "test server", + authorizationEndpoint: "https://www.contoso.com/oauth2/auth", + authorizationMethods: ["GET"], + bearerTokenSendingMethods: ["authorizationHeader"], + clientId: "1", + clientRegistrationEndpoint: "https://www.contoso.com/apps", + clientSecret: "2", + defaultScope: "read write", + displayName: "test2", + grantTypes: ["authorizationCode", "implicit"], + resourceOwnerPassword: "pwd", + resourceOwnerUsername: "un", + supportState: true, + tokenEndpoint: "https://www.contoso.com/oauth2/token", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerDeleteSample.js new file mode 100644 index 000000000000..7f974cb7d9d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific authorization server instance. + * + * @summary deletes specific authorization server instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationServer.json + */ +async function apiManagementDeleteAuthorizationServer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationServer.delete("rg1", "apimService1", "newauthServer2", "*"); +} + +async function main() { + await apiManagementDeleteAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetEntityTagSample.js new file mode 100644 index 000000000000..ece916bbad3f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * + * @summary gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadAuthorizationServer.json + */ +async function apiManagementHeadAuthorizationServer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationServer.getEntityTag("rg1", "apimService1", "newauthServer2"); +} + +async function main() { + await apiManagementHeadAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetSample.js new file mode 100644 index 000000000000..0f95a8a05927 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the authorization server specified by its identifier. + * + * @summary gets the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationServer.json + */ +async function apiManagementGetAuthorizationServer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.get("rg1", "apimService1", "newauthServer2"); + console.log(result); +} + +async function main() { + await apiManagementGetAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListByServiceSample.js new file mode 100644 index 000000000000..b0cf2156e056 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of authorization servers defined within a service instance. + * + * @summary lists a collection of authorization servers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationServers.json + */ +async function apiManagementListAuthorizationServers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationServer.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListAuthorizationServers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListSecretsSample.js new file mode 100644 index 000000000000..a7dab9529014 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerListSecretsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the client secret details of the authorization server. + * + * @summary gets the client secret details of the authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAuthorizationServerListSecrets.json + */ +async function apiManagementAuthorizationServerListSecrets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.listSecrets( + "rg1", + "apimService1", + "newauthServer2", + ); + console.log(result); +} + +async function main() { + await apiManagementAuthorizationServerListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerUpdateSample.js new file mode 100644 index 000000000000..8826cf60a535 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/authorizationServerUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the authorization server specified by its identifier. + * + * @summary updates the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateAuthorizationServer.json + */ +async function apiManagementUpdateAuthorizationServer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.update( + "rg1", + "apimService1", + "newauthServer", + "*", + { + clientId: "update", + clientSecret: "updated", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendCreateOrUpdateSample.js new file mode 100644 index 000000000000..00cdcbe278ee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendCreateOrUpdateSample.js @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json + */ +async function apiManagementCreateBackendCustomAssignedCertificateThumbprint() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverCertificateThumbprints: ["1365083bae61ee876fc26850b825d05d3eb2e503"], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendProxyBackend.json + */ +async function apiManagementCreateBackendProxyBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "proxybackend", { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { "x-my-1": ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] }, + }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendServiceFabric.json + */ +async function apiManagementCreateBackendServiceFabric() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "sfbackend", { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1", + }, + ], + }, + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithAzureRegion.json + */ +async function apiManagementCreateBackendWithAzureRegion() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "azurebackend", { + azureRegion: "northeurope", + url: "https://backendname2644/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json + */ +async function apiManagementCreateBackendWithCarbonAwareLoadBalancer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "carbonawareloadbalancerbackend", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sustainable-backend-europe-north", + preferredCarbonEmission: "Medium", + priority: 1, + weight: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + priority: 1, + weight: 1, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json + */ +async function apiManagementCreateBackendCustomAssignedCertificateX509Names() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverX509Names: [{ name: "*.badssl.com" }], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json + */ +async function apiManagementCreateBackendWithPriorityBasedLoadBalancer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "priority-based-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-3", + priority: 2, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-4", + priority: 2, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithSimpleLoadBalancer.json + */ +async function apiManagementCreateBackendWithSimpleLoadBalancer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "simple-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithWeightedLoadBalancer.json + */ +async function apiManagementCreateBackendWithWeightedLoadBalancer() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "weighted-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + weight: 75, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + weight: 25, + }, + ], + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateBackendCustomAssignedCertificateThumbprint(); + await apiManagementCreateBackendProxyBackend(); + await apiManagementCreateBackendServiceFabric(); + await apiManagementCreateBackendWithAzureRegion(); + await apiManagementCreateBackendWithCarbonAwareLoadBalancer(); + await apiManagementCreateBackendCustomAssignedCertificateX509Names(); + await apiManagementCreateBackendWithPriorityBasedLoadBalancer(); + await apiManagementCreateBackendWithSimpleLoadBalancer(); + await apiManagementCreateBackendWithWeightedLoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendDeleteSample.js new file mode 100644 index 000000000000..f49bcf3b26bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteBackend.json + */ +async function apiManagementDeleteBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.delete("rg1", "apimService1", "sfbackend", "*"); +} + +async function main() { + await apiManagementDeleteBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetEntityTagSample.js new file mode 100644 index 000000000000..6ed41b57e872 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadBackend.json + */ +async function apiManagementHeadBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.getEntityTag("rg1", "apimService1", "sfbackend"); +} + +async function main() { + await apiManagementHeadBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetSample.js new file mode 100644 index 000000000000..d1b352d2d7ed --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetBackend.json + */ +async function apiManagementGetBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.get("rg1", "apimService1", "sfbackend"); + console.log(result); +} + +async function main() { + await apiManagementGetBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendListByServiceSample.js new file mode 100644 index 000000000000..0ca04e8ec674 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of backends in the specified service instance. + * + * @summary lists a collection of backends in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListBackends.json + */ +async function apiManagementListBackends() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.backend.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListBackends(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendReconnectSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendReconnectSample.js new file mode 100644 index 000000000000..1108f3e3e8b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendReconnectSample.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * + * @summary notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackendReconnect.json + */ +async function apiManagementBackendReconnect() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.reconnect("rg1", "apimService1", "proxybackend", { + parameters: { after: "PT3S" }, + }); +} + +async function main() { + await apiManagementBackendReconnect(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendUpdateSample.js new file mode 100644 index 000000000000..b65ba03caf05 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/backendUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing backend. + * + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateBackend.json + */ +async function apiManagementUpdateBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.update("rg1", "apimService1", "proxybackend", "*", { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheCreateOrUpdateSample.js new file mode 100644 index 000000000000..ba7a5ffb97a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates an External Cache to be used in Api Management instance. + * + * @summary creates or updates an External Cache to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCache.json + */ +async function apiManagementCreateCache() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.createOrUpdate("rg1", "apimService1", "c1", { + description: "Redis cache instances in West India", + connectionString: "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + resourceId: + "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + useFromLocation: "default", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheDeleteSample.js new file mode 100644 index 000000000000..3cb4e3d19cbe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Cache. + * + * @summary deletes specific Cache. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCache.json + */ +async function apiManagementDeleteCache() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.cache.delete("rg1", "apimService1", "southindia", "*"); +} + +async function main() { + await apiManagementDeleteCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetEntityTagSample.js new file mode 100644 index 000000000000..aa04ca773e5f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Cache specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCache.json + */ +async function apiManagementHeadCache() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.cache.getEntityTag("rg1", "apimService1", "default"); +} + +async function main() { + await apiManagementHeadCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetSample.js new file mode 100644 index 000000000000..5f8f0cccdbaf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Cache specified by its identifier. + * + * @summary gets the details of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCache.json + */ +async function apiManagementGetCache() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.get("rg1", "apimService1", "c1"); + console.log(result); +} + +async function main() { + await apiManagementGetCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheListByServiceSample.js new file mode 100644 index 000000000000..7063394f92d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of all external Caches in the specified service instance. + * + * @summary lists a collection of all external Caches in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCaches.json + */ +async function apiManagementListCaches() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.cache.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListCaches(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheUpdateSample.js new file mode 100644 index 000000000000..cd987fd1e283 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/cacheUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the cache specified by its identifier. + * + * @summary updates the details of the cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateCache.json + */ +async function apiManagementUpdateCache() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.update("rg1", "apimService1", "c1", "*", { + useFromLocation: "westindia", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateCreateOrUpdateSample.js new file mode 100644 index 000000000000..4c6c7cd3074d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateCreateOrUpdateSample.js @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificate.json + */ +async function apiManagementCreateCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "tempcert", { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificateWithKeyVault.json + */ +async function apiManagementCreateCertificateWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "templateCertkv", { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateCertificate(); + await apiManagementCreateCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateDeleteSample.js new file mode 100644 index 000000000000..2f0cec11eb26 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCertificate.json + */ +async function apiManagementDeleteCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.certificate.delete("rg1", "apimService1", "tempcert", "*"); +} + +async function main() { + await apiManagementDeleteCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetEntityTagSample.js new file mode 100644 index 000000000000..fc43b912ace6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCertificate.json + */ +async function apiManagementHeadCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.certificate.getEntityTag("rg1", "apimService1", "templateCert1"); +} + +async function main() { + await apiManagementHeadCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetSample.js new file mode 100644 index 000000000000..41b7e076493f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificate.json + */ +async function apiManagementGetCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get("rg1", "apimService1", "templateCert1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificateWithKeyVault.json + */ +async function apiManagementGetCertificateWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get("rg1", "apimService1", "templateCertkv"); + console.log(result); +} + +async function main() { + await apiManagementGetCertificate(); + await apiManagementGetCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateListByServiceSample.js new file mode 100644 index 000000000000..2dd69592a50e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of all certificates in the specified service instance. + * + * @summary lists a collection of all certificates in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCertificates.json + */ +async function apiManagementListCertificates() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.certificate.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListCertificates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateRefreshSecretSample.js new file mode 100644 index 000000000000..07adb7b815fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/certificateRefreshSecretSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshCertificate.json + */ +async function apiManagementRefreshCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.refreshSecret("rg1", "apimService1", "templateCertkv"); + console.log(result); +} + +async function main() { + await apiManagementRefreshCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationCreateOrUpdateSample.js new file mode 100644 index 000000000000..2b20b68be47e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a client application. + * + * @summary creates or Updates a client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplication.json + */ +async function apiManagementCreateProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.createOrUpdate("rg1", "apimService1", "testAppId", { + description: "This is just an example application", + displayName: "Test Application", + ownerId: "/users/userId", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationDeleteSample.js new file mode 100644 index 000000000000..00b55cd710a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete client application. + * + * @summary delete client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplication.json + */ +async function apiManagementDeleteProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.delete("rg1", "apimService1", "testAppId"); +} + +async function main() { + await apiManagementDeleteProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetEntityTagSample.js new file mode 100644 index 000000000000..d9db8449dbde --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadClientApplication.json + */ +async function apiManagementHeadProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.getEntityTag("rg1", "apimService1", "testAppId"); +} + +async function main() { + await apiManagementHeadProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetSample.js new file mode 100644 index 000000000000..56c90c59d867 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the client application specified by its identifier. + * + * @summary gets the details of the client application specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplication.json + */ +async function apiManagementGetClientApplication() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.get("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main() { + await apiManagementGetClientApplication(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListByServiceSample.js new file mode 100644 index 000000000000..16484ce0a731 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of client applications in the specified service instance. + * + * @summary lists a collection of client applications in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplications.json + */ +async function apiManagementListProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplication.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListSecretsSample.js new file mode 100644 index 000000000000..fae3150692e1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationListSecretsSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to retrived client application secrets. + * + * @summary retrived client application secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationSecrets.json + */ +async function apiManagementListProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.listSecrets("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main() { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkCreateSample.js new file mode 100644 index 000000000000..dc14399d9f96 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkCreateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an Product to the specified Client Application via link. + * + * @summary adds an Product to the specified Client Application via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplicationProductLink.json + */ +async function apiManagementCreateClientApplicationProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.create( + "rg1", + "apimService1", + "testAppId", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkDeleteSample.js new file mode 100644 index 000000000000..63153d005455 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Product from the specified client application. + * + * @summary deletes the specified Product from the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplicationProductLink.json + */ +async function apiManagementDeleteClientApplicationProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplicationProductLink.delete("rg1", "apimService1", "testAppId", "link1"); +} + +async function main() { + await apiManagementDeleteClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkGetSample.js new file mode 100644 index 000000000000..c3975c7e4650 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the product link for the client application. + * + * @summary gets the product link for the client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplicationProductLink.json + */ +async function apiManagementGetProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.get( + "rg1", + "apimService1", + "testAppId", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkListByClientApplicationsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkListByClientApplicationsSample.js new file mode 100644 index 000000000000..f3b697ceb1be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/clientApplicationProductLinkListByClientApplicationsSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of product links associated with the specified client application. + * + * @summary lists a collection of product links associated with the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationProductLinks.json + */ +async function apiManagementListProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplicationProductLink.listByClientApplications( + "rg1", + "apimService1", + "testAppId", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemCreateOrUpdateSample.js new file mode 100644 index 000000000000..e02b89e2b592 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemCreateOrUpdateSample.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new developer portal's content item specified by the provided content type. + * + * @summary creates a new developer portal's content item specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentTypeContentItem.json + */ +async function apiManagementCreateContentTypeContentItem() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.createOrUpdate( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + { + properties: { + en_us: { + description: "Short story about the company.", + documentId: "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + keywords: "company, about", + permalink: "/about", + title: "About", + }, + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemDeleteSample.js new file mode 100644 index 000000000000..eeae36bdcc65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the specified developer portal's content item. + * + * @summary removes the specified developer portal's content item. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentTypeContentItem.json + */ +async function apiManagementDeleteContentTypeContentItem() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentItem.delete( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "*", + ); +} + +async function main() { + await apiManagementDeleteContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetEntityTagSample.js new file mode 100644 index 000000000000..4f3cb4f30705 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * + * @summary returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadContentTypeContentItem.json + */ +async function apiManagementHeadContentTypeContentItem() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentItem.getEntityTag( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + ); +} + +async function main() { + await apiManagementHeadContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetSample.js new file mode 100644 index 000000000000..dabcd2e30a60 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the developer portal's content item specified by its identifier. + * + * @summary returns the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentTypeContentItem.json + */ +async function apiManagementGetContentTypeContentItem() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.get( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + ); + console.log(result); +} + +async function main() { + await apiManagementGetContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemListByServiceSample.js new file mode 100644 index 000000000000..ee1b845b81fe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentItemListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists developer portal's content items specified by the provided content type. + * + * @summary lists developer portal's content items specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypeContentItems.json + */ +async function apiManagementListContentTypeContentItems() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.contentItem.listByService("rg1", "apimService1", "page")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListContentTypeContentItems(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeCreateOrUpdateSample.js new file mode 100644 index 000000000000..9448b3df2002 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeCreateOrUpdateSample.js @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * + * @summary creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentType.json + */ +async function apiManagementCreateContentType() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.createOrUpdate("rg1", "apimService1", "page", { + namePropertiesName: "Page", + schema: { + additionalProperties: false, + properties: { + en_us: { + type: "object", + additionalProperties: false, + properties: { + description: { + type: "string", + description: "Page description. This property gets included in SEO attributes.", + indexed: true, + title: "Description", + }, + documentId: { + type: "string", + description: "Reference to page content document.", + title: "Document ID", + }, + keywords: { + type: "string", + description: "Page keywords. This property gets included in SEO attributes.", + indexed: true, + title: "Keywords", + }, + permalink: { + type: "string", + description: "Page permalink, e.g. '/about'.", + indexed: true, + title: "Permalink", + }, + title: { + type: "string", + description: "Page title. This property gets included in SEO attributes.", + indexed: true, + title: "Title", + }, + }, + required: ["title", "permalink", "documentId"], + }, + }, + }, + description: "A regular page", + version: "1.0.0", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeDeleteSample.js new file mode 100644 index 000000000000..129767ece1c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * + * @summary removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentType.json + */ +async function apiManagementDeleteContentType() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentType.delete("rg1", "apimService1", "page", "*"); +} + +async function main() { + await apiManagementDeleteContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeGetSample.js new file mode 100644 index 000000000000..0d2a892d4f0b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * + * @summary gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentType.json + */ +async function apiManagementGetContentType() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.get("rg1", "apimService1", "page"); + console.log(result); +} + +async function main() { + await apiManagementGetContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeListByServiceSample.js new file mode 100644 index 000000000000..5c77b61bd56f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/contentTypeListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * + * @summary lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypes.json + */ +async function apiManagementListContentTypes() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.contentType.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListContentTypes(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsCreateOrUpdateSample.js new file mode 100644 index 000000000000..46cbac74bbbe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or Update Delegation settings. + * + * @summary create or Update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutDelegation.json + */ +async function apiManagementPortalSettingsUpdateDelegation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.createOrUpdate( + "rg1", + "apimService1", + { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsUpdateDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetEntityTagSample.js new file mode 100644 index 000000000000..b83f5baf7c84 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the DelegationSettings. + * + * @summary gets the entity state (Etag) version of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDelegationSettings.json + */ +async function apiManagementHeadDelegationSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.delegationSettings.getEntityTag("rg1", "apimService1"); +} + +async function main() { + await apiManagementHeadDelegationSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetSample.js new file mode 100644 index 000000000000..f46747f72e8d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get Delegation Settings for the Portal. + * + * @summary get Delegation Settings for the Portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetDelegation.json + */ +async function apiManagementPortalSettingsGetDelegation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsGetDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsListSecretsSample.js new file mode 100644 index 000000000000..19f11a50f65a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsListSecretsSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the secret validation key of the DelegationSettings. + * + * @summary gets the secret validation key of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json + */ +async function apiManagementListSecretsPortalSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.listSecrets("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementListSecretsPortalSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsUpdateSample.js new file mode 100644 index 000000000000..66bd0b2cbcba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/delegationSettingsUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update Delegation settings. + * + * @summary update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateDelegation.json + */ +async function apiManagementPortalSettingsUpdateDelegation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.delegationSettings.update("rg1", "apimService1", "*", { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "", + }); +} + +async function main() { + await apiManagementPortalSettingsUpdateDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesGetByNameSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesGetByNameSample.js new file mode 100644 index 000000000000..be8376afbbf3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesGetByNameSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get soft-deleted Api Management Service by name. + * + * @summary get soft-deleted Api Management Service by name. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDeletedServiceByName.json + */ +async function apiManagementGetDeletedServiceByName() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.getByName("westus", "apimService3"); + console.log(result); +} + +async function main() { + await apiManagementGetDeletedServiceByName(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesListBySubscriptionSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesListBySubscriptionSample.js new file mode 100644 index 000000000000..04e2ff998b8f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesListBySubscriptionSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all soft-deleted services available for undelete for the given subscription. + * + * @summary lists all soft-deleted services available for undelete for the given subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesListBySubscription.json + */ +async function apiManagementDeletedServicesListBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.deletedServices.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementDeletedServicesListBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesPurgeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesPurgeSample.js new file mode 100644 index 000000000000..00b796af46f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/deletedServicesPurgeSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to purges Api Management Service (deletes it with no option to undelete). + * + * @summary purges Api Management Service (deletes it with no option to undelete). + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesPurge.json + */ +async function apiManagementDeletedServicesPurge() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.purge("westus", "apimService3"); + console.log(result); +} + +async function main() { + await apiManagementDeletedServicesPurge(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticCreateOrUpdateSample.js new file mode 100644 index 000000000000..fdbe58c9c513 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticCreateOrUpdateSample.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. + * + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDiagnostic.json + */ +async function apiManagementCreateDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.createOrUpdate( + "rg1", + "apimService1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticDeleteSample.js new file mode 100644 index 000000000000..7fbe3f7ae8ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDiagnostic.json + */ +async function apiManagementDeleteDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.diagnostic.delete("rg1", "apimService1", "applicationinsights", "*"); +} + +async function main() { + await apiManagementDeleteDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetEntityTagSample.js new file mode 100644 index 000000000000..819eeff82325 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDiagnostic.json + */ +async function apiManagementHeadDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.diagnostic.getEntityTag("rg1", "apimService1", "applicationinsights"); +} + +async function main() { + await apiManagementHeadDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetSample.js new file mode 100644 index 000000000000..5660966a3d4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDiagnostic.json + */ +async function apiManagementGetDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.get("rg1", "apimService1", "applicationinsights"); + console.log(result); +} + +async function main() { + await apiManagementGetDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticListByServiceSample.js new file mode 100644 index 000000000000..ba2020f19aeb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all diagnostics of the API Management service instance. + * + * @summary lists all diagnostics of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDiagnostics.json + */ +async function apiManagementListDiagnostics() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.diagnostic.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticUpdateSample.js new file mode 100644 index 000000000000..77fcb9970733 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/diagnosticUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. + * + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDiagnostic.json + */ +async function apiManagementUpdateDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.update("rg1", "apimService1", "applicationinsights", "*", { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationCreateOrUpdateSample.js new file mode 100644 index 000000000000..bdf89b966d9f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Documentation or updates an existing one. + * + * @summary creates a new Documentation or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDocumentation.json + */ +async function apiManagementCreateDocumentation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { content: "content", title: "Title" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationDeleteSample.js new file mode 100644 index 000000000000..7a747dba7fa5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Documentation from an API. + * + * @summary deletes the specified Documentation from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDocumentation.json + */ +async function apiManagementDeleteDocumentation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.documentation.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main() { + await apiManagementDeleteDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetEntityTagSample.js new file mode 100644 index 000000000000..94ee7c5fa2bb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Documentation by its identifier. + * + * @summary gets the entity state (Etag) version of the Documentation by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDocumentation.json + */ +async function apiManagementHeadDocumentation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.documentation.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main() { + await apiManagementHeadDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetSample.js new file mode 100644 index 000000000000..966217d2110f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Documentation specified by its identifier. + * + * @summary gets the details of the Documentation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDocumentation.json + */ +async function apiManagementGetDocumentation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main() { + await apiManagementGetDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationListByServiceSample.js new file mode 100644 index 000000000000..366fa835d311 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Documentations of the API Management service instance. + * + * @summary lists all Documentations of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDocumentations.json + */ +async function apiManagementListApis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.documentation.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationUpdateSample.js new file mode 100644 index 000000000000..06b9f4b2518a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/documentationUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Documentation for an API specified by its identifier. + * + * @summary updates the details of the Documentation for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDocumentation.json + */ +async function apiManagementUpdateDocumentation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { content: "content updated", title: "Title updated" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateCreateOrUpdateSample.js new file mode 100644 index 000000000000..9cbf7539aa34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an Email Template. + * + * @summary updates an Email Template. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTemplate.json + */ +async function apiManagementCreateTemplate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.createOrUpdate( + "rg1", + "apimService1", + "newIssueNotificationMessage", + { subject: "Your request for $IssueName was successfully received." }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateDeleteSample.js new file mode 100644 index 000000000000..8d6b8906dc5f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to reset the Email Template to default template provided by the API Management service instance. + * + * @summary reset the Email Template to default template provided by the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTemplate.json + */ +async function apiManagementDeleteTemplate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.emailTemplate.delete("rg1", "apimService1", "newIssueNotificationMessage", "*"); +} + +async function main() { + await apiManagementDeleteTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetEntityTagSample.js new file mode 100644 index 000000000000..5cc1fcde2573 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the email template specified by its identifier. + * + * @summary gets the entity state (Etag) version of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadEmailTemplate.json + */ +async function apiManagementHeadEmailTemplate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.emailTemplate.getEntityTag("rg1", "apimService1", "newIssueNotificationMessage"); +} + +async function main() { + await apiManagementHeadEmailTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetSample.js new file mode 100644 index 000000000000..872ce0a38769 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the email template specified by its identifier. + * + * @summary gets the details of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTemplate.json + */ +async function apiManagementGetTemplate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.get( + "rg1", + "apimService1", + "newIssueNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementGetTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateListByServiceSample.js new file mode 100644 index 000000000000..2b235dae7a19 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all email templates + * + * @summary gets all email templates + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTemplates.json + */ +async function apiManagementListTemplates() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.emailTemplate.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTemplates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateUpdateSample.js new file mode 100644 index 000000000000..9afc0d8b10cf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/emailTemplateUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates API Management email template + * + * @summary updates API Management email template + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTemplate.json + */ +async function apiManagementUpdateTemplate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.update( + "rg1", + "apimService1", + "newIssueNotificationMessage", + "*", + { + body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', + subject: "Your request $IssueName was received", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiCreateOrUpdateSample.js new file mode 100644 index 000000000000..fcc6094ff7b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiCreateOrUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified Gateway. + * + * @summary adds an API to the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayApi.json + */ +async function apiManagementCreateGatewayApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.createOrUpdate("rg1", "apimService1", "gw1", "echo-api", { + parameters: { provisioningState: "created" }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiDeleteSample.js new file mode 100644 index 000000000000..2ac0cd99a9de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified Gateway. + * + * @summary deletes the specified API from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayApi.json + */ +async function apiManagementDeleteGatewayApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayApi.delete("rg1", "apimService1", "gw1", "echo-api"); +} + +async function main() { + await apiManagementDeleteGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiGetEntityTagSample.js new file mode 100644 index 000000000000..631230228177 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Gateway entity. + * + * @summary checks that API entity specified by identifier is associated with the Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayApi.json + */ +async function apiManagementHeadGatewayApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayApi.getEntityTag("rg1", "apimService1", "gw1", "api1"); +} + +async function main() { + await apiManagementHeadGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiListByServiceSample.js new file mode 100644 index 000000000000..ce7d2b2b4664 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayApiListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the APIs associated with a gateway. + * + * @summary lists a collection of the APIs associated with a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayApis.json + */ +async function apiManagementListGatewayApis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayApi.listByService("rg1", "apimService1", "gw1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewayApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js new file mode 100644 index 000000000000..9fac84e98fc0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to assign Certificate entity to Gateway entity as Certificate Authority. + * + * @summary assign Certificate entity to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayCertificateAuthority.json + */ +async function apiManagementCreateGatewayCertificateAuthority() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.createOrUpdate( + "rg1", + "apimService1", + "gw1", + "cert1", + { isTrusted: false }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityDeleteSample.js new file mode 100644 index 000000000000..9055c456fe49 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to remove relationship between Certificate Authority and Gateway entity. + * + * @summary remove relationship between Certificate Authority and Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json + */ +async function apiManagementDeleteGatewayCertificateAuthority() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayCertificateAuthority.delete("rg1", "apimService1", "gw1", "default", "*"); +} + +async function main() { + await apiManagementDeleteGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetEntityTagSample.js new file mode 100644 index 000000000000..fa17a2545539 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * + * @summary checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayCertificateAuthority.json + */ +async function apiManagementHeadGatewayCertificateAuthority() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayCertificateAuthority.getEntityTag("rg1", "apimService1", "gw1", "cert1"); +} + +async function main() { + await apiManagementHeadGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetSample.js new file mode 100644 index 000000000000..3dbc65772ae3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get assigned Gateway Certificate Authority details. + * + * @summary get assigned Gateway Certificate Authority details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayCertificateAuthority.json + */ +async function apiManagementGetGatewayCertificateAuthority() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.get( + "rg1", + "apimService1", + "gw1", + "cert1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityListByServiceSample.js new file mode 100644 index 000000000000..9285004e77a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCertificateAuthorityListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the collection of Certificate Authorities for the specified Gateway entity. + * + * @summary lists the collection of Certificate Authorities for the specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayCertificateAuthorities.json + */ +async function apiManagementListGatewaycertificateAuthorities() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayCertificateAuthority.listByService( + "rg1", + "apimService1", + "gw1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewaycertificateAuthorities(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCreateOrUpdateSample.js new file mode 100644 index 000000000000..20d64b35fdc8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayCreateOrUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates a Gateway to be used in Api Management instance. + * + * @summary creates or updates a Gateway to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGateway.json + */ +async function apiManagementCreateGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.createOrUpdate("rg1", "apimService1", "gw1", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayDeleteSample.js new file mode 100644 index 000000000000..2e117c994f78 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Gateway. + * + * @summary deletes specific Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGateway.json + */ +async function apiManagementDeleteGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.delete("rg1", "apimService1", "gw1", "*"); +} + +async function main() { + await apiManagementDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGenerateTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGenerateTokenSample.js new file mode 100644 index 000000000000..18943bd4ef89 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGenerateTokenSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the Shared Access Authorization Token for the gateway. + * + * @summary gets the Shared Access Authorization Token for the gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGenerateToken.json + */ +async function apiManagementGatewayGenerateToken() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.generateToken("rg1", "apimService1", "gw1", { + expiry: new Date("2020-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); + console.log(result); +} + +async function main() { + await apiManagementGatewayGenerateToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetEntityTagSample.js new file mode 100644 index 000000000000..239c95d453f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Gateway specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGateway.json + */ +async function apiManagementHeadGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.getEntityTag("rg1", "apimService1", "mygateway"); +} + +async function main() { + await apiManagementHeadGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetSample.js new file mode 100644 index 000000000000..518f0db00f8e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Gateway specified by its identifier. + * + * @summary gets the details of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGateway.json + */ +async function apiManagementGetGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.get("rg1", "apimService1", "gw1"); + console.log(result); +} + +async function main() { + await apiManagementGetGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js new file mode 100644 index 000000000000..c6c5ee9583f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationCreateOrUpdateSample.js @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates of updates hostname configuration for a Gateway. + * + * @summary creates of updates hostname configuration for a Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json + */ +async function apiManagementCreateGatewayHostnameConfiguration() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.createOrUpdate( + "rg1", + "apimService1", + "gw1", + "default", + { + certificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + hostname: "*", + http2Enabled: true, + negotiateClientCertificate: false, + tls10Enabled: false, + tls11Enabled: false, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationDeleteSample.js new file mode 100644 index 000000000000..de16988479c5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified hostname configuration from the specified Gateway. + * + * @summary deletes the specified hostname configuration from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json + */ +async function apiManagementDeleteGatewayHostnameConfiguration() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayHostnameConfiguration.delete("rg1", "apimService1", "gw1", "default", "*"); +} + +async function main() { + await apiManagementDeleteGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetEntityTagSample.js new file mode 100644 index 000000000000..b98054e08a1f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * + * @summary checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json + */ +async function apiManagementHeadGatewayHostnameConfiguration() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayHostnameConfiguration.getEntityTag("rg1", "apimService1", "gw1", "default"); +} + +async function main() { + await apiManagementHeadGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetSample.js new file mode 100644 index 000000000000..1e63e81e52d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get details of a hostname configuration + * + * @summary get details of a hostname configuration + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameConfiguration.json + */ +async function apiManagementGetGatewayHostnameConfiguration() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.get( + "rg1", + "apimService1", + "gw1", + "default", + ); + console.log(result); +} + +async function main() { + await apiManagementGetGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationListByServiceSample.js new file mode 100644 index 000000000000..1c2cd063743a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayHostnameConfigurationListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the collection of hostname configurations for the specified gateway. + * + * @summary lists the collection of hostname configurations for the specified gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameConfigurations.json + */ +async function apiManagementListGatewayHostnameConfigurations() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayHostnameConfiguration.listByService( + "rg1", + "apimService1", + "gw1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGatewayHostnameConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayInvalidateDebugCredentialsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayInvalidateDebugCredentialsSample.js new file mode 100644 index 000000000000..83135694096d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayInvalidateDebugCredentialsSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to action is invalidating all debug credentials issued for gateway. + * + * @summary action is invalidating all debug credentials issued for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json + */ +async function apiManagementGatewayInvalidateDebugCredentials() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.invalidateDebugCredentials("rg1", "apimService1", "gw1"); +} + +async function main() { + await apiManagementGatewayInvalidateDebugCredentials(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListByServiceSample.js new file mode 100644 index 000000000000..a6b3a39aef1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of gateways registered with service instance. + * + * @summary lists a collection of gateways registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGateways.json + */ +async function apiManagementListGateways() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gateway.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGateways(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListDebugCredentialsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListDebugCredentialsSample.js new file mode 100644 index 000000000000..023b60d8dbe9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListDebugCredentialsSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create new debug credentials for gateway. + * + * @summary create new debug credentials for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListDebugCredentials.json + */ +async function apiManagementGatewayListDebugCredentials() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listDebugCredentials("rg1", "apimService1", "gw1", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + credentialsExpireAfter: "PT1H", + purposes: ["tracing"], + }); + console.log(result); +} + +async function main() { + await apiManagementGatewayListDebugCredentials(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListKeysSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListKeysSample.js new file mode 100644 index 000000000000..27c778bb7f9d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListKeysSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to retrieves gateway keys. + * + * @summary retrieves gateway keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListKeys.json + */ +async function apiManagementGatewayListKeys() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listKeys("rg1", "apimService1", "gw1"); + console.log(result); +} + +async function main() { + await apiManagementGatewayListKeys(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListTraceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListTraceSample.js new file mode 100644 index 000000000000..b1d2bc6ca933 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayListTraceSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to fetches trace collected by gateway. + * + * @summary fetches trace collected by gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListTrace.json + */ +async function apiManagementGatewayListTrace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listTrace("rg1", "apimService1", "gw1", { + traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", + }); + console.log(result); +} + +async function main() { + await apiManagementGatewayListTrace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayRegenerateKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayRegenerateKeySample.js new file mode 100644 index 000000000000..02cf8abbe0bb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayRegenerateKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerates specified gateway key invalidating any tokens created with it. + * + * @summary regenerates specified gateway key invalidating any tokens created with it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayRegenerateKey.json + */ +async function apiManagementGatewayRegenerateKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.regenerateKey("rg1", "apimService1", "gwId", { keyType: "primary" }); +} + +async function main() { + await apiManagementGatewayRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayUpdateSample.js new file mode 100644 index 000000000000..7632f749f5a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/gatewayUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the gateway specified by its identifier. + * + * @summary updates the details of the gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGateway.json + */ +async function apiManagementUpdateGateway() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.update("rg1", "apimService1", "gw1", "*", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaCreateOrUpdateSample.js new file mode 100644 index 000000000000..f71fa4e045b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaCreateOrUpdateSample.js @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. + * + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema1.json + */ +async function apiManagementCreateSchema1() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. + * + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema2.json + */ +async function apiManagementCreateSchema2() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { + description: "sample schema description", + document: { + type: "object", + $id: "https://example.com/person.schema.json", + $schema: "https://json-schema.org/draft/2020-12/schema", + properties: { + age: { + type: "integer", + description: "Age in years which must be equal to or greater than zero.", + minimum: 0, + }, + firstName: { type: "string", description: "The person's first name." }, + lastName: { type: "string", description: "The person's last name." }, + }, + title: "Person", + }, + schemaType: "json", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateSchema1(); + await apiManagementCreateSchema2(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaDeleteSample.js new file mode 100644 index 000000000000..50a37ea489bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGlobalSchema.json + */ +async function apiManagementDeleteSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.globalSchema.delete("rg1", "apimService1", "schema1", "*"); +} + +async function main() { + await apiManagementDeleteSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetEntityTagSample.js new file mode 100644 index 000000000000..797eb0b6789b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGlobalSchema.json + */ +async function apiManagementHeadApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.globalSchema.getEntityTag("rg1", "apimService1", "myschema"); +} + +async function main() { + await apiManagementHeadApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetSample.js new file mode 100644 index 000000000000..ec02f6ff8f51 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema1.json + */ +async function apiManagementGetSchema1() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get("rg1", "apimService1", "schema1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema2.json + */ +async function apiManagementGetSchema2() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get("rg1", "apimService1", "schema2"); + console.log(result); +} + +async function main() { + await apiManagementGetSchema1(); + await apiManagementGetSchema2(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaListByServiceSample.js new file mode 100644 index 000000000000..10143fc82137 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/globalSchemaListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of schemas registered with service instance. + * + * @summary lists a collection of schemas registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGlobalSchemas.json + */ +async function apiManagementListSchemas() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.globalSchema.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverCreateOrUpdateSample.js new file mode 100644 index 000000000000..387c02541538 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new resolver in the GraphQL API or updates an existing one. + * + * @summary creates a new resolver in the GraphQL API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolver.json + */ +async function apiManagementCreateGraphQLApiResolver() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.createOrUpdate( + "rg1", + "apimService1", + "someAPI", + "newResolver", + { path: "Query/users", description: "A GraphQL Resolver example", displayName: "Query Users" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverDeleteSample.js new file mode 100644 index 000000000000..9fef565ae889 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified resolver in the GraphQL API. + * + * @summary deletes the specified resolver in the GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolver.json + */ +async function apiManagementDeleteGraphQLApiResolver() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main() { + await apiManagementDeleteGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetEntityTagSample.js new file mode 100644 index 000000000000..d8d7c0b7aab5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolver.json + */ +async function apiManagementHeadGraphQLApiResolver() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementHeadGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetSample.js new file mode 100644 index 000000000000..e765600bec3a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the GraphQL API Resolver specified by its identifier. + * + * @summary gets the details of the GraphQL API Resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolver.json + */ +async function apiManagementGetGraphQLApiResolver() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main() { + await apiManagementGetGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverListByApiSample.js new file mode 100644 index 000000000000..053beb4f06c9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverListByApiSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the resolvers for the specified GraphQL API. + * + * @summary lists a collection of the resolvers for the specified GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolvers.json + */ +async function apiManagementListGraphQLApiResolvers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolver.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGraphQLApiResolvers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..66f813b9d13f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the GraphQL API Resolver level. + * + * @summary creates or updates policy configuration for the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json + */ +async function apiManagementCreateGraphQLApiResolverPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + 'GET/api/users', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyDeleteSample.js new file mode 100644 index 000000000000..df066a4375d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the GraphQL Api Resolver. + * + * @summary deletes the policy configuration at the GraphQL Api Resolver. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json + */ +async function apiManagementDeleteGraphQLApiResolverPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testResolver", + "policy", + "*", + ); +} + +async function main() { + await apiManagementDeleteGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..58005c52301f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json + */ +async function apiManagementHeadGraphQLApiResolverPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main() { + await apiManagementHeadGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetSample.js new file mode 100644 index 000000000000..8813806a6a6e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the GraphQL API Resolver level. + * + * @summary get the policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json + */ +async function apiManagementGetGraphQLApiResolverPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.get( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyListByResolverSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyListByResolverSample.js new file mode 100644 index 000000000000..71ce03abd0f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverPolicyListByResolverSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the list of policy configuration at the GraphQL API Resolver level. + * + * @summary get the list of policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolverPolicies.json + */ +async function apiManagementListGraphQLApiResolverPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolverPolicy.listByResolver( + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGraphQLApiResolverPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverUpdateSample.js new file mode 100644 index 000000000000..79e5a2bfc448 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/graphQLApiResolverUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the resolver in the GraphQL API specified by its identifier. + * + * @summary updates the details of the resolver in the GraphQL API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGraphQLApiResolver.json + */ +async function apiManagementUpdateGraphQLApiResolver() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.update( + "rg1", + "apimService1", + "echo-api", + "resolverId", + "*", + { + path: "Query/adminUsers", + description: "A GraphQL Resolver example", + displayName: "Query AdminUsers", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupCreateOrUpdateSample.js new file mode 100644 index 000000000000..bf9a336315bb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupCreateOrUpdateSample.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroup.json + */ +async function apiManagementCreateGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate("rg1", "apimService1", "tempgroup", { + displayName: "temp group", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupExternal.json + */ +async function apiManagementCreateGroupExternal() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate("rg1", "apimService1", "aadGroup", { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateGroup(); + await apiManagementCreateGroupExternal(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupDeleteSample.js new file mode 100644 index 000000000000..c38c558e99ea --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific group of the API Management service instance. + * + * @summary deletes specific group of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroup.json + */ +async function apiManagementDeleteGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.group.delete("rg1", "apimService1", "aadGroup", "*"); +} + +async function main() { + await apiManagementDeleteGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetEntityTagSample.js new file mode 100644 index 000000000000..6fe181be9fd6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroup.json + */ +async function apiManagementHeadGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.group.getEntityTag("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); +} + +async function main() { + await apiManagementHeadGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetSample.js new file mode 100644 index 000000000000..bfcfd4597122 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGroup.json + */ +async function apiManagementGetGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); + console.log(result); +} + +async function main() { + await apiManagementGetGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupListByServiceSample.js new file mode 100644 index 000000000000..68a62055387a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of groups defined within a service instance. + * + * @summary lists a collection of groups defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroups.json + */ +async function apiManagementListGroups() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.group.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUpdateSample.js new file mode 100644 index 000000000000..6a1c8c30cd4d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the group specified by its identifier. + * + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGroup.json + */ +async function apiManagementUpdateGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.update("rg1", "apimService1", "tempgroup", "*", { + displayName: "temp group", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCheckEntityExistsSample.js new file mode 100644 index 000000000000..f911eaeed73d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCheckEntityExistsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroupUser.json + */ +async function apiManagementHeadGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.groupUser.checkEntityExists( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", + ); +} + +async function main() { + await apiManagementHeadGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCreateSample.js new file mode 100644 index 000000000000..09129e054aca --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserCreateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupUser.json + */ +async function apiManagementCreateGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.create( + "rg1", + "apimService1", + "tempgroup", + "59307d350af58404d8a26300", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserDeleteSample.js new file mode 100644 index 000000000000..704f30050a18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroupUser.json + */ +async function apiManagementDeleteGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.groupUser.delete("rg1", "apimService1", "templategroup", "59307d350af58404d8a26300"); +} + +async function main() { + await apiManagementDeleteGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserListSample.js new file mode 100644 index 000000000000..38b04d0d6a5d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/groupUserListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroupUsers.json + */ +async function apiManagementListGroupUsers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.groupUser.list( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListGroupUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderCreateOrUpdateSample.js new file mode 100644 index 000000000000..aa17d6482045 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderCreateOrUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates the IdentityProvider configuration. + * + * @summary creates or Updates the IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateIdentityProvider.json + */ +async function apiManagementCreateIdentityProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.createOrUpdate("rg1", "apimService1", "facebook", { + clientId: "facebookid", + clientSecret: "facebookapplicationsecret", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderDeleteSample.js new file mode 100644 index 000000000000..819a18427f70 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified identity provider configuration. + * + * @summary deletes the specified identity provider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteIdentityProvider.json + */ +async function apiManagementDeleteIdentityProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.identityProvider.delete("rg1", "apimService1", "aad", "*"); +} + +async function main() { + await apiManagementDeleteIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetEntityTagSample.js new file mode 100644 index 000000000000..905c5997fec3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the identityProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the identityProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadIdentityProvider.json + */ +async function apiManagementHeadIdentityProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.identityProvider.getEntityTag("rg1", "apimService1", "aadB2C"); +} + +async function main() { + await apiManagementHeadIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetSample.js new file mode 100644 index 000000000000..050f8dd45f54 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the configuration details of the identity Provider configured in specified service instance. + * + * @summary gets the configuration details of the identity Provider configured in specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIdentityProvider.json + */ +async function apiManagementGetIdentityProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.get("rg1", "apimService1", "aadB2C"); + console.log(result); +} + +async function main() { + await apiManagementGetIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListByServiceSample.js new file mode 100644 index 000000000000..9830bd083fe9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of Identity Provider configured in the specified service instance. + * + * @summary lists a collection of Identity Provider configured in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIdentityProviders.json + */ +async function apiManagementListIdentityProviders() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.identityProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListIdentityProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListSecretsSample.js new file mode 100644 index 000000000000..47656878bfbf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderListSecretsSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the client secret details of the Identity Provider. + * + * @summary gets the client secret details of the Identity Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementIdentityProviderListSecrets.json + */ +async function apiManagementIdentityProviderListSecrets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.listSecrets("rg1", "apimService1", "aadB2C"); + console.log(result); +} + +async function main() { + await apiManagementIdentityProviderListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderUpdateSample.js new file mode 100644 index 000000000000..14bcde5cec85 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/identityProviderUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing IdentityProvider configuration. + * + * @summary updates an existing IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateIdentityProvider.json + */ +async function apiManagementUpdateIdentityProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.update("rg1", "apimService1", "facebook", "*", { + clientId: "updatedfacebookid", + clientSecret: "updatedfacebooksecret", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueGetSample.js new file mode 100644 index 000000000000..097c04508cfc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets API Management issue details + * + * @summary gets API Management issue details + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIssue.json + */ +async function apiManagementGetIssue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.issue.get("rg1", "apimService1", "57d2ef278aa04f0ad01d6cdc"); + console.log(result); +} + +async function main() { + await apiManagementGetIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueListByServiceSample.js new file mode 100644 index 000000000000..59addc0a3a33 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/issueListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of issues in the specified service instance. + * + * @summary lists a collection of issues in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIssues.json + */ +async function apiManagementListIssues() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.issue.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListIssues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerCreateOrUpdateSample.js new file mode 100644 index 000000000000..da43233b6269 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerCreateOrUpdateSample.js @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAILogger.json + */ +async function apiManagementCreateAILogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "loggerId", { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateEHLogger.json + */ +async function apiManagementCreateEHLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "eh1", { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", + }, + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateAILogger(); + await apiManagementCreateEHLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerDeleteSample.js new file mode 100644 index 000000000000..67177c3df9f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteLogger.json + */ +async function apiManagementDeleteLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.logger.delete("rg1", "apimService1", "loggerId", "*"); +} + +async function main() { + await apiManagementDeleteLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetEntityTagSample.js new file mode 100644 index 000000000000..edd9b38304a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadLogger.json + */ +async function apiManagementHeadLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.logger.getEntityTag("rg1", "apimService1", "templateLogger"); +} + +async function main() { + await apiManagementHeadLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetSample.js new file mode 100644 index 000000000000..132ce471927e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetLogger.json + */ +async function apiManagementGetLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.get("rg1", "apimService1", "templateLogger"); + console.log(result); +} + +async function main() { + await apiManagementGetLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerListByServiceSample.js new file mode 100644 index 000000000000..e9fd88227ae1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of loggers in the specified service instance. + * + * @summary lists a collection of loggers in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListLoggers.json + */ +async function apiManagementListLoggers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.logger.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListLoggers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerUpdateSample.js new file mode 100644 index 000000000000..2b897100a15c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/loggerUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing logger. + * + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateLogger.json + */ +async function apiManagementUpdateLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.update("rg1", "apimService1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueCreateOrUpdateSample.js new file mode 100644 index 000000000000..c3d4f1d82b54 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueCreateOrUpdateSample.js @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValue.json + */ +async function apiManagementCreateNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop2", { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar"], + value: "propValue", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValueWithKeyVault.json + */ +async function apiManagementCreateNamedValueWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop6", { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", + }, + secret: true, + tags: ["foo", "bar"], + }); + console.log(result); +} + +async function main() { + await apiManagementCreateNamedValue(); + await apiManagementCreateNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueDeleteSample.js new file mode 100644 index 000000000000..a774819733c4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific named value from the API Management service instance. + * + * @summary deletes specific named value from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNamedValue.json + */ +async function apiManagementDeleteNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.namedValue.delete("rg1", "apimService1", "testprop2", "*"); +} + +async function main() { + await apiManagementDeleteNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetEntityTagSample.js new file mode 100644 index 000000000000..e7552c40deeb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNamedValue.json + */ +async function apiManagementHeadNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.namedValue.getEntityTag("rg1", "apimService1", "testarmTemplateproperties2"); +} + +async function main() { + await apiManagementHeadNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetSample.js new file mode 100644 index 000000000000..6ed68d761e9d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValue.json + */ +async function apiManagementGetNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get("rg1", "apimService1", "testarmTemplateproperties2"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValueWithKeyVault.json + */ +async function apiManagementGetNamedValueWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get("rg1", "apimService1", "testprop6"); + console.log(result); +} + +async function main() { + await apiManagementGetNamedValue(); + await apiManagementGetNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListByServiceSample.js new file mode 100644 index 000000000000..bb8fabe0d0b2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of named values defined within a service instance. + * + * @summary lists a collection of named values defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNamedValues.json + */ +async function apiManagementListNamedValues() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.namedValue.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListNamedValues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListValueSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListValueSample.js new file mode 100644 index 000000000000..24eb2dd4cbc4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueListValueSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementNamedValueListValue.json + */ +async function apiManagementNamedValueListValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.listValue( + "rg1", + "apimService1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +async function main() { + await apiManagementNamedValueListValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueRefreshSecretSample.js new file mode 100644 index 000000000000..889fa0e8bbcc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueRefreshSecretSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshNamedValue.json + */ +async function apiManagementRefreshNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.refreshSecret("rg1", "apimService1", "testprop2"); + console.log(result); +} + +async function main() { + await apiManagementRefreshNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueUpdateSample.js new file mode 100644 index 000000000000..34a7de1adedb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/namedValueUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the specific named value. + * + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateNamedValue.json + */ +async function apiManagementUpdateNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.update("rg1", "apimService1", "testprop2", "*", { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar2"], + value: "propValue", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByLocationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByLocationSample.js new file mode 100644 index 000000000000..7c5f1e116cc0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByLocationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json + */ +async function apiManagementServiceGetNetworkStatusByLocation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByLocation( + "rg1", + "apimService1", + "North Central US", + ); + console.log(result); +} + +async function main() { + await apiManagementServiceGetNetworkStatusByLocation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByServiceSample.js new file mode 100644 index 000000000000..44dc86e0868f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/networkStatusListByServiceSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatus.json + */ +async function apiManagementServiceGetNetworkStatus() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByService("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementServiceGetNetworkStatus(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationCreateOrUpdateSample.js new file mode 100644 index 000000000000..e1135f078814 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or Update API Management publisher notification. + * + * @summary create or Update API Management publisher notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotification.json + */ +async function apiManagementCreateNotification() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationGetSample.js new file mode 100644 index 000000000000..a98dccb2de6a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNotification.json + */ +async function apiManagementGetNotification() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.get( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementGetNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationListByServiceSample.js new file mode 100644 index 000000000000..4b97f16219af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotifications.json + */ +async function apiManagementListNotifications() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.notification.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListNotifications(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCheckEntityExistsSample.js new file mode 100644 index 000000000000..11eed12888f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCheckEntityExistsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientEmail.json + */ +async function apiManagementHeadNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main() { + await apiManagementHeadNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCreateOrUpdateSample.js new file mode 100644 index 000000000000..c60f6384041f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientEmail.json + */ +async function apiManagementCreateNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "foobar@live.com", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailDeleteSample.js new file mode 100644 index 000000000000..0bbcaf6c948a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientEmail.json + */ +async function apiManagementDeleteNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientEmail.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main() { + await apiManagementDeleteNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailListByNotificationSample.js new file mode 100644 index 000000000000..02af26ff281e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientEmailListByNotificationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientEmails.json + */ +async function apiManagementListNotificationRecipientEmails() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.listByNotification( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementListNotificationRecipientEmails(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCheckEntityExistsSample.js new file mode 100644 index 000000000000..aefc398d1aa3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCheckEntityExistsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientUser.json + */ +async function apiManagementHeadNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main() { + await apiManagementHeadNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCreateOrUpdateSample.js new file mode 100644 index 000000000000..886e42f0ea98 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientUser.json + */ +async function apiManagementCreateNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserDeleteSample.js new file mode 100644 index 000000000000..fd557afc36ef --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserDeleteSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientUser.json + */ +async function apiManagementDeleteNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientUser.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main() { + await apiManagementDeleteNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserListByNotificationSample.js new file mode 100644 index 000000000000..3b241836a939 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/notificationRecipientUserListByNotificationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientUsers.json + */ +async function apiManagementListNotificationRecipientUsers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.listByNotification( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementListNotificationRecipientUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderCreateOrUpdateSample.js new file mode 100644 index 000000000000..73df953dbfa3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the OpenID Connect Provider. + * + * @summary creates or updates the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateOpenIdConnectProvider.json + */ +async function apiManagementCreateOpenIdConnectProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.createOrUpdate( + "rg1", + "apimService1", + "templateOpenIdConnect3", + { + clientId: "oidprovidertemplate3", + clientSecret: "x", + displayName: "templateoidprovider3", + metadataEndpoint: "https://oidprovider-template3.net", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderDeleteSample.js new file mode 100644 index 000000000000..005dab9c8611 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific OpenID Connect Provider of the API Management service instance. + * + * @summary deletes specific OpenID Connect Provider of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteOpenIdConnectProvider.json + */ +async function apiManagementDeleteOpenIdConnectProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.openIdConnectProvider.delete("rg1", "apimService1", "templateOpenIdConnect3", "*"); +} + +async function main() { + await apiManagementDeleteOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetEntityTagSample.js new file mode 100644 index 000000000000..60cc5c6269a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadOpenIdConnectProvider.json + */ +async function apiManagementHeadOpenIdConnectProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.openIdConnectProvider.getEntityTag("rg1", "apimService1", "templateOpenIdConnect2"); +} + +async function main() { + await apiManagementHeadOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetSample.js new file mode 100644 index 000000000000..ac2e3bbaacc3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderGetSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets specific OpenID Connect Provider without secrets. + * + * @summary gets specific OpenID Connect Provider without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOpenIdConnectProvider.json + */ +async function apiManagementGetOpenIdConnectProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.get( + "rg1", + "apimService1", + "templateOpenIdConnect2", + ); + console.log(result); +} + +async function main() { + await apiManagementGetOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListByServiceSample.js new file mode 100644 index 000000000000..c649610c3477 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists of all the OpenId Connect Providers. + * + * @summary lists of all the OpenId Connect Providers. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOpenIdConnectProviders.json + */ +async function apiManagementListOpenIdConnectProviders() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.openIdConnectProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListOpenIdConnectProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListSecretsSample.js new file mode 100644 index 000000000000..3d588ba2bc9f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderListSecretsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the client secret details of the OpenID Connect Provider. + * + * @summary gets the client secret details of the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementOpenidConnectProviderListSecrets.json + */ +async function apiManagementOpenidConnectProviderListSecrets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.listSecrets( + "rg1", + "apimService1", + "templateOpenIdConnect2", + ); + console.log(result); +} + +async function main() { + await apiManagementOpenidConnectProviderListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderUpdateSample.js new file mode 100644 index 000000000000..bad03d5731f5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/openIdConnectProviderUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the specific OpenID Connect Provider. + * + * @summary updates the specific OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateOpenIdConnectProvider.json + */ +async function apiManagementUpdateOpenIdConnectProvider() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.update( + "rg1", + "apimService1", + "templateOpenIdConnect2", + "*", + { clientSecret: "updatedsecret", useInApiDocumentation: true, useInTestConsole: false }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationListByTagsSample.js new file mode 100644 index 000000000000..072960da6f97 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationListByTagsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of operations associated with tags. + * + * @summary lists a collection of operations associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationsByTags.json + */ +async function apiManagementListApiOperationsByTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.operation.listByTags("rg1", "apimService1", "a1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiOperationsByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationStatusGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationStatusGetSample.js new file mode 100644 index 000000000000..fa81d17b12c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationStatusGetSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the current status of an async operation. + * + * @summary returns the current status of an async operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationStatus.json + */ +async function getOperationStatus() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); + console.log(result); +} + +async function main() { + await getOperationStatus(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationsResultsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationsResultsGetSample.js new file mode 100644 index 000000000000..d2f841dd55d6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/operationsResultsGetSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns operation results for long running operations executing DELETE or PATCH on the resource. + * + * @summary returns operation results for long running operations executing DELETE or PATCH on the resource. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationResult.json + */ +async function apiManagementGetOperationResult() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.operationsResults.get("westus2", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); +} + +async function main() { + await apiManagementGetOperationResult(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js new file mode 100644 index 000000000000..72d726f788e6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/outboundNetworkDependenciesEndpointsListByServiceSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the network endpoints of all outbound dependencies of a ApiManagement service. + * + * @summary gets the network endpoints of all outbound dependencies of a ApiManagement service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + */ +async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.outboundNetworkDependenciesEndpoints.listByService( + "rg1", + "apimService1", + ); + console.log(result); +} + +async function main() { + await apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/package.json b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/package.json new file mode 100644 index 000000000000..f208865d3ee0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/package.json @@ -0,0 +1,36 @@ +{ + "name": "@azure-samples/arm-apimanagement-js-beta", + "private": true, + "version": "1.0.0", + "description": "@azure/arm-apimanagement client library samples for JavaScript (Beta)", + "engines": { + "node": ">=20.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/apimanagement/arm-apimanagement" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement", + "dependencies": { + "@azure/arm-apimanagement": "beta", + "dotenv": "latest", + "@azure/identity": "^4.13.0" + }, + "devDependencies": { + "cross-env": "latest" + } +} diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyCreateOrUpdateSample.js new file mode 100644 index 000000000000..c84128ef9413 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyCreateOrUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the global policy configuration of the Api Management service. + * + * @summary creates or updates the global policy configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicy.json + */ +async function apiManagementCreatePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.createOrUpdate("rg1", "apimService1", "policy", { + format: "xml", + value: + "\r\n \r\n \r\n \r\n \r\n \r\n", + }); + console.log(result); +} + +async function main() { + await apiManagementCreatePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDeleteSample.js new file mode 100644 index 000000000000..38e294e99b30 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the global policy configuration of the Api Management Service. + * + * @summary deletes the global policy configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicy.json + */ +async function apiManagementDeletePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policy.delete("rg1", "apimService1", "policy", "*"); +} + +async function main() { + await apiManagementDeletePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDescriptionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDescriptionListByServiceSample.js new file mode 100644 index 000000000000..a53993f8872f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyDescriptionListByServiceSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all policy descriptions. + * + * @summary lists all policy descriptions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyDescriptions.json + */ +async function apiManagementListPolicyDescriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyDescription.listByService("rg1", "apimService1", { + scope: "Api", + }); + console.log(result); +} + +async function main() { + await apiManagementListPolicyDescriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentCreateOrUpdateSample.js new file mode 100644 index 000000000000..fd59853cfd58 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates a policy fragment. + * + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyFragment.json + */ +async function apiManagementCreatePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.createOrUpdate( + "rg1", + "apimService1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreatePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentDeleteSample.js new file mode 100644 index 000000000000..b515dfe6ca2f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyFragment.json + */ +async function apiManagementDeletePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyFragment.delete("rg1", "apimService1", "policyFragment1", "*"); +} + +async function main() { + await apiManagementDeletePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetEntityTagSample.js new file mode 100644 index 000000000000..1e51d72884ec --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyFragment.json + */ +async function apiManagementHeadPolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyFragment.getEntityTag("rg1", "apimService1", "policyFragment1"); +} + +async function main() { + await apiManagementHeadPolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetSample.js new file mode 100644 index 000000000000..951766ae8775 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentGetSample.js @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragment.json + */ +async function apiManagementGetPolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragmentFormat.json + */ +async function apiManagementGetPolicyFragmentFormat() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1", { + format: "rawxml", + }); + console.log(result); +} + +async function main() { + await apiManagementGetPolicyFragment(); + await apiManagementGetPolicyFragmentFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListByServiceSample.js new file mode 100644 index 000000000000..e89b385ed661 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all policy fragments. + * + * @summary gets all policy fragments. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragments.json + */ +async function apiManagementListPolicyFragments() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policyFragment.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPolicyFragments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListReferencesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListReferencesSample.js new file mode 100644 index 000000000000..270284844063 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyFragmentListReferencesSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragmentReferences.json + */ +async function apiManagementListPolicyFragmentReferences() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listReferences( + "rg1", + "apimService1", + "policyFragment1", + ); + console.log(result); +} + +async function main() { + await apiManagementListPolicyFragmentReferences(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetEntityTagSample.js new file mode 100644 index 000000000000..e14680d2d44a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * + * @summary gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicy.json + */ +async function apiManagementHeadPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policy.getEntityTag("rg1", "apimService1", "policy"); +} + +async function main() { + await apiManagementHeadPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetSample.js new file mode 100644 index 000000000000..a820036bf507 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the Global policy definition of the Api Management service. + * + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicy.json + */ +async function apiManagementGetPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get("rg1", "apimService1", "policy"); + console.log(result); +} + +/** + * This sample demonstrates how to get the Global policy definition of the Api Management service. + * + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFormat.json + */ +async function apiManagementGetPolicyFormat() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get("rg1", "apimService1", "policy"); + console.log(result); +} + +async function main() { + await apiManagementGetPolicy(); + await apiManagementGetPolicyFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyListByServiceSample.js new file mode 100644 index 000000000000..84483c98ae24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all the Global Policy definitions of the Api Management service. + * + * @summary lists all the Global Policy definitions of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicies.json + */ +async function apiManagementListPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policy.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionCreateOrUpdateSample.js new file mode 100644 index 000000000000..be11f5d36b55 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the policy restriction configuration of the Api Management service. + * + * @summary creates or updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyRestriction.json + */ +async function apiManagementCreatePolicyRestriction() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.createOrUpdate( + "rg1", + "apimService1", + "policyRestriction1", + { requireBase: "true", scope: "Sample Path to the policy document." }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreatePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionDeleteSample.js new file mode 100644 index 000000000000..c99149112d6f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionDeleteSample.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy restriction configuration of the Api Management Service. + * + * @summary deletes the policy restriction configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyRestriction.json + */ +async function apiManagementDeletePolicyRestriction() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyRestriction.delete("rg1", "apimService1", "policyRestriction1", { + ifMatch: "*", + }); +} + +async function main() { + await apiManagementDeletePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetEntityTagSample.js new file mode 100644 index 000000000000..c775590a5da5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the policy restriction in the Api Management service. + * + * @summary gets the entity state (Etag) version of the policy restriction in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyRestriction.json + */ +async function apiManagementHeadPolicyRestriction() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyRestriction.getEntityTag("rg1", "apimService1", "policyRestriction1"); +} + +async function main() { + await apiManagementHeadPolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetSample.js new file mode 100644 index 000000000000..0e9248a98d18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy restriction of the Api Management service. + * + * @summary get the policy restriction of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyRestriction.json + */ +async function apiManagementGetPolicyRestriction() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.get("rg1", "apimService1", "policyRestriction1"); + console.log(result); +} + +async function main() { + await apiManagementGetPolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionListByServiceSample.js new file mode 100644 index 000000000000..cdd74a6c7019 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all policy restrictions of API Management services. + * + * @summary gets all policy restrictions of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyRestrictions.json + */ +async function apiManagementListPolicyRestrictions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policyRestriction.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionUpdateSample.js new file mode 100644 index 000000000000..d3d08e63750d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the policy restriction configuration of the Api Management service. + * + * @summary updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePolicyRestriction.json + */ +async function apiManagementUpdatePolicyRestriction() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.update( + "rg1", + "apimService1", + "policyRestriction1", + "*", + { scope: "Sample Path 2 to the policy document." }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdatePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionValidationsByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionValidationsByServiceSample.js new file mode 100644 index 000000000000..e967c7f593fa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/policyRestrictionValidationsByServiceSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to validate all policies of API Management services. + * + * @summary validate all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementValidatePolicies.json + */ +async function apiManagementListPolicyRestrictions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestrictionValidations.byService("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigCreateOrUpdateSample.js new file mode 100644 index 000000000000..7eca943edb8d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigCreateOrUpdateSample.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or update the developer portal configuration. + * + * @summary create or update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalConfig.json + */ +async function apiManagementCreatePortalConfig() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.createOrUpdate("rg1", "apimService1", "default", "*", { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"], + }, + delegation: { delegateRegistration: false, delegateSubscription: false }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions.", + }, + }, + }); + console.log(result); +} + +async function main() { + await apiManagementCreatePortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetEntityTagSample.js new file mode 100644 index 000000000000..8902965ef4a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the developer portal configuration. + * + * @summary gets the entity state (Etag) version of the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalConfig.json + */ +async function apiManagementHeadPortalConfig() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.portalConfig.getEntityTag("rg1", "apimService1", "default"); +} + +async function main() { + await apiManagementHeadPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetSample.js new file mode 100644 index 000000000000..00c09b12a601 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the developer portal configuration. + * + * @summary get the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalConfig.json + */ +async function apiManagementPortalConfig() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.get("rg1", "apimService1", "default"); + console.log(result); +} + +async function main() { + await apiManagementPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigListByServiceSample.js new file mode 100644 index 000000000000..9d77c54c47f4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the developer portal configurations. + * + * @summary lists the developer portal configurations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalConfig.json + */ +async function apiManagementListPortalConfig() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.portalConfig.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigUpdateSample.js new file mode 100644 index 000000000000..778debb48520 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalConfigUpdateSample.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update the developer portal configuration. + * + * @summary update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalConfig.json + */ +async function apiManagementUpdatePortalConfig() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.update("rg1", "apimService1", "default", "*", { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"], + }, + delegation: { delegateRegistration: false, delegateSubscription: false }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions.", + }, + }, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdatePortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionCreateOrUpdateSample.js new file mode 100644 index 000000000000..88cde6a70c48 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * + * @summary creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalRevision.json + */ +async function apiManagementCreatePortalRevision() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.createOrUpdate( + "rg1", + "apimService1", + "20201112101010", + { description: "portal revision 1", isCurrent: true }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreatePortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetEntityTagSample.js new file mode 100644 index 000000000000..3623e69718a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the developer portal revision specified by its identifier. + * + * @summary gets the developer portal revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalRevision.json + */ +async function apiManagementHeadPortalRevision() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.portalRevision.getEntityTag("rg1", "apimService1", "20201112101010"); +} + +async function main() { + await apiManagementHeadPortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetSample.js new file mode 100644 index 000000000000..df3ede8d8eb3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the developer portal's revision specified by its identifier. + * + * @summary gets the developer portal's revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPortalRevision.json + */ +async function apiManagementGetPortalRevision() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.get("rg1", "apimService1", "20201112101010"); + console.log(result); +} + +async function main() { + await apiManagementGetPortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionListByServiceSample.js new file mode 100644 index 000000000000..b953a1977659 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists developer portal's revisions. + * + * @summary lists developer portal's revisions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalRevisions.json + */ +async function apiManagementListPortalRevisions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.portalRevision.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPortalRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionUpdateSample.js new file mode 100644 index 000000000000..175b0a495f16 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalRevisionUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the description of specified portal revision or makes it current. + * + * @summary updates the description of specified portal revision or makes it current. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalRevision.json + */ +async function apiManagementUpdatePortalRevision() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.update("rg1", "apimService1", "20201112101010", "*", { + description: "portal revision update", + isCurrent: true, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdatePortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalSettingsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalSettingsListByServiceSample.js new file mode 100644 index 000000000000..37ea67e20863 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/portalSettingsListByServiceSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of portalsettings defined within a service instance.. + * + * @summary lists a collection of portalsettings defined within a service instance.. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalSettings.json + */ +async function apiManagementListPortalSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalSettings.listByService("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementListPortalSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionCreateOrUpdateSample.js new file mode 100644 index 000000000000..a7506b148c88 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionCreateOrUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Private Endpoint Connection or updates an existing one. + * + * @summary creates a new Private Endpoint Connection or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json + */ +async function apiManagementApproveOrRejectPrivateEndpointConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.createOrUpdate( + "rg1", + "apimService1", + "privateEndpointConnectionName", + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + properties: { + privateLinkServiceConnectionState: { + description: "The Private Endpoint Connection is approved.", + status: "Approved", + }, + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementApproveOrRejectPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionDeleteSample.js new file mode 100644 index 000000000000..d78d1b5f3c00 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionDeleteSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Private Endpoint Connection. + * + * @summary deletes the specified Private Endpoint Connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePrivateEndpointConnection.json + */ +async function apiManagementDeletePrivateEndpointConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.privateEndpointConnection.delete( + "rg1", + "apimService1", + "privateEndpointConnectionName", + ); +} + +async function main() { + await apiManagementDeletePrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetByNameSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetByNameSample.js new file mode 100644 index 000000000000..047848644221 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetByNameSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Private Endpoint Connection specified by its identifier. + * + * @summary gets the details of the Private Endpoint Connection specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateEndpointConnection.json + */ +async function apiManagementGetPrivateEndpointConnection() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.getByName( + "rg1", + "apimService1", + "privateEndpointConnectionName", + ); + console.log(result); +} + +async function main() { + await apiManagementGetPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js new file mode 100644 index 000000000000..f558b7a44246 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionGetPrivateLinkResourceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateLinkGroupResource.json + */ +async function apiManagementGetPrivateLinkGroupResource() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.getPrivateLinkResource( + "rg1", + "apimService1", + "privateLinkSubResourceName", + ); + console.log(result); +} + +async function main() { + await apiManagementGetPrivateLinkGroupResource(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListByServiceSample.js new file mode 100644 index 000000000000..3ad5676b2890 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all private endpoint connections of the API Management service instance. + * + * @summary lists all private endpoint connections of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateEndpointConnections.json + */ +async function apiManagementListPrivateEndpointConnections() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.privateEndpointConnection.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListPrivateEndpointConnections(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js new file mode 100644 index 000000000000..8242a7e7cace --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/privateEndpointConnectionListPrivateLinkResourcesSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateLinkGroupResources.json + */ +async function apiManagementListPrivateLinkGroupResources() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.listPrivateLinkResources( + "rg1", + "apimService1", + ); + console.log(result); +} + +async function main() { + await apiManagementListPrivateLinkGroupResources(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCheckEntityExistsSample.js new file mode 100644 index 000000000000..1ed773482c78 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCheckEntityExistsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Product entity. + * + * @summary checks that API entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductApi.json + */ +async function apiManagementHeadProductApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApi.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCreateOrUpdateSample.js new file mode 100644 index 000000000000..efd513f1dd56 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified product. + * + * @summary adds an API to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApi.json + */ +async function apiManagementCreateProductApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "echo-api", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiDeleteSample.js new file mode 100644 index 000000000000..aec210c48073 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApi.json + */ +async function apiManagementDeleteProductApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApi.delete("rg1", "apimService1", "testproduct", "echo-api"); +} + +async function main() { + await apiManagementDeleteProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..c7e315284944 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified product via link. + * + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApiLink.json + */ +async function apiManagementCreateProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApiLink.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkDeleteSample.js new file mode 100644 index 000000000000..a3dd9ab833e9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApiLink.json + */ +async function apiManagementDeleteProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApiLink.delete("rg1", "apimService1", "testproduct", "link1"); +} + +async function main() { + await apiManagementDeleteProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkGetSample.js new file mode 100644 index 000000000000..613d7a76f476 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductApiLink.json + */ +async function apiManagementGetProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApiLink.get("rg1", "apimService1", "testproduct", "link1"); + console.log(result); +} + +async function main() { + await apiManagementGetProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkListByProductSample.js new file mode 100644 index 000000000000..2672e7dfccf7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiLinkListByProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApiLinks.json + */ +async function apiManagementListProductApiLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productApiLink.listByProduct("rg1", "apimService1", "product1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiListByProductSample.js new file mode 100644 index 000000000000..d6dc4960b3b0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productApiListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the APIs associated with a product. + * + * @summary lists a collection of the APIs associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApis.json + */ +async function apiManagementListProductApis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productApi.listByProduct( + "rg1", + "apimService1", + "5768181ea40f7eb6c49f6ac7", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productCreateOrUpdateSample.js new file mode 100644 index 000000000000..df8e62494d21 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productCreateOrUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a product. + * + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProduct.json + */ +async function apiManagementCreateProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.createOrUpdate("rg1", "apimService1", "testproduct", { + displayName: "Test Template ProductName 4", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productDeleteSample.js new file mode 100644 index 000000000000..0a2a80f91126 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productDeleteSample.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete product. + * + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProduct.json + */ +async function apiManagementDeleteProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.product.delete("rg1", "apimService1", "testproduct", "*", { + deleteSubscriptions: true, + }); +} + +async function main() { + await apiManagementDeleteProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetEntityTagSample.js new file mode 100644 index 000000000000..a4eeba8818f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProduct.json + */ +async function apiManagementHeadProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.product.getEntityTag("rg1", "apimService1", "unlimited"); +} + +async function main() { + await apiManagementHeadProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetSample.js new file mode 100644 index 000000000000..2aadca4ab9fb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProduct.json + */ +async function apiManagementGetProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.get("rg1", "apimService1", "unlimited"); + console.log(result); +} + +async function main() { + await apiManagementGetProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCheckEntityExistsSample.js new file mode 100644 index 000000000000..34fd4f61a814 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCheckEntityExistsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that Group entity specified by identifier is associated with the Product entity. + * + * @summary checks that Group entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductGroup.json + */ +async function apiManagementHeadProductGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroup.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCreateOrUpdateSample.js new file mode 100644 index 000000000000..a1ddf80b6515 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds the association between the specified developer group with the specified product. + * + * @summary adds the association between the specified developer group with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroup.json + */ +async function apiManagementCreateProductGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "templateGroup", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupDeleteSample.js new file mode 100644 index 000000000000..fb257013aa3b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the association between the specified group and product. + * + * @summary deletes the association between the specified group and product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroup.json + */ +async function apiManagementDeleteProductGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroup.delete("rg1", "apimService1", "testproduct", "templateGroup"); +} + +async function main() { + await apiManagementDeleteProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..753e21b6b1de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds a group to the specified product via link. + * + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroupLink.json + */ +async function apiManagementCreateProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroupLink.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkDeleteSample.js new file mode 100644 index 000000000000..41cb1945bd0a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroupLink.json + */ +async function apiManagementDeleteProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroupLink.delete("rg1", "apimService1", "testproduct", "link1"); +} + +async function main() { + await apiManagementDeleteProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkGetSample.js new file mode 100644 index 000000000000..2b004fc9280e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductGroupLink.json + */ +async function apiManagementGetProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroupLink.get("rg1", "apimService1", "testproduct", "link1"); + console.log(result); +} + +async function main() { + await apiManagementGetProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkListByProductSample.js new file mode 100644 index 000000000000..b74acee4f736 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupLinkListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroupLinks.json + */ +async function apiManagementListProductGroupLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productGroupLink.listByProduct( + "rg1", + "apimService1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductGroupLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupListByProductSample.js new file mode 100644 index 000000000000..8a38a1661a97 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productGroupListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the collection of developer groups associated with the specified product. + * + * @summary lists the collection of developer groups associated with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroups.json + */ +async function apiManagementListProductGroups() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productGroup.listByProduct( + "rg1", + "apimService1", + "5600b57e7e8880006a060002", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByServiceSample.js new file mode 100644 index 000000000000..3d4906216c83 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of products in the specified service instance. + * + * @summary lists a collection of products in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProducts.json + */ +async function apiManagementListProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.product.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByTagsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByTagsSample.js new file mode 100644 index 000000000000..0a99ac17f228 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productListByTagsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of products associated with tags. + * + * @summary lists a collection of products associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductsByTags.json + */ +async function apiManagementListProductsByTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.product.listByTags("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductsByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..a256f53e844e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the Product. + * + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductPolicy.json + */ +async function apiManagementCreateProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.createOrUpdate( + "rg1", + "apimService1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyDeleteSample.js new file mode 100644 index 000000000000..b95b96096c48 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductPolicy.json + */ +async function apiManagementDeleteProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productPolicy.delete("rg1", "apimService1", "testproduct", "policy", "*"); +} + +async function main() { + await apiManagementDeleteProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..af7adef5f86d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductPolicy.json + */ +async function apiManagementHeadProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productPolicy.getEntityTag("rg1", "apimService1", "unlimited", "policy"); +} + +async function main() { + await apiManagementHeadProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetSample.js new file mode 100644 index 000000000000..18b991ad91a3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductPolicy.json + */ +async function apiManagementGetProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.get( + "rg1", + "apimService1", + "kjoshiarmTemplateProduct4", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyListByProductSample.js new file mode 100644 index 000000000000..70913198938c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productPolicyListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductPolicies.json + */ +async function apiManagementListProductPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productPolicy.listByProduct( + "rg1", + "apimService1", + "armTemplateProduct4", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productSubscriptionsListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productSubscriptionsListSample.js new file mode 100644 index 000000000000..adf3e63991e8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productSubscriptionsListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the collection of subscriptions to the specified product. + * + * @summary lists the collection of subscriptions to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductSubscriptions.json + */ +async function apiManagementListProductSubscriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productSubscriptions.list( + "rg1", + "apimService1", + "5600b57e7e8880006a060002", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productUpdateSample.js new file mode 100644 index 000000000000..2baf36efa9fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update existing product details. + * + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProduct.json + */ +async function apiManagementUpdateProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.update("rg1", "apimService1", "testproduct", "*", { + displayName: "Test Template ProductName 4", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiCreateOrUpdateSample.js new file mode 100644 index 000000000000..ea0ad4af0882 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Wiki for a Product or updates an existing one. + * + * @summary creates a new Wiki for a Product or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductWiki.json + */ +async function apiManagementCreateProductWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiDeleteSample.js new file mode 100644 index 000000000000..af5f8118df36 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Wiki from a Product. + * + * @summary deletes the specified Wiki from a Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductWiki.json + */ +async function apiManagementDeleteProductWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main() { + await apiManagementDeleteProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetEntityTagSample.js new file mode 100644 index 000000000000..206895b8d863 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductWiki.json + */ +async function apiManagementHeadProductWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main() { + await apiManagementHeadProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetSample.js new file mode 100644 index 000000000000..b6da317948d4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductWiki.json + */ +async function apiManagementGetProductWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main() { + await apiManagementGetProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiUpdateSample.js new file mode 100644 index 000000000000..4b903a47c280 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikiUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Wiki for a Product specified by its identifier. + * + * @summary updates the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProductWiki.json + */ +async function apiManagementUpdateProductWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikisListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikisListSample.js new file mode 100644 index 000000000000..0183e51c933a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/productWikisListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductWikis.json + */ +async function apiManagementGetApiWiki() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productWikis.list( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysListByServiceSample.js new file mode 100644 index 000000000000..15f8297faee8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysListByServiceSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * + * @summary lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeys.json + */ +async function apiManagementGetQuotaCounterKeys() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.listByService("rg1", "apimService1", "ba"); + console.log(result); +} + +async function main() { + await apiManagementGetQuotaCounterKeys(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysUpdateSample.js new file mode 100644 index 000000000000..560106bc3875 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByCounterKeysUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * + * @summary updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKey.json + */ +async function apiManagementUpdateQuotaCounterKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.update("rg1", "apimService1", "ba", { + callsCount: 0, + kbTransferred: 2.5630078125, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateQuotaCounterKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysGetSample.js new file mode 100644 index 000000000000..e4bfa6dfb6bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * + * @summary gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + */ +async function apiManagementGetQuotaCounterKeysByQuotaPeriod() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.get( + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", + ); + console.log(result); +} + +async function main() { + await apiManagementGetQuotaCounterKeysByQuotaPeriod(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysUpdateSample.js new file mode 100644 index 000000000000..4132d79e524a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/quotaByPeriodKeysUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing quota counter value in the specified service instance. + * + * @summary updates an existing quota counter value in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + */ +async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.update( + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", + { callsCount: 0, kbTransferred: 0 }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/regionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/regionListByServiceSample.js new file mode 100644 index 000000000000..d20d61beacdd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/regionListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all azure regions in which the service exists. + * + * @summary lists all azure regions in which the service exists. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListRegions.json + */ +async function apiManagementListRegions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.region.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListRegions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByApiSample.js new file mode 100644 index 000000000000..51166d41dd6a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByApiSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by API. + * + * @summary lists report records by API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByApi.json + */ +async function apiManagementGetReportsByApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByApi( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByGeoSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByGeoSample.js new file mode 100644 index 000000000000..6b7853259d0d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByGeoSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by geography. + * + * @summary lists report records by geography. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByGeo.json + */ +async function apiManagementGetReportsByGeo() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByGeo( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByGeo(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByOperationSample.js new file mode 100644 index 000000000000..e58c55f22caf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByOperationSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by API Operations. + * + * @summary lists report records by API Operations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByOperation.json + */ +async function apiManagementGetReportsByOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByOperation( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByProductSample.js new file mode 100644 index 000000000000..9309f3c30547 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by Product. + * + * @summary lists report records by Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByProduct.json + */ +async function apiManagementGetReportsByProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByProduct( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByRequestSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByRequestSample.js new file mode 100644 index 000000000000..ce13785a012f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByRequestSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by Request. + * + * @summary lists report records by Request. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByRequest.json + */ +async function apiManagementGetReportsByRequest() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByRequest( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListBySubscriptionSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListBySubscriptionSample.js new file mode 100644 index 000000000000..19fab69f0225 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListBySubscriptionSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by subscription. + * + * @summary lists report records by subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsBySubscription.json + */ +async function apiManagementGetReportsBySubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listBySubscription( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByTimeSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByTimeSample.js new file mode 100644 index 000000000000..d09c0891516e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByTimeSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by Time. + * + * @summary lists report records by Time. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByTime.json + */ +async function apiManagementGetReportsByTime() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByTime( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "PT15M", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByTime(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByUserSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByUserSample.js new file mode 100644 index 000000000000..09acca77c314 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/reportsListByUserSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists report records by User. + * + * @summary lists report records by User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByUser.json + */ +async function apiManagementGetReportsByUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByUser( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementGetReportsByUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/javascript/sample.env b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/sample.env similarity index 100% rename from sdk/apimanagement/arm-apimanagement/samples/v10/javascript/sample.env rename to sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/sample.env diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsCreateOrUpdateSample.js new file mode 100644 index 000000000000..a07f103dd28c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or Update Sign-In settings. + * + * @summary create or Update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignIn.json + */ +async function apiManagementPortalSettingsUpdateSignIn() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.createOrUpdate( + "rg1", + "apimService1", + { enabled: true }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsUpdateSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetEntityTagSample.js new file mode 100644 index 000000000000..55be73f6a396 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignInSettings. + * + * @summary gets the entity state (Etag) version of the SignInSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignInSettings.json + */ +async function apiManagementHeadSignInSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signInSettings.getEntityTag("rg1", "apimService1"); +} + +async function main() { + await apiManagementHeadSignInSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetSample.js new file mode 100644 index 000000000000..7276cf542b01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get Sign In Settings for the Portal + * + * @summary get Sign In Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignIn.json + */ +async function apiManagementPortalSettingsGetSignIn() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsGetSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsUpdateSample.js new file mode 100644 index 000000000000..2393717bcc3a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signInSettingsUpdateSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update Sign-In settings. + * + * @summary update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignIn.json + */ +async function apiManagementPortalSettingsUpdateSignIn() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signInSettings.update("rg1", "apimService1", "*", { enabled: true }); +} + +async function main() { + await apiManagementPortalSettingsUpdateSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsCreateOrUpdateSample.js new file mode 100644 index 000000000000..fd968f3a4993 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsCreateOrUpdateSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or Update Sign-Up settings. + * + * @summary create or Update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignUp.json + */ +async function apiManagementPortalSettingsUpdateSignUp() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.createOrUpdate( + "rg1", + "apimService1", + { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsUpdateSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetEntityTagSample.js new file mode 100644 index 000000000000..6ff678500d2f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignUpSettings. + * + * @summary gets the entity state (Etag) version of the SignUpSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignUpSettings.json + */ +async function apiManagementHeadSignUpSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signUpSettings.getEntityTag("rg1", "apimService1"); +} + +async function main() { + await apiManagementHeadSignUpSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetSample.js new file mode 100644 index 000000000000..96d6a1649441 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get Sign Up Settings for the Portal + * + * @summary get Sign Up Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignUp.json + */ +async function apiManagementPortalSettingsGetSignUp() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main() { + await apiManagementPortalSettingsGetSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsUpdateSample.js new file mode 100644 index 000000000000..78ea6792a977 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/signUpSettingsUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update Sign-Up settings. + * + * @summary update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignUp.json + */ +async function apiManagementPortalSettingsUpdateSignUp() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signUpSettings.update("rg1", "apimService1", "*", { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }); +} + +async function main() { + await apiManagementPortalSettingsUpdateSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionCreateOrUpdateSample.js new file mode 100644 index 000000000000..ab5bbebdb454 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. + * + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSubscription.json + */ +async function apiManagementCreateSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.createOrUpdate("rg1", "apimService1", "testsub", { + displayName: "testsub", + ownerId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionDeleteSample.js new file mode 100644 index 000000000000..31d681bf66a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteSubscription.json + */ +async function apiManagementDeleteSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.delete("rg1", "apimService1", "testsub", "*"); +} + +async function main() { + await apiManagementDeleteSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetEntityTagSample.js new file mode 100644 index 000000000000..0200248001b8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSubscription.json + */ +async function apiManagementHeadSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.getEntityTag("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); +} + +async function main() { + await apiManagementHeadSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetSample.js new file mode 100644 index 000000000000..9c34b81aaa3c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetSubscription.json + */ +async function apiManagementGetSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.get("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); + console.log(result); +} + +async function main() { + await apiManagementGetSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSample.js new file mode 100644 index 000000000000..07d0b7b8ab8c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all subscriptions of the API Management service instance. + * + * @summary lists all subscriptions of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSubscriptions.json + */ +async function apiManagementListSubscriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.subscription.list("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSecretsSample.js new file mode 100644 index 000000000000..5ef0d2a0155d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionListSecretsSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionListSecrets.json + */ +async function apiManagementSubscriptionListSecrets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.listSecrets( + "rg1", + "apimService1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main() { + await apiManagementSubscriptionListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegeneratePrimaryKeySample.js new file mode 100644 index 000000000000..d69f0a382ccb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegeneratePrimaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the API Management service instance. + * + * @summary regenerates primary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json + */ +async function apiManagementSubscriptionRegeneratePrimaryKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.regeneratePrimaryKey("rg1", "apimService1", "testsub"); +} + +async function main() { + await apiManagementSubscriptionRegeneratePrimaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegenerateSecondaryKeySample.js new file mode 100644 index 000000000000..3fa423fb1676 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionRegenerateSecondaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json + */ +async function apiManagementSubscriptionRegenerateSecondaryKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.regenerateSecondaryKey("rg1", "apimService1", "testsub"); +} + +async function main() { + await apiManagementSubscriptionRegenerateSecondaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionUpdateSample.js new file mode 100644 index 000000000000..041004c0e693 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/subscriptionUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of a subscription specified by its identifier. + * + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateSubscription.json + */ +async function apiManagementUpdateSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.update("rg1", "apimService1", "testsub", "*", { + displayName: "testsub", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..f392176cc9a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkCreateOrUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified tag via link. + * + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagApiLink.json + */ +async function apiManagementCreateTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagApiLink.createOrUpdate("rg1", "apimService1", "tag1", "link1", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkDeleteSample.js new file mode 100644 index 000000000000..31693a1293bd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagApiLink.json + */ +async function apiManagementDeleteTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagApiLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkGetSample.js new file mode 100644 index 000000000000..fdb3ec7f47ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagApiLink.json + */ +async function apiManagementGetTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagApiLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main() { + await apiManagementGetTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkListByProductSample.js new file mode 100644 index 000000000000..10be47072f2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagApiLinkListByProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagApiLinks.json + */ +async function apiManagementListTagApiLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagApiLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTagApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToApiSample.js new file mode 100644 index 000000000000..76026d331773 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToApiSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to assign tag to the Api. + * + * @summary assign tag to the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTag.json + */ +async function apiManagementCreateApiTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToApi( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToOperationSample.js new file mode 100644 index 000000000000..6148d03db0cb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToOperationSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to assign tag to the Operation. + * + * @summary assign tag to the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationTag.json + */ +async function apiManagementCreateApiOperationTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToOperation( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "5931a75ae4bbd512a88c680a", + "tagId1", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToProductSample.js new file mode 100644 index 000000000000..dfd6a8ee8838 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagAssignToProductSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to assign tag to the Product. + * + * @summary assign tag to the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductTag.json + */ +async function apiManagementCreateProductTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToProduct( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagCreateOrUpdateSample.js new file mode 100644 index 000000000000..ddc269b0cfe0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagCreateOrUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a tag. + * + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTag.json + */ +async function apiManagementCreateTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.createOrUpdate("rg1", "apimService1", "tagId1", { + displayName: "tag1", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDeleteSample.js new file mode 100644 index 000000000000..21adc707790d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific tag of the API Management service instance. + * + * @summary deletes specific tag of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTag.json + */ +async function apiManagementDeleteTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.delete("rg1", "apimService1", "tagId1", "*"); +} + +async function main() { + await apiManagementDeleteTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromApiSample.js new file mode 100644 index 000000000000..3567e02a81ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromApiSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to detach the tag from the Api. + * + * @summary detach the tag from the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTag.json + */ +async function apiManagementDeleteApiTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromApi( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + ); +} + +async function main() { + await apiManagementDeleteApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromOperationSample.js new file mode 100644 index 000000000000..b8bdca0d7844 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromOperationSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to detach the tag from the Operation. + * + * @summary detach the tag from the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationTag.json + */ +async function apiManagementDeleteApiOperationTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromOperation( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28d1f7fab116c282651", + "59d5b28e1f7fab116402044e", + ); +} + +async function main() { + await apiManagementDeleteApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromProductSample.js new file mode 100644 index 000000000000..16f28565b52a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagDetachFromProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to detach the tag from the Product. + * + * @summary detach the tag from the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductTag.json + */ +async function apiManagementDeleteProductTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromProduct( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + ); +} + +async function main() { + await apiManagementDeleteProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByApiSample.js new file mode 100644 index 000000000000..a56dfae30374 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByApiSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tag associated with the API. + * + * @summary get tag associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTag.json + */ +async function apiManagementGetApiTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByApi( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByOperationSample.js new file mode 100644 index 000000000000..52e067869956 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByOperationSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tag associated with the Operation. + * + * @summary get tag associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationTag.json + */ +async function apiManagementGetApiOperationTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByOperation( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByProductSample.js new file mode 100644 index 000000000000..48c66685dc67 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetByProductSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tag associated with the Product. + * + * @summary get tag associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductTag.json + */ +async function apiManagementGetProductTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByProduct( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByApiSample.js new file mode 100644 index 000000000000..d23138b50fa0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByApiSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTag.json + */ +async function apiManagementHeadApiTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByApi( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByOperationSample.js new file mode 100644 index 000000000000..8a17147e0934 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByOperationSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationTag.json + */ +async function apiManagementHeadApiOperationTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByOperation( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByProductSample.js new file mode 100644 index 000000000000..f7f4b8bbe0a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateByProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductTag.json + */ +async function apiManagementHeadProductTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByProduct( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f8", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateSample.js new file mode 100644 index 000000000000..9eb078b62527 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetEntityStateSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTag.json + */ +async function apiManagementHeadTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityState("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); +} + +async function main() { + await apiManagementHeadTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetSample.js new file mode 100644 index 000000000000..97b99861bb31 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTag.json + */ +async function apiManagementGetTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); + console.log(result); +} + +async function main() { + await apiManagementGetTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByApiSample.js new file mode 100644 index 000000000000..44c10eff7823 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByApiSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Tags associated with the API. + * + * @summary lists all Tags associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTags.json + */ +async function apiManagementListApiTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByOperationSample.js new file mode 100644 index 000000000000..f479b0601af7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByOperationSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Tags associated with the Operation. + * + * @summary lists all Tags associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationTags.json + */ +async function apiManagementListApiOperationTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByOperation( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0888cba3f6", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListApiOperationTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByProductSample.js new file mode 100644 index 000000000000..aea55705bb6e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByProductSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all Tags associated with the Product. + * + * @summary lists all Tags associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductTags.json + */ +async function apiManagementListProductTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByProduct( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListProductTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByServiceSample.js new file mode 100644 index 000000000000..f8e9f02e439a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of tags defined within a service instance. + * + * @summary lists a collection of tags defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTags.json + */ +async function apiManagementListTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..a86df1f0afee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an operation to the specified tag via link. + * + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagOperationLink.json + */ +async function apiManagementCreateTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagOperationLink.createOrUpdate( + "rg1", + "apimService1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkDeleteSample.js new file mode 100644 index 000000000000..2317e2ac50e8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagOperationLink.json + */ +async function apiManagementDeleteTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagOperationLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkGetSample.js new file mode 100644 index 000000000000..09a23bf30060 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagOperationLink.json + */ +async function apiManagementGetTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagOperationLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main() { + await apiManagementGetTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkListByProductSample.js new file mode 100644 index 000000000000..907ac1112f89 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagOperationLinkListByProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagOperationLinks.json + */ +async function apiManagementListTagOperationLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagOperationLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTagOperationLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..512c7aa022c3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkCreateOrUpdateSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds a product to the specified tag via link. + * + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagProductLink.json + */ +async function apiManagementCreateTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagProductLink.createOrUpdate( + "rg1", + "apimService1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkDeleteSample.js new file mode 100644 index 000000000000..682f6d416c6d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagProductLink.json + */ +async function apiManagementDeleteTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagProductLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkGetSample.js new file mode 100644 index 000000000000..d873357be3f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagProductLink.json + */ +async function apiManagementGetTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagProductLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main() { + await apiManagementGetTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkListByProductSample.js new file mode 100644 index 000000000000..d54ea847d3d6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagProductLinkListByProductSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagProductLinks.json + */ +async function apiManagementListTagProductLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagProductLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTagProductLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagResourceListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagResourceListByServiceSample.js new file mode 100644 index 000000000000..b049c48aedc5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagResourceListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of resources associated with tags. + * + * @summary lists a collection of resources associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagResources.json + */ +async function apiManagementListTagResources() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagResource.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTagResources(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagUpdateSample.js new file mode 100644 index 000000000000..4ce06e4e2135 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tagUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the tag specified by its identifier. + * + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTag.json + */ +async function apiManagementUpdateTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.update("rg1", "apimService1", "temptag", "*", { + displayName: "temp tag", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessCreateSample.js new file mode 100644 index 000000000000..20d4f5fbc8f2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessCreateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tenant access information details. + * + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTenantAccess.json + */ +async function apiManagementCreateTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.create("rg1", "apimService1", "access", "*", { + enabled: true, + }); + console.log(result); +} + +async function main() { + await apiManagementCreateTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetEntityTagSample.js new file mode 100644 index 000000000000..ab00fdd616e9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to tenant access metadata + * + * @summary tenant access metadata + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTenantAccess.json + */ +async function apiManagementHeadTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.getEntityTag("rg1", "apimService1", "access"); +} + +async function main() { + await apiManagementHeadTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetSample.js new file mode 100644 index 000000000000..dedaf7a7e0dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGetSample.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tenant access information details without secrets. + * + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantAccess.json + */ +async function apiManagementGetTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get("rg1", "apimService1", "access"); + console.log(result); +} + +/** + * This sample demonstrates how to get tenant access information details without secrets. + * + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantGitAccess.json + */ +async function apiManagementGetTenantGitAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get("rg1", "apimService1", "gitAccess"); + console.log(result); +} + +async function main() { + await apiManagementGetTenantAccess(); + await apiManagementGetTenantGitAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegeneratePrimaryKeySample.js new file mode 100644 index 000000000000..68e2d321b354 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegeneratePrimaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerate primary access key for GIT. + * + * @summary regenerate primary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccessGit.regeneratePrimaryKey("rg1", "apimService1", "access"); +} + +async function main() { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegenerateSecondaryKeySample.js new file mode 100644 index 000000000000..bde87d5d7a18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessGitRegenerateSecondaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerate secondary access key for GIT. + * + * @summary regenerate secondary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateKey.json + */ +async function apiManagementTenantAccessRegenerateKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccessGit.regenerateSecondaryKey("rg1", "apimService1", "access"); +} + +async function main() { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListByServiceSample.js new file mode 100644 index 000000000000..51e4fe8b733a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns list of access infos - for Git and Management endpoints. + * + * @summary returns list of access infos - for Git and Management endpoints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantAccess.json + */ +async function apiManagementListTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tenantAccess.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListSecretsSample.js new file mode 100644 index 000000000000..519f41a6ca4e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessListSecretsSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tenant access information details. + * + * @summary get tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsTenantAccess.json + */ +async function apiManagementListSecretsTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.listSecrets("rg1", "apimService1", "access"); + console.log(result); +} + +async function main() { + await apiManagementListSecretsTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegeneratePrimaryKeySample.js new file mode 100644 index 000000000000..be2c04bb14b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegeneratePrimaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerate primary access key + * + * @summary regenerate primary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.regeneratePrimaryKey("rg1", "apimService1", "access"); +} + +async function main() { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegenerateSecondaryKeySample.js new file mode 100644 index 000000000000..4211f14d8fc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessRegenerateSecondaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerate secondary access key + * + * @summary regenerate secondary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.regenerateSecondaryKey("rg1", "apimService1", "access"); +} + +async function main() { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessUpdateSample.js new file mode 100644 index 000000000000..5a9fd8b76c0e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantAccessUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update tenant access information details. + * + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTenantAccess.json + */ +async function apiManagementUpdateTenantAccess() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.update("rg1", "apimService1", "access", "*", { + enabled: true, + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationDeploySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationDeploySample.js new file mode 100644 index 000000000000..0c89e75c6a62 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationDeploySample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * + * @summary this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationDeploy.json + */ +async function apiManagementTenantConfigurationDeploy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.deploy("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main() { + await apiManagementTenantConfigurationDeploy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationGetSyncStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationGetSyncStateSample.js new file mode 100644 index 000000000000..eab3b88fddcb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationGetSyncStateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the status of the most recent synchronization between the configuration database and the Git repository. + * + * @summary gets the status of the most recent synchronization between the configuration database and the Git repository. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessSyncState.json + */ +async function apiManagementTenantAccessSyncState() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.getSyncState( + "rg1", + "apimService1", + "configuration", + ); + console.log(result); +} + +async function main() { + await apiManagementTenantAccessSyncState(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationSaveSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationSaveSample.js new file mode 100644 index 000000000000..6d126927a910 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationSaveSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * + * @summary this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationSave.json + */ +async function apiManagementTenantConfigurationSave() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.save("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main() { + await apiManagementTenantConfigurationSave(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationValidateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationValidateSample.js new file mode 100644 index 000000000000..4ccb084a7e24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantConfigurationValidateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * + * @summary this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationValidate.json + */ +async function apiManagementTenantConfigurationValidate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.validate("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main() { + await apiManagementTenantConfigurationValidate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsGetSample.js new file mode 100644 index 000000000000..bf6ca4432e1e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get tenant settings. + * + * @summary get tenant settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantSettings.json + */ +async function apiManagementGetTenantSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantSettings.get("rg1", "apimService1", "public"); + console.log(result); +} + +async function main() { + await apiManagementGetTenantSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsListByServiceSample.js new file mode 100644 index 000000000000..8cbc865375ac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/tenantSettingsListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to public settings. + * + * @summary public settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantSettings.json + */ +async function apiManagementListTenantSettings() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tenantSettings.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListTenantSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userConfirmationPasswordSendSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userConfirmationPasswordSendSample.js new file mode 100644 index 000000000000..16e3258751ac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userConfirmationPasswordSendSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to sends confirmation + * + * @summary sends confirmation + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserConfirmationPasswordSend.json + */ +async function apiManagementUserConfirmationPasswordSend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.userConfirmationPassword.send("rg1", "apimService1", "57127d485157a511ace86ae7"); +} + +async function main() { + await apiManagementUserConfirmationPasswordSend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userCreateOrUpdateSample.js new file mode 100644 index 000000000000..7939ef5fa495 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a user. + * + * @summary creates or Updates a user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateUser.json + */ +async function apiManagementCreateUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.createOrUpdate( + "rg1", + "apimService1", + "5931a75ae4bbd512288c680b", + { confirmation: "signup", email: "foobar@outlook.com", firstName: "foo", lastName: "bar" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userDeleteSample.js new file mode 100644 index 000000000000..030baaf18b3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific user. + * + * @summary deletes specific user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteUser.json + */ +async function apiManagementDeleteUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.user.delete("rg1", "apimService1", "5931a75ae4bbd512288c680b", "*"); +} + +async function main() { + await apiManagementDeleteUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGenerateSsoUrlSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGenerateSsoUrlSample.js new file mode 100644 index 000000000000..a95aac84ee4d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGenerateSsoUrlSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * + * @summary retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserGenerateSsoUrl.json + */ +async function apiManagementUserGenerateSsoUrl() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.generateSsoUrl( + "rg1", + "apimService1", + "57127d485157a511ace86ae7", + ); + console.log(result); +} + +async function main() { + await apiManagementUserGenerateSsoUrl(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetEntityTagSample.js new file mode 100644 index 000000000000..efdd760e8c37 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the user specified by its identifier. + * + * @summary gets the entity state (Etag) version of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadUser.json + */ +async function apiManagementHeadUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.user.getEntityTag("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); +} + +async function main() { + await apiManagementHeadUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSample.js new file mode 100644 index 000000000000..27bfe7bee9cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the user specified by its identifier. + * + * @summary gets the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUser.json + */ +async function apiManagementGetUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.get("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); + console.log(result); +} + +async function main() { + await apiManagementGetUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSharedAccessTokenSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSharedAccessTokenSample.js new file mode 100644 index 000000000000..42e32efc6ea9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGetSharedAccessTokenSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the Shared Access Authorization Token for the User. + * + * @summary gets the Shared Access Authorization Token for the User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserToken.json + */ +async function apiManagementUserToken() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getSharedAccessToken("rg1", "apimService1", "userId1718", { + expiry: new Date("2019-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); + console.log(result); +} + +async function main() { + await apiManagementUserToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGroupListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGroupListSample.js new file mode 100644 index 000000000000..46a1e3410ed2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userGroupListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all user groups. + * + * @summary lists all user groups. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserGroups.json + */ +async function apiManagementListUserGroups() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userGroup.list( + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListUserGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userIdentitiesListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userIdentitiesListSample.js new file mode 100644 index 000000000000..13f1da58cb8e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userIdentitiesListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to list of all user identities. + * + * @summary list of all user identities. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserIdentities.json + */ +async function apiManagementListUserIdentities() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userIdentities.list( + "rg1", + "apimService1", + "57f2af53bb17172280f44057", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListUserIdentities(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userListByServiceSample.js new file mode 100644 index 000000000000..b81df67d0671 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of registered users in the specified service instance. + * + * @summary lists a collection of registered users in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUsers.json + */ +async function apiManagementListUsers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.user.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionGetSample.js new file mode 100644 index 000000000000..954d91b9c32b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the specified Subscription entity associated with a particular user. + * + * @summary gets the specified Subscription entity associated with a particular user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUserSubscription.json + */ +async function apiManagementGetUserSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userSubscription.get( + "rg1", + "apimService1", + "1", + "5fa9b096f3df14003c070001", + ); + console.log(result); +} + +async function main() { + await apiManagementGetUserSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionListSample.js new file mode 100644 index 000000000000..7880b6d50d86 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userSubscriptionListSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists the collection of subscriptions of the specified user. + * + * @summary lists the collection of subscriptions of the specified user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserSubscriptions.json + */ +async function apiManagementListUserSubscriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userSubscription.list( + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListUserSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userUpdateSample.js new file mode 100644 index 000000000000..4db4310abd8f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/userUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the user specified by its identifier. + * + * @summary updates the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateUser.json + */ +async function apiManagementUpdateUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.update("rg1", "apimService1", "5931a75ae4bbd512a88c680b", "*", { + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiCreateOrUpdateSample.js new file mode 100644 index 000000000000..c6edddc6396f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiCreateOrUpdateSample.js @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates new or updates existing specified API of the workspace in an API Management service instance. + * + * @summary creates new or updates existing specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApi.json + */ +async function apiManagementCreateWorkspaceApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempgroup", + { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDeleteSample.js new file mode 100644 index 000000000000..2315c12d7b13 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API of the workspace in an API Management service instance. + * + * @summary deletes the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApi.json + */ +async function apiManagementDeleteWorkspaceApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApi.delete("rg1", "apimService1", "wks1", "echo-api", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js new file mode 100644 index 000000000000..8af52ddb14f5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticCreateOrUpdateSample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. + * + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json + */ +async function apiManagementCreateWorkspaceApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticDeleteSample.js new file mode 100644 index 000000000000..a7b7635091ea --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json + */ +async function apiManagementDeleteWorkspaceApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetEntityTagSample.js new file mode 100644 index 000000000000..2a6a30683931 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json + */ +async function apiManagementHeadWorkspaceApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetSample.js new file mode 100644 index 000000000000..fe433cf93359 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json + */ +async function apiManagementGetWorkspaceApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.get( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticListByWorkspaceSample.js new file mode 100644 index 000000000000..bb9a4fd85a75 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticListByWorkspaceSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiDiagnostics.json + */ +async function apiManagementListWorkspaceApiDiagnostics() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiDiagnostic.listByWorkspace( + "rg1", + "apimService1", + "wks1", + "echo-api", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticUpdateSample.js new file mode 100644 index 000000000000..cfaf3b0fb64c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiDiagnosticUpdateSample.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. + * + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json + */ +async function apiManagementUpdateWorkspaceApiDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.update( + "rg1", + "apimService1", + "wks1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiExportGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiExportGetSample.js new file mode 100644 index 000000000000..11c4d931511d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiExportGetSample.js @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json + */ +async function apiManagementGetWorkspaceApiExportInOpenApi2Dot0() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiExport.get( + "rg1", + "apimService1", + "wks1", + "echo-api", + "swagger-link", + "true", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json + */ +async function apiManagementGetWorkspaceApiExportInOpenApi3Dot0() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiExport.get( + "rg1", + "apimService1", + "wks1", + "aid9676", + "openapi-link", + "true", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiExportInOpenApi2Dot0(); + await apiManagementGetWorkspaceApiExportInOpenApi3Dot0(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetEntityTagSample.js new file mode 100644 index 000000000000..b5ded3a25a18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApi.json + */ +async function apiManagementHeadWorkspaceApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApi.getEntityTag("rg1", "apimService1", "wks1", "57d1f7558aa04f15146d9d8a"); +} + +async function main() { + await apiManagementHeadWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetSample.js new file mode 100644 index 000000000000..673c769c1555 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiGetSample.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiContract.json + */ +async function apiManagementGetWorkspaceApiContract() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.get( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRevision.json + */ +async function apiManagementGetWorkspaceApiRevision() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.get("rg1", "apimService1", "wks1", "echo-api;rev=3"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiContract(); + await apiManagementGetWorkspaceApiRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiListByServiceSample.js new file mode 100644 index 000000000000..bbb26a9d83f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all APIs of the workspace in an API Management service instance. + * + * @summary lists all APIs of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApis.json + */ +async function apiManagementListWorkspaceApis() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApi.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationCreateOrUpdateSample.js new file mode 100644 index 000000000000..c4a4982ea8bd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationCreateOrUpdateSample.js @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new operation in the API or updates an existing one. + * + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperation.json + */ +async function apiManagementCreateWorkspaceApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, + ], + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationDeleteSample.js new file mode 100644 index 000000000000..5339afc8b5b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperation.json + */ +async function apiManagementDeleteWorkspaceApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperation.delete( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetEntityTagSample.js new file mode 100644 index 000000000000..3e022e414930 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperation.json + */ +async function apiManagementHeadWorkspaceApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperation.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetSample.js new file mode 100644 index 000000000000..2050e6aa72a2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperation.json + */ +async function apiManagementGetWorkspaceApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.get( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationListByApiSample.js new file mode 100644 index 000000000000..2d182bc576cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationListByApiSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperations.json + */ +async function apiManagementListWorkspaceApiOperations() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiOperation.listByApi( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..05747d3274d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyCreateOrUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. + * + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json + */ +async function apiManagementCreateWorkspaceApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperationPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyDeleteSample.js new file mode 100644 index 000000000000..6985d79535d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyDeleteSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json + */ +async function apiManagementDeleteWorkspaceApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperationPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testapi", + "testoperation", + "policy", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..0e0ad55edc04 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetEntityTagSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json + */ +async function apiManagementHeadWorkspaceApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetSample.js new file mode 100644 index 000000000000..9741607edea7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyGetSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json + */ +async function apiManagementGetWorkspaceApiOperationPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperationPolicy.get( + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyListByOperationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyListByOperationSample.js new file mode 100644 index 000000000000..b29cee1ae411 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationPolicyListByOperationSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json + */ +async function apiManagementListWorkspaceApiOperationPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiOperationPolicy.listByOperation( + "rg1", + "apimService1", + "wks1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiOperationPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationUpdateSample.js new file mode 100644 index 000000000000..9a927118da54 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiOperationUpdateSample.js @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. + * + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiOperation.json + */ +async function apiManagementUpdateWorkspaceApiOperation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.update( + "rg1", + "apimService1", + "wks1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, + }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, + ], + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..28e04d291563 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiPolicy.json + */ +async function apiManagementCreateWorkspaceApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyDeleteSample.js new file mode 100644 index 000000000000..970b4d2b3648 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json + */ +async function apiManagementDeleteWorkspaceApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiPolicy.delete("rg1", "apimService1", "wks1", "loggerId", "policy", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..04f4895878be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiPolicy.json + */ +async function apiManagementHeadWorkspaceApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "policy", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetSample.js new file mode 100644 index 000000000000..d9d254a3a0b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiPolicy.json + */ +async function apiManagementGetWorkspaceApiPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiPolicy.get( + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyListByApiSample.js new file mode 100644 index 000000000000..7be1be9134be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiPolicyListByApiSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiPolicies.json + */ +async function apiManagementListWorkspaceApiPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiPolicy.listByApi( + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseCreateOrUpdateSample.js new file mode 100644 index 000000000000..18ce13006afa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Release for the API. + * + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiRelease.json + */ +async function apiManagementCreateWorkspaceApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseDeleteSample.js new file mode 100644 index 000000000000..4fba6645a289 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiRelease.json + */ +async function apiManagementDeleteWorkspaceApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiRelease.delete( + "rg1", + "apimService1", + "wks1", + "5a5fcc09124a7fa9b89f2f1d", + "testrev", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetEntityTagSample.js new file mode 100644 index 000000000000..7b6fbecaa41b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiRelease.json + */ +async function apiManagementHeadWorkspaceApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiRelease.getEntityTag( + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetSample.js new file mode 100644 index 000000000000..b3f71d392366 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRelease.json + */ +async function apiManagementGetWorkspaceApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.get( + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseListByServiceSample.js new file mode 100644 index 000000000000..d8f994a89801 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseListByServiceSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiReleases.json + */ +async function apiManagementListWorkspaceApiReleases() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiRelease.listByService( + "rg1", + "apimService1", + "wks1", + "a1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiReleases(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseUpdateSample.js new file mode 100644 index 000000000000..19690ec48327 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiReleaseUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. + * + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiRelease.json + */ +async function apiManagementUpdateWorkspaceApiRelease() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.update( + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + "*", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiRevisionListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiRevisionListByServiceSample.js new file mode 100644 index 000000000000..949fcaccf46e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiRevisionListByServiceSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiRevisions.json + */ +async function apiManagementListWorkspaceApiRevisions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiRevision.listByService( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaCreateOrUpdateSample.js new file mode 100644 index 000000000000..cedb2d46a11d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaCreateOrUpdateSample.js @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates schema configuration for the API. + * + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiSchema.json + */ +async function apiManagementCreateWorkspaceApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaDeleteSample.js new file mode 100644 index 000000000000..c2fe8fd65376 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiSchema.json + */ +async function apiManagementDeleteWorkspaceApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiSchema.delete( + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetEntityTagSample.js new file mode 100644 index 000000000000..235fa229c88e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiSchema.json + */ +async function apiManagementHeadWorkspaceApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiSchema.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); +} + +async function main() { + await apiManagementHeadWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetSample.js new file mode 100644 index 000000000000..08755f7bd5fe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiSchema.json + */ +async function apiManagementGetWorkspaceApiSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiSchema.get( + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaListByApiSample.js new file mode 100644 index 000000000000..cd6c8b58c01a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiSchemaListByApiSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiSchemas.json + */ +async function apiManagementListWorkspaceApiSchemas() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiSchema.listByApi( + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiUpdateSample.js new file mode 100644 index 000000000000..08b94679beb0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiUpdateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the specified API of the workspace in an API Management service instance. + * + * @summary updates the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApi.json + */ +async function apiManagementUpdateWorkspaceApi() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.update("rg1", "apimService1", "wks1", "echo-api", "*", { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetCreateOrUpdateSample.js new file mode 100644 index 000000000000..d5b41e5c4be3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a Api Version Set. + * + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json + */ +async function apiManagementCreateWorkspaceApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "api1", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetDeleteSample.js new file mode 100644 index 000000000000..2037218c4224 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json + */ +async function apiManagementDeleteWorkspaceApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiVersionSet.delete("rg1", "apimService1", "wks1", "a1", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetEntityTagSample.js new file mode 100644 index 000000000000..a0bc4c8865fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json + */ +async function apiManagementHeadWorkspaceApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiVersionSet.getEntityTag("rg1", "apimService1", "wks1", "vs1"); +} + +async function main() { + await apiManagementHeadWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetSample.js new file mode 100644 index 000000000000..1e2fbc1c5ca4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiVersionSet.json + */ +async function apiManagementGetWorkspaceApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.get("rg1", "apimService1", "wks1", "vs1"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetListByServiceSample.js new file mode 100644 index 000000000000..42bb736d4111 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified workspace with a service instance. + * + * @summary lists a collection of API Version Sets in the specified workspace with a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiVersionSets.json + */ +async function apiManagementListWorkspaceApiVersionSets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiVersionSet.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceApiVersionSets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetUpdateSample.js new file mode 100644 index 000000000000..f08c7e922b5a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceApiVersionSetUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. + * + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json + */ +async function apiManagementUpdateWorkspaceApiVersionSet() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.update( + "rg1", + "apimService1", + "wks1", + "vs1", + "*", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendCreateOrUpdateSample.js new file mode 100644 index 000000000000..407791c6ea1d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendCreateOrUpdateSample.js @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json + */ +async function apiManagementCreateWorkspaceBackendProxyBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "proxybackend", + { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { "x-my-1": ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] }, + }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendServiceFabric.json + */ +async function apiManagementCreateWorkspaceBackendServiceFabric() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "sfbackend", + { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1", + }, + ], + }, + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceBackendProxyBackend(); + await apiManagementCreateWorkspaceBackendServiceFabric(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendDeleteSample.js new file mode 100644 index 000000000000..2a3d3c7b4fc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceBackend.json + */ +async function apiManagementDeleteWorkspaceBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceBackend.delete("rg1", "apimService1", "wks1", "sfbackend", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetEntityTagSample.js new file mode 100644 index 000000000000..38055956d4f9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceBackend.json + */ +async function apiManagementHeadWorkspaceBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceBackend.getEntityTag("rg1", "apimService1", "wks1", "sfbackend"); +} + +async function main() { + await apiManagementHeadWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetSample.js new file mode 100644 index 000000000000..0ceb75109fc2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceBackend.json + */ +async function apiManagementGetWorkspaceBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.get("rg1", "apimService1", "wks1", "sfbackend"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendListByWorkspaceSample.js new file mode 100644 index 000000000000..5ffe0807ab3b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendListByWorkspaceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of backends in the specified workspace. + * + * @summary lists a collection of backends in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceBackends.json + */ +async function apiManagementListWorkspaceBackends() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceBackend.listByWorkspace("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceBackends(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendUpdateSample.js new file mode 100644 index 000000000000..794b6e6afc3a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceBackendUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing backend. + * + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceBackend.json + */ +async function apiManagementUpdateWorkspaceBackend() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.update( + "rg1", + "apimService1", + "wks1", + "proxybackend", + "*", + { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateCreateOrUpdateSample.js new file mode 100644 index 000000000000..9ff4f6574012 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateCreateOrUpdateSample.js @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificate.json + */ +async function apiManagementCreateWorkspaceCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempcert", + { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificateWithKeyVault.json + */ +async function apiManagementCreateWorkspaceCertificateWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceCertificate(); + await apiManagementCreateWorkspaceCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateDeleteSample.js new file mode 100644 index 000000000000..4c035351514e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceCertificate.json + */ +async function apiManagementDeleteWorkspaceCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceCertificate.delete("rg1", "apimService1", "wks1", "tempcert", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetEntityTagSample.js new file mode 100644 index 000000000000..39d62c10bfa1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceCertificate.json + */ +async function apiManagementWorkspaceHeadCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceCertificate.getEntityTag("rg1", "apimService1", "wks1", "templateCert1"); +} + +async function main() { + await apiManagementWorkspaceHeadCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetSample.js new file mode 100644 index 000000000000..7023c7d181ca --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateGetSample.js @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificate.json + */ +async function apiManagementGetWorkspaceCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.get( + "rg1", + "apimService1", + "wks1", + "templateCert1", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificateWithKeyVault.json + */ +async function apiManagementGetWorkspaceCertificateWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.get( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceCertificate(); + await apiManagementGetWorkspaceCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateListByWorkspaceSample.js new file mode 100644 index 000000000000..da2ead833ee6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateListByWorkspaceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of all certificates in the specified workspace. + * + * @summary lists a collection of all certificates in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceCertificates.json + */ +async function apiManagementListWorkspaceCertificates() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceCertificate.listByWorkspace( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceCertificates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateRefreshSecretSample.js new file mode 100644 index 000000000000..1d7ae44778d4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCertificateRefreshSecretSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceCertificate.json + */ +async function apiManagementRefreshWorkspaceCertificate() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.refreshSecret( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + ); + console.log(result); +} + +async function main() { + await apiManagementRefreshWorkspaceCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCreateOrUpdateSample.js new file mode 100644 index 000000000000..8b27ca7173c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceCreateOrUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new workspace or updates an existing one. + * + * @summary creates a new workspace or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspace.json + */ +async function apiManagementCreateWorkspace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.createOrUpdate("rg1", "apimService1", "wks1", { + description: "workspace 1", + displayName: "my workspace", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDeleteSample.js new file mode 100644 index 000000000000..d34a557efae6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified workspace. + * + * @summary deletes the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspace.json + */ +async function apiManagementDeleteWorkspace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspace.delete("rg1", "apimService1", "wks1", "*"); +} + +async function main() { + await apiManagementDeleteWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticCreateOrUpdateSample.js new file mode 100644 index 000000000000..d17ba00f4188 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticCreateOrUpdateSample.js @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. + * + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceDiagnostic.json + */ +async function apiManagementCreateWorkspaceDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticDeleteSample.js new file mode 100644 index 000000000000..f46f6299c13a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json + */ +async function apiManagementDeleteWorkspaceDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetEntityTagSample.js new file mode 100644 index 000000000000..18c2b71f0c75 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceDiagnostic.json + */ +async function apiManagementHeadWorkspaceDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + ); +} + +async function main() { + await apiManagementHeadWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetSample.js new file mode 100644 index 000000000000..da1b75a5a789 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceDiagnostic.json + */ +async function apiManagementGetWorkspaceDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.get( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticListByWorkspaceSample.js new file mode 100644 index 000000000000..c6dbcd13d2a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticListByWorkspaceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all diagnostics in the specified workspace. + * + * @summary lists all diagnostics in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceDiagnostics.json + */ +async function apiManagementListWorkspaceDiagnostics() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceDiagnostic.listByWorkspace( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticUpdateSample.js new file mode 100644 index 000000000000..126cc73730b8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceDiagnosticUpdateSample.js @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. + * + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json + */ +async function apiManagementUpdateWorkspaceDiagnostic() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.update( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetEntityTagSample.js new file mode 100644 index 000000000000..9f2eebb6acf6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspace.json + */ +async function apiManagementHeadWorkspace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspace.getEntityTag("rg1", "apimService1", "wks"); +} + +async function main() { + await apiManagementHeadWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetSample.js new file mode 100644 index 000000000000..5be78dfd648d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the workspace specified by its identifier. + * + * @summary gets the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspace.json + */ +async function apiManagementGetWorkspace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.get("rg1", "apimService1", "wks1"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js new file mode 100644 index 000000000000..d2204c6f57dd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the workspace in an API Management service instance. + * + * @summary creates new or updates existing specified Schema of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSchema.json + */ +async function apiManagementCreateWorkspaceSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGlobalSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "schema1", + { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaDeleteSample.js new file mode 100644 index 000000000000..c002a12f089b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSchema.json + */ +async function apiManagementDeleteWorkspaceSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGlobalSchema.delete("rg1", "apimService1", "wks1", "schema1", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetEntityTagSample.js new file mode 100644 index 000000000000..0a0b32e2a656 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSchema.json + */ +async function apiManagementHeadWorkspaceSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGlobalSchema.getEntityTag("rg1", "apimService1", "wks1", "myschema"); +} + +async function main() { + await apiManagementHeadWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetSample.js new file mode 100644 index 000000000000..a833fe69c3c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSchema.json + */ +async function apiManagementGetWorkspaceSchema() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGlobalSchema.get("rg1", "apimService1", "wks1", "schema1"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaListByServiceSample.js new file mode 100644 index 000000000000..72bf23c43a4c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGlobalSchemaListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of schemas registered with workspace in a service instance. + * + * @summary lists a collection of schemas registered with workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSchemas.json + */ +async function apiManagementListWorkspaceSchemas() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGlobalSchema.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupCreateOrUpdateSample.js new file mode 100644 index 000000000000..709eec1ebda0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupCreateOrUpdateSample.js @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroup.json + */ +async function apiManagementCreateWorkspaceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempgroup", + { displayName: "temp group" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupExternal.json + */ +async function apiManagementCreateWorkspaceGroupExternal() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "aadGroup", + { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceGroup(); + await apiManagementCreateWorkspaceGroupExternal(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupDeleteSample.js new file mode 100644 index 000000000000..e29e9e87a69a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific group of the workspace in an API Management service instance. + * + * @summary deletes specific group of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroup.json + */ +async function apiManagementDeleteWorkspaceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroup.delete("rg1", "apimService1", "wks1", "aadGroup", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetEntityTagSample.js new file mode 100644 index 000000000000..eb2a1890d013 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroup.json + */ +async function apiManagementHeadWorkspaceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroup.getEntityTag( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetSample.js new file mode 100644 index 000000000000..b049c3d6edf7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceGroup.json + */ +async function apiManagementGetWorkspaceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.get( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupListByServiceSample.js new file mode 100644 index 000000000000..59aa45cd07fc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of groups defined within a workspace in a service instance. + * + * @summary lists a collection of groups defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroups.json + */ +async function apiManagementListWorkspaceGroups() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGroup.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUpdateSample.js new file mode 100644 index 000000000000..7992f5d3b855 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the group specified by its identifier. + * + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceGroup.json + */ +async function apiManagementUpdateWorkspaceGroup() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.update( + "rg1", + "apimService1", + "wks1", + "tempgroup", + "*", + { displayName: "temp group" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCheckEntityExistsSample.js new file mode 100644 index 000000000000..09fcec6a66c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCheckEntityExistsSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroupUser.json + */ +async function apiManagementHeadWorkspaceGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroupUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", + ); +} + +async function main() { + await apiManagementHeadWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCreateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCreateSample.js new file mode 100644 index 000000000000..363c509255d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserCreateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupUser.json + */ +async function apiManagementCreateWorkspaceGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroupUser.create( + "rg1", + "apimService1", + "wks1", + "tempgroup", + "59307d350af58404d8a26300", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserDeleteSample.js new file mode 100644 index 000000000000..9978d25042a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroupUser.json + */ +async function apiManagementDeleteWorkspaceGroupUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroupUser.delete( + "rg1", + "apimService1", + "wks1", + "templategroup", + "59307d350af58404d8a26300", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserListSample.js new file mode 100644 index 000000000000..7c4b4ca28126 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceGroupUserListSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroupUsers.json + */ +async function apiManagementListWorkspaceGroupUsers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGroupUser.list( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceGroupUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceListByServiceSample.js new file mode 100644 index 000000000000..b8fba4747462 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all workspaces of the API Management service instance. + * + * @summary lists all workspaces of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaces.json + */ +async function apiManagementListWorkspaces() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspace.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaces(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerCreateOrUpdateSample.js new file mode 100644 index 000000000000..60dcfde4af2b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerCreateOrUpdateSample.js @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceAILogger.json + */ +async function apiManagementCreateWorkspaceAILogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "loggerId", + { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceEHLogger.json + */ +async function apiManagementCreateWorkspaceEHLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.createOrUpdate("rg1", "apimService1", "wks1", "eh1", { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", + }, + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceAILogger(); + await apiManagementCreateWorkspaceEHLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerDeleteSample.js new file mode 100644 index 000000000000..1a2051034605 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceLogger.json + */ +async function apiManagementDeleteWorkspaceLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceLogger.delete("rg1", "apimService1", "wks1", "loggerId", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetEntityTagSample.js new file mode 100644 index 000000000000..7b1e9dbb7007 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceLogger.json + */ +async function apiManagementHeadWorkspaceLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceLogger.getEntityTag("rg1", "apimService1", "wks1", "templateLogger"); +} + +async function main() { + await apiManagementHeadWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetSample.js new file mode 100644 index 000000000000..dc149ca70a4c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLogger.json + */ +async function apiManagementGetWorkspaceLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.get("rg1", "apimService1", "wks1", "templateLogger"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerListByWorkspaceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerListByWorkspaceSample.js new file mode 100644 index 000000000000..2dbfaae82148 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerListByWorkspaceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of loggers in the specified workspace. + * + * @summary lists a collection of loggers in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLoggers.json + */ +async function apiManagementListWorkspaceLoggers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceLogger.listByWorkspace("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceLoggers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerUpdateSample.js new file mode 100644 index 000000000000..0b7c1839cae8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceLoggerUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates an existing logger. + * + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceLogger.json + */ +async function apiManagementUpdateWorkspaceLogger() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.update("rg1", "apimService1", "wks1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueCreateOrUpdateSample.js new file mode 100644 index 000000000000..1af806d178f3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueCreateOrUpdateSample.js @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValue.json + */ +async function apiManagementCreateWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop2", + { displayName: "prop3name", secret: false, tags: ["foo", "bar"], value: "propValue" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json + */ +async function apiManagementCreateWorkspaceNamedValueWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop6", + { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", + }, + secret: true, + tags: ["foo", "bar"], + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceNamedValue(); + await apiManagementCreateWorkspaceNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueDeleteSample.js new file mode 100644 index 000000000000..5991fc1ca3d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific named value from the workspace in an API Management service instance. + * + * @summary deletes specific named value from the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNamedValue.json + */ +async function apiManagementDeleteWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNamedValue.delete("rg1", "apimService1", "wks1", "testprop2", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetEntityTagSample.js new file mode 100644 index 000000000000..91fe8fee3575 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNamedValue.json + */ +async function apiManagementHeadWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNamedValue.getEntityTag( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); +} + +async function main() { + await apiManagementHeadWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetSample.js new file mode 100644 index 000000000000..5e8e2109841c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueGetSample.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValue.json + */ +async function apiManagementGetWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.get( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + */ +async function apiManagementGetWorkspaceNamedValueWithKeyVault() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.get("rg1", "apimService1", "wks1", "testprop6"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceNamedValue(); + await apiManagementGetWorkspaceNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListByServiceSample.js new file mode 100644 index 000000000000..04fe8115de18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of named values defined within a workspace in a service instance. + * + * @summary lists a collection of named values defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNamedValues.json + */ +async function apiManagementListWorkspaceNamedValues() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceNamedValue.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceNamedValues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListValueSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListValueSample.js new file mode 100644 index 000000000000..5e104955d25c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueListValueSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceNamedValueListValue.json + */ +async function apiManagementWorkspaceNamedValueListValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.listValue( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +async function main() { + await apiManagementWorkspaceNamedValueListValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueRefreshSecretSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueRefreshSecretSample.js new file mode 100644 index 000000000000..4e11a37d17d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueRefreshSecretSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceNamedValue.json + */ +async function apiManagementRefreshWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.refreshSecret( + "rg1", + "apimService1", + "wks1", + "testprop2", + ); + console.log(result); +} + +async function main() { + await apiManagementRefreshWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueUpdateSample.js new file mode 100644 index 000000000000..d1544566bf24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNamedValueUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the specific named value. + * + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceNamedValue.json + */ +async function apiManagementUpdateWorkspaceNamedValue() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.update( + "rg1", + "apimService1", + "wks1", + "testprop2", + "*", + { displayName: "prop3name", secret: false, tags: ["foo", "bar2"], value: "propValue" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationCreateOrUpdateSample.js new file mode 100644 index 000000000000..63737bb60f7c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationCreateOrUpdateSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to create or Update API Management publisher notification for the workspace. + * + * @summary create or Update API Management publisher notification for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotification.json + */ +async function apiManagementCreateWorkspaceNotification() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotification.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationGetSample.js new file mode 100644 index 000000000000..243fd7bf1298 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNotification.json + */ +async function apiManagementGetWorkspaceNotification() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotification.get( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationListByServiceSample.js new file mode 100644 index 000000000000..f02142ab41c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotifications.json + */ +async function apiManagementListWorkspaceNotifications() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceNotification.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceNotifications(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js new file mode 100644 index 000000000000..f4f26083e0ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCheckEntityExistsSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementHeadWorkspaceNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main() { + await apiManagementHeadWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js new file mode 100644 index 000000000000..4f594fed0f1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementCreateWorkspaceNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientEmail.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "foobar@live.com", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailDeleteSample.js new file mode 100644 index 000000000000..a5587d8c059c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementDeleteWorkspaceNotificationRecipientEmail() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientEmail.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js new file mode 100644 index 000000000000..de690b14e53a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientEmailListByNotificationSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json + */ +async function apiManagementListWorkspaceNotificationRecipientEmails() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientEmail.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementListWorkspaceNotificationRecipientEmails(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js new file mode 100644 index 000000000000..313310280eaf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCheckEntityExistsSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json + */ +async function apiManagementHeadWorkspaceNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main() { + await apiManagementHeadWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js new file mode 100644 index 000000000000..c4c390653ffe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json + */ +async function apiManagementCreateWorkspaceNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientUser.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserDeleteSample.js new file mode 100644 index 000000000000..c68c3238bcb6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json + */ +async function apiManagementDeleteWorkspaceNotificationRecipientUser() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientUser.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserListByNotificationSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserListByNotificationSample.js new file mode 100644 index 000000000000..753794c5edcf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceNotificationRecipientUserListByNotificationSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json + */ +async function apiManagementListWorkspaceNotificationRecipientUsers() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientUser.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main() { + await apiManagementListWorkspaceNotificationRecipientUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..1ec68442cb8f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyCreateOrUpdateSample.js @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the workspace. + * + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicy.json + */ +async function apiManagementCreateWorkspacePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates policy configuration for the workspace. + * + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json + */ +async function apiManagementCreateWorkspacePolicyNonXmlEncoded() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspacePolicy(); + await apiManagementCreateWorkspacePolicyNonXmlEncoded(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyDeleteSample.js new file mode 100644 index 000000000000..19e2fc8708e5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the workspace. + * + * @summary deletes the policy configuration at the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicy.json + */ +async function apiManagementDeleteWorkspacePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicy.delete("rg1", "apimService1", "wks1", "policy", "*"); +} + +async function main() { + await apiManagementDeleteWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentCreateOrUpdateSample.js new file mode 100644 index 000000000000..cfd2baa7eafe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates a policy fragment. + * + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyFragment.json + */ +async function apiManagementCreateWorkspacePolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentDeleteSample.js new file mode 100644 index 000000000000..9e149c12982e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json + */ +async function apiManagementDeleteWorkspacePolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicyFragment.delete( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetEntityTagSample.js new file mode 100644 index 000000000000..b108f294af29 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicyFragment.json + */ +async function apiManagementHeadWorkspacePolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicyFragment.getEntityTag( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); +} + +async function main() { + await apiManagementHeadWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetSample.js new file mode 100644 index 000000000000..f96dd4a71873 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentGetSample.js @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragment.json + */ +async function apiManagementGetWorkspacePolicyFragment() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.get( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragmentFormat.json + */ +async function apiManagementGetWorkspacePolicyFragmentFormat() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.get( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { format: "rawxml" }, + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspacePolicyFragment(); + await apiManagementGetWorkspacePolicyFragmentFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListByServiceSample.js new file mode 100644 index 000000000000..d9010cbb9eb6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListByServiceSample.js @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets all policy fragments defined within a workspace. + * + * @summary gets all policy fragments defined within a workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragments.json + */ +async function apiManagementListWorkspacePolicyFragments() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspacePolicyFragment.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspacePolicyFragments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListReferencesSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListReferencesSample.js new file mode 100644 index 000000000000..24706b11d82d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyFragmentListReferencesSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json + */ +async function apiManagementListWorkspacePolicyFragmentReferences() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.listReferences( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); + console.log(result); +} + +async function main() { + await apiManagementListWorkspacePolicyFragmentReferences(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetEntityTagSample.js new file mode 100644 index 000000000000..337c018eac6c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicy.json + */ +async function apiManagementHeadWorkspacePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicy.getEntityTag("rg1", "apimService1", "wks1", "policy"); +} + +async function main() { + await apiManagementHeadWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetSample.js new file mode 100644 index 000000000000..73ceb3b29fbd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicy.json + */ +async function apiManagementGetWorkspacePolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.get("rg1", "apimService1", "wks1", "policy"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyListByApiSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyListByApiSample.js new file mode 100644 index 000000000000..e4015167b6cf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspacePolicyListByApiSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the workspace level. + * + * @summary get the policy configuration at the workspace level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicies.json + */ +async function apiManagementListWorkspacePolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspacePolicy.listByApi("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspacePolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..8fd51b40c474 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified product via link. + * + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductApiLink.json + */ +async function apiManagementCreateWorkspaceProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductApiLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkDeleteSample.js new file mode 100644 index 000000000000..9ab1b970a896 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json + */ +async function apiManagementDeleteWorkspaceProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductApiLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkGetSample.js new file mode 100644 index 000000000000..c269b976835d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductApiLink.json + */ +async function apiManagementGetWorkspaceProductApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductApiLink.get( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkListByProductSample.js new file mode 100644 index 000000000000..c1d40917ea52 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductApiLinkListByProductSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductApiLinks.json + */ +async function apiManagementListWorkspaceProductApiLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProductApiLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceProductApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductCreateOrUpdateSample.js new file mode 100644 index 000000000000..c97dae5d81cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductCreateOrUpdateSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or Updates a product. + * + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProduct.json + */ +async function apiManagementCreateWorkspaceProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + { displayName: "Test Template ProductName 4" }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductDeleteSample.js new file mode 100644 index 000000000000..dc8f343077d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductDeleteSample.js @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to delete product. + * + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProduct.json + */ +async function apiManagementDeleteWorkspaceProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProduct.delete("rg1", "apimService1", "wks1", "testproduct", "*", { + deleteSubscriptions: true, + }); +} + +async function main() { + await apiManagementDeleteWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetEntityTagSample.js new file mode 100644 index 000000000000..e9165d6ca0be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetEntityTagSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProduct.json + */ +async function apiManagementHeadWorkspaceProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProduct.getEntityTag("rg1", "apimService1", "wks1", "unlimited"); +} + +async function main() { + await apiManagementHeadWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetSample.js new file mode 100644 index 000000000000..2c9f77bd0428 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGetSample.js @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProduct.json + */ +async function apiManagementGetWorkspaceProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.get("rg1", "apimService1", "wks1", "unlimited"); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..3f21c5b894b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds a group to the specified product via link. + * + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json + */ +async function apiManagementCreateWorkspaceProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductGroupLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkDeleteSample.js new file mode 100644 index 000000000000..ec83a4914753 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkDeleteSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json + */ +async function apiManagementDeleteWorkspaceProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductGroupLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkGetSample.js new file mode 100644 index 000000000000..0b00f838a3c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductGroupLink.json + */ +async function apiManagementGetWorkspaceProductGroupLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductGroupLink.get( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkListByProductSample.js new file mode 100644 index 000000000000..2990aece2b91 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductGroupLinkListByProductSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductGroupLinks.json + */ +async function apiManagementListWorkspaceProductGroupLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProductGroupLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceProductGroupLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductListByServiceSample.js new file mode 100644 index 000000000000..2fc9547284b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of products in the specified workspace in a service instance. + * + * @summary lists a collection of products in the specified workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProducts.json + */ +async function apiManagementListWorkspaceProducts() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProduct.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyCreateOrUpdateSample.js new file mode 100644 index 000000000000..bc4edc5c6a27 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyCreateOrUpdateSample.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates policy configuration for the Product. + * + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductPolicy.json + */ +async function apiManagementCreateWorkspaceProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyDeleteSample.js new file mode 100644 index 000000000000..fa2df539c585 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyDeleteSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json + */ +async function apiManagementDeleteWorkspaceProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "policy", + "*", + ); +} + +async function main() { + await apiManagementDeleteWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetEntityTagSample.js new file mode 100644 index 000000000000..36a4f6be72f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetEntityTagSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProductPolicy.json + */ +async function apiManagementHeadWorkspaceProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "unlimited", + "policy", + ); +} + +async function main() { + await apiManagementHeadWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetSample.js new file mode 100644 index 000000000000..1ddff68f807e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductPolicy.json + */ +async function apiManagementGetWorkspaceProductPolicy() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.get( + "rg1", + "apimService1", + "wks1", + "kjoshiarmTemplateProduct4", + "policy", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyListByProductSample.js new file mode 100644 index 000000000000..7e8bc5089f2d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductPolicyListByProductSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductPolicies.json + */ +async function apiManagementListWorkspaceProductPolicies() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.listByProduct( + "rg1", + "apimService1", + "wks1", + "armTemplateProduct4", + ); + console.log(result); +} + +async function main() { + await apiManagementListWorkspaceProductPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductUpdateSample.js new file mode 100644 index 000000000000..6d0e18f50fe7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceProductUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to update existing product details. + * + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceProduct.json + */ +async function apiManagementUpdateWorkspaceProduct() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.update( + "rg1", + "apimService1", + "wks1", + "testproduct", + "*", + { displayName: "Test Template ProductName 4" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionCreateOrUpdateSample.js new file mode 100644 index 000000000000..4e71171f29c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionCreateOrUpdateSample.js @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. + * + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSubscription.json + */ +async function apiManagementCreateWorkspaceSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testsub", + { + displayName: "testsub", + ownerId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionDeleteSample.js new file mode 100644 index 000000000000..9efcb876ccbf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSubscription.json + */ +async function apiManagementDeleteWorkspaceSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.delete("rg1", "apimService1", "wks1", "testsub", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetEntityTagSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetEntityTagSample.js new file mode 100644 index 000000000000..c8ea3b0389d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetEntityTagSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSubscription.json + */ +async function apiManagementHeadWorkspaceSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); +} + +async function main() { + await apiManagementHeadWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetSample.js new file mode 100644 index 000000000000..448557d809ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSubscription.json + */ +async function apiManagementGetWorkspaceSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.get( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSample.js new file mode 100644 index 000000000000..edcd086a0bbd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists all subscriptions of the workspace in an API Management service instance. + * + * @summary lists all subscriptions of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSubscriptions.json + */ +async function apiManagementListWorkspaceSubscriptions() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceSubscription.list("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSecretsSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSecretsSample.js new file mode 100644 index 000000000000..9df7dc754ca6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionListSecretsSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json + */ +async function apiManagementWorkspaceSubscriptionListSecrets() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.listSecrets( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main() { + await apiManagementWorkspaceSubscriptionListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js new file mode 100644 index 000000000000..8fa813db1c28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegeneratePrimaryKeySample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates primary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json + */ +async function apiManagementWorkspaceSubscriptionRegeneratePrimaryKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.regeneratePrimaryKey("rg1", "apimService1", "wks1", "testsub"); +} + +async function main() { + await apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js new file mode 100644 index 000000000000..2ee1835599dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionRegenerateSecondaryKeySample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json + */ +async function apiManagementWorkspaceSubscriptionRegenerateSecondaryKey() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.regenerateSecondaryKey( + "rg1", + "apimService1", + "wks1", + "testsub", + ); +} + +async function main() { + await apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionUpdateSample.js new file mode 100644 index 000000000000..13386a9f3ff1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceSubscriptionUpdateSample.js @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of a subscription specified by its identifier. + * + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceSubscription.json + */ +async function apiManagementUpdateWorkspaceSubscription() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.update( + "rg1", + "apimService1", + "wks1", + "testsub", + "*", + { displayName: "testsub" }, + ); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..70bbf3075b34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an API to the specified tag via link. + * + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagApiLink.json + */ +async function apiManagementCreateWorkspaceTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagApiLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkDeleteSample.js new file mode 100644 index 000000000000..b96cd965c8f2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json + */ +async function apiManagementDeleteWorkspaceTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagApiLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkGetSample.js new file mode 100644 index 000000000000..a723fccd66a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagApiLink.json + */ +async function apiManagementGetWorkspaceTagApiLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagApiLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkListByProductSample.js new file mode 100644 index 000000000000..9e6511b04f7c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagApiLinkListByProductSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagApiLinks.json + */ +async function apiManagementListWorkspaceTagApiLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagApiLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceTagApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagCreateOrUpdateSample.js new file mode 100644 index 000000000000..85e3af6fc73a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagCreateOrUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to creates a tag. + * + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTag.json + */ +async function apiManagementCreateWorkspaceTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.createOrUpdate("rg1", "apimService1", "wks1", "tagId1", { + displayName: "tag1", + }); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagDeleteSample.js new file mode 100644 index 000000000000..8479ae8aa34a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes specific tag of the workspace in an API Management service instance. + * + * @summary deletes specific tag of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTag.json + */ +async function apiManagementDeleteWorkspaceTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTag.delete("rg1", "apimService1", "wks1", "tagId1", "*"); +} + +async function main() { + await apiManagementDeleteWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetEntityStateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetEntityStateSample.js new file mode 100644 index 000000000000..261b99d40d28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetEntityStateSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceTag.json + */ +async function apiManagementHeadWorkspaceTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTag.getEntityState( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main() { + await apiManagementHeadWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetSample.js new file mode 100644 index 000000000000..30eb4950f943 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagGetSample.js @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTag.json + */ +async function apiManagementGetWorkspaceTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.get( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagListByServiceSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagListByServiceSample.js new file mode 100644 index 000000000000..cc6a1707ee24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagListByServiceSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of tags defined within a workspace in a service instance. + * + * @summary lists a collection of tags defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTags.json + */ +async function apiManagementListWorkspaceTags() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTag.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..032ca3d8ae51 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds an operation to the specified tag via link. + * + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json + */ +async function apiManagementCreateWorkspaceTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagOperationLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkDeleteSample.js new file mode 100644 index 000000000000..88b3a3726ad8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json + */ +async function apiManagementDeleteWorkspaceTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagOperationLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkGetSample.js new file mode 100644 index 000000000000..2d881a2dc28d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagOperationLink.json + */ +async function apiManagementGetWorkspaceTagOperationLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagOperationLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkListByProductSample.js new file mode 100644 index 000000000000..08808fa3eeef --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagOperationLinkListByProductSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagOperationLinks.json + */ +async function apiManagementListWorkspaceTagOperationLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagOperationLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceTagOperationLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkCreateOrUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkCreateOrUpdateSample.js new file mode 100644 index 000000000000..3f2f013c4a5b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkCreateOrUpdateSample.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to adds a product to the specified tag via link. + * + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagProductLink.json + */ +async function apiManagementCreateWorkspaceTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagProductLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", + }, + ); + console.log(result); +} + +async function main() { + await apiManagementCreateWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkDeleteSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkDeleteSample.js new file mode 100644 index 000000000000..c0f10b2a9421 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkDeleteSample.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json + */ +async function apiManagementDeleteWorkspaceTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagProductLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main() { + await apiManagementDeleteWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkGetSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkGetSample.js new file mode 100644 index 000000000000..16592126c10e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkGetSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagProductLink.json + */ +async function apiManagementGetWorkspaceTagProductLink() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagProductLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main() { + await apiManagementGetWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkListByProductSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkListByProductSample.js new file mode 100644 index 000000000000..4221e88d46ee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagProductLinkListByProductSample.js @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagProductLinks.json + */ +async function apiManagementListWorkspaceTagProductLinks() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagProductLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await apiManagementListWorkspaceTagProductLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagUpdateSample.js new file mode 100644 index 000000000000..ca3ed1cf63c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceTagUpdateSample.js @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the tag specified by its identifier. + * + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceTag.json + */ +async function apiManagementUpdateWorkspaceTag() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.update("rg1", "apimService1", "wks1", "temptag", "*", { + displayName: "temp tag", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceUpdateSample.js b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceUpdateSample.js new file mode 100644 index 000000000000..c2e993f472a9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/javascript/workspaceUpdateSample.js @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { ApiManagementClient } = require("@azure/arm-apimanagement"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to updates the details of the workspace specified by its identifier. + * + * @summary updates the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspace.json + */ +async function apiManagementUpdateWorkspace() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.update("rg1", "apimService1", "wks1", "*", { + description: "workspace 1", + displayName: "my workspace", + }); + console.log(result); +} + +async function main() { + await apiManagementUpdateWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/README.md b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/README.md new file mode 100644 index 000000000000..8e306230938b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/README.md @@ -0,0 +1,1333 @@ +# @azure/arm-apimanagement client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for @azure/arm-apimanagement in some common scenarios. + +| **File Name** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [allPoliciesListByServiceSample.ts][allpolicieslistbyservicesample] | status of all policies of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementAllPolicies.json | +| [apiCreateOrUpdateSample.ts][apicreateorupdatesample] | creates new or updates existing specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApi.json | +| [apiDeleteSample.ts][apideletesample] | deletes the specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApi.json | +| [apiDiagnosticCreateOrUpdateSample.ts][apidiagnosticcreateorupdatesample] | creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiDiagnostic.json | +| [apiDiagnosticDeleteSample.ts][apidiagnosticdeletesample] | deletes the specified Diagnostic from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiDiagnostic.json | +| [apiDiagnosticGetEntityTagSample.ts][apidiagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiDiagnostic.json | +| [apiDiagnosticGetSample.ts][apidiagnosticgetsample] | gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiDiagnostic.json | +| [apiDiagnosticListByServiceSample.ts][apidiagnosticlistbyservicesample] | lists all diagnostics of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiDiagnostics.json | +| [apiDiagnosticUpdateSample.ts][apidiagnosticupdatesample] | updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiDiagnostic.json | +| [apiExportGetSample.ts][apiexportgetsample] | gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json | +| [apiGatewayConfigConnectionCreateOrUpdateSample.ts][apigatewayconfigconnectioncreateorupdatesample] | creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayConfigConnection.json | +| [apiGatewayConfigConnectionDeleteSample.ts][apigatewayconfigconnectiondeletesample] | deletes an existing API Management gateway config connection. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayConfigConnection.json | +| [apiGatewayConfigConnectionGetSample.ts][apigatewayconfigconnectiongetsample] | gets an API Management gateway config connection resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayConfigConnection.json | +| [apiGatewayConfigConnectionListByGatewaySample.ts][apigatewayconfigconnectionlistbygatewaysample] | list all API Management gateway config connections within a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayConfigConnection.json | +| [apiGatewayCreateOrUpdateSample.ts][apigatewaycreateorupdatesample] | creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateStandardGateway.json | +| [apiGatewayDeleteSample.ts][apigatewaydeletesample] | deletes an existing API Management gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayDeleteGateway.json | +| [apiGatewayGetSample.ts][apigatewaygetsample] | gets an API Management gateway resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGetGateway.json | +| [apiGatewayHostnameBindingCreateOrUpdateSample.ts][apigatewayhostnamebindingcreateorupdatesample] | creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingDeleteSample.ts][apigatewayhostnamebindingdeletesample] | deletes an existing API Management gateway hostname binding. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingGetSample.ts][apigatewayhostnamebindinggetsample] | gets an API Management gateway hostname binding resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameBinding.json | +| [apiGatewayHostnameBindingListByGatewaySample.ts][apigatewayhostnamebindinglistbygatewaysample] | list all API Management gateway hostname bindings within a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameBindings.json | +| [apiGatewayHostnameBindingRefreshSecretSample.ts][apigatewayhostnamebindingrefreshsecretsample] | refresh the secret for an API Management gateway hostname binding. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json | +| [apiGatewayListByResourceGroupSample.ts][apigatewaylistbyresourcegroupsample] | list all API Management gateways within a resource group. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json | +| [apiGatewayListSample.ts][apigatewaylistsample] | list all API Management gateways within a subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscription.json | +| [apiGatewayUpdateSample.ts][apigatewayupdatesample] | updates an existing API Management gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateStandardGateway.json | +| [apiGetEntityTagSample.ts][apigetentitytagsample] | gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApi.json | +| [apiGetSample.ts][apigetsample] | gets the details of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiContract.json | +| [apiIssueAttachmentCreateOrUpdateSample.ts][apiissueattachmentcreateorupdatesample] | creates a new Attachment for the Issue in an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueAttachment.json | +| [apiIssueAttachmentDeleteSample.ts][apiissueattachmentdeletesample] | deletes the specified comment from an Issue. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueAttachment.json | +| [apiIssueAttachmentGetEntityTagSample.ts][apiissueattachmentgetentitytagsample] | gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueAttachment.json | +| [apiIssueAttachmentGetSample.ts][apiissueattachmentgetsample] | gets the details of the issue Attachment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueAttachment.json | +| [apiIssueAttachmentListByServiceSample.ts][apiissueattachmentlistbyservicesample] | lists all attachments for the Issue associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueAttachments.json | +| [apiIssueCommentCreateOrUpdateSample.ts][apiissuecommentcreateorupdatesample] | creates a new Comment for the Issue in an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueComment.json | +| [apiIssueCommentDeleteSample.ts][apiissuecommentdeletesample] | deletes the specified comment from an Issue. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueComment.json | +| [apiIssueCommentGetEntityTagSample.ts][apiissuecommentgetentitytagsample] | gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueComment.json | +| [apiIssueCommentGetSample.ts][apiissuecommentgetsample] | gets the details of the issue Comment for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueComment.json | +| [apiIssueCommentListByServiceSample.ts][apiissuecommentlistbyservicesample] | lists all comments for the Issue associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueComments.json | +| [apiIssueCreateOrUpdateSample.ts][apiissuecreateorupdatesample] | creates a new Issue for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssue.json | +| [apiIssueDeleteSample.ts][apiissuedeletesample] | deletes the specified Issue from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssue.json | +| [apiIssueGetEntityTagSample.ts][apiissuegetentitytagsample] | gets the entity state (Etag) version of the Issue for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssue.json | +| [apiIssueGetSample.ts][apiissuegetsample] | gets the details of the Issue for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssue.json | +| [apiIssueListByServiceSample.ts][apiissuelistbyservicesample] | lists all issues associated with the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssues.json | +| [apiIssueUpdateSample.ts][apiissueupdatesample] | updates an existing issue for an API. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiIssue.json | +| [apiListByServiceSample.ts][apilistbyservicesample] | lists all APIs of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListApis.json | +| [apiListByTagsSample.ts][apilistbytagssample] | lists a collection of apis associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListApisByTags.json | +| [apiManagementGatewaySkusListAvailableSkusSample.ts][apimanagementgatewayskuslistavailableskussample] | gets all available SKU for a given API Management gateway x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Gateways.json | +| [apiManagementOperationsListSample.ts][apimanagementoperationslistsample] | lists all of the available REST API operations of the Microsoft.ApiManagement provider. x-ms-original-file: 2025-09-01-preview/ApiManagementListOperations.json | +| [apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts][apimanagementserviceapplynetworkconfigurationupdatessample] | updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. x-ms-original-file: 2025-09-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json | +| [apiManagementServiceBackupSample.ts][apimanagementservicebackupsample] | creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithAccessKey.json | +| [apiManagementServiceCheckNameAvailabilitySample.ts][apimanagementservicechecknameavailabilitysample] | checks availability and correctness of a name for an API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceCheckNameAvailability.json | +| [apiManagementServiceCreateOrUpdateSample.ts][apimanagementservicecreateorupdatesample] | creates or updates an API Management service. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json | +| [apiManagementServiceDeleteSample.ts][apimanagementservicedeletesample] | deletes an existing API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceDeleteService.json | +| [apiManagementServiceGetDomainOwnershipIdentifierSample.ts][apimanagementservicegetdomainownershipidentifiersample] | get the custom domain ownership identifier for an API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json | +| [apiManagementServiceGetSample.ts][apimanagementservicegetsample] | gets an API Management service resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json | +| [apiManagementServiceGetSsoTokenSample.ts][apimanagementservicegetssotokensample] | gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetSsoToken.json | +| [apiManagementServiceListByResourceGroupSample.ts][apimanagementservicelistbyresourcegroupsample] | list all API Management services within a resource group. x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json | +| [apiManagementServiceListSample.ts][apimanagementservicelistsample] | lists all API Management services within an Azure subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscription.json | +| [apiManagementServiceMigrateToStv2Sample.ts][apimanagementservicemigratetostv2sample] | upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceMigrateToStv2.json | +| [apiManagementServiceRefreshHostnamesSample.ts][apimanagementservicerefreshhostnamessample] | force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json | +| [apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts][apimanagementserviceresourcesperformconnectivitycheckasyncsample] | performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheck.json | +| [apiManagementServiceRestoreSample.ts][apimanagementservicerestoresample] | restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementRestoreWithAccessKey.json | +| [apiManagementServiceSkusListAvailableServiceSkusSample.ts][apimanagementserviceskuslistavailableserviceskussample] | gets all available SKU for a given API Management service x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Consumption.json | +| [apiManagementServiceUpdateSample.ts][apimanagementserviceupdatesample] | updates an existing API Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceDisableTls10.json | +| [apiManagementSkusListSample.ts][apimanagementskuslistsample] | gets the list of Microsoft.ApiManagement SKUs available for your Subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementListSku.json | +| [apiManagementWorkspaceLinkGetSample.ts][apimanagementworkspacelinkgetsample] | gets an API Management WorkspaceLink resource description. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLink.json | +| [apiManagementWorkspaceLinksListByServiceSample.ts][apimanagementworkspacelinkslistbyservicesample] | list all API Management workspaceLinks for a service. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLinks.json | +| [apiOperationCreateOrUpdateSample.ts][apioperationcreateorupdatesample] | creates a new operation in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperation.json | +| [apiOperationDeleteSample.ts][apioperationdeletesample] | deletes the specified operation in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperation.json | +| [apiOperationGetEntityTagSample.ts][apioperationgetentitytagsample] | gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperation.json | +| [apiOperationGetSample.ts][apioperationgetsample] | gets the details of the API Operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperation.json | +| [apiOperationListByApiSample.ts][apioperationlistbyapisample] | lists a collection of the operations for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperations.json | +| [apiOperationPolicyCreateOrUpdateSample.ts][apioperationpolicycreateorupdatesample] | creates or updates policy configuration for the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationPolicy.json | +| [apiOperationPolicyDeleteSample.ts][apioperationpolicydeletesample] | deletes the policy configuration at the Api Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationPolicy.json | +| [apiOperationPolicyGetEntityTagSample.ts][apioperationpolicygetentitytagsample] | gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationPolicy.json | +| [apiOperationPolicyGetSample.ts][apioperationpolicygetsample] | get the policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPolicy.json | +| [apiOperationPolicyListByOperationSample.ts][apioperationpolicylistbyoperationsample] | get the list of policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationPolicies.json | +| [apiOperationUpdateSample.ts][apioperationupdatesample] | updates the details of the operation in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiOperation.json | +| [apiPolicyCreateOrUpdateSample.ts][apipolicycreateorupdatesample] | creates or updates policy configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicy.json | +| [apiPolicyDeleteSample.ts][apipolicydeletesample] | deletes the policy configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiPolicy.json | +| [apiPolicyGetEntityTagSample.ts][apipolicygetentitytagsample] | gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiPolicy.json | +| [apiPolicyGetSample.ts][apipolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiPolicy.json | +| [apiPolicyListByApiSample.ts][apipolicylistbyapisample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiPolicies.json | +| [apiProductListByApisSample.ts][apiproductlistbyapissample] | lists all Products, which the API is part of. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiProducts.json | +| [apiReleaseCreateOrUpdateSample.ts][apireleasecreateorupdatesample] | creates a new Release for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRelease.json | +| [apiReleaseDeleteSample.ts][apireleasedeletesample] | deletes the specified release in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiRelease.json | +| [apiReleaseGetEntityTagSample.ts][apireleasegetentitytagsample] | returns the etag of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiRelease.json | +| [apiReleaseGetSample.ts][apireleasegetsample] | returns the details of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRelease.json | +| [apiReleaseListByServiceSample.ts][apireleaselistbyservicesample] | lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiReleases.json | +| [apiReleaseUpdateSample.ts][apireleaseupdatesample] | updates the details of the release of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiRelease.json | +| [apiRevisionListByServiceSample.ts][apirevisionlistbyservicesample] | lists all revisions of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiRevisions.json | +| [apiSchemaCreateOrUpdateSample.ts][apischemacreateorupdatesample] | creates or updates schema configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiSchema.json | +| [apiSchemaDeleteSample.ts][apischemadeletesample] | deletes the schema configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiSchema.json | +| [apiSchemaGetEntityTagSample.ts][apischemagetentitytagsample] | gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiSchema.json | +| [apiSchemaGetSample.ts][apischemagetsample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiSchema.json | +| [apiSchemaListByApiSample.ts][apischemalistbyapisample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiSchemas.json | +| [apiTagDescriptionCreateOrUpdateSample.ts][apitagdescriptioncreateorupdatesample] | create/Update tag description in scope of the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTagDescription.json | +| [apiTagDescriptionDeleteSample.ts][apitagdescriptiondeletesample] | delete tag description for the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTagDescription.json | +| [apiTagDescriptionGetEntityTagSample.ts][apitagdescriptiongetentitytagsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTagDescription.json | +| [apiTagDescriptionGetSample.ts][apitagdescriptiongetsample] | get Tag description in scope of API x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTagDescription.json | +| [apiTagDescriptionListByServiceSample.ts][apitagdescriptionlistbyservicesample] | lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTagDescriptions.json | +| [apiToolCreateOrUpdateSample.ts][apitoolcreateorupdatesample] | creates a new tool in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTool.json | +| [apiToolDeleteSample.ts][apitooldeletesample] | deletes the specified tool in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTool.json | +| [apiToolGetEntityTagSample.ts][apitoolgetentitytagsample] | gets the entity state (Etag) version of the API tool specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTool.json | +| [apiToolGetSample.ts][apitoolgetsample] | gets the details of the API Tool specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTool.json | +| [apiToolListByApiSample.ts][apitoollistbyapisample] | lists a collection of the MCP tools for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTools.json | +| [apiToolUpdateSample.ts][apitoolupdatesample] | updates the details of the tool in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiTool.json | +| [apiUpdateSample.ts][apiupdatesample] | updates the specified API of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApi.json | +| [apiVersionSetCreateOrUpdateSample.ts][apiversionsetcreateorupdatesample] | creates or Updates a Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiVersionSet.json | +| [apiVersionSetDeleteSample.ts][apiversionsetdeletesample] | deletes specific Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiVersionSet.json | +| [apiVersionSetGetEntityTagSample.ts][apiversionsetgetentitytagsample] | gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiVersionSet.json | +| [apiVersionSetGetSample.ts][apiversionsetgetsample] | gets the details of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiVersionSet.json | +| [apiVersionSetListByServiceSample.ts][apiversionsetlistbyservicesample] | lists a collection of API Version Sets in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiVersionSets.json | +| [apiVersionSetUpdateSample.ts][apiversionsetupdatesample] | updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiVersionSet.json | +| [apiWikiCreateOrUpdateSample.ts][apiwikicreateorupdatesample] | creates a new Wiki for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWiki.json | +| [apiWikiDeleteSample.ts][apiwikideletesample] | deletes the specified Wiki from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiWiki.json | +| [apiWikiGetEntityTagSample.ts][apiwikigetentitytagsample] | gets the entity state (Etag) version of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiWiki.json | +| [apiWikiGetSample.ts][apiwikigetsample] | gets the details of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiWiki.json | +| [apiWikiUpdateSample.ts][apiwikiupdatesample] | updates the details of the Wiki for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiWiki.json | +| [apiWikisListSample.ts][apiwikislistsample] | gets the wikis for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiWikis.json | +| [authorizationAccessPolicyCreateOrUpdateSample.ts][authorizationaccesspolicycreateorupdatesample] | creates or updates Authorization Access Policy. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyDeleteSample.ts][authorizationaccesspolicydeletesample] | deletes specific access policy from the Authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyGetSample.ts][authorizationaccesspolicygetsample] | gets the details of the authorization access policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationAccessPolicy.json | +| [authorizationAccessPolicyListByAuthorizationSample.ts][authorizationaccesspolicylistbyauthorizationsample] | lists a collection of authorization access policy defined within a authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationAccessPolicies.json | +| [authorizationConfirmConsentCodeSample.ts][authorizationconfirmconsentcodesample] | confirm valid consent code to suppress Authorizations anti-phishing page. x-ms-original-file: 2025-09-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json | +| [authorizationCreateOrUpdateSample.ts][authorizationcreateorupdatesample] | creates or updates authorization. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json | +| [authorizationDeleteSample.ts][authorizationdeletesample] | deletes specific Authorization from the Authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorization.json | +| [authorizationGetSample.ts][authorizationgetsample] | gets the details of the authorization specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorization.json | +| [authorizationListByAuthorizationProviderSample.ts][authorizationlistbyauthorizationprovidersample] | lists a collection of authorization providers defined within a authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsAuthCode.json | +| [authorizationLoginLinksPostSample.ts][authorizationloginlinkspostsample] | gets authorization login links. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationLoginRequest.json | +| [authorizationProviderCreateOrUpdateSample.ts][authorizationprovidercreateorupdatesample] | creates or updates authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json | +| [authorizationProviderDeleteSample.ts][authorizationproviderdeletesample] | deletes specific authorization provider from the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationProvider.json | +| [authorizationProviderGetSample.ts][authorizationprovidergetsample] | gets the details of the authorization provider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationProvider.json | +| [authorizationProviderListByServiceSample.ts][authorizationproviderlistbyservicesample] | lists a collection of authorization providers defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationProviders.json | +| [authorizationProviderRefreshSecretSample.ts][authorizationproviderrefreshsecretsample] | refreshes the Key Vault reference secret for the specified authorization provider. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json | +| [authorizationServerCreateOrUpdateSample.ts][authorizationservercreateorupdatesample] | creates new authorization server or updates an existing authorization server. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationServer.json | +| [authorizationServerDeleteSample.ts][authorizationserverdeletesample] | deletes specific authorization server instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationServer.json | +| [authorizationServerGetEntityTagSample.ts][authorizationservergetentitytagsample] | gets the entity state (Etag) version of the authorizationServer specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadAuthorizationServer.json | +| [authorizationServerGetSample.ts][authorizationservergetsample] | gets the details of the authorization server specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationServer.json | +| [authorizationServerListByServiceSample.ts][authorizationserverlistbyservicesample] | lists a collection of authorization servers defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationServers.json | +| [authorizationServerListSecretsSample.ts][authorizationserverlistsecretssample] | gets the client secret details of the authorization server. x-ms-original-file: 2025-09-01-preview/ApiManagementAuthorizationServerListSecrets.json | +| [authorizationServerUpdateSample.ts][authorizationserverupdatesample] | updates the details of the authorization server specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateAuthorizationServer.json | +| [backendCreateOrUpdateSample.ts][backendcreateorupdatesample] | creates or Updates a backend. x-ms-original-file: 2025-09-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json | +| [backendDeleteSample.ts][backenddeletesample] | deletes the specified backend. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteBackend.json | +| [backendGetEntityTagSample.ts][backendgetentitytagsample] | gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadBackend.json | +| [backendGetSample.ts][backendgetsample] | gets the details of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetBackend.json | +| [backendListByServiceSample.ts][backendlistbyservicesample] | lists a collection of backends in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListBackends.json | +| [backendReconnectSample.ts][backendreconnectsample] | notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. x-ms-original-file: 2025-09-01-preview/ApiManagementBackendReconnect.json | +| [backendUpdateSample.ts][backendupdatesample] | updates an existing backend. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateBackend.json | +| [cacheCreateOrUpdateSample.ts][cachecreateorupdatesample] | creates or updates an External Cache to be used in Api Management instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCache.json | +| [cacheDeleteSample.ts][cachedeletesample] | deletes specific Cache. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCache.json | +| [cacheGetEntityTagSample.ts][cachegetentitytagsample] | gets the entity state (Etag) version of the Cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCache.json | +| [cacheGetSample.ts][cachegetsample] | gets the details of the Cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetCache.json | +| [cacheListByServiceSample.ts][cachelistbyservicesample] | lists a collection of all external Caches in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListCaches.json | +| [cacheUpdateSample.ts][cacheupdatesample] | updates the details of the cache specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateCache.json | +| [certificateCreateOrUpdateSample.ts][certificatecreateorupdatesample] | creates or updates the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificate.json | +| [certificateDeleteSample.ts][certificatedeletesample] | deletes specific certificate. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCertificate.json | +| [certificateGetEntityTagSample.ts][certificategetentitytagsample] | gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCertificate.json | +| [certificateGetSample.ts][certificategetsample] | gets the details of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificate.json | +| [certificateListByServiceSample.ts][certificatelistbyservicesample] | lists a collection of all certificates in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListCertificates.json | +| [certificateRefreshSecretSample.ts][certificaterefreshsecretsample] | from KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshCertificate.json | +| [clientApplicationCreateOrUpdateSample.ts][clientapplicationcreateorupdatesample] | creates or Updates a client application. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplication.json | +| [clientApplicationDeleteSample.ts][clientapplicationdeletesample] | delete client application. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplication.json | +| [clientApplicationGetEntityTagSample.ts][clientapplicationgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadClientApplication.json | +| [clientApplicationGetSample.ts][clientapplicationgetsample] | gets the details of the client application specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplication.json | +| [clientApplicationListByServiceSample.ts][clientapplicationlistbyservicesample] | lists a collection of client applications in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplications.json | +| [clientApplicationListSecretsSample.ts][clientapplicationlistsecretssample] | retrived client application secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationSecrets.json | +| [clientApplicationProductLinkCreateSample.ts][clientapplicationproductlinkcreatesample] | adds an Product to the specified Client Application via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplicationProductLink.json | +| [clientApplicationProductLinkDeleteSample.ts][clientapplicationproductlinkdeletesample] | deletes the specified Product from the specified client application. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplicationProductLink.json | +| [clientApplicationProductLinkGetSample.ts][clientapplicationproductlinkgetsample] | gets the product link for the client application. x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplicationProductLink.json | +| [clientApplicationProductLinkListByClientApplicationsSample.ts][clientapplicationproductlinklistbyclientapplicationssample] | lists a collection of product links associated with the specified client application. x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationProductLinks.json | +| [contentItemCreateOrUpdateSample.ts][contentitemcreateorupdatesample] | creates a new developer portal's content item specified by the provided content type. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentTypeContentItem.json | +| [contentItemDeleteSample.ts][contentitemdeletesample] | removes the specified developer portal's content item. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentTypeContentItem.json | +| [contentItemGetEntityTagSample.ts][contentitemgetentitytagsample] | returns the entity state (ETag) version of the developer portal's content item specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadContentTypeContentItem.json | +| [contentItemGetSample.ts][contentitemgetsample] | returns the developer portal's content item specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentTypeContentItem.json | +| [contentItemListByServiceSample.ts][contentitemlistbyservicesample] | lists developer portal's content items specified by the provided content type. x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypeContentItems.json | +| [contentTypeCreateOrUpdateSample.ts][contenttypecreateorupdatesample] | creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentType.json | +| [contentTypeDeleteSample.ts][contenttypedeletesample] | removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentType.json | +| [contentTypeGetSample.ts][contenttypegetsample] | gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentType.json | +| [contentTypeListByServiceSample.ts][contenttypelistbyservicesample] | lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypes.json | +| [delegationSettingsCreateOrUpdateSample.ts][delegationsettingscreateorupdatesample] | create or Update Delegation settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutDelegation.json | +| [delegationSettingsGetEntityTagSample.ts][delegationsettingsgetentitytagsample] | gets the entity state (Etag) version of the DelegationSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDelegationSettings.json | +| [delegationSettingsGetSample.ts][delegationsettingsgetsample] | get Delegation Settings for the Portal. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetDelegation.json | +| [delegationSettingsListSecretsSample.ts][delegationsettingslistsecretssample] | gets the secret validation key of the DelegationSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json | +| [delegationSettingsUpdateSample.ts][delegationsettingsupdatesample] | update Delegation settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateDelegation.json | +| [deletedServicesGetByNameSample.ts][deletedservicesgetbynamesample] | get soft-deleted Api Management Service by name. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDeletedServiceByName.json | +| [deletedServicesListBySubscriptionSample.ts][deletedserviceslistbysubscriptionsample] | lists all soft-deleted services available for undelete for the given subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesListBySubscription.json | +| [deletedServicesPurgeSample.ts][deletedservicespurgesample] | purges Api Management Service (deletes it with no option to undelete). x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesPurge.json | +| [diagnosticCreateOrUpdateSample.ts][diagnosticcreateorupdatesample] | creates a new Diagnostic or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDiagnostic.json | +| [diagnosticDeleteSample.ts][diagnosticdeletesample] | deletes the specified Diagnostic. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDiagnostic.json | +| [diagnosticGetEntityTagSample.ts][diagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDiagnostic.json | +| [diagnosticGetSample.ts][diagnosticgetsample] | gets the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDiagnostic.json | +| [diagnosticListByServiceSample.ts][diagnosticlistbyservicesample] | lists all diagnostics of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListDiagnostics.json | +| [diagnosticUpdateSample.ts][diagnosticupdatesample] | updates the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDiagnostic.json | +| [documentationCreateOrUpdateSample.ts][documentationcreateorupdatesample] | creates a new Documentation or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDocumentation.json | +| [documentationDeleteSample.ts][documentationdeletesample] | deletes the specified Documentation from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDocumentation.json | +| [documentationGetEntityTagSample.ts][documentationgetentitytagsample] | gets the entity state (Etag) version of the Documentation by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDocumentation.json | +| [documentationGetSample.ts][documentationgetsample] | gets the details of the Documentation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetDocumentation.json | +| [documentationListByServiceSample.ts][documentationlistbyservicesample] | lists all Documentations of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListDocumentations.json | +| [documentationUpdateSample.ts][documentationupdatesample] | updates the details of the Documentation for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDocumentation.json | +| [emailTemplateCreateOrUpdateSample.ts][emailtemplatecreateorupdatesample] | updates an Email Template. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTemplate.json | +| [emailTemplateDeleteSample.ts][emailtemplatedeletesample] | reset the Email Template to default template provided by the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTemplate.json | +| [emailTemplateGetEntityTagSample.ts][emailtemplategetentitytagsample] | gets the entity state (Etag) version of the email template specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadEmailTemplate.json | +| [emailTemplateGetSample.ts][emailtemplategetsample] | gets the details of the email template specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTemplate.json | +| [emailTemplateListByServiceSample.ts][emailtemplatelistbyservicesample] | gets all email templates x-ms-original-file: 2025-09-01-preview/ApiManagementListTemplates.json | +| [emailTemplateUpdateSample.ts][emailtemplateupdatesample] | updates API Management email template x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTemplate.json | +| [gatewayApiCreateOrUpdateSample.ts][gatewayapicreateorupdatesample] | adds an API to the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayApi.json | +| [gatewayApiDeleteSample.ts][gatewayapideletesample] | deletes the specified API from the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayApi.json | +| [gatewayApiGetEntityTagSample.ts][gatewayapigetentitytagsample] | checks that API entity specified by identifier is associated with the Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayApi.json | +| [gatewayApiListByServiceSample.ts][gatewayapilistbyservicesample] | lists a collection of the APIs associated with a gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayApis.json | +| [gatewayCertificateAuthorityCreateOrUpdateSample.ts][gatewaycertificateauthoritycreateorupdatesample] | assign Certificate entity to Gateway entity as Certificate Authority. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityDeleteSample.ts][gatewaycertificateauthoritydeletesample] | remove relationship between Certificate Authority and Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityGetEntityTagSample.ts][gatewaycertificateauthoritygetentitytagsample] | checks if Certificate entity is assigned to Gateway entity as Certificate Authority. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityGetSample.ts][gatewaycertificateauthoritygetsample] | get assigned Gateway Certificate Authority details. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayCertificateAuthority.json | +| [gatewayCertificateAuthorityListByServiceSample.ts][gatewaycertificateauthoritylistbyservicesample] | lists the collection of Certificate Authorities for the specified Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayCertificateAuthorities.json | +| [gatewayCreateOrUpdateSample.ts][gatewaycreateorupdatesample] | creates or updates a Gateway to be used in Api Management instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGateway.json | +| [gatewayDeleteSample.ts][gatewaydeletesample] | deletes specific Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGateway.json | +| [gatewayGenerateTokenSample.ts][gatewaygeneratetokensample] | gets the Shared Access Authorization Token for the gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGenerateToken.json | +| [gatewayGetEntityTagSample.ts][gatewaygetentitytagsample] | gets the entity state (Etag) version of the Gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGateway.json | +| [gatewayGetSample.ts][gatewaygetsample] | gets the details of the Gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGateway.json | +| [gatewayHostnameConfigurationCreateOrUpdateSample.ts][gatewayhostnameconfigurationcreateorupdatesample] | creates of updates hostname configuration for a Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationDeleteSample.ts][gatewayhostnameconfigurationdeletesample] | deletes the specified hostname configuration from the specified Gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationGetEntityTagSample.ts][gatewayhostnameconfigurationgetentitytagsample] | checks that hostname configuration entity specified by identifier exists for specified Gateway entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationGetSample.ts][gatewayhostnameconfigurationgetsample] | get details of a hostname configuration x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameConfiguration.json | +| [gatewayHostnameConfigurationListByServiceSample.ts][gatewayhostnameconfigurationlistbyservicesample] | lists the collection of hostname configurations for the specified gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameConfigurations.json | +| [gatewayInvalidateDebugCredentialsSample.ts][gatewayinvalidatedebugcredentialssample] | action is invalidating all debug credentials issued for gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json | +| [gatewayListByServiceSample.ts][gatewaylistbyservicesample] | lists a collection of gateways registered with service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGateways.json | +| [gatewayListDebugCredentialsSample.ts][gatewaylistdebugcredentialssample] | create new debug credentials for gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListDebugCredentials.json | +| [gatewayListKeysSample.ts][gatewaylistkeyssample] | retrieves gateway keys. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListKeys.json | +| [gatewayListTraceSample.ts][gatewaylisttracesample] | fetches trace collected by gateway. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListTrace.json | +| [gatewayRegenerateKeySample.ts][gatewayregeneratekeysample] | regenerates specified gateway key invalidating any tokens created with it. x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayRegenerateKey.json | +| [gatewayUpdateSample.ts][gatewayupdatesample] | updates the details of the gateway specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGateway.json | +| [globalSchemaCreateOrUpdateSample.ts][globalschemacreateorupdatesample] | creates new or updates existing specified Schema of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema1.json | +| [globalSchemaDeleteSample.ts][globalschemadeletesample] | deletes specific Schema. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGlobalSchema.json | +| [globalSchemaGetEntityTagSample.ts][globalschemagetentitytagsample] | gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGlobalSchema.json | +| [globalSchemaGetSample.ts][globalschemagetsample] | gets the details of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema1.json | +| [globalSchemaListByServiceSample.ts][globalschemalistbyservicesample] | lists a collection of schemas registered with service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGlobalSchemas.json | +| [graphQLApiResolverCreateOrUpdateSample.ts][graphqlapiresolvercreateorupdatesample] | creates a new resolver in the GraphQL API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolver.json | +| [graphQLApiResolverDeleteSample.ts][graphqlapiresolverdeletesample] | deletes the specified resolver in the GraphQL API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolver.json | +| [graphQLApiResolverGetEntityTagSample.ts][graphqlapiresolvergetentitytagsample] | gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolver.json | +| [graphQLApiResolverGetSample.ts][graphqlapiresolvergetsample] | gets the details of the GraphQL API Resolver specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolver.json | +| [graphQLApiResolverListByApiSample.ts][graphqlapiresolverlistbyapisample] | lists a collection of the resolvers for the specified GraphQL API. x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolvers.json | +| [graphQLApiResolverPolicyCreateOrUpdateSample.ts][graphqlapiresolverpolicycreateorupdatesample] | creates or updates policy configuration for the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyDeleteSample.ts][graphqlapiresolverpolicydeletesample] | deletes the policy configuration at the GraphQL Api Resolver. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyGetEntityTagSample.ts][graphqlapiresolverpolicygetentitytagsample] | gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyGetSample.ts][graphqlapiresolverpolicygetsample] | get the policy configuration at the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json | +| [graphQLApiResolverPolicyListByResolverSample.ts][graphqlapiresolverpolicylistbyresolversample] | get the list of policy configuration at the GraphQL API Resolver level. x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolverPolicies.json | +| [graphQLApiResolverUpdateSample.ts][graphqlapiresolverupdatesample] | updates the details of the resolver in the GraphQL API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGraphQLApiResolver.json | +| [groupCreateOrUpdateSample.ts][groupcreateorupdatesample] | creates or Updates a group. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroup.json | +| [groupDeleteSample.ts][groupdeletesample] | deletes specific group of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroup.json | +| [groupGetEntityTagSample.ts][groupgetentitytagsample] | gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroup.json | +| [groupGetSample.ts][groupgetsample] | gets the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetGroup.json | +| [groupListByServiceSample.ts][grouplistbyservicesample] | lists a collection of groups defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListGroups.json | +| [groupUpdateSample.ts][groupupdatesample] | updates the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGroup.json | +| [groupUserCheckEntityExistsSample.ts][groupusercheckentityexistssample] | checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroupUser.json | +| [groupUserCreateSample.ts][groupusercreatesample] | add existing user to existing group x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupUser.json | +| [groupUserDeleteSample.ts][groupuserdeletesample] | remove existing user from existing group. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroupUser.json | +| [groupUserListSample.ts][groupuserlistsample] | lists a collection of user entities associated with the group. x-ms-original-file: 2025-09-01-preview/ApiManagementListGroupUsers.json | +| [identityProviderCreateOrUpdateSample.ts][identityprovidercreateorupdatesample] | creates or Updates the IdentityProvider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateIdentityProvider.json | +| [identityProviderDeleteSample.ts][identityproviderdeletesample] | deletes the specified identity provider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteIdentityProvider.json | +| [identityProviderGetEntityTagSample.ts][identityprovidergetentitytagsample] | gets the entity state (Etag) version of the identityProvider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadIdentityProvider.json | +| [identityProviderGetSample.ts][identityprovidergetsample] | gets the configuration details of the identity Provider configured in specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementGetIdentityProvider.json | +| [identityProviderListByServiceSample.ts][identityproviderlistbyservicesample] | lists a collection of Identity Provider configured in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListIdentityProviders.json | +| [identityProviderListSecretsSample.ts][identityproviderlistsecretssample] | gets the client secret details of the Identity Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementIdentityProviderListSecrets.json | +| [identityProviderUpdateSample.ts][identityproviderupdatesample] | updates an existing IdentityProvider configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateIdentityProvider.json | +| [issueGetSample.ts][issuegetsample] | gets API Management issue details x-ms-original-file: 2025-09-01-preview/ApiManagementGetIssue.json | +| [issueListByServiceSample.ts][issuelistbyservicesample] | lists a collection of issues in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListIssues.json | +| [loggerCreateOrUpdateSample.ts][loggercreateorupdatesample] | creates or Updates a logger. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAILogger.json | +| [loggerDeleteSample.ts][loggerdeletesample] | deletes the specified logger. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteLogger.json | +| [loggerGetEntityTagSample.ts][loggergetentitytagsample] | gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadLogger.json | +| [loggerGetSample.ts][loggergetsample] | gets the details of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetLogger.json | +| [loggerListByServiceSample.ts][loggerlistbyservicesample] | lists a collection of loggers in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListLoggers.json | +| [loggerUpdateSample.ts][loggerupdatesample] | updates an existing logger. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateLogger.json | +| [namedValueCreateOrUpdateSample.ts][namedvaluecreateorupdatesample] | creates or updates named value. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValue.json | +| [namedValueDeleteSample.ts][namedvaluedeletesample] | deletes specific named value from the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNamedValue.json | +| [namedValueGetEntityTagSample.ts][namedvaluegetentitytagsample] | gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNamedValue.json | +| [namedValueGetSample.ts][namedvaluegetsample] | gets the details of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValue.json | +| [namedValueListByServiceSample.ts][namedvaluelistbyservicesample] | lists a collection of named values defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListNamedValues.json | +| [namedValueListValueSample.ts][namedvaluelistvaluesample] | gets the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementNamedValueListValue.json | +| [namedValueRefreshSecretSample.ts][namedvaluerefreshsecretsample] | refresh the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshNamedValue.json | +| [namedValueUpdateSample.ts][namedvalueupdatesample] | updates the specific named value. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateNamedValue.json | +| [networkStatusListByLocationSample.ts][networkstatuslistbylocationsample] | gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json | +| [networkStatusListByServiceSample.ts][networkstatuslistbyservicesample] | gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatus.json | +| [notificationCreateOrUpdateSample.ts][notificationcreateorupdatesample] | create or Update API Management publisher notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotification.json | +| [notificationGetSample.ts][notificationgetsample] | gets the details of the Notification specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetNotification.json | +| [notificationListByServiceSample.ts][notificationlistbyservicesample] | lists a collection of properties defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotifications.json | +| [notificationRecipientEmailCheckEntityExistsSample.ts][notificationrecipientemailcheckentityexistssample] | determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientEmail.json | +| [notificationRecipientEmailCreateOrUpdateSample.ts][notificationrecipientemailcreateorupdatesample] | adds the Email address to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientEmail.json | +| [notificationRecipientEmailDeleteSample.ts][notificationrecipientemaildeletesample] | removes the email from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientEmail.json | +| [notificationRecipientEmailListByNotificationSample.ts][notificationrecipientemaillistbynotificationsample] | gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientEmails.json | +| [notificationRecipientUserCheckEntityExistsSample.ts][notificationrecipientusercheckentityexistssample] | determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientUser.json | +| [notificationRecipientUserCreateOrUpdateSample.ts][notificationrecipientusercreateorupdatesample] | adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientUser.json | +| [notificationRecipientUserDeleteSample.ts][notificationrecipientuserdeletesample] | removes the API Management user from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientUser.json | +| [notificationRecipientUserListByNotificationSample.ts][notificationrecipientuserlistbynotificationsample] | gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientUsers.json | +| [openIdConnectProviderCreateOrUpdateSample.ts][openidconnectprovidercreateorupdatesample] | creates or updates the OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateOpenIdConnectProvider.json | +| [openIdConnectProviderDeleteSample.ts][openidconnectproviderdeletesample] | deletes specific OpenID Connect Provider of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteOpenIdConnectProvider.json | +| [openIdConnectProviderGetEntityTagSample.ts][openidconnectprovidergetentitytagsample] | gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadOpenIdConnectProvider.json | +| [openIdConnectProviderGetSample.ts][openidconnectprovidergetsample] | gets specific OpenID Connect Provider without secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOpenIdConnectProvider.json | +| [openIdConnectProviderListByServiceSample.ts][openidconnectproviderlistbyservicesample] | lists of all the OpenId Connect Providers. x-ms-original-file: 2025-09-01-preview/ApiManagementListOpenIdConnectProviders.json | +| [openIdConnectProviderListSecretsSample.ts][openidconnectproviderlistsecretssample] | gets the client secret details of the OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementOpenidConnectProviderListSecrets.json | +| [openIdConnectProviderUpdateSample.ts][openidconnectproviderupdatesample] | updates the specific OpenID Connect Provider. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateOpenIdConnectProvider.json | +| [operationListByTagsSample.ts][operationlistbytagssample] | lists a collection of operations associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationsByTags.json | +| [operationStatusGetSample.ts][operationstatusgetsample] | returns the current status of an async operation. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationStatus.json | +| [operationsResultsGetSample.ts][operationsresultsgetsample] | returns operation results for long running operations executing DELETE or PATCH on the resource. x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationResult.json | +| [outboundNetworkDependenciesEndpointsListByServiceSample.ts][outboundnetworkdependenciesendpointslistbyservicesample] | gets the network endpoints of all outbound dependencies of a ApiManagement service. x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json | +| [policyCreateOrUpdateSample.ts][policycreateorupdatesample] | creates or updates the global policy configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicy.json | +| [policyDeleteSample.ts][policydeletesample] | deletes the global policy configuration of the Api Management Service. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicy.json | +| [policyDescriptionListByServiceSample.ts][policydescriptionlistbyservicesample] | lists all policy descriptions. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyDescriptions.json | +| [policyFragmentCreateOrUpdateSample.ts][policyfragmentcreateorupdatesample] | creates or updates a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyFragment.json | +| [policyFragmentDeleteSample.ts][policyfragmentdeletesample] | deletes a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyFragment.json | +| [policyFragmentGetEntityTagSample.ts][policyfragmentgetentitytagsample] | gets the entity state (Etag) version of a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyFragment.json | +| [policyFragmentGetSample.ts][policyfragmentgetsample] | gets a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragment.json | +| [policyFragmentListByServiceSample.ts][policyfragmentlistbyservicesample] | gets all policy fragments. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragments.json | +| [policyFragmentListReferencesSample.ts][policyfragmentlistreferencessample] | lists policy resources that reference the policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragmentReferences.json | +| [policyGetEntityTagSample.ts][policygetentitytagsample] | gets the entity state (Etag) version of the Global policy definition in the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicy.json | +| [policyGetSample.ts][policygetsample] | get the Global policy definition of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicy.json | +| [policyListByServiceSample.ts][policylistbyservicesample] | lists all the Global Policy definitions of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicies.json | +| [policyRestrictionCreateOrUpdateSample.ts][policyrestrictioncreateorupdatesample] | creates or updates the policy restriction configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyRestriction.json | +| [policyRestrictionDeleteSample.ts][policyrestrictiondeletesample] | deletes the policy restriction configuration of the Api Management Service. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyRestriction.json | +| [policyRestrictionGetEntityTagSample.ts][policyrestrictiongetentitytagsample] | gets the entity state (Etag) version of the policy restriction in the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyRestriction.json | +| [policyRestrictionGetSample.ts][policyrestrictiongetsample] | get the policy restriction of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyRestriction.json | +| [policyRestrictionListByServiceSample.ts][policyrestrictionlistbyservicesample] | gets all policy restrictions of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyRestrictions.json | +| [policyRestrictionUpdateSample.ts][policyrestrictionupdatesample] | updates the policy restriction configuration of the Api Management service. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePolicyRestriction.json | +| [policyRestrictionValidationsByServiceSample.ts][policyrestrictionvalidationsbyservicesample] | validate all policies of API Management services. x-ms-original-file: 2025-09-01-preview/ApiManagementValidatePolicies.json | +| [portalConfigCreateOrUpdateSample.ts][portalconfigcreateorupdatesample] | create or update the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalConfig.json | +| [portalConfigGetEntityTagSample.ts][portalconfiggetentitytagsample] | gets the entity state (Etag) version of the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalConfig.json | +| [portalConfigGetSample.ts][portalconfiggetsample] | get the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalConfig.json | +| [portalConfigListByServiceSample.ts][portalconfiglistbyservicesample] | lists the developer portal configurations. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalConfig.json | +| [portalConfigUpdateSample.ts][portalconfigupdatesample] | update the developer portal configuration. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalConfig.json | +| [portalRevisionCreateOrUpdateSample.ts][portalrevisioncreateorupdatesample] | creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalRevision.json | +| [portalRevisionGetEntityTagSample.ts][portalrevisiongetentitytagsample] | gets the developer portal revision specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalRevision.json | +| [portalRevisionGetSample.ts][portalrevisiongetsample] | gets the developer portal's revision specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPortalRevision.json | +| [portalRevisionListByServiceSample.ts][portalrevisionlistbyservicesample] | lists developer portal's revisions. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalRevisions.json | +| [portalRevisionUpdateSample.ts][portalrevisionupdatesample] | updates the description of specified portal revision or makes it current. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalRevision.json | +| [portalSettingsListByServiceSample.ts][portalsettingslistbyservicesample] | lists a collection of portalsettings defined within a service instance.. x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalSettings.json | +| [privateEndpointConnectionCreateOrUpdateSample.ts][privateendpointconnectioncreateorupdatesample] | creates a new Private Endpoint Connection or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json | +| [privateEndpointConnectionDeleteSample.ts][privateendpointconnectiondeletesample] | deletes the specified Private Endpoint Connection. x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionGetByNameSample.ts][privateendpointconnectiongetbynamesample] | gets the details of the Private Endpoint Connection specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateEndpointConnection.json | +| [privateEndpointConnectionGetPrivateLinkResourceSample.ts][privateendpointconnectiongetprivatelinkresourcesample] | gets the private link resources x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateLinkGroupResource.json | +| [privateEndpointConnectionListByServiceSample.ts][privateendpointconnectionlistbyservicesample] | lists all private endpoint connections of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateEndpointConnections.json | +| [privateEndpointConnectionListPrivateLinkResourcesSample.ts][privateendpointconnectionlistprivatelinkresourcessample] | gets the private link resources x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateLinkGroupResources.json | +| [productApiCheckEntityExistsSample.ts][productapicheckentityexistssample] | checks that API entity specified by identifier is associated with the Product entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductApi.json | +| [productApiCreateOrUpdateSample.ts][productapicreateorupdatesample] | adds an API to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApi.json | +| [productApiDeleteSample.ts][productapideletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApi.json | +| [productApiLinkCreateOrUpdateSample.ts][productapilinkcreateorupdatesample] | adds an API to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApiLink.json | +| [productApiLinkDeleteSample.ts][productapilinkdeletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApiLink.json | +| [productApiLinkGetSample.ts][productapilinkgetsample] | gets the API link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductApiLink.json | +| [productApiLinkListByProductSample.ts][productapilinklistbyproductsample] | lists a collection of the API links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApiLinks.json | +| [productApiListByProductSample.ts][productapilistbyproductsample] | lists a collection of the APIs associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApis.json | +| [productCreateOrUpdateSample.ts][productcreateorupdatesample] | creates or Updates a product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProduct.json | +| [productDeleteSample.ts][productdeletesample] | delete product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProduct.json | +| [productGetEntityTagSample.ts][productgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProduct.json | +| [productGetSample.ts][productgetsample] | gets the details of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProduct.json | +| [productGroupCheckEntityExistsSample.ts][productgroupcheckentityexistssample] | checks that Group entity specified by identifier is associated with the Product entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductGroup.json | +| [productGroupCreateOrUpdateSample.ts][productgroupcreateorupdatesample] | adds the association between the specified developer group with the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroup.json | +| [productGroupDeleteSample.ts][productgroupdeletesample] | deletes the association between the specified group and product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroup.json | +| [productGroupLinkCreateOrUpdateSample.ts][productgrouplinkcreateorupdatesample] | adds a group to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroupLink.json | +| [productGroupLinkDeleteSample.ts][productgrouplinkdeletesample] | deletes the specified group from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroupLink.json | +| [productGroupLinkGetSample.ts][productgrouplinkgetsample] | gets the group link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductGroupLink.json | +| [productGroupLinkListByProductSample.ts][productgrouplinklistbyproductsample] | lists a collection of the group links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroupLinks.json | +| [productGroupListByProductSample.ts][productgrouplistbyproductsample] | lists the collection of developer groups associated with the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroups.json | +| [productListByServiceSample.ts][productlistbyservicesample] | lists a collection of products in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListProducts.json | +| [productListByTagsSample.ts][productlistbytagssample] | lists a collection of products associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductsByTags.json | +| [productPolicyCreateOrUpdateSample.ts][productpolicycreateorupdatesample] | creates or updates policy configuration for the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductPolicy.json | +| [productPolicyDeleteSample.ts][productpolicydeletesample] | deletes the policy configuration at the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductPolicy.json | +| [productPolicyGetEntityTagSample.ts][productpolicygetentitytagsample] | get the ETag of the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductPolicy.json | +| [productPolicyGetSample.ts][productpolicygetsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductPolicy.json | +| [productPolicyListByProductSample.ts][productpolicylistbyproductsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductPolicies.json | +| [productSubscriptionsListSample.ts][productsubscriptionslistsample] | lists the collection of subscriptions to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductSubscriptions.json | +| [productUpdateSample.ts][productupdatesample] | update existing product details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProduct.json | +| [productWikiCreateOrUpdateSample.ts][productwikicreateorupdatesample] | creates a new Wiki for a Product or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductWiki.json | +| [productWikiDeleteSample.ts][productwikideletesample] | deletes the specified Wiki from a Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductWiki.json | +| [productWikiGetEntityTagSample.ts][productwikigetentitytagsample] | gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductWiki.json | +| [productWikiGetSample.ts][productwikigetsample] | gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductWiki.json | +| [productWikiUpdateSample.ts][productwikiupdatesample] | updates the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProductWiki.json | +| [productWikisListSample.ts][productwikislistsample] | gets the details of the Wiki for a Product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductWikis.json | +| [quotaByCounterKeysListByServiceSample.ts][quotabycounterkeyslistbyservicesample] | lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeys.json | +| [quotaByCounterKeysUpdateSample.ts][quotabycounterkeysupdatesample] | updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKey.json | +| [quotaByPeriodKeysGetSample.ts][quotabyperiodkeysgetsample] | gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json | +| [quotaByPeriodKeysUpdateSample.ts][quotabyperiodkeysupdatesample] | updates an existing quota counter value in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json | +| [regionListByServiceSample.ts][regionlistbyservicesample] | lists all azure regions in which the service exists. x-ms-original-file: 2025-09-01-preview/ApiManagementListRegions.json | +| [reportsListByApiSample.ts][reportslistbyapisample] | lists report records by API. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByApi.json | +| [reportsListByGeoSample.ts][reportslistbygeosample] | lists report records by geography. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByGeo.json | +| [reportsListByOperationSample.ts][reportslistbyoperationsample] | lists report records by API Operations. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByOperation.json | +| [reportsListByProductSample.ts][reportslistbyproductsample] | lists report records by Product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByProduct.json | +| [reportsListByRequestSample.ts][reportslistbyrequestsample] | lists report records by Request. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByRequest.json | +| [reportsListBySubscriptionSample.ts][reportslistbysubscriptionsample] | lists report records by subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsBySubscription.json | +| [reportsListByTimeSample.ts][reportslistbytimesample] | lists report records by Time. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByTime.json | +| [reportsListByUserSample.ts][reportslistbyusersample] | lists report records by User. x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByUser.json | +| [signInSettingsCreateOrUpdateSample.ts][signinsettingscreateorupdatesample] | create or Update Sign-In settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignIn.json | +| [signInSettingsGetEntityTagSample.ts][signinsettingsgetentitytagsample] | gets the entity state (Etag) version of the SignInSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignInSettings.json | +| [signInSettingsGetSample.ts][signinsettingsgetsample] | get Sign In Settings for the Portal x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignIn.json | +| [signInSettingsUpdateSample.ts][signinsettingsupdatesample] | update Sign-In settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignIn.json | +| [signUpSettingsCreateOrUpdateSample.ts][signupsettingscreateorupdatesample] | create or Update Sign-Up settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignUp.json | +| [signUpSettingsGetEntityTagSample.ts][signupsettingsgetentitytagsample] | gets the entity state (Etag) version of the SignUpSettings. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignUpSettings.json | +| [signUpSettingsGetSample.ts][signupsettingsgetsample] | get Sign Up Settings for the Portal x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignUp.json | +| [signUpSettingsUpdateSample.ts][signupsettingsupdatesample] | update Sign-Up settings. x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignUp.json | +| [subscriptionCreateOrUpdateSample.ts][subscriptioncreateorupdatesample] | creates or updates the subscription of specified user to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSubscription.json | +| [subscriptionDeleteSample.ts][subscriptiondeletesample] | deletes the specified subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteSubscription.json | +| [subscriptionGetEntityTagSample.ts][subscriptiongetentitytagsample] | gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSubscription.json | +| [subscriptionGetSample.ts][subscriptiongetsample] | gets the specified Subscription entity. x-ms-original-file: 2025-09-01-preview/ApiManagementGetSubscription.json | +| [subscriptionListSample.ts][subscriptionlistsample] | lists all subscriptions of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListSubscriptions.json | +| [subscriptionListSecretsSample.ts][subscriptionlistsecretssample] | gets the specified Subscription keys. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionListSecrets.json | +| [subscriptionRegeneratePrimaryKeySample.ts][subscriptionregenerateprimarykeysample] | regenerates primary key of existing subscription of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json | +| [subscriptionRegenerateSecondaryKeySample.ts][subscriptionregeneratesecondarykeysample] | regenerates secondary key of existing subscription of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json | +| [subscriptionUpdateSample.ts][subscriptionupdatesample] | updates the details of a subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateSubscription.json | +| [tagApiLinkCreateOrUpdateSample.ts][tagapilinkcreateorupdatesample] | adds an API to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagApiLink.json | +| [tagApiLinkDeleteSample.ts][tagapilinkdeletesample] | deletes the specified API from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagApiLink.json | +| [tagApiLinkGetSample.ts][tagapilinkgetsample] | gets the API link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagApiLink.json | +| [tagApiLinkListByProductSample.ts][tagapilinklistbyproductsample] | lists a collection of the API links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagApiLinks.json | +| [tagAssignToApiSample.ts][tagassigntoapisample] | assign tag to the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTag.json | +| [tagAssignToOperationSample.ts][tagassigntooperationsample] | assign tag to the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationTag.json | +| [tagAssignToProductSample.ts][tagassigntoproductsample] | assign tag to the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductTag.json | +| [tagCreateOrUpdateSample.ts][tagcreateorupdatesample] | creates a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTag.json | +| [tagDeleteSample.ts][tagdeletesample] | deletes specific tag of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTag.json | +| [tagDetachFromApiSample.ts][tagdetachfromapisample] | detach the tag from the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTag.json | +| [tagDetachFromOperationSample.ts][tagdetachfromoperationsample] | detach the tag from the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationTag.json | +| [tagDetachFromProductSample.ts][tagdetachfromproductsample] | detach the tag from the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductTag.json | +| [tagGetByApiSample.ts][taggetbyapisample] | get tag associated with the API. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTag.json | +| [tagGetByOperationSample.ts][taggetbyoperationsample] | get tag associated with the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationTag.json | +| [tagGetByProductSample.ts][taggetbyproductsample] | get tag associated with the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductTag.json | +| [tagGetEntityStateByApiSample.ts][taggetentitystatebyapisample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTag.json | +| [tagGetEntityStateByOperationSample.ts][taggetentitystatebyoperationsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationTag.json | +| [tagGetEntityStateByProductSample.ts][taggetentitystatebyproductsample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductTag.json | +| [tagGetEntityStateSample.ts][taggetentitystatesample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTag.json | +| [tagGetSample.ts][taggetsample] | gets the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTag.json | +| [tagListByApiSample.ts][taglistbyapisample] | lists all Tags associated with the API. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTags.json | +| [tagListByOperationSample.ts][taglistbyoperationsample] | lists all Tags associated with the Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationTags.json | +| [tagListByProductSample.ts][taglistbyproductsample] | lists all Tags associated with the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementListProductTags.json | +| [tagListByServiceSample.ts][taglistbyservicesample] | lists a collection of tags defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListTags.json | +| [tagOperationLinkCreateOrUpdateSample.ts][tagoperationlinkcreateorupdatesample] | adds an operation to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagOperationLink.json | +| [tagOperationLinkDeleteSample.ts][tagoperationlinkdeletesample] | deletes the specified operation from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagOperationLink.json | +| [tagOperationLinkGetSample.ts][tagoperationlinkgetsample] | gets the operation link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagOperationLink.json | +| [tagOperationLinkListByProductSample.ts][tagoperationlinklistbyproductsample] | lists a collection of the operation links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagOperationLinks.json | +| [tagProductLinkCreateOrUpdateSample.ts][tagproductlinkcreateorupdatesample] | adds a product to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagProductLink.json | +| [tagProductLinkDeleteSample.ts][tagproductlinkdeletesample] | deletes the specified product from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagProductLink.json | +| [tagProductLinkGetSample.ts][tagproductlinkgetsample] | gets the product link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagProductLink.json | +| [tagProductLinkListByProductSample.ts][tagproductlinklistbyproductsample] | lists a collection of the product links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagProductLinks.json | +| [tagResourceListByServiceSample.ts][tagresourcelistbyservicesample] | lists a collection of resources associated with tags. x-ms-original-file: 2025-09-01-preview/ApiManagementListTagResources.json | +| [tagUpdateSample.ts][tagupdatesample] | updates the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTag.json | +| [tenantAccessCreateSample.ts][tenantaccesscreatesample] | update tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTenantAccess.json | +| [tenantAccessGetEntityTagSample.ts][tenantaccessgetentitytagsample] | tenant access metadata x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTenantAccess.json | +| [tenantAccessGetSample.ts][tenantaccessgetsample] | get tenant access information details without secrets. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantAccess.json | +| [tenantAccessGitRegeneratePrimaryKeySample.ts][tenantaccessgitregenerateprimarykeysample] | regenerate primary access key for GIT. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json | +| [tenantAccessGitRegenerateSecondaryKeySample.ts][tenantaccessgitregeneratesecondarykeysample] | regenerate secondary access key for GIT. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateKey.json | +| [tenantAccessListByServiceSample.ts][tenantaccesslistbyservicesample] | returns list of access infos - for Git and Management endpoints. x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantAccess.json | +| [tenantAccessListSecretsSample.ts][tenantaccesslistsecretssample] | get tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsTenantAccess.json | +| [tenantAccessRegeneratePrimaryKeySample.ts][tenantaccessregenerateprimarykeysample] | regenerate primary access key x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json | +| [tenantAccessRegenerateSecondaryKeySample.ts][tenantaccessregeneratesecondarykeysample] | regenerate secondary access key x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json | +| [tenantAccessUpdateSample.ts][tenantaccessupdatesample] | update tenant access information details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTenantAccess.json | +| [tenantConfigurationDeploySample.ts][tenantconfigurationdeploysample] | this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationDeploy.json | +| [tenantConfigurationGetSyncStateSample.ts][tenantconfigurationgetsyncstatesample] | gets the status of the most recent synchronization between the configuration database and the Git repository. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessSyncState.json | +| [tenantConfigurationSaveSample.ts][tenantconfigurationsavesample] | this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationSave.json | +| [tenantConfigurationValidateSample.ts][tenantconfigurationvalidatesample] | this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationValidate.json | +| [tenantSettingsGetSample.ts][tenantsettingsgetsample] | get tenant settings. x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantSettings.json | +| [tenantSettingsListByServiceSample.ts][tenantsettingslistbyservicesample] | public settings. x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantSettings.json | +| [userConfirmationPasswordSendSample.ts][userconfirmationpasswordsendsample] | sends confirmation x-ms-original-file: 2025-09-01-preview/ApiManagementUserConfirmationPasswordSend.json | +| [userCreateOrUpdateSample.ts][usercreateorupdatesample] | creates or Updates a user. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateUser.json | +| [userDeleteSample.ts][userdeletesample] | deletes specific user. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteUser.json | +| [userGenerateSsoUrlSample.ts][usergeneratessourlsample] | retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. x-ms-original-file: 2025-09-01-preview/ApiManagementUserGenerateSsoUrl.json | +| [userGetEntityTagSample.ts][usergetentitytagsample] | gets the entity state (Etag) version of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadUser.json | +| [userGetSample.ts][usergetsample] | gets the details of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetUser.json | +| [userGetSharedAccessTokenSample.ts][usergetsharedaccesstokensample] | gets the Shared Access Authorization Token for the User. x-ms-original-file: 2025-09-01-preview/ApiManagementUserToken.json | +| [userGroupListSample.ts][usergrouplistsample] | lists all user groups. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserGroups.json | +| [userIdentitiesListSample.ts][useridentitieslistsample] | list of all user identities. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserIdentities.json | +| [userListByServiceSample.ts][userlistbyservicesample] | lists a collection of registered users in the specified service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListUsers.json | +| [userSubscriptionGetSample.ts][usersubscriptiongetsample] | gets the specified Subscription entity associated with a particular user. x-ms-original-file: 2025-09-01-preview/ApiManagementGetUserSubscription.json | +| [userSubscriptionListSample.ts][usersubscriptionlistsample] | lists the collection of subscriptions of the specified user. x-ms-original-file: 2025-09-01-preview/ApiManagementListUserSubscriptions.json | +| [userUpdateSample.ts][userupdatesample] | updates the details of the user specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateUser.json | +| [workspaceApiCreateOrUpdateSample.ts][workspaceapicreateorupdatesample] | creates new or updates existing specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApi.json | +| [workspaceApiDeleteSample.ts][workspaceapideletesample] | deletes the specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApi.json | +| [workspaceApiDiagnosticCreateOrUpdateSample.ts][workspaceapidiagnosticcreateorupdatesample] | creates a new Diagnostic for an API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticDeleteSample.ts][workspaceapidiagnosticdeletesample] | deletes the specified Diagnostic from an API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticGetEntityTagSample.ts][workspaceapidiagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticGetSample.ts][workspaceapidiagnosticgetsample] | gets the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json | +| [workspaceApiDiagnosticListByWorkspaceSample.ts][workspaceapidiagnosticlistbyworkspacesample] | lists all diagnostics of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiDiagnostics.json | +| [workspaceApiDiagnosticUpdateSample.ts][workspaceapidiagnosticupdatesample] | updates the details of the Diagnostic for an API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json | +| [workspaceApiExportGetSample.ts][workspaceapiexportgetsample] | gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json | +| [workspaceApiGetEntityTagSample.ts][workspaceapigetentitytagsample] | gets the entity state (Etag) version of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApi.json | +| [workspaceApiGetSample.ts][workspaceapigetsample] | gets the details of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiContract.json | +| [workspaceApiListByServiceSample.ts][workspaceapilistbyservicesample] | lists all APIs of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApis.json | +| [workspaceApiOperationCreateOrUpdateSample.ts][workspaceapioperationcreateorupdatesample] | creates a new operation in the API or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperation.json | +| [workspaceApiOperationDeleteSample.ts][workspaceapioperationdeletesample] | deletes the specified operation in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperation.json | +| [workspaceApiOperationGetEntityTagSample.ts][workspaceapioperationgetentitytagsample] | gets the entity state (Etag) version of the API operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperation.json | +| [workspaceApiOperationGetSample.ts][workspaceapioperationgetsample] | gets the details of the API Operation specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperation.json | +| [workspaceApiOperationListByApiSample.ts][workspaceapioperationlistbyapisample] | lists a collection of the operations for the specified API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperations.json | +| [workspaceApiOperationPolicyCreateOrUpdateSample.ts][workspaceapioperationpolicycreateorupdatesample] | creates or updates policy configuration for the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyDeleteSample.ts][workspaceapioperationpolicydeletesample] | deletes the policy configuration at the Api Operation. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyGetEntityTagSample.ts][workspaceapioperationpolicygetentitytagsample] | gets the entity state (Etag) version of the API operation policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyGetSample.ts][workspaceapioperationpolicygetsample] | get the policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json | +| [workspaceApiOperationPolicyListByOperationSample.ts][workspaceapioperationpolicylistbyoperationsample] | get the list of policy configuration at the API Operation level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json | +| [workspaceApiOperationUpdateSample.ts][workspaceapioperationupdatesample] | updates the details of the operation in the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiOperation.json | +| [workspaceApiPolicyCreateOrUpdateSample.ts][workspaceapipolicycreateorupdatesample] | creates or updates policy configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiPolicy.json | +| [workspaceApiPolicyDeleteSample.ts][workspaceapipolicydeletesample] | deletes the policy configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json | +| [workspaceApiPolicyGetEntityTagSample.ts][workspaceapipolicygetentitytagsample] | gets the entity state (Etag) version of the API policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiPolicy.json | +| [workspaceApiPolicyGetSample.ts][workspaceapipolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiPolicy.json | +| [workspaceApiPolicyListByApiSample.ts][workspaceapipolicylistbyapisample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiPolicies.json | +| [workspaceApiReleaseCreateOrUpdateSample.ts][workspaceapireleasecreateorupdatesample] | creates a new Release for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiRelease.json | +| [workspaceApiReleaseDeleteSample.ts][workspaceapireleasedeletesample] | deletes the specified release in the API. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiRelease.json | +| [workspaceApiReleaseGetEntityTagSample.ts][workspaceapireleasegetentitytagsample] | returns the etag of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiRelease.json | +| [workspaceApiReleaseGetSample.ts][workspaceapireleasegetsample] | returns the details of an API release. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRelease.json | +| [workspaceApiReleaseListByServiceSample.ts][workspaceapireleaselistbyservicesample] | lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiReleases.json | +| [workspaceApiReleaseUpdateSample.ts][workspaceapireleaseupdatesample] | updates the details of the release of the API specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiRelease.json | +| [workspaceApiRevisionListByServiceSample.ts][workspaceapirevisionlistbyservicesample] | lists all revisions of an API. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiRevisions.json | +| [workspaceApiSchemaCreateOrUpdateSample.ts][workspaceapischemacreateorupdatesample] | creates or updates schema configuration for the API. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiSchema.json | +| [workspaceApiSchemaDeleteSample.ts][workspaceapischemadeletesample] | deletes the schema configuration at the Api. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiSchema.json | +| [workspaceApiSchemaGetEntityTagSample.ts][workspaceapischemagetentitytagsample] | gets the entity state (Etag) version of the schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiSchema.json | +| [workspaceApiSchemaGetSample.ts][workspaceapischemagetsample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiSchema.json | +| [workspaceApiSchemaListByApiSample.ts][workspaceapischemalistbyapisample] | get the schema configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiSchemas.json | +| [workspaceApiUpdateSample.ts][workspaceapiupdatesample] | updates the specified API of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApi.json | +| [workspaceApiVersionSetCreateOrUpdateSample.ts][workspaceapiversionsetcreateorupdatesample] | creates or Updates a Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetDeleteSample.ts][workspaceapiversionsetdeletesample] | deletes specific Api Version Set. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetGetEntityTagSample.ts][workspaceapiversionsetgetentitytagsample] | gets the entity state (Etag) version of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetGetSample.ts][workspaceapiversionsetgetsample] | gets the details of the Api Version Set specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiVersionSet.json | +| [workspaceApiVersionSetListByServiceSample.ts][workspaceapiversionsetlistbyservicesample] | lists a collection of API Version Sets in the specified workspace with a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiVersionSets.json | +| [workspaceApiVersionSetUpdateSample.ts][workspaceapiversionsetupdatesample] | updates the details of the Api VersionSet specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json | +| [workspaceBackendCreateOrUpdateSample.ts][workspacebackendcreateorupdatesample] | creates or Updates a backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json | +| [workspaceBackendDeleteSample.ts][workspacebackenddeletesample] | deletes the specified backend. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceBackend.json | +| [workspaceBackendGetEntityTagSample.ts][workspacebackendgetentitytagsample] | gets the entity state (Etag) version of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceBackend.json | +| [workspaceBackendGetSample.ts][workspacebackendgetsample] | gets the details of the backend specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceBackend.json | +| [workspaceBackendListByWorkspaceSample.ts][workspacebackendlistbyworkspacesample] | lists a collection of backends in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceBackends.json | +| [workspaceBackendUpdateSample.ts][workspacebackendupdatesample] | updates an existing backend. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceBackend.json | +| [workspaceCertificateCreateOrUpdateSample.ts][workspacecertificatecreateorupdatesample] | creates or updates the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificate.json | +| [workspaceCertificateDeleteSample.ts][workspacecertificatedeletesample] | deletes specific certificate. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceCertificate.json | +| [workspaceCertificateGetEntityTagSample.ts][workspacecertificategetentitytagsample] | gets the entity state (Etag) version of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceCertificate.json | +| [workspaceCertificateGetSample.ts][workspacecertificategetsample] | gets the details of the certificate specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificate.json | +| [workspaceCertificateListByWorkspaceSample.ts][workspacecertificatelistbyworkspacesample] | lists a collection of all certificates in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceCertificates.json | +| [workspaceCertificateRefreshSecretSample.ts][workspacecertificaterefreshsecretsample] | from KeyVault, Refresh the certificate being used for authentication with the backend. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceCertificate.json | +| [workspaceCreateOrUpdateSample.ts][workspacecreateorupdatesample] | creates a new workspace or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspace.json | +| [workspaceDeleteSample.ts][workspacedeletesample] | deletes the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspace.json | +| [workspaceDiagnosticCreateOrUpdateSample.ts][workspacediagnosticcreateorupdatesample] | creates a new Diagnostic or updates an existing one. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceDiagnostic.json | +| [workspaceDiagnosticDeleteSample.ts][workspacediagnosticdeletesample] | deletes the specified Diagnostic. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json | +| [workspaceDiagnosticGetEntityTagSample.ts][workspacediagnosticgetentitytagsample] | gets the entity state (Etag) version of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceDiagnostic.json | +| [workspaceDiagnosticGetSample.ts][workspacediagnosticgetsample] | gets the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceDiagnostic.json | +| [workspaceDiagnosticListByWorkspaceSample.ts][workspacediagnosticlistbyworkspacesample] | lists all diagnostics in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceDiagnostics.json | +| [workspaceDiagnosticUpdateSample.ts][workspacediagnosticupdatesample] | updates the details of the Diagnostic specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json | +| [workspaceGetEntityTagSample.ts][workspacegetentitytagsample] | gets the entity state (Etag) version of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspace.json | +| [workspaceGetSample.ts][workspacegetsample] | gets the details of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspace.json | +| [workspaceGlobalSchemaCreateOrUpdateSample.ts][workspaceglobalschemacreateorupdatesample] | creates new or updates existing specified Schema of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSchema.json | +| [workspaceGlobalSchemaDeleteSample.ts][workspaceglobalschemadeletesample] | deletes specific Schema. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSchema.json | +| [workspaceGlobalSchemaGetEntityTagSample.ts][workspaceglobalschemagetentitytagsample] | gets the entity state (Etag) version of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSchema.json | +| [workspaceGlobalSchemaGetSample.ts][workspaceglobalschemagetsample] | gets the details of the Schema specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSchema.json | +| [workspaceGlobalSchemaListByServiceSample.ts][workspaceglobalschemalistbyservicesample] | lists a collection of schemas registered with workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSchemas.json | +| [workspaceGroupCreateOrUpdateSample.ts][workspacegroupcreateorupdatesample] | creates or Updates a group. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroup.json | +| [workspaceGroupDeleteSample.ts][workspacegroupdeletesample] | deletes specific group of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroup.json | +| [workspaceGroupGetEntityTagSample.ts][workspacegroupgetentitytagsample] | gets the entity state (Etag) version of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroup.json | +| [workspaceGroupGetSample.ts][workspacegroupgetsample] | gets the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceGroup.json | +| [workspaceGroupListByServiceSample.ts][workspacegrouplistbyservicesample] | lists a collection of groups defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroups.json | +| [workspaceGroupUpdateSample.ts][workspacegroupupdatesample] | updates the details of the group specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceGroup.json | +| [workspaceGroupUserCheckEntityExistsSample.ts][workspacegroupusercheckentityexistssample] | checks that user entity specified by identifier is associated with the group entity. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroupUser.json | +| [workspaceGroupUserCreateSample.ts][workspacegroupusercreatesample] | add existing user to existing group x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupUser.json | +| [workspaceGroupUserDeleteSample.ts][workspacegroupuserdeletesample] | remove existing user from existing group. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroupUser.json | +| [workspaceGroupUserListSample.ts][workspacegroupuserlistsample] | lists a collection of user entities associated with the group. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroupUsers.json | +| [workspaceListByServiceSample.ts][workspacelistbyservicesample] | lists all workspaces of the API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaces.json | +| [workspaceLoggerCreateOrUpdateSample.ts][workspaceloggercreateorupdatesample] | creates or Updates a logger. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceAILogger.json | +| [workspaceLoggerDeleteSample.ts][workspaceloggerdeletesample] | deletes the specified logger. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceLogger.json | +| [workspaceLoggerGetEntityTagSample.ts][workspaceloggergetentitytagsample] | gets the entity state (Etag) version of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceLogger.json | +| [workspaceLoggerGetSample.ts][workspaceloggergetsample] | gets the details of the logger specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLogger.json | +| [workspaceLoggerListByWorkspaceSample.ts][workspaceloggerlistbyworkspacesample] | lists a collection of loggers in the specified workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLoggers.json | +| [workspaceLoggerUpdateSample.ts][workspaceloggerupdatesample] | updates an existing logger. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceLogger.json | +| [workspaceNamedValueCreateOrUpdateSample.ts][workspacenamedvaluecreateorupdatesample] | creates or updates named value. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValue.json | +| [workspaceNamedValueDeleteSample.ts][workspacenamedvaluedeletesample] | deletes specific named value from the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNamedValue.json | +| [workspaceNamedValueGetEntityTagSample.ts][workspacenamedvaluegetentitytagsample] | gets the entity state (Etag) version of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNamedValue.json | +| [workspaceNamedValueGetSample.ts][workspacenamedvaluegetsample] | gets the details of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValue.json | +| [workspaceNamedValueListByServiceSample.ts][workspacenamedvaluelistbyservicesample] | lists a collection of named values defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNamedValues.json | +| [workspaceNamedValueListValueSample.ts][workspacenamedvaluelistvaluesample] | gets the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceNamedValueListValue.json | +| [workspaceNamedValueRefreshSecretSample.ts][workspacenamedvaluerefreshsecretsample] | refresh the secret of the named value specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceNamedValue.json | +| [workspaceNamedValueUpdateSample.ts][workspacenamedvalueupdatesample] | updates the specific named value. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceNamedValue.json | +| [workspaceNotificationCreateOrUpdateSample.ts][workspacenotificationcreateorupdatesample] | create or Update API Management publisher notification for the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotification.json | +| [workspaceNotificationGetSample.ts][workspacenotificationgetsample] | gets the details of the Notification specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNotification.json | +| [workspaceNotificationListByServiceSample.ts][workspacenotificationlistbyservicesample] | lists a collection of properties defined within a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotifications.json | +| [workspaceNotificationRecipientEmailCheckEntityExistsSample.ts][workspacenotificationrecipientemailcheckentityexistssample] | determine if Notification Recipient Email subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailCreateOrUpdateSample.ts][workspacenotificationrecipientemailcreateorupdatesample] | adds the Email address to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailDeleteSample.ts][workspacenotificationrecipientemaildeletesample] | removes the email from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json | +| [workspaceNotificationRecipientEmailListByNotificationSample.ts][workspacenotificationrecipientemaillistbynotificationsample] | gets the list of the Notification Recipient Emails subscribed to a notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json | +| [workspaceNotificationRecipientUserCheckEntityExistsSample.ts][workspacenotificationrecipientusercheckentityexistssample] | determine if the Notification Recipient User is subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserCreateOrUpdateSample.ts][workspacenotificationrecipientusercreateorupdatesample] | adds the API Management User to the list of Recipients for the Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserDeleteSample.ts][workspacenotificationrecipientuserdeletesample] | removes the API Management user from the list of Notification. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json | +| [workspaceNotificationRecipientUserListByNotificationSample.ts][workspacenotificationrecipientuserlistbynotificationsample] | gets the list of the Notification Recipient User subscribed to the notification. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json | +| [workspacePolicyCreateOrUpdateSample.ts][workspacepolicycreateorupdatesample] | creates or updates policy configuration for the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicy.json | +| [workspacePolicyDeleteSample.ts][workspacepolicydeletesample] | deletes the policy configuration at the workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicy.json | +| [workspacePolicyFragmentCreateOrUpdateSample.ts][workspacepolicyfragmentcreateorupdatesample] | creates or updates a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyFragment.json | +| [workspacePolicyFragmentDeleteSample.ts][workspacepolicyfragmentdeletesample] | deletes a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json | +| [workspacePolicyFragmentGetEntityTagSample.ts][workspacepolicyfragmentgetentitytagsample] | gets the entity state (Etag) version of a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicyFragment.json | +| [workspacePolicyFragmentGetSample.ts][workspacepolicyfragmentgetsample] | gets a policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragment.json | +| [workspacePolicyFragmentListByServiceSample.ts][workspacepolicyfragmentlistbyservicesample] | gets all policy fragments defined within a workspace. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragments.json | +| [workspacePolicyFragmentListReferencesSample.ts][workspacepolicyfragmentlistreferencessample] | lists policy resources that reference the policy fragment. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json | +| [workspacePolicyGetEntityTagSample.ts][workspacepolicygetentitytagsample] | gets the entity state (Etag) version of the workspace policy specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicy.json | +| [workspacePolicyGetSample.ts][workspacepolicygetsample] | get the policy configuration at the API level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicy.json | +| [workspacePolicyListByApiSample.ts][workspacepolicylistbyapisample] | get the policy configuration at the workspace level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicies.json | +| [workspaceProductApiLinkCreateOrUpdateSample.ts][workspaceproductapilinkcreateorupdatesample] | adds an API to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductApiLink.json | +| [workspaceProductApiLinkDeleteSample.ts][workspaceproductapilinkdeletesample] | deletes the specified API from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json | +| [workspaceProductApiLinkGetSample.ts][workspaceproductapilinkgetsample] | gets the API link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductApiLink.json | +| [workspaceProductApiLinkListByProductSample.ts][workspaceproductapilinklistbyproductsample] | lists a collection of the API links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductApiLinks.json | +| [workspaceProductCreateOrUpdateSample.ts][workspaceproductcreateorupdatesample] | creates or Updates a product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProduct.json | +| [workspaceProductDeleteSample.ts][workspaceproductdeletesample] | delete product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProduct.json | +| [workspaceProductGetEntityTagSample.ts][workspaceproductgetentitytagsample] | gets the entity state (Etag) version of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProduct.json | +| [workspaceProductGetSample.ts][workspaceproductgetsample] | gets the details of the product specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProduct.json | +| [workspaceProductGroupLinkCreateOrUpdateSample.ts][workspaceproductgrouplinkcreateorupdatesample] | adds a group to the specified product via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkDeleteSample.ts][workspaceproductgrouplinkdeletesample] | deletes the specified group from the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkGetSample.ts][workspaceproductgrouplinkgetsample] | gets the group link for the product. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductGroupLink.json | +| [workspaceProductGroupLinkListByProductSample.ts][workspaceproductgrouplinklistbyproductsample] | lists a collection of the group links associated with a product. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductGroupLinks.json | +| [workspaceProductListByServiceSample.ts][workspaceproductlistbyservicesample] | lists a collection of products in the specified workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProducts.json | +| [workspaceProductPolicyCreateOrUpdateSample.ts][workspaceproductpolicycreateorupdatesample] | creates or updates policy configuration for the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductPolicy.json | +| [workspaceProductPolicyDeleteSample.ts][workspaceproductpolicydeletesample] | deletes the policy configuration at the Product. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json | +| [workspaceProductPolicyGetEntityTagSample.ts][workspaceproductpolicygetentitytagsample] | get the ETag of the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProductPolicy.json | +| [workspaceProductPolicyGetSample.ts][workspaceproductpolicygetsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductPolicy.json | +| [workspaceProductPolicyListByProductSample.ts][workspaceproductpolicylistbyproductsample] | get the policy configuration at the Product level. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductPolicies.json | +| [workspaceProductUpdateSample.ts][workspaceproductupdatesample] | update existing product details. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceProduct.json | +| [workspaceSubscriptionCreateOrUpdateSample.ts][workspacesubscriptioncreateorupdatesample] | creates or updates the subscription of specified user to the specified product. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSubscription.json | +| [workspaceSubscriptionDeleteSample.ts][workspacesubscriptiondeletesample] | deletes the specified subscription. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSubscription.json | +| [workspaceSubscriptionGetEntityTagSample.ts][workspacesubscriptiongetentitytagsample] | gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSubscription.json | +| [workspaceSubscriptionGetSample.ts][workspacesubscriptiongetsample] | gets the specified Subscription entity. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSubscription.json | +| [workspaceSubscriptionListSample.ts][workspacesubscriptionlistsample] | lists all subscriptions of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSubscriptions.json | +| [workspaceSubscriptionListSecretsSample.ts][workspacesubscriptionlistsecretssample] | gets the specified Subscription keys. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json | +| [workspaceSubscriptionRegeneratePrimaryKeySample.ts][workspacesubscriptionregenerateprimarykeysample] | regenerates primary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json | +| [workspaceSubscriptionRegenerateSecondaryKeySample.ts][workspacesubscriptionregeneratesecondarykeysample] | regenerates secondary key of existing subscription of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json | +| [workspaceSubscriptionUpdateSample.ts][workspacesubscriptionupdatesample] | updates the details of a subscription specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceSubscription.json | +| [workspaceTagApiLinkCreateOrUpdateSample.ts][workspacetagapilinkcreateorupdatesample] | adds an API to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagApiLink.json | +| [workspaceTagApiLinkDeleteSample.ts][workspacetagapilinkdeletesample] | deletes the specified API from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json | +| [workspaceTagApiLinkGetSample.ts][workspacetagapilinkgetsample] | gets the API link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagApiLink.json | +| [workspaceTagApiLinkListByProductSample.ts][workspacetagapilinklistbyproductsample] | lists a collection of the API links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagApiLinks.json | +| [workspaceTagCreateOrUpdateSample.ts][workspacetagcreateorupdatesample] | creates a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTag.json | +| [workspaceTagDeleteSample.ts][workspacetagdeletesample] | deletes specific tag of the workspace in an API Management service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTag.json | +| [workspaceTagGetEntityStateSample.ts][workspacetaggetentitystatesample] | gets the entity state version of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceTag.json | +| [workspaceTagGetSample.ts][workspacetaggetsample] | gets the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTag.json | +| [workspaceTagListByServiceSample.ts][workspacetaglistbyservicesample] | lists a collection of tags defined within a workspace in a service instance. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTags.json | +| [workspaceTagOperationLinkCreateOrUpdateSample.ts][workspacetagoperationlinkcreateorupdatesample] | adds an operation to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkDeleteSample.ts][workspacetagoperationlinkdeletesample] | deletes the specified operation from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkGetSample.ts][workspacetagoperationlinkgetsample] | gets the operation link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagOperationLink.json | +| [workspaceTagOperationLinkListByProductSample.ts][workspacetagoperationlinklistbyproductsample] | lists a collection of the operation links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagOperationLinks.json | +| [workspaceTagProductLinkCreateOrUpdateSample.ts][workspacetagproductlinkcreateorupdatesample] | adds a product to the specified tag via link. x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagProductLink.json | +| [workspaceTagProductLinkDeleteSample.ts][workspacetagproductlinkdeletesample] | deletes the specified product from the specified tag. x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json | +| [workspaceTagProductLinkGetSample.ts][workspacetagproductlinkgetsample] | gets the product link for the tag. x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagProductLink.json | +| [workspaceTagProductLinkListByProductSample.ts][workspacetagproductlinklistbyproductsample] | lists a collection of the product links associated with a tag. x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagProductLinks.json | +| [workspaceTagUpdateSample.ts][workspacetagupdatesample] | updates the details of the tag specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceTag.json | +| [workspaceUpdateSample.ts][workspaceupdatesample] | updates the details of the workspace specified by its identifier. x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspace.json | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] to run these sample programs. + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/allPoliciesListByServiceSample.js +``` + +Alternatively, run a single sample with the required environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +node dist/allPoliciesListByServiceSample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[allpolicieslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/allPoliciesListByServiceSample.ts +[apicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiCreateOrUpdateSample.ts +[apideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDeleteSample.ts +[apidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticCreateOrUpdateSample.ts +[apidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticDeleteSample.ts +[apidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetEntityTagSample.ts +[apidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetSample.ts +[apidiagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticListByServiceSample.ts +[apidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticUpdateSample.ts +[apiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiExportGetSample.ts +[apigatewayconfigconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts +[apigatewayconfigconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionDeleteSample.ts +[apigatewayconfigconnectiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionGetSample.ts +[apigatewayconfigconnectionlistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts +[apigatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayCreateOrUpdateSample.ts +[apigatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayDeleteSample.ts +[apigatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayGetSample.ts +[apigatewayhostnamebindingcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingCreateOrUpdateSample.ts +[apigatewayhostnamebindingdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingDeleteSample.ts +[apigatewayhostnamebindinggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingGetSample.ts +[apigatewayhostnamebindinglistbygatewaysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingListByGatewaySample.ts +[apigatewayhostnamebindingrefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingRefreshSecretSample.ts +[apigatewaylistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListByResourceGroupSample.ts +[apigatewaylistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListSample.ts +[apigatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayUpdateSample.ts +[apigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetEntityTagSample.ts +[apigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetSample.ts +[apiissueattachmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts +[apiissueattachmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentDeleteSample.ts +[apiissueattachmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetEntityTagSample.ts +[apiissueattachmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetSample.ts +[apiissueattachmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentListByServiceSample.ts +[apiissuecommentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentCreateOrUpdateSample.ts +[apiissuecommentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentDeleteSample.ts +[apiissuecommentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetEntityTagSample.ts +[apiissuecommentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetSample.ts +[apiissuecommentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentListByServiceSample.ts +[apiissuecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCreateOrUpdateSample.ts +[apiissuedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueDeleteSample.ts +[apiissuegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetEntityTagSample.ts +[apiissuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetSample.ts +[apiissuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueListByServiceSample.ts +[apiissueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueUpdateSample.ts +[apilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByServiceSample.ts +[apilistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByTagsSample.ts +[apimanagementgatewayskuslistavailableskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts +[apimanagementoperationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementOperationsListSample.ts +[apimanagementserviceapplynetworkconfigurationupdatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts +[apimanagementservicebackupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceBackupSample.ts +[apimanagementservicechecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts +[apimanagementservicecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCreateOrUpdateSample.ts +[apimanagementservicedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceDeleteSample.ts +[apimanagementservicegetdomainownershipidentifiersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts +[apimanagementservicegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSample.ts +[apimanagementservicegetssotokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSsoTokenSample.ts +[apimanagementservicelistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListByResourceGroupSample.ts +[apimanagementservicelistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListSample.ts +[apimanagementservicemigratetostv2sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceMigrateToStv2Sample.ts +[apimanagementservicerefreshhostnamessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRefreshHostnamesSample.ts +[apimanagementserviceresourcesperformconnectivitycheckasyncsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts +[apimanagementservicerestoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRestoreSample.ts +[apimanagementserviceskuslistavailableserviceskussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts +[apimanagementserviceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceUpdateSample.ts +[apimanagementskuslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementSkusListSample.ts +[apimanagementworkspacelinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinkGetSample.ts +[apimanagementworkspacelinkslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts +[apioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationCreateOrUpdateSample.ts +[apioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationDeleteSample.ts +[apioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetEntityTagSample.ts +[apioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetSample.ts +[apioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationListByApiSample.ts +[apioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts +[apioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyDeleteSample.ts +[apioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetEntityTagSample.ts +[apioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetSample.ts +[apioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyListByOperationSample.ts +[apioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationUpdateSample.ts +[apipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyCreateOrUpdateSample.ts +[apipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyDeleteSample.ts +[apipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetEntityTagSample.ts +[apipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetSample.ts +[apipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyListByApiSample.ts +[apiproductlistbyapissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiProductListByApisSample.ts +[apireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseCreateOrUpdateSample.ts +[apireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseDeleteSample.ts +[apireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetEntityTagSample.ts +[apireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetSample.ts +[apireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseListByServiceSample.ts +[apireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseUpdateSample.ts +[apirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiRevisionListByServiceSample.ts +[apischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaCreateOrUpdateSample.ts +[apischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaDeleteSample.ts +[apischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetEntityTagSample.ts +[apischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetSample.ts +[apischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaListByApiSample.ts +[apitagdescriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts +[apitagdescriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionDeleteSample.ts +[apitagdescriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetEntityTagSample.ts +[apitagdescriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetSample.ts +[apitagdescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionListByServiceSample.ts +[apitoolcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolCreateOrUpdateSample.ts +[apitooldeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolDeleteSample.ts +[apitoolgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetEntityTagSample.ts +[apitoolgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetSample.ts +[apitoollistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolListByApiSample.ts +[apitoolupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolUpdateSample.ts +[apiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiUpdateSample.ts +[apiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetCreateOrUpdateSample.ts +[apiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetDeleteSample.ts +[apiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetEntityTagSample.ts +[apiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetSample.ts +[apiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetListByServiceSample.ts +[apiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetUpdateSample.ts +[apiwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiCreateOrUpdateSample.ts +[apiwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiDeleteSample.ts +[apiwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetEntityTagSample.ts +[apiwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetSample.ts +[apiwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiUpdateSample.ts +[apiwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikisListSample.ts +[authorizationaccesspolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts +[authorizationaccesspolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyDeleteSample.ts +[authorizationaccesspolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyGetSample.ts +[authorizationaccesspolicylistbyauthorizationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts +[authorizationconfirmconsentcodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationConfirmConsentCodeSample.ts +[authorizationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationCreateOrUpdateSample.ts +[authorizationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationDeleteSample.ts +[authorizationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationGetSample.ts +[authorizationlistbyauthorizationprovidersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationListByAuthorizationProviderSample.ts +[authorizationloginlinkspostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationLoginLinksPostSample.ts +[authorizationprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderCreateOrUpdateSample.ts +[authorizationproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderDeleteSample.ts +[authorizationprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderGetSample.ts +[authorizationproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderListByServiceSample.ts +[authorizationproviderrefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderRefreshSecretSample.ts +[authorizationservercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerCreateOrUpdateSample.ts +[authorizationserverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerDeleteSample.ts +[authorizationservergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetEntityTagSample.ts +[authorizationservergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetSample.ts +[authorizationserverlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListByServiceSample.ts +[authorizationserverlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListSecretsSample.ts +[authorizationserverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerUpdateSample.ts +[backendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendCreateOrUpdateSample.ts +[backenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendDeleteSample.ts +[backendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetEntityTagSample.ts +[backendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetSample.ts +[backendlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendListByServiceSample.ts +[backendreconnectsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendReconnectSample.ts +[backendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendUpdateSample.ts +[cachecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheCreateOrUpdateSample.ts +[cachedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheDeleteSample.ts +[cachegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetEntityTagSample.ts +[cachegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetSample.ts +[cachelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheListByServiceSample.ts +[cacheupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheUpdateSample.ts +[certificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateCreateOrUpdateSample.ts +[certificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateDeleteSample.ts +[certificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetEntityTagSample.ts +[certificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetSample.ts +[certificatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateListByServiceSample.ts +[certificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateRefreshSecretSample.ts +[clientapplicationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationCreateOrUpdateSample.ts +[clientapplicationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationDeleteSample.ts +[clientapplicationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetEntityTagSample.ts +[clientapplicationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetSample.ts +[clientapplicationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListByServiceSample.ts +[clientapplicationlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListSecretsSample.ts +[clientapplicationproductlinkcreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkCreateSample.ts +[clientapplicationproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkDeleteSample.ts +[clientapplicationproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkGetSample.ts +[clientapplicationproductlinklistbyclientapplicationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkListByClientApplicationsSample.ts +[contentitemcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemCreateOrUpdateSample.ts +[contentitemdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemDeleteSample.ts +[contentitemgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetEntityTagSample.ts +[contentitemgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetSample.ts +[contentitemlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemListByServiceSample.ts +[contenttypecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeCreateOrUpdateSample.ts +[contenttypedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeDeleteSample.ts +[contenttypegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeGetSample.ts +[contenttypelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeListByServiceSample.ts +[delegationsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsCreateOrUpdateSample.ts +[delegationsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetEntityTagSample.ts +[delegationsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetSample.ts +[delegationsettingslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsListSecretsSample.ts +[delegationsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsUpdateSample.ts +[deletedservicesgetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesGetByNameSample.ts +[deletedserviceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesListBySubscriptionSample.ts +[deletedservicespurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesPurgeSample.ts +[diagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticCreateOrUpdateSample.ts +[diagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticDeleteSample.ts +[diagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetEntityTagSample.ts +[diagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetSample.ts +[diagnosticlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticListByServiceSample.ts +[diagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticUpdateSample.ts +[documentationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationCreateOrUpdateSample.ts +[documentationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationDeleteSample.ts +[documentationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetEntityTagSample.ts +[documentationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetSample.ts +[documentationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationListByServiceSample.ts +[documentationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationUpdateSample.ts +[emailtemplatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateCreateOrUpdateSample.ts +[emailtemplatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateDeleteSample.ts +[emailtemplategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetEntityTagSample.ts +[emailtemplategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetSample.ts +[emailtemplatelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateListByServiceSample.ts +[emailtemplateupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateUpdateSample.ts +[gatewayapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiCreateOrUpdateSample.ts +[gatewayapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiDeleteSample.ts +[gatewayapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiGetEntityTagSample.ts +[gatewayapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiListByServiceSample.ts +[gatewaycertificateauthoritycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts +[gatewaycertificateauthoritydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityDeleteSample.ts +[gatewaycertificateauthoritygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts +[gatewaycertificateauthoritygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetSample.ts +[gatewaycertificateauthoritylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts +[gatewaycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCreateOrUpdateSample.ts +[gatewaydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayDeleteSample.ts +[gatewaygeneratetokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGenerateTokenSample.ts +[gatewaygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetEntityTagSample.ts +[gatewaygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetSample.ts +[gatewayhostnameconfigurationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts +[gatewayhostnameconfigurationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationDeleteSample.ts +[gatewayhostnameconfigurationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts +[gatewayhostnameconfigurationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetSample.ts +[gatewayhostnameconfigurationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts +[gatewayinvalidatedebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayInvalidateDebugCredentialsSample.ts +[gatewaylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListByServiceSample.ts +[gatewaylistdebugcredentialssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListDebugCredentialsSample.ts +[gatewaylistkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListKeysSample.ts +[gatewaylisttracesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListTraceSample.ts +[gatewayregeneratekeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayRegenerateKeySample.ts +[gatewayupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayUpdateSample.ts +[globalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaCreateOrUpdateSample.ts +[globalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaDeleteSample.ts +[globalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetEntityTagSample.ts +[globalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetSample.ts +[globalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaListByServiceSample.ts +[graphqlapiresolvercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverCreateOrUpdateSample.ts +[graphqlapiresolverdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverDeleteSample.ts +[graphqlapiresolvergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetEntityTagSample.ts +[graphqlapiresolvergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetSample.ts +[graphqlapiresolverlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverListByApiSample.ts +[graphqlapiresolverpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyCreateOrUpdateSample.ts +[graphqlapiresolverpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyDeleteSample.ts +[graphqlapiresolverpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetEntityTagSample.ts +[graphqlapiresolverpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetSample.ts +[graphqlapiresolverpolicylistbyresolversample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyListByResolverSample.ts +[graphqlapiresolverupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverUpdateSample.ts +[groupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupCreateOrUpdateSample.ts +[groupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupDeleteSample.ts +[groupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetEntityTagSample.ts +[groupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetSample.ts +[grouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupListByServiceSample.ts +[groupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUpdateSample.ts +[groupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCheckEntityExistsSample.ts +[groupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCreateSample.ts +[groupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserDeleteSample.ts +[groupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserListSample.ts +[identityprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderCreateOrUpdateSample.ts +[identityproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderDeleteSample.ts +[identityprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetEntityTagSample.ts +[identityprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetSample.ts +[identityproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListByServiceSample.ts +[identityproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListSecretsSample.ts +[identityproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderUpdateSample.ts +[issuegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueGetSample.ts +[issuelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueListByServiceSample.ts +[loggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerCreateOrUpdateSample.ts +[loggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerDeleteSample.ts +[loggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetEntityTagSample.ts +[loggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetSample.ts +[loggerlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerListByServiceSample.ts +[loggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerUpdateSample.ts +[namedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueCreateOrUpdateSample.ts +[namedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueDeleteSample.ts +[namedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetEntityTagSample.ts +[namedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetSample.ts +[namedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListByServiceSample.ts +[namedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListValueSample.ts +[namedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueRefreshSecretSample.ts +[namedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueUpdateSample.ts +[networkstatuslistbylocationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByLocationSample.ts +[networkstatuslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByServiceSample.ts +[notificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationCreateOrUpdateSample.ts +[notificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationGetSample.ts +[notificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationListByServiceSample.ts +[notificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts +[notificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts +[notificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailDeleteSample.ts +[notificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailListByNotificationSample.ts +[notificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts +[notificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts +[notificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserDeleteSample.ts +[notificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserListByNotificationSample.ts +[openidconnectprovidercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts +[openidconnectproviderdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderDeleteSample.ts +[openidconnectprovidergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetEntityTagSample.ts +[openidconnectprovidergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetSample.ts +[openidconnectproviderlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListByServiceSample.ts +[openidconnectproviderlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListSecretsSample.ts +[openidconnectproviderupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderUpdateSample.ts +[operationlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationListByTagsSample.ts +[operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationStatusGetSample.ts +[operationsresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationsResultsGetSample.ts +[outboundnetworkdependenciesendpointslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts +[policycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyCreateOrUpdateSample.ts +[policydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDeleteSample.ts +[policydescriptionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDescriptionListByServiceSample.ts +[policyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentCreateOrUpdateSample.ts +[policyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentDeleteSample.ts +[policyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetEntityTagSample.ts +[policyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetSample.ts +[policyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListByServiceSample.ts +[policyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListReferencesSample.ts +[policygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetEntityTagSample.ts +[policygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetSample.ts +[policylistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyListByServiceSample.ts +[policyrestrictioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionCreateOrUpdateSample.ts +[policyrestrictiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionDeleteSample.ts +[policyrestrictiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetEntityTagSample.ts +[policyrestrictiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetSample.ts +[policyrestrictionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionListByServiceSample.ts +[policyrestrictionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionUpdateSample.ts +[policyrestrictionvalidationsbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionValidationsByServiceSample.ts +[portalconfigcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigCreateOrUpdateSample.ts +[portalconfiggetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetEntityTagSample.ts +[portalconfiggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetSample.ts +[portalconfiglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigListByServiceSample.ts +[portalconfigupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigUpdateSample.ts +[portalrevisioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionCreateOrUpdateSample.ts +[portalrevisiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetEntityTagSample.ts +[portalrevisiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetSample.ts +[portalrevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionListByServiceSample.ts +[portalrevisionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionUpdateSample.ts +[portalsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalSettingsListByServiceSample.ts +[privateendpointconnectioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts +[privateendpointconnectiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionDeleteSample.ts +[privateendpointconnectiongetbynamesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetByNameSample.ts +[privateendpointconnectiongetprivatelinkresourcesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts +[privateendpointconnectionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListByServiceSample.ts +[privateendpointconnectionlistprivatelinkresourcessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts +[productapicheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCheckEntityExistsSample.ts +[productapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCreateOrUpdateSample.ts +[productapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiDeleteSample.ts +[productapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkCreateOrUpdateSample.ts +[productapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkDeleteSample.ts +[productapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkGetSample.ts +[productapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkListByProductSample.ts +[productapilistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiListByProductSample.ts +[productcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productCreateOrUpdateSample.ts +[productdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productDeleteSample.ts +[productgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetEntityTagSample.ts +[productgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetSample.ts +[productgroupcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCheckEntityExistsSample.ts +[productgroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCreateOrUpdateSample.ts +[productgroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupDeleteSample.ts +[productgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkCreateOrUpdateSample.ts +[productgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkDeleteSample.ts +[productgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkGetSample.ts +[productgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkListByProductSample.ts +[productgrouplistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupListByProductSample.ts +[productlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByServiceSample.ts +[productlistbytagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByTagsSample.ts +[productpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyCreateOrUpdateSample.ts +[productpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyDeleteSample.ts +[productpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetEntityTagSample.ts +[productpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetSample.ts +[productpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyListByProductSample.ts +[productsubscriptionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productSubscriptionsListSample.ts +[productupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productUpdateSample.ts +[productwikicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiCreateOrUpdateSample.ts +[productwikideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiDeleteSample.ts +[productwikigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetEntityTagSample.ts +[productwikigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetSample.ts +[productwikiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiUpdateSample.ts +[productwikislistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikisListSample.ts +[quotabycounterkeyslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysListByServiceSample.ts +[quotabycounterkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysUpdateSample.ts +[quotabyperiodkeysgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysGetSample.ts +[quotabyperiodkeysupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysUpdateSample.ts +[regionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/regionListByServiceSample.ts +[reportslistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByApiSample.ts +[reportslistbygeosample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByGeoSample.ts +[reportslistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByOperationSample.ts +[reportslistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByProductSample.ts +[reportslistbyrequestsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByRequestSample.ts +[reportslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListBySubscriptionSample.ts +[reportslistbytimesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByTimeSample.ts +[reportslistbyusersample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByUserSample.ts +[signinsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsCreateOrUpdateSample.ts +[signinsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetEntityTagSample.ts +[signinsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetSample.ts +[signinsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsUpdateSample.ts +[signupsettingscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsCreateOrUpdateSample.ts +[signupsettingsgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetEntityTagSample.ts +[signupsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetSample.ts +[signupsettingsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsUpdateSample.ts +[subscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionCreateOrUpdateSample.ts +[subscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionDeleteSample.ts +[subscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetEntityTagSample.ts +[subscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetSample.ts +[subscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSample.ts +[subscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSecretsSample.ts +[subscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegeneratePrimaryKeySample.ts +[subscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegenerateSecondaryKeySample.ts +[subscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionUpdateSample.ts +[tagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkCreateOrUpdateSample.ts +[tagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkDeleteSample.ts +[tagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkGetSample.ts +[tagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkListByProductSample.ts +[tagassigntoapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToApiSample.ts +[tagassigntooperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToOperationSample.ts +[tagassigntoproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToProductSample.ts +[tagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagCreateOrUpdateSample.ts +[tagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDeleteSample.ts +[tagdetachfromapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromApiSample.ts +[tagdetachfromoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromOperationSample.ts +[tagdetachfromproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromProductSample.ts +[taggetbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByApiSample.ts +[taggetbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByOperationSample.ts +[taggetbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByProductSample.ts +[taggetentitystatebyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByApiSample.ts +[taggetentitystatebyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByOperationSample.ts +[taggetentitystatebyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByProductSample.ts +[taggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateSample.ts +[taggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetSample.ts +[taglistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByApiSample.ts +[taglistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByOperationSample.ts +[taglistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByProductSample.ts +[taglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByServiceSample.ts +[tagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkCreateOrUpdateSample.ts +[tagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkDeleteSample.ts +[tagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkGetSample.ts +[tagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkListByProductSample.ts +[tagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkCreateOrUpdateSample.ts +[tagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkDeleteSample.ts +[tagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkGetSample.ts +[tagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkListByProductSample.ts +[tagresourcelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagResourceListByServiceSample.ts +[tagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagUpdateSample.ts +[tenantaccesscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessCreateSample.ts +[tenantaccessgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetEntityTagSample.ts +[tenantaccessgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetSample.ts +[tenantaccessgitregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts +[tenantaccessgitregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts +[tenantaccesslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListByServiceSample.ts +[tenantaccesslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListSecretsSample.ts +[tenantaccessregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts +[tenantaccessregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts +[tenantaccessupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessUpdateSample.ts +[tenantconfigurationdeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationDeploySample.ts +[tenantconfigurationgetsyncstatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationGetSyncStateSample.ts +[tenantconfigurationsavesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationSaveSample.ts +[tenantconfigurationvalidatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationValidateSample.ts +[tenantsettingsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsGetSample.ts +[tenantsettingslistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsListByServiceSample.ts +[userconfirmationpasswordsendsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userConfirmationPasswordSendSample.ts +[usercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userCreateOrUpdateSample.ts +[userdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userDeleteSample.ts +[usergeneratessourlsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGenerateSsoUrlSample.ts +[usergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetEntityTagSample.ts +[usergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSample.ts +[usergetsharedaccesstokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSharedAccessTokenSample.ts +[usergrouplistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGroupListSample.ts +[useridentitieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userIdentitiesListSample.ts +[userlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userListByServiceSample.ts +[usersubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionGetSample.ts +[usersubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionListSample.ts +[userupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userUpdateSample.ts +[workspaceapicreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiCreateOrUpdateSample.ts +[workspaceapideletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDeleteSample.ts +[workspaceapidiagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts +[workspaceapidiagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticDeleteSample.ts +[workspaceapidiagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts +[workspaceapidiagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetSample.ts +[workspaceapidiagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts +[workspaceapidiagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticUpdateSample.ts +[workspaceapiexportgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiExportGetSample.ts +[workspaceapigetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetEntityTagSample.ts +[workspaceapigetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetSample.ts +[workspaceapilistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiListByServiceSample.ts +[workspaceapioperationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts +[workspaceapioperationdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationDeleteSample.ts +[workspaceapioperationgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetEntityTagSample.ts +[workspaceapioperationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetSample.ts +[workspaceapioperationlistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationListByApiSample.ts +[workspaceapioperationpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts +[workspaceapioperationpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyDeleteSample.ts +[workspaceapioperationpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts +[workspaceapioperationpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetSample.ts +[workspaceapioperationpolicylistbyoperationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts +[workspaceapioperationupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationUpdateSample.ts +[workspaceapipolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts +[workspaceapipolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyDeleteSample.ts +[workspaceapipolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetEntityTagSample.ts +[workspaceapipolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetSample.ts +[workspaceapipolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyListByApiSample.ts +[workspaceapireleasecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts +[workspaceapireleasedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseDeleteSample.ts +[workspaceapireleasegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetEntityTagSample.ts +[workspaceapireleasegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetSample.ts +[workspaceapireleaselistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseListByServiceSample.ts +[workspaceapireleaseupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseUpdateSample.ts +[workspaceapirevisionlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiRevisionListByServiceSample.ts +[workspaceapischemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts +[workspaceapischemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaDeleteSample.ts +[workspaceapischemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetEntityTagSample.ts +[workspaceapischemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetSample.ts +[workspaceapischemalistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaListByApiSample.ts +[workspaceapiupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiUpdateSample.ts +[workspaceapiversionsetcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts +[workspaceapiversionsetdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetDeleteSample.ts +[workspaceapiversionsetgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts +[workspaceapiversionsetgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetSample.ts +[workspaceapiversionsetlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetListByServiceSample.ts +[workspaceapiversionsetupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetUpdateSample.ts +[workspacebackendcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendCreateOrUpdateSample.ts +[workspacebackenddeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendDeleteSample.ts +[workspacebackendgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetEntityTagSample.ts +[workspacebackendgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetSample.ts +[workspacebackendlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendListByWorkspaceSample.ts +[workspacebackendupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendUpdateSample.ts +[workspacecertificatecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateCreateOrUpdateSample.ts +[workspacecertificatedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateDeleteSample.ts +[workspacecertificategetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetEntityTagSample.ts +[workspacecertificategetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetSample.ts +[workspacecertificatelistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateListByWorkspaceSample.ts +[workspacecertificaterefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateRefreshSecretSample.ts +[workspacecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCreateOrUpdateSample.ts +[workspacedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDeleteSample.ts +[workspacediagnosticcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts +[workspacediagnosticdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticDeleteSample.ts +[workspacediagnosticgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetEntityTagSample.ts +[workspacediagnosticgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetSample.ts +[workspacediagnosticlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts +[workspacediagnosticupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticUpdateSample.ts +[workspacegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetEntityTagSample.ts +[workspacegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetSample.ts +[workspaceglobalschemacreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts +[workspaceglobalschemadeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaDeleteSample.ts +[workspaceglobalschemagetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts +[workspaceglobalschemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetSample.ts +[workspaceglobalschemalistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaListByServiceSample.ts +[workspacegroupcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupCreateOrUpdateSample.ts +[workspacegroupdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupDeleteSample.ts +[workspacegroupgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetEntityTagSample.ts +[workspacegroupgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetSample.ts +[workspacegrouplistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupListByServiceSample.ts +[workspacegroupupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUpdateSample.ts +[workspacegroupusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts +[workspacegroupusercreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCreateSample.ts +[workspacegroupuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserDeleteSample.ts +[workspacegroupuserlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserListSample.ts +[workspacelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceListByServiceSample.ts +[workspaceloggercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerCreateOrUpdateSample.ts +[workspaceloggerdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerDeleteSample.ts +[workspaceloggergetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetEntityTagSample.ts +[workspaceloggergetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetSample.ts +[workspaceloggerlistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerListByWorkspaceSample.ts +[workspaceloggerupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerUpdateSample.ts +[workspacenamedvaluecreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts +[workspacenamedvaluedeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueDeleteSample.ts +[workspacenamedvaluegetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetEntityTagSample.ts +[workspacenamedvaluegetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetSample.ts +[workspacenamedvaluelistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListByServiceSample.ts +[workspacenamedvaluelistvaluesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListValueSample.ts +[workspacenamedvaluerefreshsecretsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueRefreshSecretSample.ts +[workspacenamedvalueupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueUpdateSample.ts +[workspacenotificationcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationCreateOrUpdateSample.ts +[workspacenotificationgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationGetSample.ts +[workspacenotificationlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationListByServiceSample.ts +[workspacenotificationrecipientemailcheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts +[workspacenotificationrecipientemailcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts +[workspacenotificationrecipientemaildeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts +[workspacenotificationrecipientemaillistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts +[workspacenotificationrecipientusercheckentityexistssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts +[workspacenotificationrecipientusercreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts +[workspacenotificationrecipientuserdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts +[workspacenotificationrecipientuserlistbynotificationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts +[workspacepolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyCreateOrUpdateSample.ts +[workspacepolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyDeleteSample.ts +[workspacepolicyfragmentcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts +[workspacepolicyfragmentdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentDeleteSample.ts +[workspacepolicyfragmentgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts +[workspacepolicyfragmentgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetSample.ts +[workspacepolicyfragmentlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListByServiceSample.ts +[workspacepolicyfragmentlistreferencessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListReferencesSample.ts +[workspacepolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetEntityTagSample.ts +[workspacepolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetSample.ts +[workspacepolicylistbyapisample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyListByApiSample.ts +[workspaceproductapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts +[workspaceproductapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkDeleteSample.ts +[workspaceproductapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkGetSample.ts +[workspaceproductapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkListByProductSample.ts +[workspaceproductcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductCreateOrUpdateSample.ts +[workspaceproductdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductDeleteSample.ts +[workspaceproductgetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetEntityTagSample.ts +[workspaceproductgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetSample.ts +[workspaceproductgrouplinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts +[workspaceproductgrouplinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkDeleteSample.ts +[workspaceproductgrouplinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkGetSample.ts +[workspaceproductgrouplinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkListByProductSample.ts +[workspaceproductlistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductListByServiceSample.ts +[workspaceproductpolicycreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts +[workspaceproductpolicydeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyDeleteSample.ts +[workspaceproductpolicygetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetEntityTagSample.ts +[workspaceproductpolicygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetSample.ts +[workspaceproductpolicylistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyListByProductSample.ts +[workspaceproductupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductUpdateSample.ts +[workspacesubscriptioncreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts +[workspacesubscriptiondeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionDeleteSample.ts +[workspacesubscriptiongetentitytagsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetEntityTagSample.ts +[workspacesubscriptiongetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetSample.ts +[workspacesubscriptionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSample.ts +[workspacesubscriptionlistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSecretsSample.ts +[workspacesubscriptionregenerateprimarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts +[workspacesubscriptionregeneratesecondarykeysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts +[workspacesubscriptionupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionUpdateSample.ts +[workspacetagapilinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts +[workspacetagapilinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkDeleteSample.ts +[workspacetagapilinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkGetSample.ts +[workspacetagapilinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkListByProductSample.ts +[workspacetagcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagCreateOrUpdateSample.ts +[workspacetagdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagDeleteSample.ts +[workspacetaggetentitystatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetEntityStateSample.ts +[workspacetaggetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetSample.ts +[workspacetaglistbyservicesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagListByServiceSample.ts +[workspacetagoperationlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts +[workspacetagoperationlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkDeleteSample.ts +[workspacetagoperationlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkGetSample.ts +[workspacetagoperationlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkListByProductSample.ts +[workspacetagproductlinkcreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts +[workspacetagproductlinkdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkDeleteSample.ts +[workspacetagproductlinkgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkGetSample.ts +[workspacetagproductlinklistbyproductsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkListByProductSample.ts +[workspacetagupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagUpdateSample.ts +[workspaceupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceUpdateSample.ts +[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-apimanagement?view=azure-node-preview +[freesub]: https://azure.microsoft.com/free/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/package.json b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/package.json new file mode 100644 index 000000000000..24bf5c966b6f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/package.json @@ -0,0 +1,43 @@ +{ + "name": "@azure-samples/arm-apimanagement-ts-beta", + "private": true, + "version": "1.0.0", + "description": "@azure/arm-apimanagement client library samples for TypeScript (Beta)", + "engines": { + "node": ">=20.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/apimanagement/arm-apimanagement" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/apimanagement/arm-apimanagement", + "dependencies": { + "@azure/arm-apimanagement": "beta", + "dotenv": "latest", + "@azure/identity": "^4.13.0" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "cross-env": "latest", + "rimraf": "latest", + "typescript": "~6.0.2" + } +} diff --git a/sdk/apimanagement/arm-apimanagement/samples/v10/typescript/sample.env b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/sample.env similarity index 100% rename from sdk/apimanagement/arm-apimanagement/samples/v10/typescript/sample.env rename to sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/sample.env diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/allPoliciesListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/allPoliciesListByServiceSample.ts new file mode 100644 index 000000000000..14241d53087a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/allPoliciesListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to status of all policies of API Management services. + * + * @summary status of all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAllPolicies.json + */ +async function apiManagementListPolicyRestrictions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.allPolicies.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8d723cd802c3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiCreateOrUpdateSample.ts @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApi.json + */ +async function apiManagementCreateApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiClone.json + */ +async function apiManagementCreateApiClone(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api2", { + path: "echo2", + description: "Copy of Existing Echo Api including Operations.", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + subscriptionRequired: true, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiNewVersionUsingExistingApi.json + */ +async function apiManagementCreateApiNewVersionUsingExistingApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echoapiv3", { + path: "echo2", + description: + "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + apiVersion: "v4", + apiVersionSetId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + displayName: "Echo API2", + isCurrent: true, + protocols: ["http", "https"], + serviceUrl: "http://echoapi.cloudapp.net/api", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + subscriptionRequired: true, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRevisionFromExistingApi.json + */ +async function apiManagementCreateApiRevisionFromExistingApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "echo-api;rev=3", { + path: "echo", + apiRevisionDescription: "Creating a Revision of an existing API", + serviceUrl: "http://echoapi.cloudapp.net/apiv3", + sourceApiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + */ +async function apiManagementCreateApiUsingImportOverrideServiceUrl(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "apidocs", { + format: "swagger-link", + path: "petstoreapi123", + serviceUrl: "http://petstore.swagger.wordnik.com/api", + value: "http://apimpimportviaurl.azurewebsites.net/api/apidocs/", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3Import.json + */ +async function apiManagementCreateApiUsingOai3Import(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "openapi-link", + path: "petstore", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + */ +async function apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "openapi-link", + path: "petstore", + translateRequiredQueryParametersConduct: "template", + value: + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingSwaggerImport.json + */ +async function apiManagementCreateApiUsingSwaggerImport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "swagger-link-json", + path: "petstore", + value: "http://petstore.swagger.io/v2/swagger.json", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiUsingWadlImport.json + */ +async function apiManagementCreateApiUsingWadlImport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "petstore", { + format: "wadl-link-json", + path: "collector", + value: + "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleAuthServers.json + */ +async function apiManagementCreateApiWithMultipleAuthServers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2AuthenticationSettings: [ + { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + { authorizationServerId: "authorizationServerId2284", scope: "oauth2scope2581" }, + ], + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + */ +async function apiManagementCreateApiWithMultipleOpenIdConnectProviders(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + openidAuthenticationSettings: [ + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2283", + }, + { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "openidProviderId2284", + }, + ], + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWithOpenIdConnect.json + */ +async function apiManagementCreateApiWithOpenIdConnect(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + path: "petstore", + description: + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + authenticationSettings: { + openid: { + bearerTokenSendingMethods: ["authorizationHeader"], + openidProviderId: "testopenid", + }, + }, + displayName: "Swagger Petstore", + protocols: ["https"], + serviceUrl: "http://petstore.swagger.io/v2", + subscriptionKeyParameterNames: { + header: "Ocp-Apim-Subscription-Key", + query: "subscription-key", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApi.json + */ +async function apiManagementCreateGraphQLApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "graphql", + path: "graphql-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://api.spacex.land/graphql", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGrpcApi.json + */ +async function apiManagementCreateGrpcApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "grpc", + format: "grpc-link", + path: "grpc-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["https"], + serviceUrl: "https://your-api-hostname/samples", + value: + "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMcpApi.json + */ +async function apiManagementCreateMcpApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "mcp-api", { + apiType: "mcp", + path: "mcp-api", + description: "MCP API for AI agent tool discovery and invocation", + displayName: "MCP API", + protocols: ["https"], + serviceUrl: "https://mcp-backend.contoso.com", + mcpProperties: { + transportType: "streamable", + endpoints: [{ name: "message", uriTemplate: "/mcp/messages" }], + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateODataApi.json + */ +async function apiManagementCreateODataApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "odata", + format: "odata-link", + path: "odata-api", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["http", "https"], + serviceUrl: "https://services.odata.org/TripPinWebApiService", + value: "https://services.odata.org/TripPinWebApiService/$metadata", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + */ +async function apiManagementCreateSoapPassThroughApiUsingWsdlImport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { + format: "wsdl-link", + path: "currency", + soapApiType: "soap", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSoapToRestApiUsingWsdlImport.json + */ +async function apiManagementCreateSoapToRestApiUsingWsdlImport(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "soapApi", { + format: "wsdl-link", + path: "currency", + value: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + wsdlSelector: { + wsdlEndpointName: "CurrencyConvertorSoap", + wsdlServiceName: "CurrencyConvertor", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified API of the API Management service instance. + * + * @summary creates new or updates existing specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWebsocketApi.json + */ +async function apiManagementCreateWebSocketApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.createOrUpdate("rg1", "apimService1", "tempgroup", { + apiType: "websocket", + path: "newapiPath", + description: "apidescription5200", + displayName: "apiname1463", + protocols: ["wss", "ws"], + serviceUrl: "wss://echo.websocket.org", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApi(); + await apiManagementCreateApiClone(); + await apiManagementCreateApiNewVersionUsingExistingApi(); + await apiManagementCreateApiRevisionFromExistingApi(); + await apiManagementCreateApiUsingImportOverrideServiceUrl(); + await apiManagementCreateApiUsingOai3Import(); + await apiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct(); + await apiManagementCreateApiUsingSwaggerImport(); + await apiManagementCreateApiUsingWadlImport(); + await apiManagementCreateApiWithMultipleAuthServers(); + await apiManagementCreateApiWithMultipleOpenIdConnectProviders(); + await apiManagementCreateApiWithOpenIdConnect(); + await apiManagementCreateGraphQLApi(); + await apiManagementCreateGrpcApi(); + await apiManagementCreateMcpApi(); + await apiManagementCreateODataApi(); + await apiManagementCreateSoapPassThroughApiUsingWsdlImport(); + await apiManagementCreateSoapToRestApiUsingWsdlImport(); + await apiManagementCreateWebSocketApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDeleteSample.ts new file mode 100644 index 000000000000..4a1ed5959c3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API of the API Management service instance. + * + * @summary deletes the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApi.json + */ +async function apiManagementDeleteApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.api.delete("rg1", "apimService1", "echo-api", "*"); +} + +async function main(): Promise { + await apiManagementDeleteApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticCreateOrUpdateSample.ts new file mode 100644 index 000000000000..45e8175d7a71 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticCreateOrUpdateSample.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. + * + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiDiagnostic.json + */ +async function apiManagementCreateApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticDeleteSample.ts new file mode 100644 index 000000000000..9199820d2feb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiDiagnostic.json + */ +async function apiManagementDeleteApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiDiagnostic.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetEntityTagSample.ts new file mode 100644 index 000000000000..f98f76ed5ff7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiDiagnostic.json + */ +async function apiManagementHeadApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); +} + +async function main(): Promise { + await apiManagementHeadApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetSample.ts new file mode 100644 index 000000000000..0bfbc9d0c585 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiDiagnostic.json + */ +async function apiManagementGetApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.get( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticListByServiceSample.ts new file mode 100644 index 000000000000..3cfd0bbd0a5a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiDiagnostics.json + */ +async function apiManagementListApiDiagnostics(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiDiagnostic.listByService("rg1", "apimService1", "echo-api")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticUpdateSample.ts new file mode 100644 index 000000000000..04ac432abb4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiDiagnosticUpdateSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. + * + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiDiagnostic.json + */ +async function apiManagementUpdateApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiDiagnostic.update( + "rg1", + "apimService1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiExportGetSample.ts new file mode 100644 index 000000000000..91c27f08162e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiExportGetSample.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi2dot0.json + */ +async function apiManagementGetApiExportInOpenApi2Dot0(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + "rg1", + "apimService1", + "echo-api", + "swagger-link", + "true", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiExportInOpenApi3dot0.json + */ +async function apiManagementGetApiExportInOpenApi3Dot0(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiExport.get( + "rg1", + "apimService1", + "aid9676", + "openapi-link", + "true", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiExportInOpenApi2Dot0(); + await apiManagementGetApiExportInOpenApi3Dot0(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..3229e72c5704 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionCreateOrUpdateSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayConfigConnection.json + */ +async function apiManagementCreateGatewayConfigConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayConfigConnection.createOrUpdate( + "rg1", + "standard-gw-01", + "gcc-01", + { + sourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionDeleteSample.ts new file mode 100644 index 000000000000..836a9b5e75a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes an existing API Management gateway config connection. + * + * @summary deletes an existing API Management gateway config connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayConfigConnection.json + */ +async function apiManagementGatewayDeleteGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayConfigConnection.delete("rg1", "standard-gw-01", "gcc-01", "*"); +} + +async function main(): Promise { + await apiManagementGatewayDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionGetSample.ts new file mode 100644 index 000000000000..4bbadaa345e6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management gateway config connection resource description. + * + * @summary gets an API Management gateway config connection resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayConfigConnection.json + */ +async function apiManagementGetGatewayConfigConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayConfigConnection.get("rg1", "standard-gw-01", "gcc-01"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts new file mode 100644 index 000000000000..1685592f577a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayConfigConnectionListByGatewaySample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management gateway config connections within a gateway. + * + * @summary list all API Management gateway config connections within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayConfigConnection.json + */ +async function apiManagementListGatewayConfigConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGatewayConfigConnection.listByGateway( + "rg1", + "standard-gw-1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayCreateOrUpdateSample.ts new file mode 100644 index 000000000000..454178273704 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayCreateOrUpdateSample.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateStandardGateway.json + */ +async function apiManagementCreateStandardGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", + backend: { + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", + }, + }, + sku: { name: "Standard", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePremiumGateway.json + */ +async function apiManagementCreateWorkspacePremiumGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.createOrUpdate("rg1", "apimGateway1", { + location: "South Central US", + backend: { + subnet: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1", + }, + }, + virtualNetworkType: "External", + sku: { name: "WorkspaceGatewayPremium", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateStandardGateway(); + await apiManagementCreateWorkspacePremiumGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayDeleteSample.ts new file mode 100644 index 000000000000..601994fb289c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes an existing API Management gateway. + * + * @summary deletes an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayDeleteGateway.json + */ +async function apiManagementGatewayDeleteGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.delete("rg1", "example-gateway"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayGetSample.ts new file mode 100644 index 000000000000..c3201734ade5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management gateway resource description. + * + * @summary gets an API Management gateway resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGetGateway.json + */ +async function apiManagementGatewayGetGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.get("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayGetGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingCreateOrUpdateSample.ts new file mode 100644 index 000000000000..cc70c8a2f01f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameBinding.json + */ +async function apiManagementCreateGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.createOrUpdate( + "rg1", + "apimGateway1", + "hb-1", + { + hostname: "primary.cotoso.com", + keyVault: { + identityClientId: "00000000-0000-0000-0000-000000000000", + secretId: "https://myvault.keyvault.azure.net/secrets/contosoprimarycert", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingDeleteSample.ts new file mode 100644 index 000000000000..92177f6c1f9f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes an existing API Management gateway hostname binding. + * + * @summary deletes an existing API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameBinding.json + */ +async function apiManagementDeleteGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.delete("rg1", "standard-gw-01", "gcc-01", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingGetSample.ts new file mode 100644 index 000000000000..6de8b35876de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management gateway hostname binding resource description. + * + * @summary gets an API Management gateway hostname binding resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameBinding.json + */ +async function apiManagementGetGatewayHostnameBinding(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGatewayHostnameBinding.get("rg1", "standard-gw-1", "hb-1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGatewayHostnameBinding(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingListByGatewaySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingListByGatewaySample.ts new file mode 100644 index 000000000000..bb28801e5434 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingListByGatewaySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management gateway hostname bindings within a gateway. + * + * @summary list all API Management gateway hostname bindings within a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameBindings.json + */ +async function apiManagementListGatewayHostnameBindings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGatewayHostnameBinding.listByGateway("rg1", "standard-gw-1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayHostnameBindings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingRefreshSecretSample.ts new file mode 100644 index 000000000000..dcc8560c4841 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayHostnameBindingRefreshSecretSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refresh the secret for an API Management gateway hostname binding. + * + * @summary refresh the secret for an API Management gateway hostname binding. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshGatewayHostnameBindingSecret.json + */ +async function apiManagementRefreshGatewayHostnameBindingSecret(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiGatewayHostnameBinding.refreshSecret("rg1", "standard-gw-01", "gcc-01"); +} + +async function main(): Promise { + await apiManagementRefreshGatewayHostnameBindingSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListByResourceGroupSample.ts new file mode 100644 index 000000000000..60c82375cdde --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management gateways within a resource group. + * + * @summary list all API Management gateways within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json + */ +async function apiManagementListGatewaysBySubscriptionAndResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGateway.listByResourceGroup("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewaysBySubscriptionAndResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListSample.ts new file mode 100644 index 000000000000..16980df50d2b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management gateways within a subscription. + * + * @summary list all API Management gateways within a subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewaysBySubscription.json + */ +async function apiManagementListGatewaysBySubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiGateway.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewaysBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayUpdateSample.ts new file mode 100644 index 000000000000..8cd167f65770 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGatewayUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing API Management gateway. + * + * @summary updates an existing API Management gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateStandardGateway.json + */ +async function apiManagementUpdateStandardGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiGateway.update("rg1", "apimGateway1", { + sku: { name: "Standard", capacity: 10 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateStandardGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetEntityTagSample.ts new file mode 100644 index 000000000000..d8feffafddd1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApi.json + */ +async function apiManagementHeadApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.api.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main(): Promise { + await apiManagementHeadApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetSample.ts new file mode 100644 index 000000000000..72d34cf026f8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiContract.json + */ +async function apiManagementGetApiContract(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRevision.json + */ +async function apiManagementGetApiRevisionContract(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.get("rg1", "apimService1", "echo-api;rev=3"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiContract(); + await apiManagementGetApiRevisionContract(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f05c20ad6c0d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentCreateOrUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Attachment for the Issue in an API or updates an existing one. + * + * @summary creates a new Attachment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueAttachment.json + */ +async function apiManagementCreateApiIssueAttachment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + { content: "IEJhc2U2NA==", contentFormat: "image/jpeg", title: "Issue attachment." }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentDeleteSample.ts new file mode 100644 index 000000000000..452e6ae4660c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueAttachment.json + */ +async function apiManagementDeleteApiIssueAttachment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueAttachment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetEntityTagSample.ts new file mode 100644 index 000000000000..68aaa4ca8f70 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueAttachment.json + */ +async function apiManagementHeadApiIssueAttachment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueAttachment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + ); +} + +async function main(): Promise { + await apiManagementHeadApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetSample.ts new file mode 100644 index 000000000000..7b220bb3e2dd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the issue Attachment for an API specified by its identifier. + * + * @summary gets the details of the issue Attachment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueAttachment.json + */ +async function apiManagementGetApiIssueAttachment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueAttachment.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "57d2ef278aa04f0888cba3f3", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiIssueAttachment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentListByServiceSample.ts new file mode 100644 index 000000000000..b8b268b28805 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueAttachmentListByServiceSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all attachments for the Issue associated with the specified API. + * + * @summary lists all attachments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueAttachments.json + */ +async function apiManagementListApiIssueAttachments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssueAttachment.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiIssueAttachments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentCreateOrUpdateSample.ts new file mode 100644 index 000000000000..76bd02419d7c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Comment for the Issue in an API or updates an existing one. + * + * @summary creates a new Comment for the Issue in an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssueComment.json + */ +async function apiManagementCreateApiIssueComment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + { + createdDate: new Date("2018-02-01T22:21:20.467Z"), + text: "Issue comment.", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentDeleteSample.ts new file mode 100644 index 000000000000..c48b16f8b58a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified comment from an Issue. + * + * @summary deletes the specified comment from an Issue. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssueComment.json + */ +async function apiManagementDeleteApiIssueComment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueComment.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetEntityTagSample.ts new file mode 100644 index 000000000000..74af39162ad5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssueComment.json + */ +async function apiManagementHeadApiIssueComment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssueComment.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + ); +} + +async function main(): Promise { + await apiManagementHeadApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetSample.ts new file mode 100644 index 000000000000..a5ec242ab1d7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the issue Comment for an API specified by its identifier. + * + * @summary gets the details of the issue Comment for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssueComment.json + */ +async function apiManagementGetApiIssueComment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssueComment.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "599e29ab193c3c0bd0b3e2fb", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiIssueComment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentListByServiceSample.ts new file mode 100644 index 000000000000..f1a7fdf41e9e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCommentListByServiceSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all comments for the Issue associated with the specified API. + * + * @summary lists all comments for the Issue associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssueComments.json + */ +async function apiManagementListApiIssueComments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssueComment.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiIssueComments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCreateOrUpdateSample.ts new file mode 100644 index 000000000000..99c92de6f0f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueCreateOrUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Issue for an API or updates an existing one. + * + * @summary creates a new Issue for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiIssue.json + */ +async function apiManagementCreateApiIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + { + description: "New API issue description", + createdDate: new Date("2018-02-01T22:21:20.467Z"), + state: "open", + title: "New API issue", + userId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueDeleteSample.ts new file mode 100644 index 000000000000..278d2f1893b4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Issue from an API. + * + * @summary deletes the specified Issue from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiIssue.json + */ +async function apiManagementDeleteApiIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssue.delete( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetEntityTagSample.ts new file mode 100644 index 000000000000..8401bab8d75a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiIssue.json + */ +async function apiManagementHeadApiIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiIssue.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetSample.ts new file mode 100644 index 000000000000..cd607f7f1d70 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Issue for an API specified by its identifier. + * + * @summary gets the details of the Issue for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiIssue.json + */ +async function apiManagementGetApiIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueListByServiceSample.ts new file mode 100644 index 000000000000..b6449cd8cfcb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all issues associated with the specified API. + * + * @summary lists all issues associated with the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiIssues.json + */ +async function apiManagementListApiIssues(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiIssue.listByService( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiIssues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueUpdateSample.ts new file mode 100644 index 000000000000..75f3cf225ce8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiIssueUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing issue for an API. + * + * @summary updates an existing issue for an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiIssue.json + */ +async function apiManagementUpdateApiIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiIssue.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "57d2ef278aa04f0ad01d6cdc", + "*", + { state: "closed" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByServiceSample.ts new file mode 100644 index 000000000000..ec423a9c2058 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all APIs of the API Management service instance. + * + * @summary lists all APIs of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApis.json + */ +async function apiManagementListApis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.api.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByTagsSample.ts new file mode 100644 index 000000000000..cfddfbb5f608 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiListByTagsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of apis associated with tags. + * + * @summary lists a collection of apis associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApisByTags.json + */ +async function apiManagementListApisByTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.api.listByTags("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApisByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts new file mode 100644 index 000000000000..accebacc3117 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementGatewaySkusListAvailableSkusSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all available SKU for a given API Management gateway + * + * @summary gets all available SKU for a given API Management gateway + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Gateways.json + */ +async function apiManagementListSKUsGateways(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementGatewaySkus.listAvailableSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListSKUsGateways(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementOperationsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementOperationsListSample.ts new file mode 100644 index 000000000000..f8380fbfadbb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementOperationsListSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * + * @summary lists all of the available REST API operations of the Microsoft.ApiManagement provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOperations.json + */ +async function apiManagementListOperations(): Promise { + const credential = new DefaultAzureCredential(); + const client = new ApiManagementClient(credential); + const resArray = new Array(); + for await (const item of client.apiManagementOperations.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts new file mode 100644 index 000000000000..50d05049289f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceApplyNetworkConfigurationUpdatesSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * + * @summary updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApplyNetworkConfigurationUpdates.json + */ +async function apiManagementApplyNetworkConfigurationUpdates(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.applyNetworkConfigurationUpdates( + "rg1", + "apimService1", + { parameters: { location: "west us" } }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementApplyNetworkConfigurationUpdates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceBackupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceBackupSample.ts new file mode 100644 index 000000000000..fbb8dfe8320c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceBackupSample.ts @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithAccessKey.json + */ +async function apiManagementBackupWithAccessKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithSystemManagedIdentity.json + */ +async function apiManagementBackupWithSystemManagedIdentity(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessType: "SystemAssignedManagedIdentity", + backupName: "backup5", + containerName: "apim-backups", + storageAccount: "contosorpstorage", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * + * @summary creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackupWithUserAssignedManagedIdentity.json + */ +async function apiManagementBackupWithUserAssignedManagedIdentity(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.backup("rg1", "apimService1", { + accessType: "UserAssignedManagedIdentity", + backupName: "backup5", + clientId: "XXXXX-a154-4830-XXXX-46a12da1a1e2", + containerName: "apim-backups", + storageAccount: "contosorpstorage", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementBackupWithAccessKey(); + await apiManagementBackupWithSystemManagedIdentity(); + await apiManagementBackupWithUserAssignedManagedIdentity(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts new file mode 100644 index 000000000000..f3a29bae2d9b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCheckNameAvailabilitySample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks availability and correctness of a name for an API Management service. + * + * @summary checks availability and correctness of a name for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceCheckNameAvailability.json + */ +async function apiManagementServiceCheckNameAvailability(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.checkNameAvailability({ name: "apimService1" }); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceCheckNameAvailability(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCreateOrUpdateSample.ts new file mode 100644 index 000000000000..2d76219bc2e5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceCreateOrUpdateSample.ts @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + */ +async function apiManagementCreateMultiRegionServiceWithCustomHostname(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "West US", + additionalLocations: [ + { disableGateway: true, location: "East US", sku: { name: "Premium", capacity: 1 } }, + ], + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + certificatePassword: "Password", + defaultSslBinding: true, + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "gateway1.msitesting.net", + }, + { + type: "Management", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "mgmt.msitesting.net", + }, + { + type: "Portal", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "portal1.msitesting.net", + }, + { + type: "ConfigurationApi", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "configuration-api.msitesting.net", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkType: "None", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateService.json + */ +async function apiManagementCreateService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceHavingMsi.json + */ +async function apiManagementCreateServiceHavingMsi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInVnetWithPublicIP.json + */ +async function apiManagementCreateServiceInVnetWithPublicIP(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "East US 2 EUAP", + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant", + }, + virtualNetworkType: "External", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"], + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceInZones.json + */ +async function apiManagementCreateServiceInZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "North europe", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 2 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + zones: ["1", "2"], + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceSkuv2Service.json + */ +async function apiManagementCreateServiceSkuv2Service(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { type: "SystemAssigned" }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "StandardV2", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + */ +async function apiManagementCreateServiceWithCustomHostnameKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": + {}, + }, + }, + location: "North Europe", + apiVersionConstraint: { minApiVersion: "2019-01-01" }, + hostnameConfigurations: [ + { + type: "Proxy", + defaultSslBinding: true, + hostName: "gateway1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "Management", + hostName: "mgmt.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "Portal", + hostName: "portal1.msitesting.net", + identityClientId: "329419bc-adec-4dce-9568-25a6d486e468", + keyVaultId: "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + }, + { + type: "ConfigurationApi", + certificatePassword: "Password", + encodedCertificate: "****** Base 64 Encoded Certificate ************", + hostName: "configuration-api.msitesting.net", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + virtualNetworkType: "None", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithDeveloperPortal.json + */ +async function apiManagementCreateServiceWithDeveloperPortal(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + developerPortalStatus: "Enabled", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + sku: { name: "Developer", capacity: 1 }, + tags: { Name: "Contoso", Test: "User" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithNatGatewayEnabled.json + */ +async function apiManagementCreateServiceWithNatGatewayEnabled(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "East US", + natGatewayState: "Enabled", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Premium", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithSystemCertificates.json + */ +async function apiManagementCreateServiceWithSystemCertificates(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "Central US", + certificates: [ + { + certificatePassword: "Password", + encodedCertificate: "*******Base64 encoded Certificate******************", + storeName: "CertificateAuthority", + }, + ], + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithUserAssignedIdentity.json + */ +async function apiManagementCreateServiceWithUserAssignedIdentity(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + identity: { + type: "UserAssigned", + userAssignedIdentities: { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": + {}, + }, + }, + location: "West US", + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Consumption", capacity: 0 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json + */ +async function apiManagementCreateServiceWithoutLegacyConfigurationApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "Central US", + configurationApi: { legacyApi: "Disabled" }, + publisherEmail: "apim@autorestsdk.com", + publisherName: "autorestsdk", + sku: { name: "Basic", capacity: 1 }, + tags: { tag1: "value1", tag2: "value2", tag3: "value3" }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * + * @summary creates or updates an API Management service. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUndelete.json + */ +async function apiManagementUndelete(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.createOrUpdate("rg1", "apimService1", { + location: "South Central US", + publisherEmail: "foo@contoso.com", + publisherName: "foo", + restore: true, + sku: { name: "Developer", capacity: 1 }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateMultiRegionServiceWithCustomHostname(); + await apiManagementCreateService(); + await apiManagementCreateServiceHavingMsi(); + await apiManagementCreateServiceInVnetWithPublicIP(); + await apiManagementCreateServiceInZones(); + await apiManagementCreateServiceSkuv2Service(); + await apiManagementCreateServiceWithCustomHostnameKeyVault(); + await apiManagementCreateServiceWithDeveloperPortal(); + await apiManagementCreateServiceWithNatGatewayEnabled(); + await apiManagementCreateServiceWithSystemCertificates(); + await apiManagementCreateServiceWithUserAssignedIdentity(); + await apiManagementCreateServiceWithoutLegacyConfigurationApi(); + await apiManagementUndelete(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceDeleteSample.ts new file mode 100644 index 000000000000..d39938644eda --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceDeleteSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes an existing API Management service. + * + * @summary deletes an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceDeleteService.json + */ +async function apiManagementServiceDeleteService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.delete("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceDeleteService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts new file mode 100644 index 000000000000..b2057a6ce1e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetDomainOwnershipIdentifierSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the custom domain ownership identifier for an API Management service. + * + * @summary get the custom domain ownership identifier for an API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetDomainOwnershipIdentifier.json + */ +async function apiManagementServiceGetDomainOwnershipIdentifier(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getDomainOwnershipIdentifier(); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetDomainOwnershipIdentifier(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSample.ts new file mode 100644 index 000000000000..0d51ec7feab9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSample.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetMultiRegionInternalVnet.json + */ +async function apiManagementServiceGetMultiRegionInternalVnet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetService.json + */ +async function apiManagementServiceGetService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets an API Management service resource description. + * + * @summary gets an API Management service resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetServiceHavingMsi.json + */ +async function apiManagementServiceGetServiceHavingMsi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.get("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetMultiRegionInternalVnet(); + await apiManagementServiceGetService(); + await apiManagementServiceGetServiceHavingMsi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSsoTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSsoTokenSample.ts new file mode 100644 index 000000000000..3e10e187e615 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceGetSsoTokenSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * + * @summary gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetSsoToken.json + */ +async function apiManagementServiceGetSsoToken(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.getSsoToken("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetSsoToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListByResourceGroupSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListByResourceGroupSample.ts new file mode 100644 index 000000000000..8ab5e32dfdcf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListByResourceGroupSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management services within a resource group. + * + * @summary list all API Management services within a resource group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscriptionAndResourceGroup.json + */ +async function apiManagementListServiceBySubscriptionAndResourceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementService.listByResourceGroup("rg1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListServiceBySubscriptionAndResourceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListSample.ts new file mode 100644 index 000000000000..a2774f5552b6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all API Management services within an Azure subscription. + * + * @summary lists all API Management services within an Azure subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListServiceBySubscription.json + */ +async function apiManagementListServiceBySubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementService.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListServiceBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceMigrateToStv2Sample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceMigrateToStv2Sample.ts new file mode 100644 index 000000000000..bc19b12d5531 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceMigrateToStv2Sample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * + * @summary upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceMigrateToStv2.json + */ +async function apiManagementMigrateService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.migrateToStv2("rg1", "apimService1", { + parameters: { mode: "PreserveIp" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementMigrateService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRefreshHostnamesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRefreshHostnamesSample.ts new file mode 100644 index 000000000000..934a30790d99 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRefreshHostnamesSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * + * @summary force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceRefreshKeyVaultHostnames.json + */ +async function apiManagementServiceRefreshKeyVaultHostnames(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.refreshHostnames("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceRefreshKeyVaultHostnames(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts new file mode 100644 index 000000000000..f85f11100394 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceResourcesPerformConnectivityCheckAsyncSample.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheck.json + */ +async function tcpConnectivityCheck(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "8.8.8.8", port: 53 }, + preferredIPVersion: "IPv4", + source: { region: "northeurope" }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * + * @summary performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPerformConnectivityCheckHttpConnect.json + */ +async function httpConnectivityCheck(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementServiceResources.performConnectivityCheckAsync( + "rg1", + "apimService1", + { + destination: { address: "https://microsoft.com", port: 3306 }, + protocolConfiguration: { + httpConfiguration: { + method: "GET", + headers: [{ name: "Authorization", value: "Bearer myPreciousToken" }], + validStatusCodes: [200, 204], + }, + }, + source: { region: "northeurope" }, + protocol: "HTTPS", + }, + ); + console.log(result); +} + +async function main(): Promise { + await tcpConnectivityCheck(); + await httpConnectivityCheck(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRestoreSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRestoreSample.ts new file mode 100644 index 000000000000..c56c00a06752 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceRestoreSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * + * @summary restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRestoreWithAccessKey.json + */ +async function apiManagementRestoreService(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.restore("rg1", "apimService1", { + accessKey: "**************************************************", + accessType: "AccessKey", + backupName: "apimService1backup_2017_03_19", + containerName: "backupContainer", + storageAccount: "teststorageaccount", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementRestoreService(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts new file mode 100644 index 000000000000..d1088ff41d07 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceSkusListAvailableServiceSkusSample.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all available SKU for a given API Management service + * + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Consumption.json + */ +async function apiManagementListSKUsConsumption(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +/** + * This sample demonstrates how to gets all available SKU for a given API Management service + * + * @summary gets all available SKU for a given API Management service + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSKUs-Dedicated.json + */ +async function apiManagementListSKUsDedicated(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementServiceSkus.listAvailableServiceSkus( + "rg1", + "apimService1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListSKUsConsumption(); + await apiManagementListSKUsDedicated(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceUpdateSample.ts new file mode 100644 index 000000000000..2d0e9fdb6d7a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementServiceUpdateSample.ts @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceDisableTls10.json + */ +async function apiManagementUpdateServiceDisableTls10(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + customProperties: { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + }, + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServicePublisherDetails.json + */ +async function apiManagementUpdateServicePublisherDetails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + publisherEmail: "foobar@live.com", + publisherName: "Contoso Vnext", + }); + console.log(result); +} + +/** + * This sample demonstrates how to updates an existing API Management service. + * + * @summary updates an existing API Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateServiceToNewVnetAndAZs.json + */ +async function apiManagementUpdateServiceToNewVnetAndAvailabilityZones(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementService.update("rg1", "apimService1", { + additionalLocations: [ + { + location: "Australia East", + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + sku: { name: "Premium", capacity: 3 }, + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default", + }, + zones: ["1", "2", "3"], + }, + ], + publicIpAddressId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + virtualNetworkConfiguration: { + subnetResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2", + }, + virtualNetworkType: "External", + sku: { name: "Premium", capacity: 3 }, + zones: ["1", "2", "3"], + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateServiceDisableTls10(); + await apiManagementUpdateServicePublisherDetails(); + await apiManagementUpdateServiceToNewVnetAndAvailabilityZones(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementSkusListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementSkusListSample.ts new file mode 100644 index 000000000000..6c4807446c72 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementSkusListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * + * @summary gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSku.json + */ +async function listsAllAvailableResourceSKUs(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementSkus.list()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listsAllAvailableResourceSKUs(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinkGetSample.ts new file mode 100644 index 000000000000..c436de2f83e7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets an API Management WorkspaceLink resource description. + * + * @summary gets an API Management WorkspaceLink resource description. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLink.json + */ +async function apiManagementGetWorkspaceLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiManagementWorkspaceLink.get("rg1", "service1", "wk-1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts new file mode 100644 index 000000000000..45bc5d10d750 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiManagementWorkspaceLinksListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list all API Management workspaceLinks for a service. + * + * @summary list all API Management workspaceLinks for a service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLinks.json + */ +async function apiManagementListGatewayConfigConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiManagementWorkspaceLinks.listByService("rg1", "service1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayConfigConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a5d27f6ff553 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationCreateOrUpdateSample.ts @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new operation in the API or updates an existing one. + * + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperation.json + */ +async function apiManagementCreateApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.createOrUpdate( + "rg1", + "apimService1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, + ], + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationDeleteSample.ts new file mode 100644 index 000000000000..2129313a8296 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperation.json + */ +async function apiManagementDeleteApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperation.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetEntityTagSample.ts new file mode 100644 index 000000000000..37e926a7e2cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperation.json + */ +async function apiManagementHeadApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperation.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetSample.ts new file mode 100644 index 000000000000..59a816ef22b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationGetSample.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperation.json + */ +async function apiManagementGetApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPetStore.json + */ +async function apiManagementGetApiOperationPetStore(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.get( + "rg1", + "apimService1", + "swagger-petstore", + "loginUser", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiOperation(); + await apiManagementGetApiOperationPetStore(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationListByApiSample.ts new file mode 100644 index 000000000000..c152ccefb175 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperations.json + */ +async function apiManagementListApiOperations(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiOperation.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a53d4ed2d87c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. + * + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationPolicy.json + */ +async function apiManagementCreateApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyDeleteSample.ts new file mode 100644 index 000000000000..fd9b35fa8640 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationPolicy.json + */ +async function apiManagementDeleteApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperationPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testoperation", + "policy", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..7579ba800948 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationPolicy.json + */ +async function apiManagementHeadApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetSample.ts new file mode 100644 index 000000000000..41f3009cc3b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationPolicy.json + */ +async function apiManagementGetApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.get( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyListByOperationSample.ts new file mode 100644 index 000000000000..c67774278400 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationPolicyListByOperationSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationPolicies.json + */ +async function apiManagementListApiOperationPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperationPolicy.listByOperation( + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListApiOperationPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationUpdateSample.ts new file mode 100644 index 000000000000..7bdaac75dc13 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiOperationUpdateSample.ts @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. + * + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiOperation.json + */ +async function apiManagementUpdateApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiOperation.update( + "rg1", + "apimService1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, + }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, + ], + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..2f0b1a71b92b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyCreateOrUpdateSample.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicy.json + */ +async function apiManagementCreateApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiPolicyNonXmlEncoded.json + */ +async function apiManagementCreateApiPolicyNonXmlEncoded(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiPolicy(); + await apiManagementCreateApiPolicyNonXmlEncoded(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyDeleteSample.ts new file mode 100644 index 000000000000..1ff1015a5b05 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiPolicy.json + */ +async function apiManagementDeleteApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiPolicy.delete("rg1", "apimService1", "loggerId", "policy", "*"); +} + +async function main(): Promise { + await apiManagementDeleteApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..1cbaa19e0d6c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiPolicy.json + */ +async function apiManagementHeadApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiPolicy.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "policy"); +} + +async function main(): Promise { + await apiManagementHeadApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetSample.ts new file mode 100644 index 000000000000..5985832222e6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiPolicy.json + */ +async function apiManagementGetApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.get( + "rg1", + "apimService1", + "5600b59475ff190048040001", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyListByApiSample.ts new file mode 100644 index 000000000000..1713a106962e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiPolicyListByApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiPolicies.json + */ +async function apiManagementListApiPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiPolicy.listByApi( + "rg1", + "apimService1", + "5600b59475ff190048040001", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListApiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiProductListByApisSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiProductListByApisSample.ts new file mode 100644 index 000000000000..3d994f19affe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiProductListByApisSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Products, which the API is part of. + * + * @summary lists all Products, which the API is part of. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiProducts.json + */ +async function apiManagementListApiProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiProduct.listByApis( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseCreateOrUpdateSample.ts new file mode 100644 index 000000000000..ddcc599f5145 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Release for the API. + * + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiRelease.json + */ +async function apiManagementCreateApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.createOrUpdate("rg1", "apimService1", "a1", "testrev", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseDeleteSample.ts new file mode 100644 index 000000000000..cce1b5479ccb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiRelease.json + */ +async function apiManagementDeleteApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiRelease.delete("rg1", "apimService1", "5a5fcc09124a7fa9b89f2f1d", "testrev", "*"); +} + +async function main(): Promise { + await apiManagementDeleteApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetEntityTagSample.ts new file mode 100644 index 000000000000..5ce348c3e60e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiRelease.json + */ +async function apiManagementHeadApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiRelease.getEntityTag("rg1", "apimService1", "a1", "5a7cb545298324c53224a799"); +} + +async function main(): Promise { + await apiManagementHeadApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetSample.ts new file mode 100644 index 000000000000..694a8a9e7add --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiRelease.json + */ +async function apiManagementGetApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.get( + "rg1", + "apimService1", + "a1", + "5a7cb545298324c53224a799", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseListByServiceSample.ts new file mode 100644 index 000000000000..4ae515d2830e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiReleases.json + */ +async function apiManagementListApiReleases(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiRelease.listByService("rg1", "apimService1", "a1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiReleases(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseUpdateSample.ts new file mode 100644 index 000000000000..86ee45fa4f76 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiReleaseUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. + * + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiRelease.json + */ +async function apiManagementUpdateApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiRelease.update("rg1", "apimService1", "a1", "testrev", "*", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + notes: "yahooagain", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiRevisionListByServiceSample.ts new file mode 100644 index 000000000000..b32203c3ace3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiRevisionListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiRevisions.json + */ +async function apiManagementListApiRevisions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiRevision.listByService( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8e0d86e16471 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates schema configuration for the API. + * + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiSchema.json + */ +async function apiManagementCreateApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.createOrUpdate( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaDeleteSample.ts new file mode 100644 index 000000000000..060565c1af2d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiSchema.json + */ +async function apiManagementDeleteApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiSchema.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetEntityTagSample.ts new file mode 100644 index 000000000000..2fbd25aa6487 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiSchema.json + */ +async function apiManagementHeadApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiSchema.getEntityTag( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); +} + +async function main(): Promise { + await apiManagementHeadApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetSample.ts new file mode 100644 index 000000000000..ff67c37fe055 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiSchema.json + */ +async function apiManagementGetApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiSchema.get( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaListByApiSample.ts new file mode 100644 index 000000000000..d1605209827b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiSchemaListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiSchemas.json + */ +async function apiManagementListApiSchemas(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiSchema.listByApi( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8ada3ba8f06c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create/Update tag description in scope of the Api. + * + * @summary create/Update tag description in scope of the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTagDescription.json + */ +async function apiManagementCreateApiTagDescription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.createOrUpdate( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + { + description: + "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + externalDocsDescription: "Description of the external docs resource", + externalDocsUrl: "http://some.url/additionaldoc", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionDeleteSample.ts new file mode 100644 index 000000000000..188e988616ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete tag description for the Api. + * + * @summary delete tag description for the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTagDescription.json + */ +async function apiManagementDeleteApiTagDescription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTagDescription.delete( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetEntityTagSample.ts new file mode 100644 index 000000000000..d479d2dc01b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTagDescription.json + */ +async function apiManagementHeadApiTagDescription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTagDescription.getEntityTag( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetSample.ts new file mode 100644 index 000000000000..60d57855af60 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get Tag description in scope of API + * + * @summary get Tag description in scope of API + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTagDescription.json + */ +async function apiManagementGetApiTagDescription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTagDescription.get( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiTagDescription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionListByServiceSample.ts new file mode 100644 index 000000000000..a2690b908489 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiTagDescriptionListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * + * @summary lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTagDescriptions.json + */ +async function apiManagementListApiTagDescriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiTagDescription.listByService( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiTagDescriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e2367699a598 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new tool in the API or updates an existing one. + * + * @summary creates a new tool in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTool.json + */ +async function apiManagementCreateApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.createOrUpdate( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/github-rest-api/operations/createIssue", + description: "This is a MCP tool to create an issue in a github repository", + displayName: "createIssue", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolDeleteSample.ts new file mode 100644 index 000000000000..9055191303d7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified tool in the API. + * + * @summary deletes the specified tool in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTool.json + */ +async function apiManagementDeleteApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetEntityTagSample.ts new file mode 100644 index 000000000000..bede0be7a005 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API tool specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTool.json + */ +async function apiManagementHeadApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiTool.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetSample.ts new file mode 100644 index 000000000000..984f99d8be86 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API Tool specified by its identifier. + * + * @summary gets the details of the API Tool specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTool.json + */ +async function apiManagementGetApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.get( + "rg1", + "apimService1", + "github-mcp-api", + "findRepositories", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolListByApiSample.ts new file mode 100644 index 000000000000..fd458f21aa68 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolListByApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the MCP tools for the specified API. + * + * @summary lists a collection of the MCP tools for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTools.json + */ +async function apiManagementListApiTools(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiTool.listByApi("rg1", "apimService1", "github-mcp-api")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiTools(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolUpdateSample.ts new file mode 100644 index 000000000000..a6764f325aaa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiToolUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the tool in the API specified by its identifier. + * + * @summary updates the details of the tool in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiTool.json + */ +async function apiManagementUpdateApiTool(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiTool.update( + "rg1", + "apimService1", + "github-mcp-api", + "createIssue", + { description: "This is updated description", displayName: "createIssue" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiTool(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiUpdateSample.ts new file mode 100644 index 000000000000..1172bc254a70 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the specified API of the API Management service instance. + * + * @summary updates the specified API of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApi.json + */ +async function apiManagementUpdateApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.api.update("rg1", "apimService1", "echo-api", "*", { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6e685fdfd88e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a Api Version Set. + * + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiVersionSet.json + */ +async function apiManagementCreateApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.createOrUpdate("rg1", "apimService1", "api1", { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetDeleteSample.ts new file mode 100644 index 000000000000..51579a6a609b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiVersionSet.json + */ +async function apiManagementDeleteApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiVersionSet.delete("rg1", "apimService1", "a1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetEntityTagSample.ts new file mode 100644 index 000000000000..705bc98c9db5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiVersionSet.json + */ +async function apiManagementHeadApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiVersionSet.getEntityTag("rg1", "apimService1", "vs1"); +} + +async function main(): Promise { + await apiManagementHeadApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetSample.ts new file mode 100644 index 000000000000..948fc03f573e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiVersionSet.json + */ +async function apiManagementGetApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.get("rg1", "apimService1", "vs1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetListByServiceSample.ts new file mode 100644 index 000000000000..e22b545eb7ac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified service instance. + * + * @summary lists a collection of API Version Sets in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiVersionSets.json + */ +async function apiManagementListApiVersionSets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiVersionSet.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiVersionSets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetUpdateSample.ts new file mode 100644 index 000000000000..6b2bd7876063 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiVersionSetUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. + * + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiVersionSet.json + */ +async function apiManagementUpdateApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiVersionSet.update("rg1", "apimService1", "vs1", "*", { + description: "Version configuration", + displayName: "api set 1", + versioningScheme: "Segment", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..72328341c7db --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Wiki for an API or updates an existing one. + * + * @summary creates a new Wiki for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiWiki.json + */ +async function apiManagementCreateApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiDeleteSample.ts new file mode 100644 index 000000000000..5ca65b2ea817 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Wiki from an API. + * + * @summary deletes the specified Wiki from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiWiki.json + */ +async function apiManagementDeleteApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main(): Promise { + await apiManagementDeleteApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetEntityTagSample.ts new file mode 100644 index 000000000000..df2d67e89597 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiWiki.json + */ +async function apiManagementHeadApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.apiWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main(): Promise { + await apiManagementHeadApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetSample.ts new file mode 100644 index 000000000000..4606824ce4d0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Wiki for an API specified by its identifier. + * + * @summary gets the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiWiki.json + */ +async function apiManagementGetApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiUpdateSample.ts new file mode 100644 index 000000000000..6a876c151e73 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikiUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Wiki for an API specified by its identifier. + * + * @summary updates the details of the Wiki for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateApiWiki.json + */ +async function apiManagementUpdateApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.apiWiki.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikisListSample.ts new file mode 100644 index 000000000000..4de9edee4b20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/apiWikisListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the wikis for an API specified by its identifier. + * + * @summary gets the wikis for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiWikis.json + */ +async function apiManagementListApiWikis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.apiWikis.list( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiWikis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..4374fb346f6a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates Authorization Access Policy. + * + * @summary creates or updates Authorization Access Policy. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAccessPolicy.json + */ +async function apiManagementCreateAuthorizationAccessPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + { + appIds: ["d5f04bb0-ba78-4878-a43e-35a0b74fe315"], + objectId: "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + tenantId: "13932a0d-5c63-4d37-901d-1df9c97722ff", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyDeleteSample.ts new file mode 100644 index 000000000000..62ec6aae8486 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific access policy from the Authorization. + * + * @summary deletes specific access policy from the Authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationAccessPolicy.json + */ +async function apiManagementDeleteAuthorizationAccessPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationAccessPolicy.delete( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyGetSample.ts new file mode 100644 index 000000000000..005b9aa93ff4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the authorization access policy specified by its identifier. + * + * @summary gets the details of the authorization access policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationAccessPolicy.json + */ +async function apiManagementGetAuthorizationAccessPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationAccessPolicy.get( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetAuthorizationAccessPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts new file mode 100644 index 000000000000..13fad840905e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationAccessPolicyListByAuthorizationSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of authorization access policy defined within a authorization. + * + * @summary lists a collection of authorization access policy defined within a authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationAccessPolicies.json + */ +async function apiManagementListAuthorizationAccessPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationAccessPolicy.listByAuthorization( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListAuthorizationAccessPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationConfirmConsentCodeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationConfirmConsentCodeSample.ts new file mode 100644 index 000000000000..2ba5bada7e94 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationConfirmConsentCodeSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to confirm valid consent code to suppress Authorizations anti-phishing page. + * + * @summary confirm valid consent code to suppress Authorizations anti-phishing page. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + */ +async function apiManagementPostAuthorizationConfirmConsentCodeRequest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorization.confirmConsentCode( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { consentCode: "theconsentcode" }, + ); +} + +async function main(): Promise { + await apiManagementPostAuthorizationConfirmConsentCodeRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6b71b2f80742 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationCreateOrUpdateSample.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates authorization. + * + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADAuthCode.json + */ +async function apiManagementCreateAuthorizationAADAuthCode(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + "authz2", + { authorizationType: "OAuth2", oAuth2GrantType: "AuthorizationCode" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization. + * + * @summary creates or updates authorization. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationAADClientCred.json + */ +async function apiManagementCreateAuthorizationAADClientCred(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.createOrUpdate( + "rg1", + "apimService1", + "aadwithclientcred", + "authz1", + { + authorizationType: "OAuth2", + oAuth2GrantType: "AuthorizationCode", + parameters: { clientId: "clientsecretid", clientSecret: "clientsecretvalue" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateAuthorizationAADAuthCode(); + await apiManagementCreateAuthorizationAADClientCred(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationDeleteSample.ts new file mode 100644 index 000000000000..ab82c84696ab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Authorization from the Authorization provider. + * + * @summary deletes specific Authorization from the Authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorization.json + */ +async function apiManagementDeleteAuthorization(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorization.delete("rg1", "apimService1", "aadwithauthcode", "authz1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteAuthorization(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationGetSample.ts new file mode 100644 index 000000000000..312ab12788b0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the authorization specified by its identifier. + * + * @summary gets the details of the authorization specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorization.json + */ +async function apiManagementGetAuthorization(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorization.get("rg1", "apimService1", "aadwithauthcode", "authz1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetAuthorization(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationListByAuthorizationProviderSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationListByAuthorizationProviderSample.ts new file mode 100644 index 000000000000..60ab37f47a2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationListByAuthorizationProviderSample.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. + * + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsAuthCode.json + */ +async function apiManagementListAuthorizationsAuthCode(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorization.listByAuthorizationProvider( + "rg1", + "apimService1", + "aadwithauthcode", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a authorization provider. + * + * @summary lists a collection of authorization providers defined within a authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationsClientCred.json + */ +async function apiManagementListAuthorizationsClientCred(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorization.listByAuthorizationProvider( + "rg1", + "apimService1", + "aadwithclientcred", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListAuthorizationsAuthCode(); + await apiManagementListAuthorizationsClientCred(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationLoginLinksPostSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationLoginLinksPostSample.ts new file mode 100644 index 000000000000..2f2ac5647b62 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationLoginLinksPostSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets authorization login links. + * + * @summary gets authorization login links. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationLoginRequest.json + */ +async function apiManagementGetAuthorizationLoginRequest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationLoginLinks.post( + "rg1", + "apimService1", + "aadwithauthcode", + "authz1", + { postLoginRedirectUrl: "https://www.bing.com/" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetAuthorizationLoginRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7ace96bdbc33 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderCreateOrUpdateSample.ts @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCode.json + */ +async function apiManagementCreateAuthorizationProviderAADAuthCode(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithauthcode", + { + displayName: "aadwithauthcode", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "clientsecretid", + clientSecret: "clientsecretvalue", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault.json + */ +async function apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithkeyvault", + { + displayName: "Azure AD with Key Vault", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "53790825-fdd3-4b80-bc7a-4c3aaf25801d", + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + keyVault: { secretIdentifier: "https://my.vault.azure.net/secrets/clientSecret" }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderAADClientCred.json + */ +async function apiManagementCreateAuthorizationProviderAADClientCred(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "aadwithclientcred", + { + displayName: "aadwithclientcred", + identityProvider: "aad", + oauth2: { + grantTypes: { + authorizationCode: { + resourceUri: "https://graph.microsoft.com", + scopes: "User.Read.All Group.Read.All", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + */ +async function apiManagementCreateAuthorizationProviderGenericOAuth2(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "eventbrite", + { + displayName: "eventbrite", + identityProvider: "oauth2", + oauth2: { + grantTypes: { + authorizationCode: { + authorizationUrl: "https://www.eventbrite.com/oauth/authorize", + clientId: "clientid", + clientSecret: "clientsecretvalue", + refreshUrl: "https://www.eventbrite.com/oauth/token", + tokenUrl: "https://www.eventbrite.com/oauth/token", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates authorization provider. + * + * @summary creates or updates authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationProviderOOBGoogle.json + */ +async function apiManagementCreateAuthorizationProviderOOBGoogle(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.createOrUpdate( + "rg1", + "apimService1", + "google", + { + displayName: "google", + identityProvider: "google", + oauth2: { + grantTypes: { + authorizationCode: { + clientId: "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", + clientSecret: "clientsecretvalue", + scopes: + "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", + }, + }, + redirectUrl: + "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateAuthorizationProviderAADAuthCode(); + await apiManagementCreateAuthorizationProviderAADAuthCodeWithKeyVault(); + await apiManagementCreateAuthorizationProviderAADClientCred(); + await apiManagementCreateAuthorizationProviderGenericOAuth2(); + await apiManagementCreateAuthorizationProviderOOBGoogle(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderDeleteSample.ts new file mode 100644 index 000000000000..b77d18679daa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific authorization provider from the API Management service instance. + * + * @summary deletes specific authorization provider from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationProvider.json + */ +async function apiManagementDeleteAuthorizationProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationProvider.delete("rg1", "apimService1", "aadwithauthcode", "*"); +} + +async function main(): Promise { + await apiManagementDeleteAuthorizationProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderGetSample.ts new file mode 100644 index 000000000000..9d68374aa7a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the authorization provider specified by its identifier. + * + * @summary gets the details of the authorization provider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationProvider.json + */ +async function apiManagementGetAuthorizationProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.get("rg1", "apimService1", "aadwithauthcode"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetAuthorizationProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderListByServiceSample.ts new file mode 100644 index 000000000000..99190c1f9b85 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of authorization providers defined within a service instance. + * + * @summary lists a collection of authorization providers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationProviders.json + */ +async function apiManagementListAuthorizationProviders(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListAuthorizationProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderRefreshSecretSample.ts new file mode 100644 index 000000000000..9217675d64f6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationProviderRefreshSecretSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refreshes the Key Vault reference secret for the specified authorization provider. + * + * @summary refreshes the Key Vault reference secret for the specified authorization provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshAuthorizationProviderSecret.json + */ +async function apiManagementAuthorizationProviderRefreshSecret(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationProvider.refreshSecret( + "rg1", + "apimService1", + "aadwithkeyvault", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementAuthorizationProviderRefreshSecret(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerCreateOrUpdateSample.ts new file mode 100644 index 000000000000..34102a21cc3a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerCreateOrUpdateSample.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates new authorization server or updates an existing authorization server. + * + * @summary creates new authorization server or updates an existing authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAuthorizationServer.json + */ +async function apiManagementCreateAuthorizationServer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.createOrUpdate( + "rg1", + "apimService1", + "newauthServer", + { + description: "test server", + authorizationEndpoint: "https://www.contoso.com/oauth2/auth", + authorizationMethods: ["GET"], + bearerTokenSendingMethods: ["authorizationHeader"], + clientId: "1", + clientRegistrationEndpoint: "https://www.contoso.com/apps", + clientSecret: "2", + defaultScope: "read write", + displayName: "test2", + grantTypes: ["authorizationCode", "implicit"], + resourceOwnerPassword: "pwd", + resourceOwnerUsername: "un", + supportState: true, + tokenEndpoint: "https://www.contoso.com/oauth2/token", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerDeleteSample.ts new file mode 100644 index 000000000000..438e2bb7f83a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific authorization server instance. + * + * @summary deletes specific authorization server instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteAuthorizationServer.json + */ +async function apiManagementDeleteAuthorizationServer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationServer.delete("rg1", "apimService1", "newauthServer2", "*"); +} + +async function main(): Promise { + await apiManagementDeleteAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetEntityTagSample.ts new file mode 100644 index 000000000000..94ef98eda885 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * + * @summary gets the entity state (Etag) version of the authorizationServer specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadAuthorizationServer.json + */ +async function apiManagementHeadAuthorizationServer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.authorizationServer.getEntityTag("rg1", "apimService1", "newauthServer2"); +} + +async function main(): Promise { + await apiManagementHeadAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetSample.ts new file mode 100644 index 000000000000..951e6be2f130 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the authorization server specified by its identifier. + * + * @summary gets the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetAuthorizationServer.json + */ +async function apiManagementGetAuthorizationServer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.get("rg1", "apimService1", "newauthServer2"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListByServiceSample.ts new file mode 100644 index 000000000000..d991a9e0851d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of authorization servers defined within a service instance. + * + * @summary lists a collection of authorization servers defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListAuthorizationServers.json + */ +async function apiManagementListAuthorizationServers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.authorizationServer.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListAuthorizationServers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListSecretsSample.ts new file mode 100644 index 000000000000..c7c282b5d683 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerListSecretsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the client secret details of the authorization server. + * + * @summary gets the client secret details of the authorization server. + * x-ms-original-file: 2025-09-01-preview/ApiManagementAuthorizationServerListSecrets.json + */ +async function apiManagementAuthorizationServerListSecrets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.listSecrets( + "rg1", + "apimService1", + "newauthServer2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementAuthorizationServerListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerUpdateSample.ts new file mode 100644 index 000000000000..4a345e08b153 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/authorizationServerUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the authorization server specified by its identifier. + * + * @summary updates the details of the authorization server specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateAuthorizationServer.json + */ +async function apiManagementUpdateAuthorizationServer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.authorizationServer.update( + "rg1", + "apimService1", + "newauthServer", + "*", + { + clientId: "update", + clientSecret: "updated", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateAuthorizationServer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendCreateOrUpdateSample.ts new file mode 100644 index 000000000000..fec249d2f5a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendCreateOrUpdateSample.ts @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagamentCreateBackendWithCustomAssignedCertificate_Thumbprints.json + */ +async function apiManagementCreateBackendCustomAssignedCertificateThumbprint(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverCertificateThumbprints: ["1365083bae61ee876fc26850b825d05d3eb2e503"], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendProxyBackend.json + */ +async function apiManagementCreateBackendProxyBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "proxybackend", { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { "x-my-1": ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] }, + }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendServiceFabric.json + */ +async function apiManagementCreateBackendServiceFabric(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "sfbackend", { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1", + }, + ], + }, + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithAzureRegion.json + */ +async function apiManagementCreateBackendWithAzureRegion(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "azurebackend", { + azureRegion: "northeurope", + url: "https://backendname2644/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCarbonAwareLoadBalancer.json + */ +async function apiManagementCreateBackendWithCarbonAwareLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "carbonawareloadbalancerbackend", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sustainable-backend-europe-north", + preferredCarbonEmission: "Medium", + priority: 1, + weight: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + priority: 1, + weight: 1, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithCustomAssignedCertificate_X509Names.json + */ +async function apiManagementCreateBackendCustomAssignedCertificateX509Names(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate("rg1", "apimService1", "cabackend", { + description: "Custom Assigned certificate Example", + tls: { + serverX509Names: [{ name: "*.badssl.com" }], + validateCertificateChain: true, + validateCertificateName: true, + }, + url: "https://self-signed.badssl.com/", + protocol: "http", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithPriorityBasedLoadBalancer.json + */ +async function apiManagementCreateBackendWithPriorityBasedLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "priority-based-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + priority: 1, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-3", + priority: 2, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-4", + priority: 2, + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithSimpleLoadBalancer.json + */ +async function apiManagementCreateBackendWithSimpleLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "simple-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + }, + ], + }, + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateBackendWithWeightedLoadBalancer.json + */ +async function apiManagementCreateBackendWithWeightedLoadBalancer(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.createOrUpdate( + "rg1", + "apimService1", + "weighted-load-balancer", + { + typePropertiesType: "Pool", + pool: { + services: [ + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-1", + weight: 75, + }, + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/backend-2", + weight: 25, + }, + ], + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateBackendCustomAssignedCertificateThumbprint(); + await apiManagementCreateBackendProxyBackend(); + await apiManagementCreateBackendServiceFabric(); + await apiManagementCreateBackendWithAzureRegion(); + await apiManagementCreateBackendWithCarbonAwareLoadBalancer(); + await apiManagementCreateBackendCustomAssignedCertificateX509Names(); + await apiManagementCreateBackendWithPriorityBasedLoadBalancer(); + await apiManagementCreateBackendWithSimpleLoadBalancer(); + await apiManagementCreateBackendWithWeightedLoadBalancer(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendDeleteSample.ts new file mode 100644 index 000000000000..64d94822c3d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteBackend.json + */ +async function apiManagementDeleteBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.delete("rg1", "apimService1", "sfbackend", "*"); +} + +async function main(): Promise { + await apiManagementDeleteBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetEntityTagSample.ts new file mode 100644 index 000000000000..1d35d5551774 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadBackend.json + */ +async function apiManagementHeadBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.getEntityTag("rg1", "apimService1", "sfbackend"); +} + +async function main(): Promise { + await apiManagementHeadBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetSample.ts new file mode 100644 index 000000000000..7c96c5fc5bae --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetBackend.json + */ +async function apiManagementGetBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.get("rg1", "apimService1", "sfbackend"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendListByServiceSample.ts new file mode 100644 index 000000000000..54cafc5d0487 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of backends in the specified service instance. + * + * @summary lists a collection of backends in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListBackends.json + */ +async function apiManagementListBackends(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.backend.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListBackends(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendReconnectSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendReconnectSample.ts new file mode 100644 index 000000000000..cdd6e04d1459 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendReconnectSample.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * + * @summary notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + * x-ms-original-file: 2025-09-01-preview/ApiManagementBackendReconnect.json + */ +async function apiManagementBackendReconnect(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.backend.reconnect("rg1", "apimService1", "proxybackend", { + parameters: { after: "PT3S" }, + }); +} + +async function main(): Promise { + await apiManagementBackendReconnect(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendUpdateSample.ts new file mode 100644 index 000000000000..fbe21088be34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/backendUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing backend. + * + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateBackend.json + */ +async function apiManagementUpdateBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.backend.update("rg1", "apimService1", "proxybackend", "*", { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheCreateOrUpdateSample.ts new file mode 100644 index 000000000000..779a85778fc5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates an External Cache to be used in Api Management instance. + * + * @summary creates or updates an External Cache to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCache.json + */ +async function apiManagementCreateCache(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.createOrUpdate("rg1", "apimService1", "c1", { + description: "Redis cache instances in West India", + connectionString: "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + resourceId: + "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + useFromLocation: "default", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheDeleteSample.ts new file mode 100644 index 000000000000..c4fcde49b4c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Cache. + * + * @summary deletes specific Cache. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCache.json + */ +async function apiManagementDeleteCache(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.cache.delete("rg1", "apimService1", "southindia", "*"); +} + +async function main(): Promise { + await apiManagementDeleteCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetEntityTagSample.ts new file mode 100644 index 000000000000..88606e6e03a0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Cache specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCache.json + */ +async function apiManagementHeadCache(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.cache.getEntityTag("rg1", "apimService1", "default"); +} + +async function main(): Promise { + await apiManagementHeadCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetSample.ts new file mode 100644 index 000000000000..37ff302ba48c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Cache specified by its identifier. + * + * @summary gets the details of the Cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCache.json + */ +async function apiManagementGetCache(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.get("rg1", "apimService1", "c1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheListByServiceSample.ts new file mode 100644 index 000000000000..6524dc396986 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of all external Caches in the specified service instance. + * + * @summary lists a collection of all external Caches in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCaches.json + */ +async function apiManagementListCaches(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.cache.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListCaches(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheUpdateSample.ts new file mode 100644 index 000000000000..d71883f38e02 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/cacheUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the cache specified by its identifier. + * + * @summary updates the details of the cache specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateCache.json + */ +async function apiManagementUpdateCache(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.cache.update("rg1", "apimService1", "c1", "*", { + useFromLocation: "westindia", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateCache(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7fe9f55ebaa5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateCreateOrUpdateSample.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificate.json + */ +async function apiManagementCreateCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "tempcert", { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateCertificateWithKeyVault.json + */ +async function apiManagementCreateCertificateWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.createOrUpdate("rg1", "apimService1", "templateCertkv", { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateCertificate(); + await apiManagementCreateCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateDeleteSample.ts new file mode 100644 index 000000000000..e33da89ded58 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteCertificate.json + */ +async function apiManagementDeleteCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.certificate.delete("rg1", "apimService1", "tempcert", "*"); +} + +async function main(): Promise { + await apiManagementDeleteCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetEntityTagSample.ts new file mode 100644 index 000000000000..db167955e2f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadCertificate.json + */ +async function apiManagementHeadCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.certificate.getEntityTag("rg1", "apimService1", "templateCert1"); +} + +async function main(): Promise { + await apiManagementHeadCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetSample.ts new file mode 100644 index 000000000000..9d736e20a8c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificate.json + */ +async function apiManagementGetCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get("rg1", "apimService1", "templateCert1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetCertificateWithKeyVault.json + */ +async function apiManagementGetCertificateWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.get("rg1", "apimService1", "templateCertkv"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetCertificate(); + await apiManagementGetCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateListByServiceSample.ts new file mode 100644 index 000000000000..c2e2ea2fd83a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of all certificates in the specified service instance. + * + * @summary lists a collection of all certificates in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListCertificates.json + */ +async function apiManagementListCertificates(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.certificate.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListCertificates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateRefreshSecretSample.ts new file mode 100644 index 000000000000..a8dfa331c664 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/certificateRefreshSecretSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshCertificate.json + */ +async function apiManagementRefreshCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.certificate.refreshSecret("rg1", "apimService1", "templateCertkv"); + console.log(result); +} + +async function main(): Promise { + await apiManagementRefreshCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8196c46ef5d2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a client application. + * + * @summary creates or Updates a client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplication.json + */ +async function apiManagementCreateProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.createOrUpdate("rg1", "apimService1", "testAppId", { + description: "This is just an example application", + displayName: "Test Application", + ownerId: "/users/userId", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationDeleteSample.ts new file mode 100644 index 000000000000..d1ced2fdc146 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete client application. + * + * @summary delete client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplication.json + */ +async function apiManagementDeleteProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.delete("rg1", "apimService1", "testAppId"); +} + +async function main(): Promise { + await apiManagementDeleteProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetEntityTagSample.ts new file mode 100644 index 000000000000..5cb31a7f4b20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadClientApplication.json + */ +async function apiManagementHeadProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplication.getEntityTag("rg1", "apimService1", "testAppId"); +} + +async function main(): Promise { + await apiManagementHeadProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetSample.ts new file mode 100644 index 000000000000..1789de792860 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the client application specified by its identifier. + * + * @summary gets the details of the client application specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplication.json + */ +async function apiManagementGetClientApplication(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.get("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetClientApplication(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListByServiceSample.ts new file mode 100644 index 000000000000..1b8652e780a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of client applications in the specified service instance. + * + * @summary lists a collection of client applications in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplications.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplication.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListSecretsSample.ts new file mode 100644 index 000000000000..59a906d5c8a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationListSecretsSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrived client application secrets. + * + * @summary retrived client application secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationSecrets.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplication.listSecrets("rg1", "apimService1", "testAppId"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkCreateSample.ts new file mode 100644 index 000000000000..5c939659c2b9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkCreateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an Product to the specified Client Application via link. + * + * @summary adds an Product to the specified Client Application via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateClientApplicationProductLink.json + */ +async function apiManagementCreateClientApplicationProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.create( + "rg1", + "apimService1", + "testAppId", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkDeleteSample.ts new file mode 100644 index 000000000000..d628c0bf88ea --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Product from the specified client application. + * + * @summary deletes the specified Product from the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteClientApplicationProductLink.json + */ +async function apiManagementDeleteClientApplicationProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.clientApplicationProductLink.delete("rg1", "apimService1", "testAppId", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteClientApplicationProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkGetSample.ts new file mode 100644 index 000000000000..e4a8524cef9b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the product link for the client application. + * + * @summary gets the product link for the client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetClientApplicationProductLink.json + */ +async function apiManagementGetProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.clientApplicationProductLink.get( + "rg1", + "apimService1", + "testAppId", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkListByClientApplicationsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkListByClientApplicationsSample.ts new file mode 100644 index 000000000000..21d1a4bf28b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/clientApplicationProductLinkListByClientApplicationsSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of product links associated with the specified client application. + * + * @summary lists a collection of product links associated with the specified client application. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListClientApplicationProductLinks.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.clientApplicationProductLink.listByClientApplications( + "rg1", + "apimService1", + "testAppId", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemCreateOrUpdateSample.ts new file mode 100644 index 000000000000..5f85953fcbc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemCreateOrUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new developer portal's content item specified by the provided content type. + * + * @summary creates a new developer portal's content item specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentTypeContentItem.json + */ +async function apiManagementCreateContentTypeContentItem(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.createOrUpdate( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + { + properties: { + en_us: { + description: "Short story about the company.", + documentId: "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + keywords: "company, about", + permalink: "/about", + title: "About", + }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemDeleteSample.ts new file mode 100644 index 000000000000..2e4d61fcd580 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the specified developer portal's content item. + * + * @summary removes the specified developer portal's content item. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentTypeContentItem.json + */ +async function apiManagementDeleteContentTypeContentItem(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentItem.delete( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetEntityTagSample.ts new file mode 100644 index 000000000000..b30f5d115c0c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * + * @summary returns the entity state (ETag) version of the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadContentTypeContentItem.json + */ +async function apiManagementHeadContentTypeContentItem(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentItem.getEntityTag( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + ); +} + +async function main(): Promise { + await apiManagementHeadContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetSample.ts new file mode 100644 index 000000000000..8cfec995ba17 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the developer portal's content item specified by its identifier. + * + * @summary returns the developer portal's content item specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentTypeContentItem.json + */ +async function apiManagementGetContentTypeContentItem(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentItem.get( + "rg1", + "apimService1", + "page", + "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetContentTypeContentItem(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemListByServiceSample.ts new file mode 100644 index 000000000000..cc7c5471073c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentItemListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists developer portal's content items specified by the provided content type. + * + * @summary lists developer portal's content items specified by the provided content type. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypeContentItems.json + */ +async function apiManagementListContentTypeContentItems(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.contentItem.listByService("rg1", "apimService1", "page")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListContentTypeContentItems(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeCreateOrUpdateSample.ts new file mode 100644 index 000000000000..63bbe360e311 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeCreateOrUpdateSample.ts @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * + * @summary creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateContentType.json + */ +async function apiManagementCreateContentType(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.createOrUpdate("rg1", "apimService1", "page", { + namePropertiesName: "Page", + schema: { + additionalProperties: false, + properties: { + en_us: { + type: "object", + additionalProperties: false, + properties: { + description: { + type: "string", + description: "Page description. This property gets included in SEO attributes.", + indexed: true, + title: "Description", + }, + documentId: { + type: "string", + description: "Reference to page content document.", + title: "Document ID", + }, + keywords: { + type: "string", + description: "Page keywords. This property gets included in SEO attributes.", + indexed: true, + title: "Keywords", + }, + permalink: { + type: "string", + description: "Page permalink, e.g. '/about'.", + indexed: true, + title: "Permalink", + }, + title: { + type: "string", + description: "Page title. This property gets included in SEO attributes.", + indexed: true, + title: "Title", + }, + }, + required: ["title", "permalink", "documentId"], + }, + }, + }, + description: "A regular page", + version: "1.0.0", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeDeleteSample.ts new file mode 100644 index 000000000000..bba35e284463 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * + * @summary removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteContentType.json + */ +async function apiManagementDeleteContentType(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.contentType.delete("rg1", "apimService1", "page", "*"); +} + +async function main(): Promise { + await apiManagementDeleteContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeGetSample.ts new file mode 100644 index 000000000000..246731f2467f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * + * @summary gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetContentType.json + */ +async function apiManagementGetContentType(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.contentType.get("rg1", "apimService1", "page"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetContentType(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeListByServiceSample.ts new file mode 100644 index 000000000000..17e8ae824d21 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/contentTypeListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * + * @summary lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListContentTypes.json + */ +async function apiManagementListContentTypes(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.contentType.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListContentTypes(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..c35a054d48b2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or Update Delegation settings. + * + * @summary create or Update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutDelegation.json + */ +async function apiManagementPortalSettingsUpdateDelegation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.createOrUpdate( + "rg1", + "apimService1", + { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetEntityTagSample.ts new file mode 100644 index 000000000000..83e0b638ae6f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the DelegationSettings. + * + * @summary gets the entity state (Etag) version of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDelegationSettings.json + */ +async function apiManagementHeadDelegationSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.delegationSettings.getEntityTag("rg1", "apimService1"); +} + +async function main(): Promise { + await apiManagementHeadDelegationSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetSample.ts new file mode 100644 index 000000000000..6cf2b57fe667 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get Delegation Settings for the Portal. + * + * @summary get Delegation Settings for the Portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetDelegation.json + */ +async function apiManagementPortalSettingsGetDelegation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsGetDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsListSecretsSample.ts new file mode 100644 index 000000000000..6095a85092d1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsListSecretsSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the secret validation key of the DelegationSettings. + * + * @summary gets the secret validation key of the DelegationSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsPortalSettingsValidationKey.json + */ +async function apiManagementListSecretsPortalSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.delegationSettings.listSecrets("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListSecretsPortalSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsUpdateSample.ts new file mode 100644 index 000000000000..3a781b6b656c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/delegationSettingsUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update Delegation settings. + * + * @summary update Delegation settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateDelegation.json + */ +async function apiManagementPortalSettingsUpdateDelegation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.delegationSettings.update("rg1", "apimService1", "*", { + subscriptions: { enabled: true }, + url: "http://contoso.com/delegation", + userRegistration: { enabled: true }, + validationKey: "", + }); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateDelegation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesGetByNameSample.ts new file mode 100644 index 000000000000..7d1947a02a91 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesGetByNameSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get soft-deleted Api Management Service by name. + * + * @summary get soft-deleted Api Management Service by name. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDeletedServiceByName.json + */ +async function apiManagementGetDeletedServiceByName(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.getByName("westus", "apimService3"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetDeletedServiceByName(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesListBySubscriptionSample.ts new file mode 100644 index 000000000000..3ff30ef8d91e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesListBySubscriptionSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all soft-deleted services available for undelete for the given subscription. + * + * @summary lists all soft-deleted services available for undelete for the given subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesListBySubscription.json + */ +async function apiManagementDeletedServicesListBySubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.deletedServices.listBySubscription()) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementDeletedServicesListBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesPurgeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesPurgeSample.ts new file mode 100644 index 000000000000..ce7132bf595e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/deletedServicesPurgeSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to purges Api Management Service (deletes it with no option to undelete). + * + * @summary purges Api Management Service (deletes it with no option to undelete). + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletedServicesPurge.json + */ +async function apiManagementDeletedServicesPurge(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.deletedServices.purge("westus", "apimService3"); + console.log(result); +} + +async function main(): Promise { + await apiManagementDeletedServicesPurge(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticCreateOrUpdateSample.ts new file mode 100644 index 000000000000..eafb4167d15e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticCreateOrUpdateSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. + * + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDiagnostic.json + */ +async function apiManagementCreateDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.createOrUpdate( + "rg1", + "apimService1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticDeleteSample.ts new file mode 100644 index 000000000000..52d8b79d332b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDiagnostic.json + */ +async function apiManagementDeleteDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.diagnostic.delete("rg1", "apimService1", "applicationinsights", "*"); +} + +async function main(): Promise { + await apiManagementDeleteDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetEntityTagSample.ts new file mode 100644 index 000000000000..378c6a605a3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDiagnostic.json + */ +async function apiManagementHeadDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.diagnostic.getEntityTag("rg1", "apimService1", "applicationinsights"); +} + +async function main(): Promise { + await apiManagementHeadDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetSample.ts new file mode 100644 index 000000000000..e059b49798a0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDiagnostic.json + */ +async function apiManagementGetDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.get("rg1", "apimService1", "applicationinsights"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticListByServiceSample.ts new file mode 100644 index 000000000000..bea7dae99a7a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all diagnostics of the API Management service instance. + * + * @summary lists all diagnostics of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDiagnostics.json + */ +async function apiManagementListDiagnostics(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.diagnostic.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticUpdateSample.ts new file mode 100644 index 000000000000..c76670fb3c1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/diagnosticUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. + * + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDiagnostic.json + */ +async function apiManagementUpdateDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.diagnostic.update("rg1", "apimService1", "applicationinsights", "*", { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..871f0415779a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Documentation or updates an existing one. + * + * @summary creates a new Documentation or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateDocumentation.json + */ +async function apiManagementCreateDocumentation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { content: "content", title: "Title" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationDeleteSample.ts new file mode 100644 index 000000000000..a72ebc9ffb47 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Documentation from an API. + * + * @summary deletes the specified Documentation from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteDocumentation.json + */ +async function apiManagementDeleteDocumentation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.documentation.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main(): Promise { + await apiManagementDeleteDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetEntityTagSample.ts new file mode 100644 index 000000000000..6f988600db65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Documentation by its identifier. + * + * @summary gets the entity state (Etag) version of the Documentation by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadDocumentation.json + */ +async function apiManagementHeadDocumentation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.documentation.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main(): Promise { + await apiManagementHeadDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetSample.ts new file mode 100644 index 000000000000..fe5188e690af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Documentation specified by its identifier. + * + * @summary gets the details of the Documentation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetDocumentation.json + */ +async function apiManagementGetDocumentation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationListByServiceSample.ts new file mode 100644 index 000000000000..6e356e8cc4dd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Documentations of the API Management service instance. + * + * @summary lists all Documentations of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListDocumentations.json + */ +async function apiManagementListApis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.documentation.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationUpdateSample.ts new file mode 100644 index 000000000000..7cae60ed368b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/documentationUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Documentation for an API specified by its identifier. + * + * @summary updates the details of the Documentation for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateDocumentation.json + */ +async function apiManagementUpdateDocumentation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.documentation.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { content: "content updated", title: "Title updated" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateDocumentation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateCreateOrUpdateSample.ts new file mode 100644 index 000000000000..d72f8ae08a18 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an Email Template. + * + * @summary updates an Email Template. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTemplate.json + */ +async function apiManagementCreateTemplate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.createOrUpdate( + "rg1", + "apimService1", + "newIssueNotificationMessage", + { subject: "Your request for $IssueName was successfully received." }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateDeleteSample.ts new file mode 100644 index 000000000000..d85f3822f15a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to reset the Email Template to default template provided by the API Management service instance. + * + * @summary reset the Email Template to default template provided by the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTemplate.json + */ +async function apiManagementDeleteTemplate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.emailTemplate.delete("rg1", "apimService1", "newIssueNotificationMessage", "*"); +} + +async function main(): Promise { + await apiManagementDeleteTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetEntityTagSample.ts new file mode 100644 index 000000000000..faaca3da2866 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the email template specified by its identifier. + * + * @summary gets the entity state (Etag) version of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadEmailTemplate.json + */ +async function apiManagementHeadEmailTemplate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.emailTemplate.getEntityTag("rg1", "apimService1", "newIssueNotificationMessage"); +} + +async function main(): Promise { + await apiManagementHeadEmailTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetSample.ts new file mode 100644 index 000000000000..96459558ea4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the email template specified by its identifier. + * + * @summary gets the details of the email template specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTemplate.json + */ +async function apiManagementGetTemplate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.get( + "rg1", + "apimService1", + "newIssueNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateListByServiceSample.ts new file mode 100644 index 000000000000..7b932ae121ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all email templates + * + * @summary gets all email templates + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTemplates.json + */ +async function apiManagementListTemplates(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.emailTemplate.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTemplates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateUpdateSample.ts new file mode 100644 index 000000000000..ac3a4e386d6f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/emailTemplateUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates API Management email template + * + * @summary updates API Management email template + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTemplate.json + */ +async function apiManagementUpdateTemplate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.emailTemplate.update( + "rg1", + "apimService1", + "newIssueNotificationMessage", + "*", + { + body: '\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

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

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n', + subject: "Your request $IssueName was received", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateTemplate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..54bf8423f74f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiCreateOrUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified Gateway. + * + * @summary adds an API to the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayApi.json + */ +async function apiManagementCreateGatewayApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayApi.createOrUpdate("rg1", "apimService1", "gw1", "echo-api", { + parameters: { provisioningState: "created" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiDeleteSample.ts new file mode 100644 index 000000000000..bee9cadfc850 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified Gateway. + * + * @summary deletes the specified API from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayApi.json + */ +async function apiManagementDeleteGatewayApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayApi.delete("rg1", "apimService1", "gw1", "echo-api"); +} + +async function main(): Promise { + await apiManagementDeleteGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiGetEntityTagSample.ts new file mode 100644 index 000000000000..dc753a633863 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Gateway entity. + * + * @summary checks that API entity specified by identifier is associated with the Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayApi.json + */ +async function apiManagementHeadGatewayApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayApi.getEntityTag("rg1", "apimService1", "gw1", "api1"); +} + +async function main(): Promise { + await apiManagementHeadGatewayApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiListByServiceSample.ts new file mode 100644 index 000000000000..9567fc25e8f4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayApiListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the APIs associated with a gateway. + * + * @summary lists a collection of the APIs associated with a gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayApis.json + */ +async function apiManagementListGatewayApis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayApi.listByService("rg1", "apimService1", "gw1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts new file mode 100644 index 000000000000..2a8c11727021 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assign Certificate entity to Gateway entity as Certificate Authority. + * + * @summary assign Certificate entity to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayCertificateAuthority.json + */ +async function apiManagementCreateGatewayCertificateAuthority(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.createOrUpdate( + "rg1", + "apimService1", + "gw1", + "cert1", + { isTrusted: false }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityDeleteSample.ts new file mode 100644 index 000000000000..60bd119b6402 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to remove relationship between Certificate Authority and Gateway entity. + * + * @summary remove relationship between Certificate Authority and Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayCertificateAuthority.json + */ +async function apiManagementDeleteGatewayCertificateAuthority(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayCertificateAuthority.delete("rg1", "apimService1", "gw1", "default", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts new file mode 100644 index 000000000000..e7c9e6e07df1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * + * @summary checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayCertificateAuthority.json + */ +async function apiManagementHeadGatewayCertificateAuthority(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayCertificateAuthority.getEntityTag("rg1", "apimService1", "gw1", "cert1"); +} + +async function main(): Promise { + await apiManagementHeadGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetSample.ts new file mode 100644 index 000000000000..c78d47451c36 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get assigned Gateway Certificate Authority details. + * + * @summary get assigned Gateway Certificate Authority details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayCertificateAuthority.json + */ +async function apiManagementGetGatewayCertificateAuthority(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayCertificateAuthority.get( + "rg1", + "apimService1", + "gw1", + "cert1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGatewayCertificateAuthority(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts new file mode 100644 index 000000000000..70483ac49cc1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCertificateAuthorityListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the collection of Certificate Authorities for the specified Gateway entity. + * + * @summary lists the collection of Certificate Authorities for the specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayCertificateAuthorities.json + */ +async function apiManagementListGatewaycertificateAuthorities(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayCertificateAuthority.listByService( + "rg1", + "apimService1", + "gw1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewaycertificateAuthorities(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCreateOrUpdateSample.ts new file mode 100644 index 000000000000..1ed99e898547 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayCreateOrUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a Gateway to be used in Api Management instance. + * + * @summary creates or updates a Gateway to be used in Api Management instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGateway.json + */ +async function apiManagementCreateGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.createOrUpdate("rg1", "apimService1", "gw1", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayDeleteSample.ts new file mode 100644 index 000000000000..3d177a9c0deb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Gateway. + * + * @summary deletes specific Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGateway.json + */ +async function apiManagementDeleteGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.delete("rg1", "apimService1", "gw1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGenerateTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGenerateTokenSample.ts new file mode 100644 index 000000000000..df2f8fda9951 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGenerateTokenSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the Shared Access Authorization Token for the gateway. + * + * @summary gets the Shared Access Authorization Token for the gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayGenerateToken.json + */ +async function apiManagementGatewayGenerateToken(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.generateToken("rg1", "apimService1", "gw1", { + expiry: new Date("2020-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayGenerateToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetEntityTagSample.ts new file mode 100644 index 000000000000..3baf7b0e3fcc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Gateway specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGateway.json + */ +async function apiManagementHeadGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.getEntityTag("rg1", "apimService1", "mygateway"); +} + +async function main(): Promise { + await apiManagementHeadGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetSample.ts new file mode 100644 index 000000000000..bfa85f127ba0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Gateway specified by its identifier. + * + * @summary gets the details of the Gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGateway.json + */ +async function apiManagementGetGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.get("rg1", "apimService1", "gw1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..26cbb3bf35fe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationCreateOrUpdateSample.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates of updates hostname configuration for a Gateway. + * + * @summary creates of updates hostname configuration for a Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGatewayHostnameConfiguration.json + */ +async function apiManagementCreateGatewayHostnameConfiguration(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.createOrUpdate( + "rg1", + "apimService1", + "gw1", + "default", + { + certificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + hostname: "*", + http2Enabled: true, + negotiateClientCertificate: false, + tls10Enabled: false, + tls11Enabled: false, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationDeleteSample.ts new file mode 100644 index 000000000000..b320eca928d0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified hostname configuration from the specified Gateway. + * + * @summary deletes the specified hostname configuration from the specified Gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGatewayHostnameConfiguration.json + */ +async function apiManagementDeleteGatewayHostnameConfiguration(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayHostnameConfiguration.delete("rg1", "apimService1", "gw1", "default", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts new file mode 100644 index 000000000000..189f8b9dc5d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * + * @summary checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGatewayHostnameConfiguration.json + */ +async function apiManagementHeadGatewayHostnameConfiguration(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gatewayHostnameConfiguration.getEntityTag("rg1", "apimService1", "gw1", "default"); +} + +async function main(): Promise { + await apiManagementHeadGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetSample.ts new file mode 100644 index 000000000000..f49b21fe673a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get details of a hostname configuration + * + * @summary get details of a hostname configuration + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGatewayHostnameConfiguration.json + */ +async function apiManagementGetGatewayHostnameConfiguration(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gatewayHostnameConfiguration.get( + "rg1", + "apimService1", + "gw1", + "default", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGatewayHostnameConfiguration(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts new file mode 100644 index 000000000000..46627034dc87 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayHostnameConfigurationListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the collection of hostname configurations for the specified gateway. + * + * @summary lists the collection of hostname configurations for the specified gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGatewayHostnameConfigurations.json + */ +async function apiManagementListGatewayHostnameConfigurations(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gatewayHostnameConfiguration.listByService( + "rg1", + "apimService1", + "gw1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGatewayHostnameConfigurations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayInvalidateDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayInvalidateDebugCredentialsSample.ts new file mode 100644 index 000000000000..2eceeb888f7a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayInvalidateDebugCredentialsSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to action is invalidating all debug credentials issued for gateway. + * + * @summary action is invalidating all debug credentials issued for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayInvalidateDebugCredentials.json + */ +async function apiManagementGatewayInvalidateDebugCredentials(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.invalidateDebugCredentials("rg1", "apimService1", "gw1"); +} + +async function main(): Promise { + await apiManagementGatewayInvalidateDebugCredentials(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListByServiceSample.ts new file mode 100644 index 000000000000..ff922825ce21 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of gateways registered with service instance. + * + * @summary lists a collection of gateways registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGateways.json + */ +async function apiManagementListGateways(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.gateway.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGateways(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListDebugCredentialsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListDebugCredentialsSample.ts new file mode 100644 index 000000000000..a003c4bf47a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListDebugCredentialsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create new debug credentials for gateway. + * + * @summary create new debug credentials for gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListDebugCredentials.json + */ +async function apiManagementGatewayListDebugCredentials(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listDebugCredentials("rg1", "apimService1", "gw1", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + credentialsExpireAfter: "PT1H", + purposes: ["tracing"], + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayListDebugCredentials(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListKeysSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListKeysSample.ts new file mode 100644 index 000000000000..6754228af5c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListKeysSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves gateway keys. + * + * @summary retrieves gateway keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListKeys.json + */ +async function apiManagementGatewayListKeys(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listKeys("rg1", "apimService1", "gw1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayListKeys(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListTraceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListTraceSample.ts new file mode 100644 index 000000000000..e6acb0b8ede9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayListTraceSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to fetches trace collected by gateway. + * + * @summary fetches trace collected by gateway. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayListTrace.json + */ +async function apiManagementGatewayListTrace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.listTrace("rg1", "apimService1", "gw1", { + traceId: "CrDvXXXXXXXXXXXXXVU3ZA2-1", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementGatewayListTrace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayRegenerateKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayRegenerateKeySample.ts new file mode 100644 index 000000000000..55c2459e93a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayRegenerateKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerates specified gateway key invalidating any tokens created with it. + * + * @summary regenerates specified gateway key invalidating any tokens created with it. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGatewayRegenerateKey.json + */ +async function apiManagementGatewayRegenerateKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.gateway.regenerateKey("rg1", "apimService1", "gwId", { keyType: "primary" }); +} + +async function main(): Promise { + await apiManagementGatewayRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayUpdateSample.ts new file mode 100644 index 000000000000..aed2d5bb2043 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/gatewayUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the gateway specified by its identifier. + * + * @summary updates the details of the gateway specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGateway.json + */ +async function apiManagementUpdateGateway(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.gateway.update("rg1", "apimService1", "gw1", "*", { + description: "my gateway 1", + locationData: { name: "my location" }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateGateway(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaCreateOrUpdateSample.ts new file mode 100644 index 000000000000..ab24a1216981 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaCreateOrUpdateSample.ts @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. + * + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema1.json + */ +async function apiManagementCreateSchema1(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the API Management service instance. + * + * @summary creates new or updates existing specified Schema of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGlobalSchema2.json + */ +async function apiManagementCreateSchema2(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.createOrUpdate("rg1", "apimService1", "schema1", { + description: "sample schema description", + document: { + type: "object", + $id: "https://example.com/person.schema.json", + $schema: "https://json-schema.org/draft/2020-12/schema", + properties: { + age: { + type: "integer", + description: "Age in years which must be equal to or greater than zero.", + minimum: 0, + }, + firstName: { type: "string", description: "The person's first name." }, + lastName: { type: "string", description: "The person's last name." }, + }, + title: "Person", + }, + schemaType: "json", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateSchema1(); + await apiManagementCreateSchema2(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaDeleteSample.ts new file mode 100644 index 000000000000..151dd3377284 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGlobalSchema.json + */ +async function apiManagementDeleteSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.globalSchema.delete("rg1", "apimService1", "schema1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetEntityTagSample.ts new file mode 100644 index 000000000000..5e217b561530 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGlobalSchema.json + */ +async function apiManagementHeadApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.globalSchema.getEntityTag("rg1", "apimService1", "myschema"); +} + +async function main(): Promise { + await apiManagementHeadApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetSample.ts new file mode 100644 index 000000000000..6f908ee016de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema1.json + */ +async function apiManagementGetSchema1(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get("rg1", "apimService1", "schema1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGlobalSchema2.json + */ +async function apiManagementGetSchema2(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.globalSchema.get("rg1", "apimService1", "schema2"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetSchema1(); + await apiManagementGetSchema2(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaListByServiceSample.ts new file mode 100644 index 000000000000..7b20787b18e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/globalSchemaListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of schemas registered with service instance. + * + * @summary lists a collection of schemas registered with service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGlobalSchemas.json + */ +async function apiManagementListSchemas(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.globalSchema.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8b9605bc736c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new resolver in the GraphQL API or updates an existing one. + * + * @summary creates a new resolver in the GraphQL API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolver.json + */ +async function apiManagementCreateGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.createOrUpdate( + "rg1", + "apimService1", + "someAPI", + "newResolver", + { path: "Query/users", description: "A GraphQL Resolver example", displayName: "Query Users" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverDeleteSample.ts new file mode 100644 index 000000000000..8a36c22698ad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified resolver in the GraphQL API. + * + * @summary deletes the specified resolver in the GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolver.json + */ +async function apiManagementDeleteGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.delete( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetEntityTagSample.ts new file mode 100644 index 000000000000..8ccd8481acfb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolver.json + */ +async function apiManagementHeadGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolver.getEntityTag( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetSample.ts new file mode 100644 index 000000000000..64e23ef07109 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the GraphQL API Resolver specified by its identifier. + * + * @summary gets the details of the GraphQL API Resolver specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolver.json + */ +async function apiManagementGetGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.get( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverListByApiSample.ts new file mode 100644 index 000000000000..446a799bbd0e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the resolvers for the specified GraphQL API. + * + * @summary lists a collection of the resolvers for the specified GraphQL API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolvers.json + */ +async function apiManagementListGraphQLApiResolvers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolver.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGraphQLApiResolvers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f24a258b11d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the GraphQL API Resolver level. + * + * @summary creates or updates policy configuration for the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGraphQLApiResolverPolicy.json + */ +async function apiManagementCreateGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.createOrUpdate( + "rg1", + "apimService1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + 'GET/api/users', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyDeleteSample.ts new file mode 100644 index 000000000000..7949cfd58c35 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the GraphQL Api Resolver. + * + * @summary deletes the policy configuration at the GraphQL Api Resolver. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGraphQLApiResolverPolicy.json + */ +async function apiManagementDeleteGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.delete( + "rg1", + "apimService1", + "testapi", + "testResolver", + "policy", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..6fe7eb2863c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGraphQLApiResolverPolicy.json + */ +async function apiManagementHeadGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.graphQLApiResolverPolicy.getEntityTag( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetSample.ts new file mode 100644 index 000000000000..23b0232457c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the GraphQL API Resolver level. + * + * @summary get the policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGraphQLApiResolverPolicy.json + */ +async function apiManagementGetGraphQLApiResolverPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolverPolicy.get( + "rg1", + "apimService1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGraphQLApiResolverPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyListByResolverSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyListByResolverSample.ts new file mode 100644 index 000000000000..959ccfae7e4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverPolicyListByResolverSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the list of policy configuration at the GraphQL API Resolver level. + * + * @summary get the list of policy configuration at the GraphQL API Resolver level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGraphQLApiResolverPolicies.json + */ +async function apiManagementListGraphQLApiResolverPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.graphQLApiResolverPolicy.listByResolver( + "rg1", + "apimService1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGraphQLApiResolverPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverUpdateSample.ts new file mode 100644 index 000000000000..3ac497404139 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/graphQLApiResolverUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the resolver in the GraphQL API specified by its identifier. + * + * @summary updates the details of the resolver in the GraphQL API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGraphQLApiResolver.json + */ +async function apiManagementUpdateGraphQLApiResolver(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.graphQLApiResolver.update( + "rg1", + "apimService1", + "echo-api", + "resolverId", + "*", + { + path: "Query/adminUsers", + description: "A GraphQL Resolver example", + displayName: "Query AdminUsers", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateGraphQLApiResolver(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupCreateOrUpdateSample.ts new file mode 100644 index 000000000000..96f7c7eed703 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupCreateOrUpdateSample.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroup.json + */ +async function apiManagementCreateGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate("rg1", "apimService1", "tempgroup", { + displayName: "temp group", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupExternal.json + */ +async function apiManagementCreateGroupExternal(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.createOrUpdate("rg1", "apimService1", "aadGroup", { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGroup(); + await apiManagementCreateGroupExternal(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupDeleteSample.ts new file mode 100644 index 000000000000..6a7d5d23b8fa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific group of the API Management service instance. + * + * @summary deletes specific group of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroup.json + */ +async function apiManagementDeleteGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.group.delete("rg1", "apimService1", "aadGroup", "*"); +} + +async function main(): Promise { + await apiManagementDeleteGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetEntityTagSample.ts new file mode 100644 index 000000000000..870643398656 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroup.json + */ +async function apiManagementHeadGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.group.getEntityTag("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); +} + +async function main(): Promise { + await apiManagementHeadGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetSample.ts new file mode 100644 index 000000000000..583840ae7c09 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetGroup.json + */ +async function apiManagementGetGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupListByServiceSample.ts new file mode 100644 index 000000000000..b64b1f18cbfb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of groups defined within a service instance. + * + * @summary lists a collection of groups defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroups.json + */ +async function apiManagementListGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.group.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUpdateSample.ts new file mode 100644 index 000000000000..e062ab244782 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the group specified by its identifier. + * + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateGroup.json + */ +async function apiManagementUpdateGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.group.update("rg1", "apimService1", "tempgroup", "*", { + displayName: "temp group", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCheckEntityExistsSample.ts new file mode 100644 index 000000000000..a7cd7065eec3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCheckEntityExistsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadGroupUser.json + */ +async function apiManagementHeadGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.groupUser.checkEntityExists( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", + ); +} + +async function main(): Promise { + await apiManagementHeadGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCreateSample.ts new file mode 100644 index 000000000000..9dd7d1955ac5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserCreateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateGroupUser.json + */ +async function apiManagementCreateGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.groupUser.create( + "rg1", + "apimService1", + "tempgroup", + "59307d350af58404d8a26300", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserDeleteSample.ts new file mode 100644 index 000000000000..21848172a283 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteGroupUser.json + */ +async function apiManagementDeleteGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.groupUser.delete("rg1", "apimService1", "templategroup", "59307d350af58404d8a26300"); +} + +async function main(): Promise { + await apiManagementDeleteGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserListSample.ts new file mode 100644 index 000000000000..5fc7949957da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/groupUserListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListGroupUsers.json + */ +async function apiManagementListGroupUsers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.groupUser.list( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListGroupUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8a1ea103b163 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderCreateOrUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates the IdentityProvider configuration. + * + * @summary creates or Updates the IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateIdentityProvider.json + */ +async function apiManagementCreateIdentityProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.createOrUpdate("rg1", "apimService1", "facebook", { + clientId: "facebookid", + clientSecret: "facebookapplicationsecret", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderDeleteSample.ts new file mode 100644 index 000000000000..e663e4ae0ac2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified identity provider configuration. + * + * @summary deletes the specified identity provider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteIdentityProvider.json + */ +async function apiManagementDeleteIdentityProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.identityProvider.delete("rg1", "apimService1", "aad", "*"); +} + +async function main(): Promise { + await apiManagementDeleteIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetEntityTagSample.ts new file mode 100644 index 000000000000..8eacddeecdcf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the identityProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the identityProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadIdentityProvider.json + */ +async function apiManagementHeadIdentityProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.identityProvider.getEntityTag("rg1", "apimService1", "aadB2C"); +} + +async function main(): Promise { + await apiManagementHeadIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetSample.ts new file mode 100644 index 000000000000..2df45d8db1b0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the configuration details of the identity Provider configured in specified service instance. + * + * @summary gets the configuration details of the identity Provider configured in specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIdentityProvider.json + */ +async function apiManagementGetIdentityProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.get("rg1", "apimService1", "aadB2C"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListByServiceSample.ts new file mode 100644 index 000000000000..7d76d5fd79f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of Identity Provider configured in the specified service instance. + * + * @summary lists a collection of Identity Provider configured in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIdentityProviders.json + */ +async function apiManagementListIdentityProviders(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.identityProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListIdentityProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListSecretsSample.ts new file mode 100644 index 000000000000..5270904f7c22 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderListSecretsSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the client secret details of the Identity Provider. + * + * @summary gets the client secret details of the Identity Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementIdentityProviderListSecrets.json + */ +async function apiManagementIdentityProviderListSecrets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.listSecrets("rg1", "apimService1", "aadB2C"); + console.log(result); +} + +async function main(): Promise { + await apiManagementIdentityProviderListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderUpdateSample.ts new file mode 100644 index 000000000000..576d4fc69395 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/identityProviderUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing IdentityProvider configuration. + * + * @summary updates an existing IdentityProvider configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateIdentityProvider.json + */ +async function apiManagementUpdateIdentityProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.identityProvider.update("rg1", "apimService1", "facebook", "*", { + clientId: "updatedfacebookid", + clientSecret: "updatedfacebooksecret", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateIdentityProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueGetSample.ts new file mode 100644 index 000000000000..5633a1f7d889 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets API Management issue details + * + * @summary gets API Management issue details + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetIssue.json + */ +async function apiManagementGetIssue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.issue.get("rg1", "apimService1", "57d2ef278aa04f0ad01d6cdc"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetIssue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueListByServiceSample.ts new file mode 100644 index 000000000000..a949449e1138 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/issueListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of issues in the specified service instance. + * + * @summary lists a collection of issues in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListIssues.json + */ +async function apiManagementListIssues(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.issue.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListIssues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerCreateOrUpdateSample.ts new file mode 100644 index 000000000000..ce4e8625fbdd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerCreateOrUpdateSample.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateAILogger.json + */ +async function apiManagementCreateAILogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "loggerId", { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateEHLogger.json + */ +async function apiManagementCreateEHLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.createOrUpdate("rg1", "apimService1", "eh1", { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", + }, + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateAILogger(); + await apiManagementCreateEHLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerDeleteSample.ts new file mode 100644 index 000000000000..93fc4995f4ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteLogger.json + */ +async function apiManagementDeleteLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.logger.delete("rg1", "apimService1", "loggerId", "*"); +} + +async function main(): Promise { + await apiManagementDeleteLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetEntityTagSample.ts new file mode 100644 index 000000000000..3871d2ff87cf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadLogger.json + */ +async function apiManagementHeadLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.logger.getEntityTag("rg1", "apimService1", "templateLogger"); +} + +async function main(): Promise { + await apiManagementHeadLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetSample.ts new file mode 100644 index 000000000000..18b9f5f5b0b6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetLogger.json + */ +async function apiManagementGetLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.get("rg1", "apimService1", "templateLogger"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerListByServiceSample.ts new file mode 100644 index 000000000000..c82ccbeb9a42 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of loggers in the specified service instance. + * + * @summary lists a collection of loggers in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListLoggers.json + */ +async function apiManagementListLoggers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.logger.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListLoggers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerUpdateSample.ts new file mode 100644 index 000000000000..5ea311a39dcb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/loggerUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing logger. + * + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateLogger.json + */ +async function apiManagementUpdateLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.logger.update("rg1", "apimService1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueCreateOrUpdateSample.ts new file mode 100644 index 000000000000..9e55d06222dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueCreateOrUpdateSample.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValue.json + */ +async function apiManagementCreateNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop2", { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar"], + value: "propValue", + }); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNamedValueWithKeyVault.json + */ +async function apiManagementCreateNamedValueWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.createOrUpdate("rg1", "apimService1", "testprop6", { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", + }, + secret: true, + tags: ["foo", "bar"], + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateNamedValue(); + await apiManagementCreateNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueDeleteSample.ts new file mode 100644 index 000000000000..021c7c7bcd95 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific named value from the API Management service instance. + * + * @summary deletes specific named value from the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNamedValue.json + */ +async function apiManagementDeleteNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.namedValue.delete("rg1", "apimService1", "testprop2", "*"); +} + +async function main(): Promise { + await apiManagementDeleteNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetEntityTagSample.ts new file mode 100644 index 000000000000..4afafe868cc7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNamedValue.json + */ +async function apiManagementHeadNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.namedValue.getEntityTag("rg1", "apimService1", "testarmTemplateproperties2"); +} + +async function main(): Promise { + await apiManagementHeadNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetSample.ts new file mode 100644 index 000000000000..318f2434c3d0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValue.json + */ +async function apiManagementGetNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get("rg1", "apimService1", "testarmTemplateproperties2"); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNamedValueWithKeyVault.json + */ +async function apiManagementGetNamedValueWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.get("rg1", "apimService1", "testprop6"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetNamedValue(); + await apiManagementGetNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListByServiceSample.ts new file mode 100644 index 000000000000..0fb19005827c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of named values defined within a service instance. + * + * @summary lists a collection of named values defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNamedValues.json + */ +async function apiManagementListNamedValues(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.namedValue.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListNamedValues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListValueSample.ts new file mode 100644 index 000000000000..13eba5aa4988 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueListValueSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementNamedValueListValue.json + */ +async function apiManagementNamedValueListValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.listValue( + "rg1", + "apimService1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementNamedValueListValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueRefreshSecretSample.ts new file mode 100644 index 000000000000..13b3682ea198 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueRefreshSecretSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshNamedValue.json + */ +async function apiManagementRefreshNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.refreshSecret("rg1", "apimService1", "testprop2"); + console.log(result); +} + +async function main(): Promise { + await apiManagementRefreshNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueUpdateSample.ts new file mode 100644 index 000000000000..9ee755d69d53 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/namedValueUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the specific named value. + * + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateNamedValue.json + */ +async function apiManagementUpdateNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.namedValue.update("rg1", "apimService1", "testprop2", "*", { + displayName: "prop3name", + secret: false, + tags: ["foo", "bar2"], + value: "propValue", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByLocationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByLocationSample.ts new file mode 100644 index 000000000000..0c982c8ba2c9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByLocationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatusByLocation.json + */ +async function apiManagementServiceGetNetworkStatusByLocation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByLocation( + "rg1", + "apimService1", + "North Central US", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetNetworkStatusByLocation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByServiceSample.ts new file mode 100644 index 000000000000..2e8eb4eac0b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/networkStatusListByServiceSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * + * @summary gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetNetworkStatus.json + */ +async function apiManagementServiceGetNetworkStatus(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.networkStatus.listByService("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetNetworkStatus(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..9d18376c29bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or Update API Management publisher notification. + * + * @summary create or Update API Management publisher notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotification.json + */ +async function apiManagementCreateNotification(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationGetSample.ts new file mode 100644 index 000000000000..ed04a9a02bef --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetNotification.json + */ +async function apiManagementGetNotification(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notification.get( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationListByServiceSample.ts new file mode 100644 index 000000000000..4740e754bcf2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotifications.json + */ +async function apiManagementListNotifications(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.notification.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListNotifications(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts new file mode 100644 index 000000000000..b6c4c7a4c84b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCheckEntityExistsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientEmail.json + */ +async function apiManagementHeadNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main(): Promise { + await apiManagementHeadNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts new file mode 100644 index 000000000000..41978011ebb2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientEmail.json + */ +async function apiManagementCreateNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "foobar@live.com", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailDeleteSample.ts new file mode 100644 index 000000000000..e13b59f7a2c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientEmail.json + */ +async function apiManagementDeleteNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientEmail.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main(): Promise { + await apiManagementDeleteNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailListByNotificationSample.ts new file mode 100644 index 000000000000..def4f229a831 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientEmailListByNotificationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientEmails.json + */ +async function apiManagementListNotificationRecipientEmails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientEmail.listByNotification( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListNotificationRecipientEmails(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts new file mode 100644 index 000000000000..b34d45a9586c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCheckEntityExistsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadNotificationRecipientUser.json + */ +async function apiManagementHeadNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main(): Promise { + await apiManagementHeadNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e26610e9b7c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateNotificationRecipientUser.json + */ +async function apiManagementCreateNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.createOrUpdate( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserDeleteSample.ts new file mode 100644 index 000000000000..8ea1e0445744 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserDeleteSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteNotificationRecipientUser.json + */ +async function apiManagementDeleteNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.notificationRecipientUser.delete( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main(): Promise { + await apiManagementDeleteNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserListByNotificationSample.ts new file mode 100644 index 000000000000..fc9670cbc741 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/notificationRecipientUserListByNotificationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListNotificationRecipientUsers.json + */ +async function apiManagementListNotificationRecipientUsers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.notificationRecipientUser.listByNotification( + "rg1", + "apimService1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListNotificationRecipientUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts new file mode 100644 index 000000000000..b1b7aec9f59d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the OpenID Connect Provider. + * + * @summary creates or updates the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateOpenIdConnectProvider.json + */ +async function apiManagementCreateOpenIdConnectProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.createOrUpdate( + "rg1", + "apimService1", + "templateOpenIdConnect3", + { + clientId: "oidprovidertemplate3", + clientSecret: "x", + displayName: "templateoidprovider3", + metadataEndpoint: "https://oidprovider-template3.net", + useInApiDocumentation: true, + useInTestConsole: false, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderDeleteSample.ts new file mode 100644 index 000000000000..5bd8788d2e29 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific OpenID Connect Provider of the API Management service instance. + * + * @summary deletes specific OpenID Connect Provider of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteOpenIdConnectProvider.json + */ +async function apiManagementDeleteOpenIdConnectProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.openIdConnectProvider.delete("rg1", "apimService1", "templateOpenIdConnect3", "*"); +} + +async function main(): Promise { + await apiManagementDeleteOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetEntityTagSample.ts new file mode 100644 index 000000000000..82b2e90532e8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * + * @summary gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadOpenIdConnectProvider.json + */ +async function apiManagementHeadOpenIdConnectProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.openIdConnectProvider.getEntityTag("rg1", "apimService1", "templateOpenIdConnect2"); +} + +async function main(): Promise { + await apiManagementHeadOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetSample.ts new file mode 100644 index 000000000000..915a9d458e44 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderGetSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets specific OpenID Connect Provider without secrets. + * + * @summary gets specific OpenID Connect Provider without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOpenIdConnectProvider.json + */ +async function apiManagementGetOpenIdConnectProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.get( + "rg1", + "apimService1", + "templateOpenIdConnect2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListByServiceSample.ts new file mode 100644 index 000000000000..6782cdb77c35 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists of all the OpenId Connect Providers. + * + * @summary lists of all the OpenId Connect Providers. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListOpenIdConnectProviders.json + */ +async function apiManagementListOpenIdConnectProviders(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.openIdConnectProvider.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListOpenIdConnectProviders(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListSecretsSample.ts new file mode 100644 index 000000000000..14b933ed1a8d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderListSecretsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the client secret details of the OpenID Connect Provider. + * + * @summary gets the client secret details of the OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementOpenidConnectProviderListSecrets.json + */ +async function apiManagementOpenidConnectProviderListSecrets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.listSecrets( + "rg1", + "apimService1", + "templateOpenIdConnect2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementOpenidConnectProviderListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderUpdateSample.ts new file mode 100644 index 000000000000..ec76fca3ba28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/openIdConnectProviderUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the specific OpenID Connect Provider. + * + * @summary updates the specific OpenID Connect Provider. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateOpenIdConnectProvider.json + */ +async function apiManagementUpdateOpenIdConnectProvider(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.openIdConnectProvider.update( + "rg1", + "apimService1", + "templateOpenIdConnect2", + "*", + { clientSecret: "updatedsecret", useInApiDocumentation: true, useInTestConsole: false }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateOpenIdConnectProvider(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationListByTagsSample.ts new file mode 100644 index 000000000000..a450599b588b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationListByTagsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of operations associated with tags. + * + * @summary lists a collection of operations associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationsByTags.json + */ +async function apiManagementListApiOperationsByTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.operation.listByTags("rg1", "apimService1", "a1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiOperationsByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationStatusGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationStatusGetSample.ts new file mode 100644 index 000000000000..56281cbdf7da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationStatusGetSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the current status of an async operation. + * + * @summary returns the current status of an async operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationStatus.json + */ +async function getOperationStatus(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.operationStatus.get( + "testLocation", + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + ); + console.log(result); +} + +async function main(): Promise { + await getOperationStatus(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationsResultsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationsResultsGetSample.ts new file mode 100644 index 000000000000..2f341e0beee1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/operationsResultsGetSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns operation results for long running operations executing DELETE or PATCH on the resource. + * + * @summary returns operation results for long running operations executing DELETE or PATCH on the resource. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetOperationResult.json + */ +async function apiManagementGetOperationResult(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.operationsResults.get("westus2", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); +} + +async function main(): Promise { + await apiManagementGetOperationResult(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts new file mode 100644 index 000000000000..34de4827ced9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/outboundNetworkDependenciesEndpointsListByServiceSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the network endpoints of all outbound dependencies of a ApiManagement service. + * + * @summary gets the network endpoints of all outbound dependencies of a ApiManagement service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + */ +async function apiManagementServiceGetOutboundNetworkDependenciesEndpoints(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.outboundNetworkDependenciesEndpoints.listByService( + "rg1", + "apimService1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementServiceGetOutboundNetworkDependenciesEndpoints(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..3b4a78ec14be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyCreateOrUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the global policy configuration of the Api Management service. + * + * @summary creates or updates the global policy configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicy.json + */ +async function apiManagementCreatePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.createOrUpdate("rg1", "apimService1", "policy", { + format: "xml", + value: + "\r\n \r\n \r\n \r\n \r\n \r\n", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreatePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDeleteSample.ts new file mode 100644 index 000000000000..39d5429c51fe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the global policy configuration of the Api Management Service. + * + * @summary deletes the global policy configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicy.json + */ +async function apiManagementDeletePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policy.delete("rg1", "apimService1", "policy", "*"); +} + +async function main(): Promise { + await apiManagementDeletePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDescriptionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDescriptionListByServiceSample.ts new file mode 100644 index 000000000000..78e60e569422 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyDescriptionListByServiceSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all policy descriptions. + * + * @summary lists all policy descriptions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyDescriptions.json + */ +async function apiManagementListPolicyDescriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyDescription.listByService("rg1", "apimService1", { + scope: "Api", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementListPolicyDescriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentCreateOrUpdateSample.ts new file mode 100644 index 000000000000..fd7ab49fec1f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a policy fragment. + * + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyFragment.json + */ +async function apiManagementCreatePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.createOrUpdate( + "rg1", + "apimService1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreatePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentDeleteSample.ts new file mode 100644 index 000000000000..f0687be5245c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyFragment.json + */ +async function apiManagementDeletePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyFragment.delete("rg1", "apimService1", "policyFragment1", "*"); +} + +async function main(): Promise { + await apiManagementDeletePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetEntityTagSample.ts new file mode 100644 index 000000000000..4af8189c403e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyFragment.json + */ +async function apiManagementHeadPolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyFragment.getEntityTag("rg1", "apimService1", "policyFragment1"); +} + +async function main(): Promise { + await apiManagementHeadPolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetSample.ts new file mode 100644 index 000000000000..c2eb3591ad9e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentGetSample.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragment.json + */ +async function apiManagementGetPolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1"); + console.log(result); +} + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFragmentFormat.json + */ +async function apiManagementGetPolicyFragmentFormat(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.get("rg1", "apimService1", "policyFragment1", { + format: "rawxml", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPolicyFragment(); + await apiManagementGetPolicyFragmentFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListByServiceSample.ts new file mode 100644 index 000000000000..d759d7387e25 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all policy fragments. + * + * @summary gets all policy fragments. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragments.json + */ +async function apiManagementListPolicyFragments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policyFragment.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPolicyFragments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListReferencesSample.ts new file mode 100644 index 000000000000..91e038e698b2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyFragmentListReferencesSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyFragmentReferences.json + */ +async function apiManagementListPolicyFragmentReferences(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyFragment.listReferences( + "rg1", + "apimService1", + "policyFragment1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListPolicyFragmentReferences(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetEntityTagSample.ts new file mode 100644 index 000000000000..2925464e68bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * + * @summary gets the entity state (Etag) version of the Global policy definition in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicy.json + */ +async function apiManagementHeadPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policy.getEntityTag("rg1", "apimService1", "policy"); +} + +async function main(): Promise { + await apiManagementHeadPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetSample.ts new file mode 100644 index 000000000000..2b184b3a95cd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the Global policy definition of the Api Management service. + * + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicy.json + */ +async function apiManagementGetPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get("rg1", "apimService1", "policy"); + console.log(result); +} + +/** + * This sample demonstrates how to get the Global policy definition of the Api Management service. + * + * @summary get the Global policy definition of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyFormat.json + */ +async function apiManagementGetPolicyFormat(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policy.get("rg1", "apimService1", "policy"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPolicy(); + await apiManagementGetPolicyFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyListByServiceSample.ts new file mode 100644 index 000000000000..e3779371ca78 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all the Global Policy definitions of the Api Management service. + * + * @summary lists all the Global Policy definitions of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicies.json + */ +async function apiManagementListPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policy.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..d06548c735cb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the policy restriction configuration of the Api Management service. + * + * @summary creates or updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePolicyRestriction.json + */ +async function apiManagementCreatePolicyRestriction(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.createOrUpdate( + "rg1", + "apimService1", + "policyRestriction1", + { requireBase: "true", scope: "Sample Path to the policy document." }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreatePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionDeleteSample.ts new file mode 100644 index 000000000000..e6bf457debb9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionDeleteSample.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy restriction configuration of the Api Management Service. + * + * @summary deletes the policy restriction configuration of the Api Management Service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePolicyRestriction.json + */ +async function apiManagementDeletePolicyRestriction(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyRestriction.delete("rg1", "apimService1", "policyRestriction1", { + ifMatch: "*", + }); +} + +async function main(): Promise { + await apiManagementDeletePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetEntityTagSample.ts new file mode 100644 index 000000000000..f7b3dc80e57e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the policy restriction in the Api Management service. + * + * @summary gets the entity state (Etag) version of the policy restriction in the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPolicyRestriction.json + */ +async function apiManagementHeadPolicyRestriction(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.policyRestriction.getEntityTag("rg1", "apimService1", "policyRestriction1"); +} + +async function main(): Promise { + await apiManagementHeadPolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetSample.ts new file mode 100644 index 000000000000..56d7671039f0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy restriction of the Api Management service. + * + * @summary get the policy restriction of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPolicyRestriction.json + */ +async function apiManagementGetPolicyRestriction(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.get("rg1", "apimService1", "policyRestriction1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionListByServiceSample.ts new file mode 100644 index 000000000000..e91ba6b26e3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all policy restrictions of API Management services. + * + * @summary gets all policy restrictions of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPolicyRestrictions.json + */ +async function apiManagementListPolicyRestrictions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.policyRestriction.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionUpdateSample.ts new file mode 100644 index 000000000000..5f574c9fbd7f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the policy restriction configuration of the Api Management service. + * + * @summary updates the policy restriction configuration of the Api Management service. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePolicyRestriction.json + */ +async function apiManagementUpdatePolicyRestriction(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestriction.update( + "rg1", + "apimService1", + "policyRestriction1", + "*", + { scope: "Sample Path 2 to the policy document." }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdatePolicyRestriction(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionValidationsByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionValidationsByServiceSample.ts new file mode 100644 index 000000000000..29eb7ca1a7f9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/policyRestrictionValidationsByServiceSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to validate all policies of API Management services. + * + * @summary validate all policies of API Management services. + * x-ms-original-file: 2025-09-01-preview/ApiManagementValidatePolicies.json + */ +async function apiManagementListPolicyRestrictions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.policyRestrictionValidations.byService("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListPolicyRestrictions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigCreateOrUpdateSample.ts new file mode 100644 index 000000000000..bf68b5fb0a62 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigCreateOrUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or update the developer portal configuration. + * + * @summary create or update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalConfig.json + */ +async function apiManagementCreatePortalConfig(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.createOrUpdate("rg1", "apimService1", "default", "*", { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"], + }, + delegation: { delegateRegistration: false, delegateSubscription: false }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions.", + }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreatePortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetEntityTagSample.ts new file mode 100644 index 000000000000..7ec079f6c369 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the developer portal configuration. + * + * @summary gets the entity state (Etag) version of the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalConfig.json + */ +async function apiManagementHeadPortalConfig(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.portalConfig.getEntityTag("rg1", "apimService1", "default"); +} + +async function main(): Promise { + await apiManagementHeadPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetSample.ts new file mode 100644 index 000000000000..8a8f3f6460ee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the developer portal configuration. + * + * @summary get the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalConfig.json + */ +async function apiManagementPortalConfig(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.get("rg1", "apimService1", "default"); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigListByServiceSample.ts new file mode 100644 index 000000000000..51dbdcb786ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the developer portal configurations. + * + * @summary lists the developer portal configurations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalConfig.json + */ +async function apiManagementListPortalConfig(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.portalConfig.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigUpdateSample.ts new file mode 100644 index 000000000000..646312a10623 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalConfigUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update the developer portal configuration. + * + * @summary update the developer portal configuration. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalConfig.json + */ +async function apiManagementUpdatePortalConfig(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalConfig.update("rg1", "apimService1", "default", "*", { + cors: { allowedOrigins: ["https://contoso.com"] }, + csp: { + allowedSources: ["*.contoso.com"], + mode: "reportOnly", + reportUri: ["https://report.contoso.com"], + }, + delegation: { delegateRegistration: false, delegateSubscription: false }, + enableBasicAuth: true, + signin: { require: false }, + signup: { + termsOfService: { + requireConsent: false, + text: "I agree to the service terms and conditions.", + }, + }, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdatePortalConfig(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7be3e539c8a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * + * @summary creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreatePortalRevision.json + */ +async function apiManagementCreatePortalRevision(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.createOrUpdate( + "rg1", + "apimService1", + "20201112101010", + { description: "portal revision 1", isCurrent: true }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreatePortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetEntityTagSample.ts new file mode 100644 index 000000000000..d90698edf941 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the developer portal revision specified by its identifier. + * + * @summary gets the developer portal revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadPortalRevision.json + */ +async function apiManagementHeadPortalRevision(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.portalRevision.getEntityTag("rg1", "apimService1", "20201112101010"); +} + +async function main(): Promise { + await apiManagementHeadPortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetSample.ts new file mode 100644 index 000000000000..be5784e78692 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the developer portal's revision specified by its identifier. + * + * @summary gets the developer portal's revision specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPortalRevision.json + */ +async function apiManagementGetPortalRevision(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.get("rg1", "apimService1", "20201112101010"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionListByServiceSample.ts new file mode 100644 index 000000000000..0aee0239ca54 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists developer portal's revisions. + * + * @summary lists developer portal's revisions. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalRevisions.json + */ +async function apiManagementListPortalRevisions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.portalRevision.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPortalRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionUpdateSample.ts new file mode 100644 index 000000000000..95338ce09117 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalRevisionUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the description of specified portal revision or makes it current. + * + * @summary updates the description of specified portal revision or makes it current. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdatePortalRevision.json + */ +async function apiManagementUpdatePortalRevision(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalRevision.update("rg1", "apimService1", "20201112101010", "*", { + description: "portal revision update", + isCurrent: true, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdatePortalRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalSettingsListByServiceSample.ts new file mode 100644 index 000000000000..c115257d71d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/portalSettingsListByServiceSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of portalsettings defined within a service instance.. + * + * @summary lists a collection of portalsettings defined within a service instance.. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPortalSettings.json + */ +async function apiManagementListPortalSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.portalSettings.listByService("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListPortalSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a00e92643919 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionCreateOrUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Private Endpoint Connection or updates an existing one. + * + * @summary creates a new Private Endpoint Connection or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementApproveOrRejectPrivateEndpointConnection.json + */ +async function apiManagementApproveOrRejectPrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.createOrUpdate( + "rg1", + "apimService1", + "privateEndpointConnectionName", + { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + properties: { + privateLinkServiceConnectionState: { + description: "The Private Endpoint Connection is approved.", + status: "Approved", + }, + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementApproveOrRejectPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionDeleteSample.ts new file mode 100644 index 000000000000..42c1baaca5da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionDeleteSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Private Endpoint Connection. + * + * @summary deletes the specified Private Endpoint Connection. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeletePrivateEndpointConnection.json + */ +async function apiManagementDeletePrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.privateEndpointConnection.delete( + "rg1", + "apimService1", + "privateEndpointConnectionName", + ); +} + +async function main(): Promise { + await apiManagementDeletePrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetByNameSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetByNameSample.ts new file mode 100644 index 000000000000..b84a264229bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetByNameSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Private Endpoint Connection specified by its identifier. + * + * @summary gets the details of the Private Endpoint Connection specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateEndpointConnection.json + */ +async function apiManagementGetPrivateEndpointConnection(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.getByName( + "rg1", + "apimService1", + "privateEndpointConnectionName", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPrivateEndpointConnection(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts new file mode 100644 index 000000000000..e29bef3cf213 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionGetPrivateLinkResourceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetPrivateLinkGroupResource.json + */ +async function apiManagementGetPrivateLinkGroupResource(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.getPrivateLinkResource( + "rg1", + "apimService1", + "privateLinkSubResourceName", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetPrivateLinkGroupResource(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListByServiceSample.ts new file mode 100644 index 000000000000..5f34a2bc3ba4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all private endpoint connections of the API Management service instance. + * + * @summary lists all private endpoint connections of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateEndpointConnections.json + */ +async function apiManagementListPrivateEndpointConnections(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.privateEndpointConnection.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListPrivateEndpointConnections(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts new file mode 100644 index 000000000000..ff706a6dae8b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/privateEndpointConnectionListPrivateLinkResourcesSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the private link resources + * + * @summary gets the private link resources + * x-ms-original-file: 2025-09-01-preview/ApiManagementListPrivateLinkGroupResources.json + */ +async function apiManagementListPrivateLinkGroupResources(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.privateEndpointConnection.listPrivateLinkResources( + "rg1", + "apimService1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListPrivateLinkGroupResources(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCheckEntityExistsSample.ts new file mode 100644 index 000000000000..9c17cc5f6762 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCheckEntityExistsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that API entity specified by identifier is associated with the Product entity. + * + * @summary checks that API entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductApi.json + */ +async function apiManagementHeadProductApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApi.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..8b5a4ba0f4da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified product. + * + * @summary adds an API to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApi.json + */ +async function apiManagementCreateProductApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApi.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "echo-api", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiDeleteSample.ts new file mode 100644 index 000000000000..53d256d0d069 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApi.json + */ +async function apiManagementDeleteProductApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApi.delete("rg1", "apimService1", "testproduct", "echo-api"); +} + +async function main(): Promise { + await apiManagementDeleteProductApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..bbfccd2ac4ab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified product via link. + * + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductApiLink.json + */ +async function apiManagementCreateProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApiLink.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkDeleteSample.ts new file mode 100644 index 000000000000..acd9c45002c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductApiLink.json + */ +async function apiManagementDeleteProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productApiLink.delete("rg1", "apimService1", "testproduct", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkGetSample.ts new file mode 100644 index 000000000000..491ca657df9c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductApiLink.json + */ +async function apiManagementGetProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productApiLink.get("rg1", "apimService1", "testproduct", "link1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkListByProductSample.ts new file mode 100644 index 000000000000..31805ffb0afa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiLinkListByProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApiLinks.json + */ +async function apiManagementListProductApiLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productApiLink.listByProduct("rg1", "apimService1", "product1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiListByProductSample.ts new file mode 100644 index 000000000000..79dbc9679546 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productApiListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the APIs associated with a product. + * + * @summary lists a collection of the APIs associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductApis.json + */ +async function apiManagementListProductApis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productApi.listByProduct( + "rg1", + "apimService1", + "5768181ea40f7eb6c49f6ac7", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productCreateOrUpdateSample.ts new file mode 100644 index 000000000000..768d2c34d838 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productCreateOrUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a product. + * + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProduct.json + */ +async function apiManagementCreateProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.createOrUpdate("rg1", "apimService1", "testproduct", { + displayName: "Test Template ProductName 4", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productDeleteSample.ts new file mode 100644 index 000000000000..c6569adffa81 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productDeleteSample.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete product. + * + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProduct.json + */ +async function apiManagementDeleteProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.product.delete("rg1", "apimService1", "testproduct", "*", { + deleteSubscriptions: true, + }); +} + +async function main(): Promise { + await apiManagementDeleteProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetEntityTagSample.ts new file mode 100644 index 000000000000..48f404110823 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProduct.json + */ +async function apiManagementHeadProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.product.getEntityTag("rg1", "apimService1", "unlimited"); +} + +async function main(): Promise { + await apiManagementHeadProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetSample.ts new file mode 100644 index 000000000000..3dd56919579c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProduct.json + */ +async function apiManagementGetProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.get("rg1", "apimService1", "unlimited"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCheckEntityExistsSample.ts new file mode 100644 index 000000000000..da938642f44d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCheckEntityExistsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that Group entity specified by identifier is associated with the Product entity. + * + * @summary checks that Group entity specified by identifier is associated with the Product entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductGroup.json + */ +async function apiManagementHeadProductGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroup.checkEntityExists( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCreateOrUpdateSample.ts new file mode 100644 index 000000000000..efacb4f165ec --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds the association between the specified developer group with the specified product. + * + * @summary adds the association between the specified developer group with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroup.json + */ +async function apiManagementCreateProductGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroup.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "templateGroup", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupDeleteSample.ts new file mode 100644 index 000000000000..acb0c3dea927 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the association between the specified group and product. + * + * @summary deletes the association between the specified group and product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroup.json + */ +async function apiManagementDeleteProductGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroup.delete("rg1", "apimService1", "testproduct", "templateGroup"); +} + +async function main(): Promise { + await apiManagementDeleteProductGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..519ce3776ac6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds a group to the specified product via link. + * + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductGroupLink.json + */ +async function apiManagementCreateProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroupLink.createOrUpdate( + "rg1", + "apimService1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/group1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkDeleteSample.ts new file mode 100644 index 000000000000..5899338549a3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductGroupLink.json + */ +async function apiManagementDeleteProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productGroupLink.delete("rg1", "apimService1", "testproduct", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkGetSample.ts new file mode 100644 index 000000000000..64bb0890b864 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductGroupLink.json + */ +async function apiManagementGetProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productGroupLink.get("rg1", "apimService1", "testproduct", "link1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkListByProductSample.ts new file mode 100644 index 000000000000..7deefc788c4e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupLinkListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroupLinks.json + */ +async function apiManagementListProductGroupLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productGroupLink.listByProduct( + "rg1", + "apimService1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductGroupLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupListByProductSample.ts new file mode 100644 index 000000000000..6f07cfeb6ed4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productGroupListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the collection of developer groups associated with the specified product. + * + * @summary lists the collection of developer groups associated with the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductGroups.json + */ +async function apiManagementListProductGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productGroup.listByProduct( + "rg1", + "apimService1", + "5600b57e7e8880006a060002", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByServiceSample.ts new file mode 100644 index 000000000000..69ef84558c37 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of products in the specified service instance. + * + * @summary lists a collection of products in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProducts.json + */ +async function apiManagementListProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.product.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByTagsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByTagsSample.ts new file mode 100644 index 000000000000..715c75a724f5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productListByTagsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of products associated with tags. + * + * @summary lists a collection of products associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductsByTags.json + */ +async function apiManagementListProductsByTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.product.listByTags("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductsByTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a83998480f82 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the Product. + * + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductPolicy.json + */ +async function apiManagementCreateProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.createOrUpdate( + "rg1", + "apimService1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyDeleteSample.ts new file mode 100644 index 000000000000..49bfebdf8c3b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductPolicy.json + */ +async function apiManagementDeleteProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productPolicy.delete("rg1", "apimService1", "testproduct", "policy", "*"); +} + +async function main(): Promise { + await apiManagementDeleteProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..09df3907628e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductPolicy.json + */ +async function apiManagementHeadProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productPolicy.getEntityTag("rg1", "apimService1", "unlimited", "policy"); +} + +async function main(): Promise { + await apiManagementHeadProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetSample.ts new file mode 100644 index 000000000000..d68f44266d6f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductPolicy.json + */ +async function apiManagementGetProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productPolicy.get( + "rg1", + "apimService1", + "kjoshiarmTemplateProduct4", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyListByProductSample.ts new file mode 100644 index 000000000000..aba8d1dbc437 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productPolicyListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductPolicies.json + */ +async function apiManagementListProductPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productPolicy.listByProduct( + "rg1", + "apimService1", + "armTemplateProduct4", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productSubscriptionsListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productSubscriptionsListSample.ts new file mode 100644 index 000000000000..912542d2dfd5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productSubscriptionsListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the collection of subscriptions to the specified product. + * + * @summary lists the collection of subscriptions to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductSubscriptions.json + */ +async function apiManagementListProductSubscriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productSubscriptions.list( + "rg1", + "apimService1", + "5600b57e7e8880006a060002", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productUpdateSample.ts new file mode 100644 index 000000000000..c81172110d6a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update existing product details. + * + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProduct.json + */ +async function apiManagementUpdateProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.product.update("rg1", "apimService1", "testproduct", "*", { + displayName: "Test Template ProductName 4", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..72f90e9e8151 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Wiki for a Product or updates an existing one. + * + * @summary creates a new Wiki for a Product or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductWiki.json + */ +async function apiManagementCreateProductWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.createOrUpdate( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + { documents: [{ documentationId: "docId1" }, { documentationId: "docId2" }] }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiDeleteSample.ts new file mode 100644 index 000000000000..998472f32ac9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Wiki from a Product. + * + * @summary deletes the specified Wiki from a Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductWiki.json + */ +async function apiManagementDeleteProductWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productWiki.delete("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*"); +} + +async function main(): Promise { + await apiManagementDeleteProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetEntityTagSample.ts new file mode 100644 index 000000000000..d19a7f7e5b26 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductWiki.json + */ +async function apiManagementHeadProductWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.productWiki.getEntityTag("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); +} + +async function main(): Promise { + await apiManagementHeadProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetSample.ts new file mode 100644 index 000000000000..6777df079957 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductWiki.json + */ +async function apiManagementGetProductWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.get("rg1", "apimService1", "57d1f7558aa04f15146d9d8a"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiUpdateSample.ts new file mode 100644 index 000000000000..1562aa67a141 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikiUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Wiki for a Product specified by its identifier. + * + * @summary updates the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateProductWiki.json + */ +async function apiManagementUpdateProductWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.productWiki.update( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + "*", + { documents: [{ documentationId: "docId1" }] }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateProductWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikisListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikisListSample.ts new file mode 100644 index 000000000000..caeb5d6934d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/productWikisListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Wiki for a Product specified by its identifier. + * + * @summary gets the details of the Wiki for a Product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductWikis.json + */ +async function apiManagementGetApiWiki(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.productWikis.list( + "rg1", + "apimService1", + "57d1f7558aa04f15146d9d8a", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetApiWiki(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysListByServiceSample.ts new file mode 100644 index 000000000000..4617547474bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysListByServiceSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * + * @summary lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeys.json + */ +async function apiManagementGetQuotaCounterKeys(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.listByService("rg1", "apimService1", "ba"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetQuotaCounterKeys(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysUpdateSample.ts new file mode 100644 index 000000000000..807d06d09c19 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByCounterKeysUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * + * @summary updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKey.json + */ +async function apiManagementUpdateQuotaCounterKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByCounterKeys.update("rg1", "apimService1", "ba", { + callsCount: 0, + kbTransferred: 2.5630078125, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateQuotaCounterKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysGetSample.ts new file mode 100644 index 000000000000..58118e9f93ff --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * + * @summary gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + */ +async function apiManagementGetQuotaCounterKeysByQuotaPeriod(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.get( + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetQuotaCounterKeysByQuotaPeriod(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysUpdateSample.ts new file mode 100644 index 000000000000..f5c7e6b0088b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/quotaByPeriodKeysUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing quota counter value in the specified service instance. + * + * @summary updates an existing quota counter value in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + */ +async function apiManagementUpdateQuotaCounterKeyByQuotaPeriod(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.quotaByPeriodKeys.update( + "rg1", + "apimService1", + "ba", + "0_P3Y6M4DT12H30M5S", + { callsCount: 0, kbTransferred: 0 }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateQuotaCounterKeyByQuotaPeriod(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/regionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/regionListByServiceSample.ts new file mode 100644 index 000000000000..1c77b9a3b447 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/regionListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all azure regions in which the service exists. + * + * @summary lists all azure regions in which the service exists. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListRegions.json + */ +async function apiManagementListRegions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.region.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListRegions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByApiSample.ts new file mode 100644 index 000000000000..d53410feccab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by API. + * + * @summary lists report records by API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByApi.json + */ +async function apiManagementGetReportsByApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByApi( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByGeoSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByGeoSample.ts new file mode 100644 index 000000000000..ca195413a293 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByGeoSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by geography. + * + * @summary lists report records by geography. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByGeo.json + */ +async function apiManagementGetReportsByGeo(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByGeo( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByGeo(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByOperationSample.ts new file mode 100644 index 000000000000..eece3321b1f7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByOperationSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by API Operations. + * + * @summary lists report records by API Operations. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByOperation.json + */ +async function apiManagementGetReportsByOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByOperation( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByProductSample.ts new file mode 100644 index 000000000000..f3002bd0b327 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by Product. + * + * @summary lists report records by Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByProduct.json + */ +async function apiManagementGetReportsByProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByProduct( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByRequestSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByRequestSample.ts new file mode 100644 index 000000000000..8ba8ff3be09b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByRequestSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by Request. + * + * @summary lists report records by Request. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByRequest.json + */ +async function apiManagementGetReportsByRequest(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByRequest( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByRequest(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListBySubscriptionSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListBySubscriptionSample.ts new file mode 100644 index 000000000000..3480bf2efbdb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListBySubscriptionSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by subscription. + * + * @summary lists report records by subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsBySubscription.json + */ +async function apiManagementGetReportsBySubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listBySubscription( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsBySubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByTimeSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByTimeSample.ts new file mode 100644 index 000000000000..e213f7ec4288 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByTimeSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by Time. + * + * @summary lists report records by Time. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByTime.json + */ +async function apiManagementGetReportsByTime(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByTime( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "PT15M", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByTime(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByUserSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByUserSample.ts new file mode 100644 index 000000000000..26551e955def --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/reportsListByUserSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists report records by User. + * + * @summary lists report records by User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetReportsByUser.json + */ +async function apiManagementGetReportsByUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.reports.listByUser( + "rg1", + "apimService1", + "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementGetReportsByUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..09a91bd95760 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or Update Sign-In settings. + * + * @summary create or Update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignIn.json + */ +async function apiManagementPortalSettingsUpdateSignIn(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.createOrUpdate( + "rg1", + "apimService1", + { enabled: true }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetEntityTagSample.ts new file mode 100644 index 000000000000..d96b51bf397e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignInSettings. + * + * @summary gets the entity state (Etag) version of the SignInSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignInSettings.json + */ +async function apiManagementHeadSignInSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signInSettings.getEntityTag("rg1", "apimService1"); +} + +async function main(): Promise { + await apiManagementHeadSignInSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetSample.ts new file mode 100644 index 000000000000..862badab4511 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get Sign In Settings for the Portal + * + * @summary get Sign In Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignIn.json + */ +async function apiManagementPortalSettingsGetSignIn(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signInSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsGetSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsUpdateSample.ts new file mode 100644 index 000000000000..56cd18e1e0af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signInSettingsUpdateSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update Sign-In settings. + * + * @summary update Sign-In settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignIn.json + */ +async function apiManagementPortalSettingsUpdateSignIn(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signInSettings.update("rg1", "apimService1", "*", { enabled: true }); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateSignIn(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsCreateOrUpdateSample.ts new file mode 100644 index 000000000000..740e42ae3196 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsCreateOrUpdateSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or Update Sign-Up settings. + * + * @summary create or Update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsPutSignUp.json + */ +async function apiManagementPortalSettingsUpdateSignUp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.createOrUpdate( + "rg1", + "apimService1", + { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetEntityTagSample.ts new file mode 100644 index 000000000000..8f34d01bc0a2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the SignUpSettings. + * + * @summary gets the entity state (Etag) version of the SignUpSettings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSignUpSettings.json + */ +async function apiManagementHeadSignUpSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signUpSettings.getEntityTag("rg1", "apimService1"); +} + +async function main(): Promise { + await apiManagementHeadSignUpSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetSample.ts new file mode 100644 index 000000000000..bc1706d76799 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get Sign Up Settings for the Portal + * + * @summary get Sign Up Settings for the Portal + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsGetSignUp.json + */ +async function apiManagementPortalSettingsGetSignUp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.signUpSettings.get("rg1", "apimService1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementPortalSettingsGetSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsUpdateSample.ts new file mode 100644 index 000000000000..ca2155bc004f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/signUpSettingsUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update Sign-Up settings. + * + * @summary update Sign-Up settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementPortalSettingsUpdateSignUp.json + */ +async function apiManagementPortalSettingsUpdateSignUp(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.signUpSettings.update("rg1", "apimService1", "*", { + enabled: true, + termsOfService: { consentRequired: true, enabled: true, text: "Terms of service text." }, + }); +} + +async function main(): Promise { + await apiManagementPortalSettingsUpdateSignUp(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..23300701a09f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. + * + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateSubscription.json + */ +async function apiManagementCreateSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.createOrUpdate("rg1", "apimService1", "testsub", { + displayName: "testsub", + ownerId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionDeleteSample.ts new file mode 100644 index 000000000000..04ec45ac3c72 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteSubscription.json + */ +async function apiManagementDeleteSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.delete("rg1", "apimService1", "testsub", "*"); +} + +async function main(): Promise { + await apiManagementDeleteSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetEntityTagSample.ts new file mode 100644 index 000000000000..3beeb2f4026b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadSubscription.json + */ +async function apiManagementHeadSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.getEntityTag("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); +} + +async function main(): Promise { + await apiManagementHeadSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetSample.ts new file mode 100644 index 000000000000..c8cb28fe6eb0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetSubscription.json + */ +async function apiManagementGetSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.get("rg1", "apimService1", "5931a769d8d14f0ad8ce13b8"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSample.ts new file mode 100644 index 000000000000..9293ff8ddff6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all subscriptions of the API Management service instance. + * + * @summary lists all subscriptions of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSubscriptions.json + */ +async function apiManagementListSubscriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.subscription.list("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSecretsSample.ts new file mode 100644 index 000000000000..82945b0d60e1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionListSecretsSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionListSecrets.json + */ +async function apiManagementSubscriptionListSecrets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.listSecrets( + "rg1", + "apimService1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementSubscriptionListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegeneratePrimaryKeySample.ts new file mode 100644 index 000000000000..a1d84b271451 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegeneratePrimaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the API Management service instance. + * + * @summary regenerates primary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegeneratePrimaryKey.json + */ +async function apiManagementSubscriptionRegeneratePrimaryKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.regeneratePrimaryKey("rg1", "apimService1", "testsub"); +} + +async function main(): Promise { + await apiManagementSubscriptionRegeneratePrimaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegenerateSecondaryKeySample.ts new file mode 100644 index 000000000000..33c92d2f7db6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionRegenerateSecondaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementSubscriptionRegenerateSecondaryKey.json + */ +async function apiManagementSubscriptionRegenerateSecondaryKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.subscription.regenerateSecondaryKey("rg1", "apimService1", "testsub"); +} + +async function main(): Promise { + await apiManagementSubscriptionRegenerateSecondaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionUpdateSample.ts new file mode 100644 index 000000000000..92f33751aed3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/subscriptionUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of a subscription specified by its identifier. + * + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateSubscription.json + */ +async function apiManagementUpdateSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.subscription.update("rg1", "apimService1", "testsub", "*", { + displayName: "testsub", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..2cca83eb9c48 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkCreateOrUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified tag via link. + * + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagApiLink.json + */ +async function apiManagementCreateTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagApiLink.createOrUpdate("rg1", "apimService1", "tag1", "link1", { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkDeleteSample.ts new file mode 100644 index 000000000000..f51942085252 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagApiLink.json + */ +async function apiManagementDeleteTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagApiLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkGetSample.ts new file mode 100644 index 000000000000..c2b8b707c13c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagApiLink.json + */ +async function apiManagementGetTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagApiLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkListByProductSample.ts new file mode 100644 index 000000000000..e2a30d5809c5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagApiLinkListByProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagApiLinks.json + */ +async function apiManagementListTagApiLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagApiLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTagApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToApiSample.ts new file mode 100644 index 000000000000..5032386d844c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToApiSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assign tag to the Api. + * + * @summary assign tag to the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiTag.json + */ +async function apiManagementCreateApiTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToApi( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToOperationSample.ts new file mode 100644 index 000000000000..5df5927fbeb2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToOperationSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assign tag to the Operation. + * + * @summary assign tag to the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateApiOperationTag.json + */ +async function apiManagementCreateApiOperationTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToOperation( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "5931a75ae4bbd512a88c680a", + "tagId1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToProductSample.ts new file mode 100644 index 000000000000..dd26452f0e4a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagAssignToProductSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to assign tag to the Product. + * + * @summary assign tag to the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateProductTag.json + */ +async function apiManagementCreateProductTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.assignToProduct( + "rg1", + "apimService1", + "5931a75ae4bbd512a88c680b", + "tagId1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagCreateOrUpdateSample.ts new file mode 100644 index 000000000000..439f6a18ac6e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagCreateOrUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a tag. + * + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTag.json + */ +async function apiManagementCreateTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.createOrUpdate("rg1", "apimService1", "tagId1", { + displayName: "tag1", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDeleteSample.ts new file mode 100644 index 000000000000..afb50e50a525 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific tag of the API Management service instance. + * + * @summary deletes specific tag of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTag.json + */ +async function apiManagementDeleteTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.delete("rg1", "apimService1", "tagId1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromApiSample.ts new file mode 100644 index 000000000000..f337c031790c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to detach the tag from the Api. + * + * @summary detach the tag from the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiTag.json + */ +async function apiManagementDeleteApiTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromApi( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromOperationSample.ts new file mode 100644 index 000000000000..88f539322d71 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromOperationSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to detach the tag from the Operation. + * + * @summary detach the tag from the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteApiOperationTag.json + */ +async function apiManagementDeleteApiOperationTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromOperation( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28d1f7fab116c282651", + "59d5b28e1f7fab116402044e", + ); +} + +async function main(): Promise { + await apiManagementDeleteApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromProductSample.ts new file mode 100644 index 000000000000..54a9d603c21c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagDetachFromProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to detach the tag from the Product. + * + * @summary detach the tag from the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteProductTag.json + */ +async function apiManagementDeleteProductTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.detachFromProduct( + "rg1", + "apimService1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + ); +} + +async function main(): Promise { + await apiManagementDeleteProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByApiSample.ts new file mode 100644 index 000000000000..d68c886d724e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByApiSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tag associated with the API. + * + * @summary get tag associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiTag.json + */ +async function apiManagementGetApiTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByApi( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByOperationSample.ts new file mode 100644 index 000000000000..b79f0acaa38f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByOperationSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tag associated with the Operation. + * + * @summary get tag associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetApiOperationTag.json + */ +async function apiManagementGetApiOperationTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByOperation( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByProductSample.ts new file mode 100644 index 000000000000..2291a39fcb5c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetByProductSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tag associated with the Product. + * + * @summary get tag associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetProductTag.json + */ +async function apiManagementGetProductTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.getByProduct( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByApiSample.ts new file mode 100644 index 000000000000..53f14f53db0d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiTag.json + */ +async function apiManagementHeadApiTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByApi( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadApiTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByOperationSample.ts new file mode 100644 index 000000000000..275c1430952c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByOperationSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadApiOperationTag.json + */ +async function apiManagementHeadApiOperationTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByOperation( + "rg1", + "apimService1", + "59d6bb8f1f7fab13dc67ec9b", + "59d6bb8f1f7fab13dc67ec9a", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadApiOperationTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByProductSample.ts new file mode 100644 index 000000000000..e621c40d55c6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateByProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadProductTag.json + */ +async function apiManagementHeadProductTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityStateByProduct( + "rg1", + "apimService1", + "59306a29e4bbd510dc24e5f8", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadProductTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateSample.ts new file mode 100644 index 000000000000..5548e557bed8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetEntityStateSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTag.json + */ +async function apiManagementHeadTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tag.getEntityState("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); +} + +async function main(): Promise { + await apiManagementHeadTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetSample.ts new file mode 100644 index 000000000000..ef09b92f6ffd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTag.json + */ +async function apiManagementGetTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.get("rg1", "apimService1", "59306a29e4bbd510dc24e5f9"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByApiSample.ts new file mode 100644 index 000000000000..b452d6dab17e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByApiSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Tags associated with the API. + * + * @summary lists all Tags associated with the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiTags.json + */ +async function apiManagementListApiTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByApi( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByOperationSample.ts new file mode 100644 index 000000000000..4b87717dade6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByOperationSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Tags associated with the Operation. + * + * @summary lists all Tags associated with the Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListApiOperationTags.json + */ +async function apiManagementListApiOperationTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByOperation( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0888cba3f6", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListApiOperationTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByProductSample.ts new file mode 100644 index 000000000000..3f479868212d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByProductSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all Tags associated with the Product. + * + * @summary lists all Tags associated with the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListProductTags.json + */ +async function apiManagementListProductTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByProduct( + "rg1", + "apimService1", + "57d2ef278aa04f0888cba3f1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListProductTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByServiceSample.ts new file mode 100644 index 000000000000..32a361ad5af7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of tags defined within a service instance. + * + * @summary lists a collection of tags defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTags.json + */ +async function apiManagementListTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tag.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..283a06be9a52 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an operation to the specified tag via link. + * + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagOperationLink.json + */ +async function apiManagementCreateTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagOperationLink.createOrUpdate( + "rg1", + "apimService1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/op1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkDeleteSample.ts new file mode 100644 index 000000000000..c28924b8ef4d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagOperationLink.json + */ +async function apiManagementDeleteTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagOperationLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkGetSample.ts new file mode 100644 index 000000000000..7d88fbd9b255 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagOperationLink.json + */ +async function apiManagementGetTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagOperationLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkListByProductSample.ts new file mode 100644 index 000000000000..dcfc31525770 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagOperationLinkListByProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagOperationLinks.json + */ +async function apiManagementListTagOperationLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagOperationLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTagOperationLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..1810cb245938 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkCreateOrUpdateSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds a product to the specified tag via link. + * + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTagProductLink.json + */ +async function apiManagementCreateTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagProductLink.createOrUpdate( + "rg1", + "apimService1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/product1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkDeleteSample.ts new file mode 100644 index 000000000000..2b494349012d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteTagProductLink.json + */ +async function apiManagementDeleteTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tagProductLink.delete("rg1", "apimService1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkGetSample.ts new file mode 100644 index 000000000000..0ccf9798c01f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTagProductLink.json + */ +async function apiManagementGetTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tagProductLink.get("rg1", "apimService1", "tag1", "link1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkListByProductSample.ts new file mode 100644 index 000000000000..2a9cfc218630 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagProductLinkListByProductSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagProductLinks.json + */ +async function apiManagementListTagProductLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagProductLink.listByProduct("rg1", "apimService1", "tag1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTagProductLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagResourceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagResourceListByServiceSample.ts new file mode 100644 index 000000000000..5cb1f2f71453 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagResourceListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of resources associated with tags. + * + * @summary lists a collection of resources associated with tags. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTagResources.json + */ +async function apiManagementListTagResources(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tagResource.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTagResources(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagUpdateSample.ts new file mode 100644 index 000000000000..3959894bf512 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tagUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the tag specified by its identifier. + * + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTag.json + */ +async function apiManagementUpdateTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tag.update("rg1", "apimService1", "temptag", "*", { + displayName: "temp tag", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessCreateSample.ts new file mode 100644 index 000000000000..72070597c8e9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessCreateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tenant access information details. + * + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateTenantAccess.json + */ +async function apiManagementCreateTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.create("rg1", "apimService1", "access", "*", { + enabled: true, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetEntityTagSample.ts new file mode 100644 index 000000000000..283a4380965f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to tenant access metadata + * + * @summary tenant access metadata + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadTenantAccess.json + */ +async function apiManagementHeadTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.getEntityTag("rg1", "apimService1", "access"); +} + +async function main(): Promise { + await apiManagementHeadTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetSample.ts new file mode 100644 index 000000000000..dfe45af8b4b9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGetSample.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tenant access information details without secrets. + * + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantAccess.json + */ +async function apiManagementGetTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get("rg1", "apimService1", "access"); + console.log(result); +} + +/** + * This sample demonstrates how to get tenant access information details without secrets. + * + * @summary get tenant access information details without secrets. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantGitAccess.json + */ +async function apiManagementGetTenantGitAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.get("rg1", "apimService1", "gitAccess"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTenantAccess(); + await apiManagementGetTenantGitAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts new file mode 100644 index 000000000000..4f91d7eaa4cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegeneratePrimaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerate primary access key for GIT. + * + * @summary regenerate primary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessGitRegeneratePrimaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccessGit.regeneratePrimaryKey("rg1", "apimService1", "access"); +} + +async function main(): Promise { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts new file mode 100644 index 000000000000..bc4284cfd4e1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessGitRegenerateSecondaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerate secondary access key for GIT. + * + * @summary regenerate secondary access key for GIT. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateKey.json + */ +async function apiManagementTenantAccessRegenerateKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccessGit.regenerateSecondaryKey("rg1", "apimService1", "access"); +} + +async function main(): Promise { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListByServiceSample.ts new file mode 100644 index 000000000000..4dd7aa4dd289 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns list of access infos - for Git and Management endpoints. + * + * @summary returns list of access infos - for Git and Management endpoints. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantAccess.json + */ +async function apiManagementListTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tenantAccess.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListSecretsSample.ts new file mode 100644 index 000000000000..2e50dab66fa9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessListSecretsSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tenant access information details. + * + * @summary get tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListSecretsTenantAccess.json + */ +async function apiManagementListSecretsTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.listSecrets("rg1", "apimService1", "access"); + console.log(result); +} + +async function main(): Promise { + await apiManagementListSecretsTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts new file mode 100644 index 000000000000..17d7da7f7c66 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegeneratePrimaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerate primary access key + * + * @summary regenerate primary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegeneratePrimaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.regeneratePrimaryKey("rg1", "apimService1", "access"); +} + +async function main(): Promise { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts new file mode 100644 index 000000000000..45ade4225136 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessRegenerateSecondaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerate secondary access key + * + * @summary regenerate secondary access key + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessRegenerateSecondaryKey.json + */ +async function apiManagementTenantAccessRegenerateKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.tenantAccess.regenerateSecondaryKey("rg1", "apimService1", "access"); +} + +async function main(): Promise { + await apiManagementTenantAccessRegenerateKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessUpdateSample.ts new file mode 100644 index 000000000000..c64d5f93f803 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantAccessUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update tenant access information details. + * + * @summary update tenant access information details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateTenantAccess.json + */ +async function apiManagementUpdateTenantAccess(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantAccess.update("rg1", "apimService1", "access", "*", { + enabled: true, + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateTenantAccess(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationDeploySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationDeploySample.ts new file mode 100644 index 000000000000..a9aa9434c522 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationDeploySample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * + * @summary this operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationDeploy.json + */ +async function apiManagementTenantConfigurationDeploy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.deploy("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementTenantConfigurationDeploy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationGetSyncStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationGetSyncStateSample.ts new file mode 100644 index 000000000000..512c3d803c0a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationGetSyncStateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the status of the most recent synchronization between the configuration database and the Git repository. + * + * @summary gets the status of the most recent synchronization between the configuration database and the Git repository. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantAccessSyncState.json + */ +async function apiManagementTenantAccessSyncState(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.getSyncState( + "rg1", + "apimService1", + "configuration", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementTenantAccessSyncState(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationSaveSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationSaveSample.ts new file mode 100644 index 000000000000..9ab843dde334 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationSaveSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * + * @summary this operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationSave.json + */ +async function apiManagementTenantConfigurationSave(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.save("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementTenantConfigurationSave(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationValidateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationValidateSample.ts new file mode 100644 index 000000000000..611e7a1b6ee4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantConfigurationValidateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * + * @summary this operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + * x-ms-original-file: 2025-09-01-preview/ApiManagementTenantConfigurationValidate.json + */ +async function apiManagementTenantConfigurationValidate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantConfiguration.validate("rg1", "apimService1", "configuration", { + branch: "master", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementTenantConfigurationValidate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsGetSample.ts new file mode 100644 index 000000000000..7c431309667e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get tenant settings. + * + * @summary get tenant settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetTenantSettings.json + */ +async function apiManagementGetTenantSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.tenantSettings.get("rg1", "apimService1", "public"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetTenantSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsListByServiceSample.ts new file mode 100644 index 000000000000..9c88669ce6b6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/tenantSettingsListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to public settings. + * + * @summary public settings. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListTenantSettings.json + */ +async function apiManagementListTenantSettings(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.tenantSettings.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListTenantSettings(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userConfirmationPasswordSendSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userConfirmationPasswordSendSample.ts new file mode 100644 index 000000000000..0687c2f8bd97 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userConfirmationPasswordSendSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to sends confirmation + * + * @summary sends confirmation + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserConfirmationPasswordSend.json + */ +async function apiManagementUserConfirmationPasswordSend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.userConfirmationPassword.send("rg1", "apimService1", "57127d485157a511ace86ae7"); +} + +async function main(): Promise { + await apiManagementUserConfirmationPasswordSend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f1a1cc4e557b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a user. + * + * @summary creates or Updates a user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateUser.json + */ +async function apiManagementCreateUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.createOrUpdate( + "rg1", + "apimService1", + "5931a75ae4bbd512288c680b", + { confirmation: "signup", email: "foobar@outlook.com", firstName: "foo", lastName: "bar" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userDeleteSample.ts new file mode 100644 index 000000000000..ecf0c8ee5db1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific user. + * + * @summary deletes specific user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteUser.json + */ +async function apiManagementDeleteUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.user.delete("rg1", "apimService1", "5931a75ae4bbd512288c680b", "*"); +} + +async function main(): Promise { + await apiManagementDeleteUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGenerateSsoUrlSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGenerateSsoUrlSample.ts new file mode 100644 index 000000000000..0a40900a36cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGenerateSsoUrlSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * + * @summary retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserGenerateSsoUrl.json + */ +async function apiManagementUserGenerateSsoUrl(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.generateSsoUrl( + "rg1", + "apimService1", + "57127d485157a511ace86ae7", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUserGenerateSsoUrl(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetEntityTagSample.ts new file mode 100644 index 000000000000..306f80c7c941 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the user specified by its identifier. + * + * @summary gets the entity state (Etag) version of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadUser.json + */ +async function apiManagementHeadUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.user.getEntityTag("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); +} + +async function main(): Promise { + await apiManagementHeadUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSample.ts new file mode 100644 index 000000000000..df3938688246 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the user specified by its identifier. + * + * @summary gets the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUser.json + */ +async function apiManagementGetUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.get("rg1", "apimService1", "5931a75ae4bbd512a88c680b"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSharedAccessTokenSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSharedAccessTokenSample.ts new file mode 100644 index 000000000000..07dc5976c3c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGetSharedAccessTokenSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the Shared Access Authorization Token for the User. + * + * @summary gets the Shared Access Authorization Token for the User. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUserToken.json + */ +async function apiManagementUserToken(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.getSharedAccessToken("rg1", "apimService1", "userId1718", { + expiry: new Date("2019-04-21T00:44:24.2845269Z"), + keyType: "primary", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUserToken(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGroupListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGroupListSample.ts new file mode 100644 index 000000000000..193651a050b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userGroupListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all user groups. + * + * @summary lists all user groups. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserGroups.json + */ +async function apiManagementListUserGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userGroup.list( + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListUserGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userIdentitiesListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userIdentitiesListSample.ts new file mode 100644 index 000000000000..3f32bce42470 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userIdentitiesListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to list of all user identities. + * + * @summary list of all user identities. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserIdentities.json + */ +async function apiManagementListUserIdentities(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userIdentities.list( + "rg1", + "apimService1", + "57f2af53bb17172280f44057", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListUserIdentities(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userListByServiceSample.ts new file mode 100644 index 000000000000..6d3e1b06c0c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of registered users in the specified service instance. + * + * @summary lists a collection of registered users in the specified service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUsers.json + */ +async function apiManagementListUsers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.user.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionGetSample.ts new file mode 100644 index 000000000000..367cf2991c3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified Subscription entity associated with a particular user. + * + * @summary gets the specified Subscription entity associated with a particular user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetUserSubscription.json + */ +async function apiManagementGetUserSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.userSubscription.get( + "rg1", + "apimService1", + "1", + "5fa9b096f3df14003c070001", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetUserSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionListSample.ts new file mode 100644 index 000000000000..76e847ef505a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userSubscriptionListSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists the collection of subscriptions of the specified user. + * + * @summary lists the collection of subscriptions of the specified user. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListUserSubscriptions.json + */ +async function apiManagementListUserSubscriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.userSubscription.list( + "rg1", + "apimService1", + "57681833a40f7eb6c49f6acf", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListUserSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userUpdateSample.ts new file mode 100644 index 000000000000..5f7a97e6c36d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/userUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the user specified by its identifier. + * + * @summary updates the details of the user specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateUser.json + */ +async function apiManagementUpdateUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.user.update("rg1", "apimService1", "5931a75ae4bbd512a88c680b", "*", { + email: "foobar@outlook.com", + firstName: "foo", + lastName: "bar", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiCreateOrUpdateSample.ts new file mode 100644 index 000000000000..b086fac2ed76 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiCreateOrUpdateSample.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates new or updates existing specified API of the workspace in an API Management service instance. + * + * @summary creates new or updates existing specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApi.json + */ +async function apiManagementCreateWorkspaceApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempgroup", + { + path: "newapiPath", + description: "apidescription5200", + authenticationSettings: { + oAuth2: { authorizationServerId: "authorizationServerId2283", scope: "oauth2scope2580" }, + }, + displayName: "apiname1463", + protocols: ["https", "http"], + serviceUrl: "http://newechoapi.cloudapp.net/api", + subscriptionKeyParameterNames: { header: "header4520", query: "query3037" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDeleteSample.ts new file mode 100644 index 000000000000..14f985b70ef9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API of the workspace in an API Management service instance. + * + * @summary deletes the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApi.json + */ +async function apiManagementDeleteWorkspaceApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApi.delete("rg1", "apimService1", "wks1", "echo-api", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts new file mode 100644 index 000000000000..2bb9fd7fac20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticCreateOrUpdateSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Diagnostic for an API or updates an existing one. + * + * @summary creates a new Diagnostic for an API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiDiagnostic.json + */ +async function apiManagementCreateWorkspaceApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticDeleteSample.ts new file mode 100644 index 000000000000..91bc4baefa1c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Diagnostic from an API. + * + * @summary deletes the specified Diagnostic from an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiDiagnostic.json + */ +async function apiManagementDeleteWorkspaceApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts new file mode 100644 index 000000000000..285989ce2168 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiDiagnostic.json + */ +async function apiManagementHeadWorkspaceApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetSample.ts new file mode 100644 index 000000000000..7cb3eb102d71 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Diagnostic for an API specified by its identifier. + * + * @summary gets the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiDiagnostic.json + */ +async function apiManagementGetWorkspaceApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.get( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "applicationinsights", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts new file mode 100644 index 000000000000..6193e3253806 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticListByWorkspaceSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all diagnostics of an API. + * + * @summary lists all diagnostics of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiDiagnostics.json + */ +async function apiManagementListWorkspaceApiDiagnostics(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiDiagnostic.listByWorkspace( + "rg1", + "apimService1", + "wks1", + "echo-api", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticUpdateSample.ts new file mode 100644 index 000000000000..d34e0d10aee9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiDiagnosticUpdateSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Diagnostic for an API specified by its identifier. + * + * @summary updates the details of the Diagnostic for an API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiDiagnostic.json + */ +async function apiManagementUpdateWorkspaceApiDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiDiagnostic.update( + "rg1", + "apimService1", + "wks1", + "echo-api", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceApiDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiExportGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiExportGetSample.ts new file mode 100644 index 000000000000..a9c2fd2bcece --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiExportGetSample.ts @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi2dot0.json + */ +async function apiManagementGetWorkspaceApiExportInOpenApi2Dot0(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiExport.get( + "rg1", + "apimService1", + "wks1", + "echo-api", + "swagger-link", + "true", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * + * @summary gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiExportInOpenApi3dot0.json + */ +async function apiManagementGetWorkspaceApiExportInOpenApi3Dot0(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiExport.get( + "rg1", + "apimService1", + "wks1", + "aid9676", + "openapi-link", + "true", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiExportInOpenApi2Dot0(); + await apiManagementGetWorkspaceApiExportInOpenApi3Dot0(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetEntityTagSample.ts new file mode 100644 index 000000000000..812e96d96ae1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApi.json + */ +async function apiManagementHeadWorkspaceApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApi.getEntityTag("rg1", "apimService1", "wks1", "57d1f7558aa04f15146d9d8a"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetSample.ts new file mode 100644 index 000000000000..fb955f931827 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiGetSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiContract.json + */ +async function apiManagementGetWorkspaceApiContract(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.get( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the API specified by its identifier. + * + * @summary gets the details of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRevision.json + */ +async function apiManagementGetWorkspaceApiRevision(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.get("rg1", "apimService1", "wks1", "echo-api;rev=3"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiContract(); + await apiManagementGetWorkspaceApiRevision(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiListByServiceSample.ts new file mode 100644 index 000000000000..c83603d3995e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all APIs of the workspace in an API Management service instance. + * + * @summary lists all APIs of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApis.json + */ +async function apiManagementListWorkspaceApis(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApi.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApis(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..21065d176cb3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationCreateOrUpdateSample.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new operation in the API or updates an existing one. + * + * @summary creates a new operation in the API or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperation.json + */ +async function apiManagementCreateWorkspaceApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "PetStoreTemplate2", + "newoperations", + { + method: "POST", + description: "This can only be done by the logged in user.", + displayName: "createUser2", + templateParameters: [], + urlTemplate: "/user1", + request: { + description: "Created user object", + headers: [], + queryParameters: [], + representations: [ + { + contentType: "application/json", + schemaId: "592f6c1d0af5840ca8897f0c", + typeName: "User", + }, + ], + }, + responses: [ + { + description: "successful operation", + headers: [], + representations: [ + { contentType: "application/xml" }, + { contentType: "application/json" }, + ], + statusCode: 200, + }, + ], + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationDeleteSample.ts new file mode 100644 index 000000000000..2374e6d05ac9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified operation in the API. + * + * @summary deletes the specified operation in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperation.json + */ +async function apiManagementDeleteWorkspaceApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperation.delete( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetEntityTagSample.ts new file mode 100644 index 000000000000..140b77d4430a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperation.json + */ +async function apiManagementHeadWorkspaceApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperation.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetSample.ts new file mode 100644 index 000000000000..64615d78b8af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the API Operation specified by its identifier. + * + * @summary gets the details of the API Operation specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperation.json + */ +async function apiManagementGetWorkspaceApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.get( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + "57d2ef278aa04f0ad01d6cdc", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationListByApiSample.ts new file mode 100644 index 000000000000..a454b81023c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationListByApiSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the operations for the specified API. + * + * @summary lists a collection of the operations for the specified API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperations.json + */ +async function apiManagementListWorkspaceApiOperations(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiOperation.listByApi( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiOperations(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..af8cb490616e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyCreateOrUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the API Operation level. + * + * @summary creates or updates policy configuration for the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiOperationPolicy.json + */ +async function apiManagementCreateWorkspaceApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperationPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "5600b57e7e8880006a080001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyDeleteSample.ts new file mode 100644 index 000000000000..e4323099863a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyDeleteSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Api Operation. + * + * @summary deletes the policy configuration at the Api Operation. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiOperationPolicy.json + */ +async function apiManagementDeleteWorkspaceApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperationPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testapi", + "testoperation", + "policy", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..dd43386b4225 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetEntityTagSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API operation policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API operation policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiOperationPolicy.json + */ +async function apiManagementHeadWorkspaceApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiOperationPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetSample.ts new file mode 100644 index 000000000000..03fdf6c707b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyGetSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API Operation level. + * + * @summary get the policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiOperationPolicy.json + */ +async function apiManagementGetWorkspaceApiOperationPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperationPolicy.get( + "rg1", + "apimService1", + "wks1", + "5600b539c53f5b0062040001", + "5600b53ac53f5b0062080006", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiOperationPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts new file mode 100644 index 000000000000..8c96325e09c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationPolicyListByOperationSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the list of policy configuration at the API Operation level. + * + * @summary get the list of policy configuration at the API Operation level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiOperationPolicies.json + */ +async function apiManagementListWorkspaceApiOperationPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiOperationPolicy.listByOperation( + "rg1", + "apimService1", + "wks1", + "599e2953193c3c0bd0b3e2fa", + "599e29ab193c3c0bd0b3e2fb", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiOperationPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationUpdateSample.ts new file mode 100644 index 000000000000..7bef1988eef2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiOperationUpdateSample.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the operation in the API specified by its identifier. + * + * @summary updates the details of the operation in the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiOperation.json + */ +async function apiManagementUpdateWorkspaceApiOperation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiOperation.update( + "rg1", + "apimService1", + "wks1", + "echo-api", + "operationId", + "*", + { + method: "GET", + displayName: "Retrieve resource", + templateParameters: [], + urlTemplate: "/resource", + request: { + queryParameters: [ + { + name: "param1", + type: "string", + description: 'A sample parameter that is required and has a default value of "sample".', + defaultValue: "sample", + required: true, + values: ["sample"], + }, + ], + }, + responses: [ + { + description: "Returned in all cases.", + headers: [], + representations: [], + statusCode: 200, + }, + { description: "Server Error.", headers: [], representations: [], statusCode: 500 }, + ], + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceApiOperation(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7cc9ff84599e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the API. + * + * @summary creates or updates policy configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiPolicy.json + */ +async function apiManagementCreateWorkspaceApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5600b57e7e8880006a040001", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyDeleteSample.ts new file mode 100644 index 000000000000..3d861ab3965c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Api. + * + * @summary deletes the policy configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiPolicy.json + */ +async function apiManagementDeleteWorkspaceApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiPolicy.delete("rg1", "apimService1", "wks1", "loggerId", "policy", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..ef1fbc96fa65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the API policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the API policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiPolicy.json + */ +async function apiManagementHeadWorkspaceApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetSample.ts new file mode 100644 index 000000000000..2c6684f18caa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiPolicy.json + */ +async function apiManagementGetWorkspaceApiPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiPolicy.get( + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyListByApiSample.ts new file mode 100644 index 000000000000..ed350f184de6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiPolicyListByApiSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiPolicies.json + */ +async function apiManagementListWorkspaceApiPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiPolicy.listByApi( + "rg1", + "apimService1", + "wks1", + "5600b59475ff190048040001", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts new file mode 100644 index 000000000000..83fc349ad924 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Release for the API. + * + * @summary creates a new Release for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiRelease.json + */ +async function apiManagementCreateWorkspaceApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseDeleteSample.ts new file mode 100644 index 000000000000..6b290a75c6d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified release in the API. + * + * @summary deletes the specified release in the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiRelease.json + */ +async function apiManagementDeleteWorkspaceApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiRelease.delete( + "rg1", + "apimService1", + "wks1", + "5a5fcc09124a7fa9b89f2f1d", + "testrev", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetEntityTagSample.ts new file mode 100644 index 000000000000..35770296dddf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the etag of an API release. + * + * @summary returns the etag of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiRelease.json + */ +async function apiManagementHeadWorkspaceApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiRelease.getEntityTag( + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetSample.ts new file mode 100644 index 000000000000..3110476f662e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to returns the details of an API release. + * + * @summary returns the details of an API release. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiRelease.json + */ +async function apiManagementGetWorkspaceApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.get( + "rg1", + "apimService1", + "wks1", + "a1", + "5a7cb545298324c53224a799", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseListByServiceSample.ts new file mode 100644 index 000000000000..d0a9dab2ebe2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseListByServiceSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * + * @summary lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiReleases.json + */ +async function apiManagementListWorkspaceApiReleases(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiRelease.listByService( + "rg1", + "apimService1", + "wks1", + "a1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiReleases(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseUpdateSample.ts new file mode 100644 index 000000000000..f5abb68fd9cd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiReleaseUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the release of the API specified by its identifier. + * + * @summary updates the details of the release of the API specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiRelease.json + */ +async function apiManagementUpdateWorkspaceApiRelease(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiRelease.update( + "rg1", + "apimService1", + "wks1", + "a1", + "testrev", + "*", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/a1", + notes: "yahooagain", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceApiRelease(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiRevisionListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiRevisionListByServiceSample.ts new file mode 100644 index 000000000000..923a86590982 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiRevisionListByServiceSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all revisions of an API. + * + * @summary lists all revisions of an API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiRevisions.json + */ +async function apiManagementListWorkspaceApiRevisions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiRevision.listByService( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiRevisions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7cac3028c8ae --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaCreateOrUpdateSample.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates schema configuration for the API. + * + * @summary creates or updates schema configuration for the API. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiSchema.json + */ +async function apiManagementCreateWorkspaceApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + { + contentType: "application/vnd.ms-azure-apim.xsd+xml", + document: { + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaDeleteSample.ts new file mode 100644 index 000000000000..37d5220878ad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the schema configuration at the Api. + * + * @summary deletes the schema configuration at the Api. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiSchema.json + */ +async function apiManagementDeleteWorkspaceApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiSchema.delete( + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", + "59d5b28e1f7fab116402044e", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetEntityTagSample.ts new file mode 100644 index 000000000000..7f4bd7d56cac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiSchema.json + */ +async function apiManagementHeadWorkspaceApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiSchema.getEntityTag( + "rg1", + "apimService1", + "wks1", + "57d1f7558aa04f15146d9d8a", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetSample.ts new file mode 100644 index 000000000000..b45224e06240 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiSchema.json + */ +async function apiManagementGetWorkspaceApiSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiSchema.get( + "rg1", + "apimService1", + "wks1", + "59d6bb8f1f7fab13dc67ec9b", + "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaListByApiSample.ts new file mode 100644 index 000000000000..313f8edf2100 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiSchemaListByApiSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the schema configuration at the API level. + * + * @summary get the schema configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiSchemas.json + */ +async function apiManagementListWorkspaceApiSchemas(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiSchema.listByApi( + "rg1", + "apimService1", + "wks1", + "59d5b28d1f7fab116c282650", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiUpdateSample.ts new file mode 100644 index 000000000000..42243ffe3063 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiUpdateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the specified API of the workspace in an API Management service instance. + * + * @summary updates the specified API of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApi.json + */ +async function apiManagementUpdateWorkspaceApi(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApi.update("rg1", "apimService1", "wks1", "echo-api", "*", { + path: "newecho", + displayName: "Echo API New", + serviceUrl: "http://echoapi.cloudapp.net/api2", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceApi(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a6585e877bb4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a Api Version Set. + * + * @summary creates or Updates a Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceApiVersionSet.json + */ +async function apiManagementCreateWorkspaceApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "api1", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetDeleteSample.ts new file mode 100644 index 000000000000..21dd0a586527 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Api Version Set. + * + * @summary deletes specific Api Version Set. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceApiVersionSet.json + */ +async function apiManagementDeleteWorkspaceApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiVersionSet.delete("rg1", "apimService1", "wks1", "a1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts new file mode 100644 index 000000000000..6308c6610889 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceApiVersionSet.json + */ +async function apiManagementHeadWorkspaceApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceApiVersionSet.getEntityTag("rg1", "apimService1", "wks1", "vs1"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetSample.ts new file mode 100644 index 000000000000..afeb89fbcbe8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Api Version Set specified by its identifier. + * + * @summary gets the details of the Api Version Set specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceApiVersionSet.json + */ +async function apiManagementGetWorkspaceApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.get("rg1", "apimService1", "wks1", "vs1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetListByServiceSample.ts new file mode 100644 index 000000000000..39c3288c60c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of API Version Sets in the specified workspace with a service instance. + * + * @summary lists a collection of API Version Sets in the specified workspace with a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceApiVersionSets.json + */ +async function apiManagementListWorkspaceApiVersionSets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceApiVersionSet.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceApiVersionSets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetUpdateSample.ts new file mode 100644 index 000000000000..fc12563f88f9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceApiVersionSetUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Api VersionSet specified by its identifier. + * + * @summary updates the details of the Api VersionSet specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceApiVersionSet.json + */ +async function apiManagementUpdateWorkspaceApiVersionSet(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceApiVersionSet.update( + "rg1", + "apimService1", + "wks1", + "vs1", + "*", + { description: "Version configuration", displayName: "api set 1", versioningScheme: "Segment" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceApiVersionSet(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendCreateOrUpdateSample.ts new file mode 100644 index 000000000000..39362b81415a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendCreateOrUpdateSample.ts @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendProxyBackend.json + */ +async function apiManagementCreateWorkspaceBackendProxyBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "proxybackend", + { + description: "description5308", + credentials: { + authorization: { parameter: "opensesma", scheme: "Basic" }, + header: { "x-my-1": ["val1", "val2"] }, + query: { sv: ["xx", "bb", "cc"] }, + }, + proxy: { password: "", url: "http://192.168.1.1:8080", username: "Contoso\\admin" }, + tls: { validateCertificateChain: true, validateCertificateName: true }, + url: "https://backendname2644/", + protocol: "http", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a backend. + * + * @summary creates or Updates a backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceBackendServiceFabric.json + */ +async function apiManagementCreateWorkspaceBackendServiceFabric(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "sfbackend", + { + description: "Service Fabric Test App 1", + properties: { + serviceFabricCluster: { + clientCertificateId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", + managementEndpoints: ["https://somecluster.com"], + maxPartitionResolutionRetries: 5, + serverX509Names: [ + { + name: "ServerCommonName1", + issuerCertificateThumbprint: "IssuerCertificateThumbprint1", + }, + ], + }, + }, + url: "fabric:/mytestapp/mytestservice", + protocol: "http", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceBackendProxyBackend(); + await apiManagementCreateWorkspaceBackendServiceFabric(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendDeleteSample.ts new file mode 100644 index 000000000000..9a14a4dd28dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified backend. + * + * @summary deletes the specified backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceBackend.json + */ +async function apiManagementDeleteWorkspaceBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceBackend.delete("rg1", "apimService1", "wks1", "sfbackend", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetEntityTagSample.ts new file mode 100644 index 000000000000..4fa435435a8c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the backend specified by its identifier. + * + * @summary gets the entity state (Etag) version of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceBackend.json + */ +async function apiManagementHeadWorkspaceBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceBackend.getEntityTag("rg1", "apimService1", "wks1", "sfbackend"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetSample.ts new file mode 100644 index 000000000000..9dfd0a7ec5be --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the backend specified by its identifier. + * + * @summary gets the details of the backend specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceBackend.json + */ +async function apiManagementGetWorkspaceBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.get("rg1", "apimService1", "wks1", "sfbackend"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendListByWorkspaceSample.ts new file mode 100644 index 000000000000..6d105b4925f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendListByWorkspaceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of backends in the specified workspace. + * + * @summary lists a collection of backends in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceBackends.json + */ +async function apiManagementListWorkspaceBackends(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceBackend.listByWorkspace("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceBackends(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendUpdateSample.ts new file mode 100644 index 000000000000..7bab9c5d5ac8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceBackendUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing backend. + * + * @summary updates an existing backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceBackend.json + */ +async function apiManagementUpdateWorkspaceBackend(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceBackend.update( + "rg1", + "apimService1", + "wks1", + "proxybackend", + "*", + { + description: "description5308", + tls: { validateCertificateChain: false, validateCertificateName: true }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceBackend(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateCreateOrUpdateSample.ts new file mode 100644 index 000000000000..cdc5f59bf02a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateCreateOrUpdateSample.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificate.json + */ +async function apiManagementCreateWorkspaceCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempcert", + { + data: "****************Base 64 Encoded Certificate *******************************", + password: "****Certificate Password******", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates the certificate being used for authentication with the backend. + * + * @summary creates or updates the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceCertificateWithKeyVault.json + */ +async function apiManagementCreateWorkspaceCertificateWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + { + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: + "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceCertificate(); + await apiManagementCreateWorkspaceCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateDeleteSample.ts new file mode 100644 index 000000000000..07379f787149 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific certificate. + * + * @summary deletes specific certificate. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceCertificate.json + */ +async function apiManagementDeleteWorkspaceCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceCertificate.delete("rg1", "apimService1", "wks1", "tempcert", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetEntityTagSample.ts new file mode 100644 index 000000000000..c5e79bf08f26 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the certificate specified by its identifier. + * + * @summary gets the entity state (Etag) version of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceCertificate.json + */ +async function apiManagementWorkspaceHeadCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceCertificate.getEntityTag("rg1", "apimService1", "wks1", "templateCert1"); +} + +async function main(): Promise { + await apiManagementWorkspaceHeadCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetSample.ts new file mode 100644 index 000000000000..c2f3d09639b4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateGetSample.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificate.json + */ +async function apiManagementGetWorkspaceCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.get( + "rg1", + "apimService1", + "wks1", + "templateCert1", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the certificate specified by its identifier. + * + * @summary gets the details of the certificate specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceCertificateWithKeyVault.json + */ +async function apiManagementGetWorkspaceCertificateWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.get( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceCertificate(); + await apiManagementGetWorkspaceCertificateWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateListByWorkspaceSample.ts new file mode 100644 index 000000000000..47a596fb05c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateListByWorkspaceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of all certificates in the specified workspace. + * + * @summary lists a collection of all certificates in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceCertificates.json + */ +async function apiManagementListWorkspaceCertificates(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceCertificate.listByWorkspace( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceCertificates(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateRefreshSecretSample.ts new file mode 100644 index 000000000000..8c65ab0bc613 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCertificateRefreshSecretSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to from KeyVault, Refresh the certificate being used for authentication with the backend. + * + * @summary from KeyVault, Refresh the certificate being used for authentication with the backend. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceCertificate.json + */ +async function apiManagementRefreshWorkspaceCertificate(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceCertificate.refreshSecret( + "rg1", + "apimService1", + "wks1", + "templateCertkv", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementRefreshWorkspaceCertificate(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e540174d764c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceCreateOrUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new workspace or updates an existing one. + * + * @summary creates a new workspace or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspace.json + */ +async function apiManagementCreateWorkspace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.createOrUpdate("rg1", "apimService1", "wks1", { + description: "workspace 1", + displayName: "my workspace", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDeleteSample.ts new file mode 100644 index 000000000000..f724b85bdff2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified workspace. + * + * @summary deletes the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspace.json + */ +async function apiManagementDeleteWorkspace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspace.delete("rg1", "apimService1", "wks1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts new file mode 100644 index 000000000000..7e42a31bb265 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticCreateOrUpdateSample.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a new Diagnostic or updates an existing one. + * + * @summary creates a new Diagnostic or updates an existing one. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceDiagnostic.json + */ +async function apiManagementCreateWorkspaceDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/azuremonitor", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticDeleteSample.ts new file mode 100644 index 000000000000..82d71a55c035 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified Diagnostic. + * + * @summary deletes the specified Diagnostic. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceDiagnostic.json + */ +async function apiManagementDeleteWorkspaceDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceDiagnostic.delete( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetEntityTagSample.ts new file mode 100644 index 000000000000..1fd4bde902c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceDiagnostic.json + */ +async function apiManagementHeadWorkspaceDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceDiagnostic.getEntityTag( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetSample.ts new file mode 100644 index 000000000000..d9b801a120b4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Diagnostic specified by its identifier. + * + * @summary gets the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceDiagnostic.json + */ +async function apiManagementGetWorkspaceDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.get( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts new file mode 100644 index 000000000000..42079a323c1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticListByWorkspaceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all diagnostics in the specified workspace. + * + * @summary lists all diagnostics in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceDiagnostics.json + */ +async function apiManagementListWorkspaceDiagnostics(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceDiagnostic.listByWorkspace( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceDiagnostics(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticUpdateSample.ts new file mode 100644 index 000000000000..2ee82dd38f89 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceDiagnosticUpdateSample.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the Diagnostic specified by its identifier. + * + * @summary updates the details of the Diagnostic specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceDiagnostic.json + */ +async function apiManagementUpdateWorkspaceDiagnostic(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceDiagnostic.update( + "rg1", + "apimService1", + "wks1", + "applicationinsights", + "*", + { + alwaysLog: "allErrors", + backend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + frontend: { + response: { body: { bytes: 512 }, headers: ["Content-type"] }, + request: { body: { bytes: 512 }, headers: ["Content-type"] }, + }, + loggerId: "/workspaces/wks1/loggers/applicationinsights", + sampling: { percentage: 50, samplingType: "fixed" }, + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceDiagnostic(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetEntityTagSample.ts new file mode 100644 index 000000000000..68ea701913ae --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspace.json + */ +async function apiManagementHeadWorkspace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspace.getEntityTag("rg1", "apimService1", "wks"); +} + +async function main(): Promise { + await apiManagementHeadWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetSample.ts new file mode 100644 index 000000000000..9b1a3bb506b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the workspace specified by its identifier. + * + * @summary gets the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspace.json + */ +async function apiManagementGetWorkspace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.get("rg1", "apimService1", "wks1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts new file mode 100644 index 000000000000..e27df94695eb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates new or updates existing specified Schema of the workspace in an API Management service instance. + * + * @summary creates new or updates existing specified Schema of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSchema.json + */ +async function apiManagementCreateWorkspaceSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGlobalSchema.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "schema1", + { + description: "sample schema description", + schemaType: "xml", + value: + '\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaDeleteSample.ts new file mode 100644 index 000000000000..28eca0764da5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific Schema. + * + * @summary deletes specific Schema. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSchema.json + */ +async function apiManagementDeleteWorkspaceSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGlobalSchema.delete("rg1", "apimService1", "wks1", "schema1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts new file mode 100644 index 000000000000..d73bdf9a5c17 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the Schema specified by its identifier. + * + * @summary gets the entity state (Etag) version of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSchema.json + */ +async function apiManagementHeadWorkspaceSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGlobalSchema.getEntityTag("rg1", "apimService1", "wks1", "myschema"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetSample.ts new file mode 100644 index 000000000000..4508f4b7a192 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Schema specified by its identifier. + * + * @summary gets the details of the Schema specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSchema.json + */ +async function apiManagementGetWorkspaceSchema(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGlobalSchema.get("rg1", "apimService1", "wks1", "schema1"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceSchema(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaListByServiceSample.ts new file mode 100644 index 000000000000..3ed32f2a3666 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGlobalSchemaListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of schemas registered with workspace in a service instance. + * + * @summary lists a collection of schemas registered with workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSchemas.json + */ +async function apiManagementListWorkspaceSchemas(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGlobalSchema.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceSchemas(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupCreateOrUpdateSample.ts new file mode 100644 index 000000000000..410708bc3788 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupCreateOrUpdateSample.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroup.json + */ +async function apiManagementCreateWorkspaceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tempgroup", + { displayName: "temp group" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a group. + * + * @summary creates or Updates a group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupExternal.json + */ +async function apiManagementCreateWorkspaceGroupExternal(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "aadGroup", + { + type: "external", + description: "new group to test", + displayName: "NewGroup (samiraad.onmicrosoft.com)", + externalId: "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceGroup(); + await apiManagementCreateWorkspaceGroupExternal(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupDeleteSample.ts new file mode 100644 index 000000000000..c4153801736c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific group of the workspace in an API Management service instance. + * + * @summary deletes specific group of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroup.json + */ +async function apiManagementDeleteWorkspaceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroup.delete("rg1", "apimService1", "wks1", "aadGroup", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetEntityTagSample.ts new file mode 100644 index 000000000000..7bc59e391f20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the group specified by its identifier. + * + * @summary gets the entity state (Etag) version of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroup.json + */ +async function apiManagementHeadWorkspaceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroup.getEntityTag( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetSample.ts new file mode 100644 index 000000000000..ca655bf95e1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the group specified by its identifier. + * + * @summary gets the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceGroup.json + */ +async function apiManagementGetWorkspaceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.get( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupListByServiceSample.ts new file mode 100644 index 000000000000..012011fa8bca --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of groups defined within a workspace in a service instance. + * + * @summary lists a collection of groups defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroups.json + */ +async function apiManagementListWorkspaceGroups(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGroup.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceGroups(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUpdateSample.ts new file mode 100644 index 000000000000..5a6c419e5953 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the group specified by its identifier. + * + * @summary updates the details of the group specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceGroup.json + */ +async function apiManagementUpdateWorkspaceGroup(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroup.update( + "rg1", + "apimService1", + "wks1", + "tempgroup", + "*", + { displayName: "temp group" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceGroup(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts new file mode 100644 index 000000000000..296772d02542 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCheckEntityExistsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to checks that user entity specified by identifier is associated with the group entity. + * + * @summary checks that user entity specified by identifier is associated with the group entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceGroupUser.json + */ +async function apiManagementHeadWorkspaceGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroupUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + "5931a75ae4bbd512a88c680b", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCreateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCreateSample.ts new file mode 100644 index 000000000000..67e4bf673736 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserCreateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to add existing user to existing group + * + * @summary add existing user to existing group + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceGroupUser.json + */ +async function apiManagementCreateWorkspaceGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceGroupUser.create( + "rg1", + "apimService1", + "wks1", + "tempgroup", + "59307d350af58404d8a26300", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserDeleteSample.ts new file mode 100644 index 000000000000..d4a1582c2aee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to remove existing user from existing group. + * + * @summary remove existing user from existing group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceGroupUser.json + */ +async function apiManagementDeleteWorkspaceGroupUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceGroupUser.delete( + "rg1", + "apimService1", + "wks1", + "templategroup", + "59307d350af58404d8a26300", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceGroupUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserListSample.ts new file mode 100644 index 000000000000..0a686858592d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceGroupUserListSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of user entities associated with the group. + * + * @summary lists a collection of user entities associated with the group. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceGroupUsers.json + */ +async function apiManagementListWorkspaceGroupUsers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceGroupUser.list( + "rg1", + "apimService1", + "wks1", + "57d2ef278aa04f0888cba3f3", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceGroupUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceListByServiceSample.ts new file mode 100644 index 000000000000..8ccf459c34a3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all workspaces of the API Management service instance. + * + * @summary lists all workspaces of the API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaces.json + */ +async function apiManagementListWorkspaces(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspace.listByService("rg1", "apimService1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaces(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerCreateOrUpdateSample.ts new file mode 100644 index 000000000000..74cbbaea24c6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerCreateOrUpdateSample.ts @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceAILogger.json + */ +async function apiManagementCreateWorkspaceAILogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "loggerId", + { + description: "adding a new logger", + credentials: { instrumentationKey: "11................a1" }, + loggerType: "applicationInsights", + }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or Updates a logger. + * + * @summary creates or Updates a logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceEHLogger.json + */ +async function apiManagementCreateWorkspaceEHLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.createOrUpdate("rg1", "apimService1", "wks1", "eh1", { + description: "adding a new logger", + credentials: { + name: "hydraeventhub", + connectionString: + "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=", + }, + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceAILogger(); + await apiManagementCreateWorkspaceEHLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerDeleteSample.ts new file mode 100644 index 000000000000..1cb3daf7f6ff --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified logger. + * + * @summary deletes the specified logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceLogger.json + */ +async function apiManagementDeleteWorkspaceLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceLogger.delete("rg1", "apimService1", "wks1", "loggerId", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetEntityTagSample.ts new file mode 100644 index 000000000000..ad94a7bde6b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the logger specified by its identifier. + * + * @summary gets the entity state (Etag) version of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceLogger.json + */ +async function apiManagementHeadWorkspaceLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceLogger.getEntityTag("rg1", "apimService1", "wks1", "templateLogger"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetSample.ts new file mode 100644 index 000000000000..849a298e9fe4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the logger specified by its identifier. + * + * @summary gets the details of the logger specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceLogger.json + */ +async function apiManagementGetWorkspaceLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.get("rg1", "apimService1", "wks1", "templateLogger"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerListByWorkspaceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerListByWorkspaceSample.ts new file mode 100644 index 000000000000..6f7768f03941 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerListByWorkspaceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of loggers in the specified workspace. + * + * @summary lists a collection of loggers in the specified workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceLoggers.json + */ +async function apiManagementListWorkspaceLoggers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceLogger.listByWorkspace("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceLoggers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerUpdateSample.ts new file mode 100644 index 000000000000..60a04d5f11de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceLoggerUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates an existing logger. + * + * @summary updates an existing logger. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceLogger.json + */ +async function apiManagementUpdateWorkspaceLogger(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceLogger.update("rg1", "apimService1", "wks1", "eh1", "*", { + description: "updating description", + loggerType: "azureEventHub", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceLogger(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6db0c27bfc72 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueCreateOrUpdateSample.ts @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValue.json + */ +async function apiManagementCreateWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop2", + { displayName: "prop3name", secret: false, tags: ["foo", "bar"], value: "propValue" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates named value. + * + * @summary creates or updates named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json + */ +async function apiManagementCreateWorkspaceNamedValueWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testprop6", + { + displayName: "prop6namekv", + keyVault: { + identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + secretIdentifier: "https://contoso.vault.azure.net/secrets/aadSecret", + }, + secret: true, + tags: ["foo", "bar"], + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceNamedValue(); + await apiManagementCreateWorkspaceNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueDeleteSample.ts new file mode 100644 index 000000000000..690bd8169790 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific named value from the workspace in an API Management service instance. + * + * @summary deletes specific named value from the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNamedValue.json + */ +async function apiManagementDeleteWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNamedValue.delete("rg1", "apimService1", "wks1", "testprop2", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetEntityTagSample.ts new file mode 100644 index 000000000000..d0f89f3925e9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the named value specified by its identifier. + * + * @summary gets the entity state (Etag) version of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNamedValue.json + */ +async function apiManagementHeadWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNamedValue.getEntityTag( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetSample.ts new file mode 100644 index 000000000000..dff852821a1e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueGetSample.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValue.json + */ +async function apiManagementGetWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.get( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets the details of the named value specified by its identifier. + * + * @summary gets the details of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + */ +async function apiManagementGetWorkspaceNamedValueWithKeyVault(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.get("rg1", "apimService1", "wks1", "testprop6"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceNamedValue(); + await apiManagementGetWorkspaceNamedValueWithKeyVault(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListByServiceSample.ts new file mode 100644 index 000000000000..05ba7f2c2a01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of named values defined within a workspace in a service instance. + * + * @summary lists a collection of named values defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNamedValues.json + */ +async function apiManagementListWorkspaceNamedValues(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceNamedValue.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceNamedValues(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListValueSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListValueSample.ts new file mode 100644 index 000000000000..7f21b5e6cd1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueListValueSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the secret of the named value specified by its identifier. + * + * @summary gets the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceNamedValueListValue.json + */ +async function apiManagementWorkspaceNamedValueListValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.listValue( + "rg1", + "apimService1", + "wks1", + "testarmTemplateproperties2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementWorkspaceNamedValueListValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueRefreshSecretSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueRefreshSecretSample.ts new file mode 100644 index 000000000000..e06a38efd345 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueRefreshSecretSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to refresh the secret of the named value specified by its identifier. + * + * @summary refresh the secret of the named value specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementRefreshWorkspaceNamedValue.json + */ +async function apiManagementRefreshWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.refreshSecret( + "rg1", + "apimService1", + "wks1", + "testprop2", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementRefreshWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueUpdateSample.ts new file mode 100644 index 000000000000..25ee5d84a372 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNamedValueUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the specific named value. + * + * @summary updates the specific named value. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceNamedValue.json + */ +async function apiManagementUpdateWorkspaceNamedValue(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNamedValue.update( + "rg1", + "apimService1", + "wks1", + "testprop2", + "*", + { displayName: "prop3name", secret: false, tags: ["foo", "bar2"], value: "propValue" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceNamedValue(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationCreateOrUpdateSample.ts new file mode 100644 index 000000000000..a0405a602292 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationCreateOrUpdateSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to create or Update API Management publisher notification for the workspace. + * + * @summary create or Update API Management publisher notification for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotification.json + */ +async function apiManagementCreateWorkspaceNotification(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotification.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationGetSample.ts new file mode 100644 index 000000000000..a6a6b3bd9660 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the Notification specified by its identifier. + * + * @summary gets the details of the Notification specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceNotification.json + */ +async function apiManagementGetWorkspaceNotification(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotification.get( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceNotification(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationListByServiceSample.ts new file mode 100644 index 000000000000..0f3662c66f1c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of properties defined within a service instance. + * + * @summary lists a collection of properties defined within a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotifications.json + */ +async function apiManagementListWorkspaceNotifications(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceNotification.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceNotifications(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts new file mode 100644 index 000000000000..f6ea27824a30 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCheckEntityExistsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to determine if Notification Recipient Email subscribed to the notification. + * + * @summary determine if Notification Recipient Email subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementHeadWorkspaceNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientEmail.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts new file mode 100644 index 000000000000..fe7a9d80008a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds the Email address to the list of Recipients for the Notification. + * + * @summary adds the Email address to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementCreateWorkspaceNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientEmail.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "foobar@live.com", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts new file mode 100644 index 000000000000..4dace04e5ae0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the email from the list of Notification. + * + * @summary removes the email from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json + */ +async function apiManagementDeleteWorkspaceNotificationRecipientEmail(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientEmail.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "contoso@live.com", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceNotificationRecipientEmail(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts new file mode 100644 index 000000000000..89178a703e9d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientEmailListByNotificationSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of the Notification Recipient Emails subscribed to a notification. + * + * @summary gets the list of the Notification Recipient Emails subscribed to a notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientEmails.json + */ +async function apiManagementListWorkspaceNotificationRecipientEmails(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientEmail.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListWorkspaceNotificationRecipientEmails(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts new file mode 100644 index 000000000000..ef58e8c5c587 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCheckEntityExistsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to determine if the Notification Recipient User is subscribed to the notification. + * + * @summary determine if the Notification Recipient User is subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceNotificationRecipientUser.json + */ +async function apiManagementHeadWorkspaceNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientUser.checkEntityExists( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts new file mode 100644 index 000000000000..f4eb594dd8db --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds the API Management User to the list of Recipients for the Notification. + * + * @summary adds the API Management User to the list of Recipients for the Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceNotificationRecipientUser.json + */ +async function apiManagementCreateWorkspaceNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientUser.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts new file mode 100644 index 000000000000..995da0ddfebf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to removes the API Management user from the list of Notification. + * + * @summary removes the API Management user from the list of Notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceNotificationRecipientUser.json + */ +async function apiManagementDeleteWorkspaceNotificationRecipientUser(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceNotificationRecipientUser.delete( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + "576823d0a40f7e74ec07d642", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceNotificationRecipientUser(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts new file mode 100644 index 000000000000..0e5885ef8713 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceNotificationRecipientUserListByNotificationSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of the Notification Recipient User subscribed to the notification. + * + * @summary gets the list of the Notification Recipient User subscribed to the notification. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceNotificationRecipientUsers.json + */ +async function apiManagementListWorkspaceNotificationRecipientUsers(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceNotificationRecipientUser.listByNotification( + "rg1", + "apimService1", + "wks1", + "RequestPublisherNotificationMessage", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListWorkspaceNotificationRecipientUsers(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..367625a900ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyCreateOrUpdateSample.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the workspace. + * + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicy.json + */ +async function apiManagementCreateWorkspacePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "xml", + value: + " ", + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +/** + * This sample demonstrates how to creates or updates policy configuration for the workspace. + * + * @summary creates or updates policy configuration for the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json + */ +async function apiManagementCreateWorkspacePolicyNonXmlEncoded(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policy", + { + format: "rawxml", + value: + '\r\n \r\n \r\n \r\n "@(context.Request.Headers.FirstOrDefault(h => h.Ke=="Via"))" \r\n \r\n \r\n ', + }, + { ifMatch: "*" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspacePolicy(); + await apiManagementCreateWorkspacePolicyNonXmlEncoded(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyDeleteSample.ts new file mode 100644 index 000000000000..b21d29f396b8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the workspace. + * + * @summary deletes the policy configuration at the workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicy.json + */ +async function apiManagementDeleteWorkspacePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicy.delete("rg1", "apimService1", "wks1", "policy", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts new file mode 100644 index 000000000000..eb9fc3e1d685 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates a policy fragment. + * + * @summary creates or updates a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspacePolicyFragment.json + */ +async function apiManagementCreateWorkspacePolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { + format: "xml", + description: "A policy fragment example", + value: '', + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentDeleteSample.ts new file mode 100644 index 000000000000..5a75b9382558 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes a policy fragment. + * + * @summary deletes a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspacePolicyFragment.json + */ +async function apiManagementDeleteWorkspacePolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicyFragment.delete( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts new file mode 100644 index 000000000000..b4597aac7cf4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of a policy fragment. + * + * @summary gets the entity state (Etag) version of a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicyFragment.json + */ +async function apiManagementHeadWorkspacePolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicyFragment.getEntityTag( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspacePolicyFragment(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetSample.ts new file mode 100644 index 000000000000..31ee75b662de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentGetSample.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragment.json + */ +async function apiManagementGetWorkspacePolicyFragment(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.get( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); + console.log(result); +} + +/** + * This sample demonstrates how to gets a policy fragment. + * + * @summary gets a policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicyFragmentFormat.json + */ +async function apiManagementGetWorkspacePolicyFragmentFormat(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.get( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + { format: "rawxml" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspacePolicyFragment(); + await apiManagementGetWorkspacePolicyFragmentFormat(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListByServiceSample.ts new file mode 100644 index 000000000000..58566b5795eb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListByServiceSample.ts @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets all policy fragments defined within a workspace. + * + * @summary gets all policy fragments defined within a workspace. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragments.json + */ +async function apiManagementListWorkspacePolicyFragments(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspacePolicyFragment.listByService( + "rg1", + "apimService1", + "wks1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspacePolicyFragments(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListReferencesSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListReferencesSample.ts new file mode 100644 index 000000000000..23a49a2c72ed --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyFragmentListReferencesSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists policy resources that reference the policy fragment. + * + * @summary lists policy resources that reference the policy fragment. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicyFragmentReferences.json + */ +async function apiManagementListWorkspacePolicyFragmentReferences(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicyFragment.listReferences( + "rg1", + "apimService1", + "wks1", + "policyFragment1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListWorkspacePolicyFragmentReferences(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..29ac5ab3d88a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the workspace policy specified by its identifier. + * + * @summary gets the entity state (Etag) version of the workspace policy specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspacePolicy.json + */ +async function apiManagementHeadWorkspacePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspacePolicy.getEntityTag("rg1", "apimService1", "wks1", "policy"); +} + +async function main(): Promise { + await apiManagementHeadWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetSample.ts new file mode 100644 index 000000000000..bcc4753a2eb3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the API level. + * + * @summary get the policy configuration at the API level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspacePolicy.json + */ +async function apiManagementGetWorkspacePolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspacePolicy.get("rg1", "apimService1", "wks1", "policy"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspacePolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyListByApiSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyListByApiSample.ts new file mode 100644 index 000000000000..454ee8402b68 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspacePolicyListByApiSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the workspace level. + * + * @summary get the policy configuration at the workspace level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspacePolicies.json + */ +async function apiManagementListWorkspacePolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspacePolicy.listByApi("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspacePolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6e3300870c2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified product via link. + * + * @summary adds an API to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductApiLink.json + */ +async function apiManagementCreateWorkspaceProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductApiLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkDeleteSample.ts new file mode 100644 index 000000000000..bc82bdae1c28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified product. + * + * @summary deletes the specified API from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductApiLink.json + */ +async function apiManagementDeleteWorkspaceProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductApiLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkGetSample.ts new file mode 100644 index 000000000000..781cf135f11e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the API link for the product. + * + * @summary gets the API link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductApiLink.json + */ +async function apiManagementGetWorkspaceProductApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductApiLink.get( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceProductApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkListByProductSample.ts new file mode 100644 index 000000000000..91ff259ce9a2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductApiLinkListByProductSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the API links associated with a product. + * + * @summary lists a collection of the API links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductApiLinks.json + */ +async function apiManagementListWorkspaceProductApiLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProductApiLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceProductApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductCreateOrUpdateSample.ts new file mode 100644 index 000000000000..670eea76eace --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductCreateOrUpdateSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or Updates a product. + * + * @summary creates or Updates a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProduct.json + */ +async function apiManagementCreateWorkspaceProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + { displayName: "Test Template ProductName 4" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductDeleteSample.ts new file mode 100644 index 000000000000..97bdea7a88a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductDeleteSample.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to delete product. + * + * @summary delete product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProduct.json + */ +async function apiManagementDeleteWorkspaceProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProduct.delete("rg1", "apimService1", "wks1", "testproduct", "*", { + deleteSubscriptions: true, + }); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetEntityTagSample.ts new file mode 100644 index 000000000000..50ebe216e705 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetEntityTagSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the product specified by its identifier. + * + * @summary gets the entity state (Etag) version of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProduct.json + */ +async function apiManagementHeadWorkspaceProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProduct.getEntityTag("rg1", "apimService1", "wks1", "unlimited"); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetSample.ts new file mode 100644 index 000000000000..73d1fd63c362 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGetSample.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the product specified by its identifier. + * + * @summary gets the details of the product specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProduct.json + */ +async function apiManagementGetWorkspaceProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.get("rg1", "apimService1", "wks1", "unlimited"); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..1d42fc9f8bbc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds a group to the specified product via link. + * + * @summary adds a group to the specified product via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductGroupLink.json + */ +async function apiManagementCreateWorkspaceProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductGroupLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + { + groupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/groups/group1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkDeleteSample.ts new file mode 100644 index 000000000000..308f3281e372 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkDeleteSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified group from the specified product. + * + * @summary deletes the specified group from the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductGroupLink.json + */ +async function apiManagementDeleteWorkspaceProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductGroupLink.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkGetSample.ts new file mode 100644 index 000000000000..697cf79891e3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the group link for the product. + * + * @summary gets the group link for the product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductGroupLink.json + */ +async function apiManagementGetWorkspaceProductGroupLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductGroupLink.get( + "rg1", + "apimService1", + "wks1", + "testproduct", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceProductGroupLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkListByProductSample.ts new file mode 100644 index 000000000000..f4a5b8383419 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductGroupLinkListByProductSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the group links associated with a product. + * + * @summary lists a collection of the group links associated with a product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductGroupLinks.json + */ +async function apiManagementListWorkspaceProductGroupLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProductGroupLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "product1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceProductGroupLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductListByServiceSample.ts new file mode 100644 index 000000000000..82fe08075684 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of products in the specified workspace in a service instance. + * + * @summary lists a collection of products in the specified workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProducts.json + */ +async function apiManagementListWorkspaceProducts(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceProduct.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceProducts(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts new file mode 100644 index 000000000000..71171106a8d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyCreateOrUpdateSample.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates policy configuration for the Product. + * + * @summary creates or updates policy configuration for the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceProductPolicy.json + */ +async function apiManagementCreateWorkspaceProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "5702e97e5157a50f48dce801", + "policy", + { + format: "xml", + value: + '\r\n \r\n \r\n \r\n @( string.Join(",", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n', + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyDeleteSample.ts new file mode 100644 index 000000000000..a2b048b5dc25 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyDeleteSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the policy configuration at the Product. + * + * @summary deletes the policy configuration at the Product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceProductPolicy.json + */ +async function apiManagementDeleteWorkspaceProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductPolicy.delete( + "rg1", + "apimService1", + "wks1", + "testproduct", + "policy", + "*", + ); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetEntityTagSample.ts new file mode 100644 index 000000000000..d5c101c0c552 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetEntityTagSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the ETag of the policy configuration at the Product level. + * + * @summary get the ETag of the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceProductPolicy.json + */ +async function apiManagementHeadWorkspaceProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceProductPolicy.getEntityTag( + "rg1", + "apimService1", + "wks1", + "unlimited", + "policy", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetSample.ts new file mode 100644 index 000000000000..fc0fff588440 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceProductPolicy.json + */ +async function apiManagementGetWorkspaceProductPolicy(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.get( + "rg1", + "apimService1", + "wks1", + "kjoshiarmTemplateProduct4", + "policy", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceProductPolicy(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyListByProductSample.ts new file mode 100644 index 000000000000..67dfed49b00d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductPolicyListByProductSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to get the policy configuration at the Product level. + * + * @summary get the policy configuration at the Product level. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceProductPolicies.json + */ +async function apiManagementListWorkspaceProductPolicies(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProductPolicy.listByProduct( + "rg1", + "apimService1", + "wks1", + "armTemplateProduct4", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementListWorkspaceProductPolicies(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductUpdateSample.ts new file mode 100644 index 000000000000..2b715f221c4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceProductUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to update existing product details. + * + * @summary update existing product details. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceProduct.json + */ +async function apiManagementUpdateWorkspaceProduct(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceProduct.update( + "rg1", + "apimService1", + "wks1", + "testproduct", + "*", + { displayName: "Test Template ProductName 4" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceProduct(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts new file mode 100644 index 000000000000..789433c7c03f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionCreateOrUpdateSample.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates or updates the subscription of specified user to the specified product. + * + * @summary creates or updates the subscription of specified user to the specified product. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceSubscription.json + */ +async function apiManagementCreateWorkspaceSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "testsub", + { + displayName: "testsub", + ownerId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + scope: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/5600b59475ff190048060002", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionDeleteSample.ts new file mode 100644 index 000000000000..43a7ea15c608 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified subscription. + * + * @summary deletes the specified subscription. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceSubscription.json + */ +async function apiManagementDeleteWorkspaceSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.delete("rg1", "apimService1", "wks1", "testsub", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetEntityTagSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetEntityTagSample.ts new file mode 100644 index 000000000000..375da2af35c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetEntityTagSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * + * @summary gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceSubscription.json + */ +async function apiManagementHeadWorkspaceSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.getEntityTag( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetSample.ts new file mode 100644 index 000000000000..333cc54339d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified Subscription entity. + * + * @summary gets the specified Subscription entity. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceSubscription.json + */ +async function apiManagementGetWorkspaceSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.get( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSample.ts new file mode 100644 index 000000000000..1038612e8787 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists all subscriptions of the workspace in an API Management service instance. + * + * @summary lists all subscriptions of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceSubscriptions.json + */ +async function apiManagementListWorkspaceSubscriptions(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceSubscription.list("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceSubscriptions(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSecretsSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSecretsSample.ts new file mode 100644 index 000000000000..59ea5377d521 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionListSecretsSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the specified Subscription keys. + * + * @summary gets the specified Subscription keys. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionListSecrets.json + */ +async function apiManagementWorkspaceSubscriptionListSecrets(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.listSecrets( + "rg1", + "apimService1", + "wks1", + "5931a769d8d14f0ad8ce13b8", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementWorkspaceSubscriptionListSecrets(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts new file mode 100644 index 000000000000..2133c5a590ab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegeneratePrimaryKeySample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerates primary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates primary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json + */ +async function apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.regeneratePrimaryKey("rg1", "apimService1", "wks1", "testsub"); +} + +async function main(): Promise { + await apiManagementWorkspaceSubscriptionRegeneratePrimaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts new file mode 100644 index 000000000000..d7faffb74a01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionRegenerateSecondaryKeySample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * + * @summary regenerates secondary key of existing subscription of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json + */ +async function apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceSubscription.regenerateSecondaryKey( + "rg1", + "apimService1", + "wks1", + "testsub", + ); +} + +async function main(): Promise { + await apiManagementWorkspaceSubscriptionRegenerateSecondaryKey(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionUpdateSample.ts new file mode 100644 index 000000000000..57b4dfc6df39 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceSubscriptionUpdateSample.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of a subscription specified by its identifier. + * + * @summary updates the details of a subscription specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceSubscription.json + */ +async function apiManagementUpdateWorkspaceSubscription(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceSubscription.update( + "rg1", + "apimService1", + "wks1", + "testsub", + "*", + { displayName: "testsub" }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceSubscription(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..13061ce43146 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an API to the specified tag via link. + * + * @summary adds an API to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagApiLink.json + */ +async function apiManagementCreateWorkspaceTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagApiLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + apiId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkDeleteSample.ts new file mode 100644 index 000000000000..24a55399ce79 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified API from the specified tag. + * + * @summary deletes the specified API from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagApiLink.json + */ +async function apiManagementDeleteWorkspaceTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagApiLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkGetSample.ts new file mode 100644 index 000000000000..a2afbc588f73 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the API link for the tag. + * + * @summary gets the API link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagApiLink.json + */ +async function apiManagementGetWorkspaceTagApiLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagApiLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceTagApiLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkListByProductSample.ts new file mode 100644 index 000000000000..68b622c1c968 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagApiLinkListByProductSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the API links associated with a tag. + * + * @summary lists a collection of the API links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagApiLinks.json + */ +async function apiManagementListWorkspaceTagApiLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagApiLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceTagApiLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagCreateOrUpdateSample.ts new file mode 100644 index 000000000000..6d515e8c8556 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagCreateOrUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to creates a tag. + * + * @summary creates a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTag.json + */ +async function apiManagementCreateWorkspaceTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.createOrUpdate("rg1", "apimService1", "wks1", "tagId1", { + displayName: "tag1", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagDeleteSample.ts new file mode 100644 index 000000000000..38de50f9bad5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes specific tag of the workspace in an API Management service instance. + * + * @summary deletes specific tag of the workspace in an API Management service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTag.json + */ +async function apiManagementDeleteWorkspaceTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTag.delete("rg1", "apimService1", "wks1", "tagId1", "*"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetEntityStateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetEntityStateSample.ts new file mode 100644 index 000000000000..a0aada7b2f9d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetEntityStateSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the entity state version of the tag specified by its identifier. + * + * @summary gets the entity state version of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementHeadWorkspaceTag.json + */ +async function apiManagementHeadWorkspaceTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTag.getEntityState( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); +} + +async function main(): Promise { + await apiManagementHeadWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetSample.ts new file mode 100644 index 000000000000..9adc17e944c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagGetSample.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the details of the tag specified by its identifier. + * + * @summary gets the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTag.json + */ +async function apiManagementGetWorkspaceTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.get( + "rg1", + "apimService1", + "wks1", + "59306a29e4bbd510dc24e5f9", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagListByServiceSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagListByServiceSample.ts new file mode 100644 index 000000000000..a3af9960f204 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagListByServiceSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of tags defined within a workspace in a service instance. + * + * @summary lists a collection of tags defined within a workspace in a service instance. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTags.json + */ +async function apiManagementListWorkspaceTags(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTag.listByService("rg1", "apimService1", "wks1")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceTags(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..5cd4821c122e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds an operation to the specified tag via link. + * + * @summary adds an operation to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagOperationLink.json + */ +async function apiManagementCreateWorkspaceTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagOperationLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + operationId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/echo-api/operations/op1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkDeleteSample.ts new file mode 100644 index 000000000000..aa3ba4c96c0a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified operation from the specified tag. + * + * @summary deletes the specified operation from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagOperationLink.json + */ +async function apiManagementDeleteWorkspaceTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagOperationLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkGetSample.ts new file mode 100644 index 000000000000..c492824a4a43 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the operation link for the tag. + * + * @summary gets the operation link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagOperationLink.json + */ +async function apiManagementGetWorkspaceTagOperationLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagOperationLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceTagOperationLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkListByProductSample.ts new file mode 100644 index 000000000000..3a949561c35d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagOperationLinkListByProductSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the operation links associated with a tag. + * + * @summary lists a collection of the operation links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagOperationLinks.json + */ +async function apiManagementListWorkspaceTagOperationLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagOperationLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceTagOperationLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts new file mode 100644 index 000000000000..727eb28648b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkCreateOrUpdateSample.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to adds a product to the specified tag via link. + * + * @summary adds a product to the specified tag via link. + * x-ms-original-file: 2025-09-01-preview/ApiManagementCreateWorkspaceTagProductLink.json + */ +async function apiManagementCreateWorkspaceTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagProductLink.createOrUpdate( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + { + productId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/products/product1", + }, + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementCreateWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkDeleteSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkDeleteSample.ts new file mode 100644 index 000000000000..e0e3b3cc50f2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkDeleteSample.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to deletes the specified product from the specified tag. + * + * @summary deletes the specified product from the specified tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementDeleteWorkspaceTagProductLink.json + */ +async function apiManagementDeleteWorkspaceTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + await client.workspaceTagProductLink.delete("rg1", "apimService1", "wks1", "tag1", "link1"); +} + +async function main(): Promise { + await apiManagementDeleteWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkGetSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkGetSample.ts new file mode 100644 index 000000000000..1ace746dd013 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkGetSample.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the product link for the tag. + * + * @summary gets the product link for the tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementGetWorkspaceTagProductLink.json + */ +async function apiManagementGetWorkspaceTagProductLink(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTagProductLink.get( + "rg1", + "apimService1", + "wks1", + "tag1", + "link1", + ); + console.log(result); +} + +async function main(): Promise { + await apiManagementGetWorkspaceTagProductLink(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkListByProductSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkListByProductSample.ts new file mode 100644 index 000000000000..0c3fd44f2482 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagProductLinkListByProductSample.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to lists a collection of the product links associated with a tag. + * + * @summary lists a collection of the product links associated with a tag. + * x-ms-original-file: 2025-09-01-preview/ApiManagementListWorkspaceTagProductLinks.json + */ +async function apiManagementListWorkspaceTagProductLinks(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.workspaceTagProductLink.listByProduct( + "rg1", + "apimService1", + "wks1", + "tag1", + )) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await apiManagementListWorkspaceTagProductLinks(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagUpdateSample.ts new file mode 100644 index 000000000000..d86aaafe3297 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceTagUpdateSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the tag specified by its identifier. + * + * @summary updates the details of the tag specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspaceTag.json + */ +async function apiManagementUpdateWorkspaceTag(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspaceTag.update("rg1", "apimService1", "wks1", "temptag", "*", { + displayName: "temp tag", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspaceTag(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceUpdateSample.ts b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceUpdateSample.ts new file mode 100644 index 000000000000..5274cb77d3de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/src/workspaceUpdateSample.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "@azure/arm-apimanagement"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to updates the details of the workspace specified by its identifier. + * + * @summary updates the details of the workspace specified by its identifier. + * x-ms-original-file: 2025-09-01-preview/ApiManagementUpdateWorkspace.json + */ +async function apiManagementUpdateWorkspace(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ApiManagementClient(credential, subscriptionId); + const result = await client.workspace.update("rg1", "apimService1", "wks1", "*", { + description: "workspace 1", + displayName: "my workspace", + }); + console.log(result); +} + +async function main(): Promise { + await apiManagementUpdateWorkspace(); +} + +main().catch(console.error); diff --git a/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/tsconfig.json b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/tsconfig.json new file mode 100644 index 000000000000..82d2ed3be723 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/samples/v11-beta/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2023", + "module": "nodenext", + "moduleResolution": "nodenext", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/index.ts new file mode 100644 index 000000000000..41607d61c477 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { AllPoliciesListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/operations.ts new file mode 100644 index 000000000000..507652acf1c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/operations.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _AllPoliciesCollection, + _allPoliciesCollectionDeserializer, + AllPoliciesContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AllPoliciesListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AllPoliciesListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_AllPoliciesCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _allPoliciesCollectionDeserializer(result.body); +} + +/** Status of all policies of API Management services. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AllPoliciesListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/options.ts new file mode 100644 index 000000000000..30744b784775 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/allPolicies/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AllPoliciesListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/api/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/api/index.ts new file mode 100644 index 000000000000..a7dfa3fcf717 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/api/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByTags, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + ApiListByTagsOptionalParams, + ApiListByServiceOptionalParams, + ApiDeleteOptionalParams, + ApiUpdateOptionalParams, + ApiCreateOrUpdateOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/api/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/api/operations.ts new file mode 100644 index 000000000000..0bdf66faa65a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/api/operations.ts @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + ApiContract, + apiContractDeserializer, + errorResponseDeserializer, + ApiCreateOrUpdateParameter, + apiCreateOrUpdateParameterSerializer, + ApiUpdateContract, + apiUpdateContractSerializer, + _ApiCollection, + _apiCollectionDeserializer, + _TagResourceCollection, + _tagResourceCollectionDeserializer, + TagResourceContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiListByTagsOptionalParams, + ApiListByServiceOptionalParams, + ApiDeleteOptionalParams, + ApiUpdateOptionalParams, + ApiCreateOrUpdateOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByTagsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiListByTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags{?api%2Dversion,%24filter,%24top,%24skip,includeNotTaggedApis}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + includeNotTaggedApis: options?.includeNotTaggedApis, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByTagsDeserialize( + result: PathUncheckedResponse, +): Promise<_TagResourceCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagResourceCollectionDeserializer(result.body); +} + +/** Lists a collection of apis associated with tags. */ +export function listByTags( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiListByTagsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByTagsSend(context, resourceGroupName, serviceName, options), + _listByTagsDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis{?api%2Dversion,%24filter,%24top,%24skip,tags,expandApiVersionSet}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + tags: options?.tags, + expandApiVersionSet: options?.expandApiVersionSet, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiCollectionDeserializer(result.body); +} + +/** Lists all APIs of the API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options: ApiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}{?api%2Dversion,deleteRevisions}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + deleteRevisions: options?.deleteRevisions, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API of the API Management service instance. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options: ApiDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, serviceName, apiId, ifMatch, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options: ApiUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Updates the specified API of the API Management service instance. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options: ApiUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options: ApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiCreateOrUpdateParameterSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Creates new or updates existing specified API of the API Management service instance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options: ApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceName, apiId, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, apiId, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Gets the details of the API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/api/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/api/options.ts new file mode 100644 index 000000000000..c8e61acfc25d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/api/options.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiListByTagsOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged APIs. */ + includeNotTaggedApis?: boolean; +} + +/** Optional parameters. */ +export interface ApiListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; + /** Include full ApiVersionSet resource in response */ + expandApiVersionSet?: boolean; +} + +/** Optional parameters. */ +export interface ApiDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Delete all revisions of the Api. */ + deleteRevisions?: boolean; +} + +/** Optional parameters. */ +export interface ApiUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/index.ts new file mode 100644 index 000000000000..3d012cc64dad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/operations.ts new file mode 100644 index 000000000000..97c937b94236 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/operations.ts @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DiagnosticContract, + diagnosticContractSerializer, + diagnosticContractDeserializer, + _DiagnosticCollection, + _diagnosticCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiDiagnosticListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_DiagnosticCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _diagnosticCollectionDeserializer(result.body); +} + +/** Lists all diagnostics of an API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiDiagnosticListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options: ApiDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Diagnostic from an API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options: ApiDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options: ApiDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Updates the details of the Diagnostic for an API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options: ApiDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: ApiDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Creates a new Diagnostic for an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: ApiDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options: ApiDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options: ApiDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options: ApiDiagnosticGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Gets the details of the Diagnostic for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options: ApiDiagnosticGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/options.ts new file mode 100644 index 000000000000..282018c470a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiDiagnostic/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiDiagnosticListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiDiagnosticDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiDiagnosticUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiDiagnosticGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiDiagnosticGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiExport/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/index.ts new file mode 100644 index 000000000000..fc0a6a8af92d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { ApiExportGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiExport/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/operations.ts new file mode 100644 index 000000000000..ec52c9cb0b5e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/operations.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiExportResult, + apiExportResultDeserializer, + ExportFormat, + ExportApi, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiExportGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options: ApiExportGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}?export=true{?api%2Dversion,format,export}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: format, + export: exportParam, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiExportResultDeserializer(result.body); +} + +/** Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options: ApiExportGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + format, + exportParam, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiExport/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/options.ts new file mode 100644 index 000000000000..e1376eae51cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiExport/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiExportGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/index.ts new file mode 100644 index 000000000000..b54ee8c3c94d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, listByResourceGroup, $delete, update, createOrUpdate, get } from "./operations.js"; +export type { + ApiGatewayListOptionalParams, + ApiGatewayListByResourceGroupOptionalParams, + ApiGatewayDeleteOptionalParams, + ApiGatewayUpdateOptionalParams, + ApiGatewayCreateOrUpdateOptionalParams, + ApiGatewayGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/operations.ts new file mode 100644 index 000000000000..61a68768d2b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/operations.ts @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiManagementGatewayResource, + apiManagementGatewayResourceSerializer, + apiManagementGatewayResourceDeserializer, + ApiManagementGatewayUpdateParameters, + apiManagementGatewayUpdateParametersSerializer, + _ApiManagementGatewayListResult, + _apiManagementGatewayListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiGatewayListOptionalParams, + ApiGatewayListByResourceGroupOptionalParams, + ApiGatewayDeleteOptionalParams, + ApiGatewayUpdateOptionalParams, + ApiGatewayCreateOrUpdateOptionalParams, + ApiGatewayGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listSend( + context: Client, + options: ApiGatewayListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementGatewayListResultDeserializer(result.body); +} + +/** List all API Management gateways within a subscription. */ +export function list( + context: Client, + options: ApiGatewayListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ApiGatewayListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementGatewayListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementGatewayListResultDeserializer(result.body); +} + +/** List all API Management gateways within a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ApiGatewayListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayResourceDeserializer(result.body); +} + +/** Deletes an existing API Management gateway. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementGatewayResource> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, gatewayName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementGatewayResource>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options: ApiGatewayUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementGatewayUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayResourceDeserializer(result.body); +} + +/** Updates an existing API Management gateway. */ +export function update( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options: ApiGatewayUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementGatewayResource> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, gatewayName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementGatewayResource>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options: ApiGatewayCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementGatewayResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayResourceDeserializer(result.body); +} + +/** Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options: ApiGatewayCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementGatewayResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, gatewayName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementGatewayResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayResourceDeserializer(result.body); +} + +/** Gets an API Management gateway resource description. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, gatewayName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/options.ts new file mode 100644 index 000000000000..fec9b993623d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGateway/options.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiGatewayListOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ApiGatewayListByResourceGroupOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ApiGatewayDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/index.ts new file mode 100644 index 000000000000..c999883ecac4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByGateway, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ApiGatewayConfigConnectionListByGatewayOptionalParams, + ApiGatewayConfigConnectionDeleteOptionalParams, + ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ApiGatewayConfigConnectionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/operations.ts new file mode 100644 index 000000000000..7635cd38c930 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/operations.ts @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiManagementGatewayConfigConnectionResource, + apiManagementGatewayConfigConnectionResourceSerializer, + apiManagementGatewayConfigConnectionResourceDeserializer, + _ApiManagementGatewayConfigConnectionListResult, + _apiManagementGatewayConfigConnectionListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiGatewayConfigConnectionListByGatewayOptionalParams, + ApiGatewayConfigConnectionDeleteOptionalParams, + ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ApiGatewayConfigConnectionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByGatewaySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayConfigConnectionListByGatewayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByGatewayDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementGatewayConfigConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementGatewayConfigConnectionListResultDeserializer(result.body); +} + +/** List all API Management gateway config connections within a gateway. */ +export function listByGateway( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayConfigConnectionListByGatewayOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByGatewaySend(context, resourceGroupName, gatewayName, options), + _listByGatewayDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options: ApiGatewayConfigConnectionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + configConnectionName: configConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an existing API Management gateway config connection. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options: ApiGatewayConfigConnectionDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, gatewayName, configConnectionName, ifMatch, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + configConnectionName: configConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementGatewayConfigConnectionResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayConfigConnectionResourceDeserializer(result.body); +} + +/** Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike< + OperationState, + ApiManagementGatewayConfigConnectionResource +> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + gatewayName, + configConnectionName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike< + OperationState, + ApiManagementGatewayConfigConnectionResource + >; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + options: ApiGatewayConfigConnectionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + configConnectionName: configConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementGatewayConfigConnectionResourceDeserializer(result.body); +} + +/** Gets an API Management gateway config connection resource description. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + options: ApiGatewayConfigConnectionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + gatewayName, + configConnectionName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/options.ts new file mode 100644 index 000000000000..f3fdf0658e01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayConfigConnection/options.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiGatewayConfigConnectionListByGatewayOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ApiGatewayConfigConnectionDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayConfigConnectionCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayConfigConnectionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/index.ts new file mode 100644 index 000000000000..abae4813a6e3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { refreshSecret, listByGateway, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ApiGatewayHostnameBindingListByGatewayOptionalParams, + ApiGatewayHostnameBindingDeleteOptionalParams, + ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ApiGatewayHostnameBindingGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/operations.ts new file mode 100644 index 000000000000..9741e295883c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/operations.ts @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GatewayHostnameBindingResource, + gatewayHostnameBindingResourceSerializer, + gatewayHostnameBindingResourceDeserializer, + _GatewayHostnameBindingListResult, + _gatewayHostnameBindingListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ApiGatewayHostnameBindingListByGatewayOptionalParams, + ApiGatewayHostnameBindingDeleteOptionalParams, + ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ApiGatewayHostnameBindingGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options: ApiGatewayHostnameBindingRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + hostnameBindingName: hostnameBindingName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _refreshSecretDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Refresh the secret for an API Management gateway hostname binding. */ +export function refreshSecret( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options: ApiGatewayHostnameBindingRefreshSecretOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _refreshSecretDeserialize, ["202", "200", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _refreshSecretSend(context, resourceGroupName, gatewayName, hostnameBindingName, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _listByGatewaySend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayHostnameBindingListByGatewayOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByGatewayDeserialize( + result: PathUncheckedResponse, +): Promise<_GatewayHostnameBindingListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _gatewayHostnameBindingListResultDeserializer(result.body); +} + +/** List all API Management gateway hostname bindings within a gateway. */ +export function listByGateway( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiGatewayHostnameBindingListByGatewayOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByGatewaySend(context, resourceGroupName, gatewayName, options), + _listByGatewayDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options: ApiGatewayHostnameBindingDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + hostnameBindingName: hostnameBindingName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes an existing API Management gateway hostname binding. */ +export function $delete( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options: ApiGatewayHostnameBindingDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, gatewayName, hostnameBindingName, ifMatch, options), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + hostnameBindingName: hostnameBindingName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: gatewayHostnameBindingResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayHostnameBindingResourceDeserializer(result.body); +} + +/** Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, GatewayHostnameBindingResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + parameters, + options, + ), + resourceLocationConfig: "azure-async-operation", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, GatewayHostnameBindingResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options: ApiGatewayHostnameBindingGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + hostnameBindingName: hostnameBindingName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayHostnameBindingResourceDeserializer(result.body); +} + +/** Gets an API Management gateway hostname binding resource description. */ +export async function get( + context: Client, + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options: ApiGatewayHostnameBindingGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/options.ts new file mode 100644 index 000000000000..e0245bec5ac5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiGatewayHostnameBinding/options.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiGatewayHostnameBindingRefreshSecretOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayHostnameBindingListByGatewayOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiGatewayHostnameBindingDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiGatewayHostnameBindingCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiGatewayHostnameBindingGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/index.ts new file mode 100644 index 000000000000..f80a15cbc95c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiIssueListByServiceOptionalParams, + ApiIssueDeleteOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/operations.ts new file mode 100644 index 000000000000..a7233272acc1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/operations.ts @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IssueContract, + issueContractSerializer, + issueContractDeserializer, + _IssueCollection, + _issueCollectionDeserializer, + IssueUpdateContract, + issueUpdateContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiIssueListByServiceOptionalParams, + ApiIssueDeleteOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiIssueListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues{?api%2Dversion,%24filter,expandCommentsAttachments,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + expandCommentsAttachments: options?.expandCommentsAttachments, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_IssueCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _issueCollectionDeserializer(result.body); +} + +/** Lists all issues associated with the specified API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiIssueListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options: ApiIssueDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Issue from an API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options: ApiIssueDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options: ApiIssueUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: issueUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueContractDeserializer(result.body); +} + +/** Updates an existing issue for an API. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options: ApiIssueUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options: ApiIssueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: issueContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueContractDeserializer(result.body); +} + +/** Creates a new Issue for an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options: ApiIssueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Issue for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}{?api%2Dversion,expandCommentsAttachments}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + expandCommentsAttachments: options?.expandCommentsAttachments, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueContractDeserializer(result.body); +} + +/** Gets the details of the Issue for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, issueId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/options.ts new file mode 100644 index 000000000000..0d5e278a4e6d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssue/options.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiIssueListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiIssueDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiIssueGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueGetOptionalParams extends OperationOptions { + /** Expand the comment attachments. */ + expandCommentsAttachments?: boolean; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/index.ts new file mode 100644 index 000000000000..ada13579da07 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/operations.ts new file mode 100644 index 000000000000..f407b452c3a7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/operations.ts @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IssueAttachmentContract, + issueAttachmentContractSerializer, + issueAttachmentContractDeserializer, + _IssueAttachmentCollection, + _issueAttachmentCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueAttachmentListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_IssueAttachmentCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _issueAttachmentCollectionDeserializer(result.body); +} + +/** Lists all attachments for the Issue associated with the specified API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueAttachmentListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, issueId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options: ApiIssueAttachmentDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + attachmentId: attachmentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified comment from an Issue. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options: ApiIssueAttachmentDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options: ApiIssueAttachmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + attachmentId: attachmentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: issueAttachmentContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueAttachmentContractDeserializer(result.body); +} + +/** Creates a new Attachment for the Issue in an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options: ApiIssueAttachmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options: ApiIssueAttachmentGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + attachmentId: attachmentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options: ApiIssueAttachmentGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options: ApiIssueAttachmentGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + attachmentId: attachmentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueAttachmentContractDeserializer(result.body); +} + +/** Gets the details of the issue Attachment for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options: ApiIssueAttachmentGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/options.ts new file mode 100644 index 000000000000..5d20a49273dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueAttachment/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiIssueAttachmentListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiIssueAttachmentDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueAttachmentCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiIssueAttachmentGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueAttachmentGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/index.ts new file mode 100644 index 000000000000..ca501937dc03 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/operations.ts new file mode 100644 index 000000000000..d7b727dbc381 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/operations.ts @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IssueCommentContract, + issueCommentContractSerializer, + issueCommentContractDeserializer, + _IssueCommentCollection, + _issueCommentCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueCommentListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_IssueCommentCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _issueCommentCollectionDeserializer(result.body); +} + +/** Lists all comments for the Issue associated with the specified API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options: ApiIssueCommentListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, issueId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options: ApiIssueCommentDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + commentId: commentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified comment from an Issue. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options: ApiIssueCommentDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options: ApiIssueCommentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + commentId: commentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: issueCommentContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueCommentContractDeserializer(result.body); +} + +/** Creates a new Comment for the Issue in an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options: ApiIssueCommentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options: ApiIssueCommentGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + commentId: commentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options: ApiIssueCommentGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options: ApiIssueCommentGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + issueId: issueId, + commentId: commentId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueCommentContractDeserializer(result.body); +} + +/** Gets the details of the issue Comment for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options: ApiIssueCommentGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/options.ts new file mode 100644 index 000000000000..ba0b25fd3335 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiIssueComment/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiIssueCommentListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiIssueCommentDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueCommentCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiIssueCommentGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiIssueCommentGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementContext.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementContext.ts new file mode 100644 index 000000000000..329cbde270fe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementContext.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { KnownVersions } from "../models/models.js"; +import { AzureSupportedClouds, getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; +import { TokenCredential } from "@azure/core-auth"; + +/** Resource provider operation status. */ +export interface ApiManagementContext extends Client { + /** The ID of the target subscription. The value must be an UUID. */ + subscriptionId: string; + /** The API version to use for this operation. */ + /** Known values of {@link KnownVersions} that the service accepts. */ + apiVersion?: string; +} + +/** Optional parameters for the client. */ +export interface ApiManagementClientOptionalParams extends ClientOptions { + /** 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; +} + +/** Resource provider operation status. */ +export function createApiManagement( + credential: TokenCredential, + subscriptionId: string, + options: ApiManagementClientOptionalParams = {}, +): ApiManagementContext { + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-arm-apimanagement/11.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + credentials: { + scopes: options.credentials?.scopes ?? ["https://management.azure.com/.default"], + }, + }; + const clientContext = getClient(endpointUrl, credential, updatedOptions); + const apiVersion = options.apiVersion; + return { ...clientContext, apiVersion, subscriptionId } as ApiManagementContext; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/index.ts new file mode 100644 index 000000000000..8ab13b961606 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAvailableSkus } from "./operations.js"; +export type { ApiManagementGatewaySkusListAvailableSkusOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/operations.ts new file mode 100644 index 000000000000..3bbdc74ae1ad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/operations.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _GatewayResourceSkuResults, + _gatewayResourceSkuResultsDeserializer, + GatewayResourceSkuResult, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementGatewaySkusListAvailableSkusOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listAvailableSkusSend( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiManagementGatewaySkusListAvailableSkusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + gatewayName: gatewayName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableSkusDeserialize( + result: PathUncheckedResponse, +): Promise<_GatewayResourceSkuResults> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _gatewayResourceSkuResultsDeserializer(result.body); +} + +/** Gets all available SKU for a given API Management gateway */ +export function listAvailableSkus( + context: Client, + resourceGroupName: string, + gatewayName: string, + options: ApiManagementGatewaySkusListAvailableSkusOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAvailableSkusSend(context, resourceGroupName, gatewayName, options), + _listAvailableSkusDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/options.ts new file mode 100644 index 000000000000..4ecefa751c28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementGatewaySkus/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementGatewaySkusListAvailableSkusOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/index.ts new file mode 100644 index 000000000000..578e19195f8f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ApiManagementOperationsListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/operations.ts new file mode 100644 index 000000000000..5f0c2fdb2a4d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _OperationListResult, + _operationListResultDeserializer, + Operation, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementOperationsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: ApiManagementOperationsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/providers/Microsoft.ApiManagement/operations{?api%2Dversion}", + { + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _operationListResultDeserializer(result.body); +} + +/** Lists all of the available REST API operations of the Microsoft.ApiManagement provider. */ +export function list( + context: Client, + options: ApiManagementOperationsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/options.ts new file mode 100644 index 000000000000..2888e88cb655 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementOperations/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementOperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/index.ts new file mode 100644 index 000000000000..ea60cec24ac4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/index.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getDomainOwnershipIdentifier, + checkNameAvailability, + refreshHostnames, + applyNetworkConfigurationUpdates, + getSsoToken, + migrateToStv2, + backup, + restore, + list, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "./operations.js"; +export type { + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceRefreshHostnamesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/operations.ts new file mode 100644 index 000000000000..68d96c921a5a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/operations.ts @@ -0,0 +1,825 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiManagementServiceResource, + apiManagementServiceResourceSerializer, + apiManagementServiceResourceDeserializer, + ApiManagementServiceUpdateParameters, + apiManagementServiceUpdateParametersSerializer, + _ApiManagementServiceListResult, + _apiManagementServiceListResultDeserializer, + ApiManagementServiceBackupRestoreParameters, + apiManagementServiceBackupRestoreParametersSerializer, + migrateToStv2ContractSerializer, + ApiManagementServiceGetSsoTokenResult, + apiManagementServiceGetSsoTokenResultDeserializer, + apiManagementServiceApplyNetworkConfigurationParametersSerializer, + ApiManagementServiceCheckNameAvailabilityParameters, + apiManagementServiceCheckNameAvailabilityParametersSerializer, + ApiManagementServiceNameAvailabilityResult, + apiManagementServiceNameAvailabilityResultDeserializer, + ApiManagementServiceGetDomainOwnershipIdentifierResult, + apiManagementServiceGetDomainOwnershipIdentifierResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceRefreshHostnamesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getDomainOwnershipIdentifierSend( + context: Client, + options: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDomainOwnershipIdentifierDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceGetDomainOwnershipIdentifierResultDeserializer(result.body); +} + +/** Get the custom domain ownership identifier for an API Management service. */ +export async function getDomainOwnershipIdentifier( + context: Client, + options: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getDomainOwnershipIdentifierSend(context, options); + return _getDomainOwnershipIdentifierDeserialize(result); +} + +export function _checkNameAvailabilitySend( + context: Client, + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options: ApiManagementServiceCheckNameAvailabilityOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementServiceCheckNameAvailabilityParametersSerializer(parameters), + }); +} + +export async function _checkNameAvailabilityDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceNameAvailabilityResultDeserializer(result.body); +} + +/** Checks availability and correctness of a name for an API Management service. */ +export async function checkNameAvailability( + context: Client, + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options: ApiManagementServiceCheckNameAvailabilityOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkNameAvailabilitySend(context, parameters, options); + return _checkNameAvailabilityDeserialize(result); +} + +export function _refreshHostnamesSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceRefreshHostnamesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/refreshHostnames{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshHostnamesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. */ +export function refreshHostnames( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceRefreshHostnamesOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _refreshHostnamesDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _refreshHostnamesSend(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _applyNetworkConfigurationUpdatesSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : apiManagementServiceApplyNetworkConfigurationParametersSerializer(options?.parameters), + }); +} + +export async function _applyNetworkConfigurationUpdatesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. */ +export function applyNetworkConfigurationUpdates( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams = { + requestOptions: {}, + }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller( + context, + _applyNetworkConfigurationUpdatesDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _applyNetworkConfigurationUpdatesSend(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ) as PollerLike, ApiManagementServiceResource>; +} + +export function _getSsoTokenSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceGetSsoTokenOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getSsoTokenDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceGetSsoTokenResultDeserializer(result.body); +} + +/** Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. */ +export async function getSsoToken( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceGetSsoTokenOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSsoTokenSend(context, resourceGroupName, serviceName, options); + return _getSsoTokenDeserialize(result); +} + +export function _migrateToStv2Send( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceMigrateToStv2OptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : migrateToStv2ContractSerializer(options?.parameters), + }); +} + +export async function _migrateToStv2Deserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. */ +export function migrateToStv2( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceMigrateToStv2OptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _migrateToStv2Deserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _migrateToStv2Send(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _backupSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options: ApiManagementServiceBackupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementServiceBackupRestoreParametersSerializer(parameters), + }); +} + +export async function _backupDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. */ +export function backup( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options: ApiManagementServiceBackupOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _backupDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _backupSend(context, resourceGroupName, serviceName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _restoreSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options: ApiManagementServiceRestoreOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementServiceBackupRestoreParametersSerializer(parameters), + }); +} + +export async function _restoreDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. */ +export function restore( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options: ApiManagementServiceRestoreOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _restoreDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _restoreSend(context, resourceGroupName, serviceName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _listSend( + context: Client, + options: ApiManagementServiceListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementServiceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementServiceListResultDeserializer(result.body); +} + +/** Lists all API Management services within an Azure subscription. */ +export function list( + context: Client, + options: ApiManagementServiceListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByResourceGroupSend( + context: Client, + resourceGroupName: string, + options: ApiManagementServiceListByResourceGroupOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResourceGroupDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementServiceListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementServiceListResultDeserializer(result.body); +} + +/** List all API Management services within a resource group. */ +export function listByResourceGroup( + context: Client, + resourceGroupName: string, + options: ApiManagementServiceListByResourceGroupOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResourceGroupSend(context, resourceGroupName, options), + _listByResourceGroupDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Deletes an existing API Management service. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _$deleteSend(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options: ApiManagementServiceUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementServiceUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Updates an existing API Management service. */ +export function update( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options: ApiManagementServiceUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend(context, resourceGroupName, serviceName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options: ApiManagementServiceCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: apiManagementServiceResourceSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Creates or updates an API Management service. This is long running operation and could take several minutes to complete. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options: ApiManagementServiceCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiManagementServiceResource> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiManagementServiceResource>; +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementServiceResourceDeserializer(result.body); +} + +/** Gets an API Management service resource description. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/options.ts new file mode 100644 index 000000000000..fe77264ad361 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementService/options.ts @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + MigrateToStv2Contract, + ApiManagementServiceApplyNetworkConfigurationParameters, +} from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiManagementServiceCheckNameAvailabilityOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiManagementServiceRefreshHostnamesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ + parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; +} + +/** Optional parameters. */ +export interface ApiManagementServiceGetSsoTokenOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiManagementServiceMigrateToStv2OptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Optional parameters supplied to migrate service. */ + parameters?: MigrateToStv2Contract; +} + +/** Optional parameters. */ +export interface ApiManagementServiceBackupOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceRestoreOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceListOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ApiManagementServiceListByResourceGroupOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} + +/** Optional parameters. */ +export interface ApiManagementServiceDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface ApiManagementServiceGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/index.ts new file mode 100644 index 000000000000..9e06ad977513 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { performConnectivityCheckAsync } from "./operations.js"; +export type { ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/operations.ts new file mode 100644 index 000000000000..c31a42a6f8af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/operations.ts @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ConnectivityCheckRequest, + connectivityCheckRequestSerializer, + ConnectivityCheckResponse, + connectivityCheckResponseDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _performConnectivityCheckAsyncSend( + context: Client, + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: connectivityCheckRequestSerializer(connectivityCheckRequestParams), + }); +} + +export async function _performConnectivityCheckAsyncDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return connectivityCheckResponseDeserializer(result.body); +} + +/** Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. */ +export function performConnectivityCheckAsync( + context: Client, + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams = { + requestOptions: {}, + }, +): PollerLike, ConnectivityCheckResponse> { + return getLongRunningPoller( + context, + _performConnectivityCheckAsyncDeserialize, + ["200", "202", "201"], + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _performConnectivityCheckAsyncSend( + context, + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ) as PollerLike, ConnectivityCheckResponse>; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/options.ts new file mode 100644 index 000000000000..09dbeceb9378 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceResources/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/index.ts new file mode 100644 index 000000000000..28963cb20bd0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listAvailableServiceSkus } from "./operations.js"; +export type { ApiManagementServiceSkusListAvailableServiceSkusOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/operations.ts new file mode 100644 index 000000000000..a8e07c031ef9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/operations.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ResourceSkuResults, + _resourceSkuResultsDeserializer, + ResourceSkuResult, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementServiceSkusListAvailableServiceSkusOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listAvailableServiceSkusSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listAvailableServiceSkusDeserialize( + result: PathUncheckedResponse, +): Promise<_ResourceSkuResults> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _resourceSkuResultsDeserializer(result.body); +} + +/** Gets all available SKU for a given API Management service */ +export function listAvailableServiceSkus( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listAvailableServiceSkusSend(context, resourceGroupName, serviceName, options), + _listAvailableServiceSkusDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/options.ts new file mode 100644 index 000000000000..4e023cf418ec --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementServiceSkus/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/index.ts new file mode 100644 index 000000000000..1b9d9fe41d23 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ApiManagementSkusListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/operations.ts new file mode 100644 index 000000000000..f9c958d2be76 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/operations.ts @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ApiManagementSkusResult, + _apiManagementSkusResultDeserializer, + ApiManagementSku, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementSkusListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + options: ApiManagementSkusListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementSkusResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementSkusResultDeserializer(result.body); +} + +/** Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. */ +export function list( + context: Client, + options: ApiManagementSkusListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/options.ts new file mode 100644 index 000000000000..0f0cf5c1dc0d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementSkus/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementSkusListOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/index.ts new file mode 100644 index 000000000000..0a864ada5d14 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { ApiManagementWorkspaceLinkGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/operations.ts new file mode 100644 index 000000000000..41af7d46ee5a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/operations.ts @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiManagementWorkspaceLinksResource, + apiManagementWorkspaceLinksResourceDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementWorkspaceLinkGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: ApiManagementWorkspaceLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiManagementWorkspaceLinksResourceDeserializer(result.body); +} + +/** Gets an API Management WorkspaceLink resource description. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: ApiManagementWorkspaceLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, workspaceId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/options.ts new file mode 100644 index 000000000000..443571503b69 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLink/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementWorkspaceLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/index.ts new file mode 100644 index 000000000000..8f935df3611f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { ApiManagementWorkspaceLinksListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/operations.ts new file mode 100644 index 000000000000..1d8948368a30 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/operations.ts @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiManagementWorkspaceLinksResource, + _ApiManagementWorkspaceLinksListResult, + _apiManagementWorkspaceLinksListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiManagementWorkspaceLinksListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementWorkspaceLinksListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks{?api%2Dversion,%24top,%24skipToken}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skipToken": options?.skipToken, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiManagementWorkspaceLinksListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiManagementWorkspaceLinksListResultDeserializer(result.body); +} + +/** List all API Management workspaceLinks for a service. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiManagementWorkspaceLinksListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/options.ts new file mode 100644 index 000000000000..8e0b051e2df1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiManagementWorkspaceLinks/options.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiManagementWorkspaceLinksListByServiceOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Skip token for retrieving the next page of results. */ + skipToken?: string; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/index.ts new file mode 100644 index 000000000000..a30a86bb4e2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiOperationListByApiOptionalParams, + ApiOperationDeleteOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/operations.ts new file mode 100644 index 000000000000..3a8e8c5642ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/operations.ts @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationContract, + operationContractSerializer, + operationContractDeserializer, + OperationUpdateContract, + operationUpdateContractSerializer, + _OperationCollection, + _operationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiOperationListByApiOptionalParams, + ApiOperationDeleteOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiOperationListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations{?api%2Dversion,%24filter,%24top,%24skip,tags}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + tags: options?.tags, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _operationCollectionDeserializer(result.body); +} + +/** Lists a collection of the operations for the specified API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiOperationListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options: ApiOperationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified operation in the API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options: ApiOperationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options: ApiOperationUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: operationUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Updates the details of the operation in the API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options: ApiOperationUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options: ApiOperationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: operationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Creates a new operation in the API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options: ApiOperationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API operation specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Gets the details of the API Operation specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/options.ts new file mode 100644 index 000000000000..dd78fc941532 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperation/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiOperationListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; +} + +/** Optional parameters. */ +export interface ApiOperationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiOperationGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/index.ts new file mode 100644 index 000000000000..16595aa6fe1c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByOperation, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/operations.ts new file mode 100644 index 000000000000..c11295810d68 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/operations.ts @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationPolicyListByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the list of policy configuration at the API Operation level. */ +export async function listByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: ApiOperationPolicyListByOperationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByOperationSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + options, + ); + return _listByOperationDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ApiOperationPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Api Operation. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ApiOperationPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ApiOperationPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the API Operation level. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ApiOperationPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: ApiOperationPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: ApiOperationPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: ApiOperationPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the API Operation level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: ApiOperationPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/options.ts new file mode 100644 index 000000000000..e9af6a2bfccd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiOperationPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiOperationPolicyListByOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiOperationPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiOperationPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/index.ts new file mode 100644 index 000000000000..7148a9c0324c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiPolicyListByApiOptionalParams, + ApiPolicyDeleteOptionalParams, + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/operations.ts new file mode 100644 index 000000000000..a54b7b4b7ba8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/operations.ts @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiPolicyListByApiOptionalParams, + ApiPolicyDeleteOptionalParams, + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiPolicyListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the policy configuration at the API level. */ +export async function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiPolicyListByApiOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByApiSend(context, resourceGroupName, serviceName, apiId, options); + return _listByApiDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ApiPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Api. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ApiPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ApiPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the API. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ApiPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options: ApiPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options: ApiPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options: ApiPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the API level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options: ApiPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, policyId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/options.ts new file mode 100644 index 000000000000..030457656a73 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiPolicyListByApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/index.ts new file mode 100644 index 000000000000..4566e4f892fc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApis } from "./operations.js"; +export type { ApiProductListByApisOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/operations.ts new file mode 100644 index 000000000000..8a422152de68 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/operations.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductContract, + _ProductCollection, + _productCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiProductListByApisOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApisSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiProductListByApisOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApisDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productCollectionDeserializer(result.body); +} + +/** Lists all Products, which the API is part of. */ +export function listByApis( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiProductListByApisOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApisSend(context, resourceGroupName, serviceName, apiId, options), + _listByApisDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/options.ts new file mode 100644 index 000000000000..dadf0af12861 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiProduct/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiProductListByApisOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/index.ts new file mode 100644 index 000000000000..9ba5eff3fbd4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiReleaseListByServiceOptionalParams, + ApiReleaseDeleteOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/operations.ts new file mode 100644 index 000000000000..2f0be4f439e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/operations.ts @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiReleaseContract, + apiReleaseContractSerializer, + apiReleaseContractDeserializer, + _ApiReleaseCollection, + _apiReleaseCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiReleaseListByServiceOptionalParams, + ApiReleaseDeleteOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiReleaseListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiReleaseCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiReleaseCollectionDeserializer(result.body); +} + +/** Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiReleaseListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options: ApiReleaseDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified release in the API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options: ApiReleaseDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options: ApiReleaseUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiReleaseContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Updates the details of the release of the API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options: ApiReleaseUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options: ApiReleaseCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiReleaseContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Creates a new Release for the API. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options: ApiReleaseCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options: ApiReleaseGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Returns the etag of an API release. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options: ApiReleaseGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options: ApiReleaseGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Returns the details of an API release. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options: ApiReleaseGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, releaseId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/options.ts new file mode 100644 index 000000000000..f9b3052d93c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRelease/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiReleaseListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiReleaseDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiReleaseUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiReleaseCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiReleaseGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiReleaseGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/index.ts new file mode 100644 index 000000000000..348c6b2fb5a7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { ApiRevisionListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/operations.ts new file mode 100644 index 000000000000..17438f63b05c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/operations.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ApiRevisionCollection, + _apiRevisionCollectionDeserializer, + ApiRevisionContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiRevisionListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiRevisionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiRevisionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiRevisionCollectionDeserializer(result.body); +} + +/** Lists all revisions of an API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiRevisionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/options.ts new file mode 100644 index 000000000000..159d7250a084 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiRevision/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiRevisionListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/index.ts new file mode 100644 index 000000000000..ec6b61e849d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiSchemaListByApiOptionalParams, + ApiSchemaDeleteOptionalParams, + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/operations.ts new file mode 100644 index 000000000000..afd1d82695a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/operations.ts @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SchemaContract, + schemaContractSerializer, + schemaContractDeserializer, + _SchemaCollection, + _schemaCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiSchemaListByApiOptionalParams, + ApiSchemaDeleteOptionalParams, + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiSchemaListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _schemaCollectionDeserializer(result.body); +} + +/** Get the schema configuration at the API level. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiSchemaListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options: ApiSchemaDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the schema configuration at the Api. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options: ApiSchemaDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + schemaId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options: ApiSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: schemaContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return schemaContractDeserializer(result.body); +} + +/** Creates or updates schema configuration for the API. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options: ApiSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, SchemaContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, SchemaContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options: ApiSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the schema specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options: ApiSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + schemaId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options: ApiSchemaGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return schemaContractDeserializer(result.body); +} + +/** Get the schema configuration at the API level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options: ApiSchemaGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, schemaId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/options.ts new file mode 100644 index 000000000000..b0b3741b6d9c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiSchema/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiSchemaListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiSchemaDeleteOptionalParams extends OperationOptions { + /** If true removes all references to the schema before deleting it. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface ApiSchemaCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiSchemaGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiSchemaGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/index.ts new file mode 100644 index 000000000000..b14350a551e2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/operations.ts new file mode 100644 index 000000000000..70c8544f7e8c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/operations.ts @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagDescriptionContract, + tagDescriptionContractDeserializer, + TagDescriptionCreateParameters, + tagDescriptionCreateParametersSerializer, + _TagDescriptionCollection, + _tagDescriptionCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiTagDescriptionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_TagDescriptionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagDescriptionCollectionDeserializer(result.body); +} + +/** Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiTagDescriptionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options: ApiTagDescriptionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagDescriptionId: tagDescriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete tag description for the Api. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options: ApiTagDescriptionDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options: ApiTagDescriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagDescriptionId: tagDescriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: tagDescriptionCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagDescriptionContractDeserializer(result.body); +} + +/** Create/Update tag description in scope of the Api. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options: ApiTagDescriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options: ApiTagDescriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagDescriptionId: tagDescriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options: ApiTagDescriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options: ApiTagDescriptionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagDescriptionId: tagDescriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagDescriptionContractDeserializer(result.body); +} + +/** Get Tag description in scope of API */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options: ApiTagDescriptionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/options.ts new file mode 100644 index 000000000000..d132b77ce0b6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTagDescription/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiTagDescriptionListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiTagDescriptionDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiTagDescriptionCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiTagDescriptionGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiTagDescriptionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTool/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/index.ts new file mode 100644 index 000000000000..fafc0febe20f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiToolListByApiOptionalParams, + ApiToolDeleteOptionalParams, + ApiToolUpdateOptionalParams, + ApiToolCreateOrUpdateOptionalParams, + ApiToolGetEntityTagOptionalParams, + ApiToolGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTool/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/operations.ts new file mode 100644 index 000000000000..fd11963d02a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/operations.ts @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ToolContract, + toolContractSerializer, + toolContractDeserializer, + _ToolCollection, + _toolCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiToolListByApiOptionalParams, + ApiToolDeleteOptionalParams, + ApiToolUpdateOptionalParams, + ApiToolCreateOrUpdateOptionalParams, + ApiToolGetEntityTagOptionalParams, + ApiToolGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiToolListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_ToolCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _toolCollectionDeserializer(result.body); +} + +/** Lists a collection of the MCP tools for the specified API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiToolListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + toolId: toolId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified tool in the API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + toolId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options: ApiToolUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + toolId: toolId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: toolContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return toolContractDeserializer(result.body); +} + +/** Updates the details of the tool in the API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options: ApiToolUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + toolId, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options: ApiToolCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + toolId: toolId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: toolContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return toolContractDeserializer(result.body); +} + +/** Creates a new tool in the API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options: ApiToolCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + toolId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + toolId: toolId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API tool specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + toolId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tools/{toolId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + toolId: toolId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return toolContractDeserializer(result.body); +} + +/** Gets the details of the API Tool specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options: ApiToolGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, toolId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiTool/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/options.ts new file mode 100644 index 000000000000..83613e2ecb9b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiTool/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiToolListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiToolDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiToolUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiToolCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiToolGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiToolGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/index.ts new file mode 100644 index 000000000000..136bd7575869 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/operations.ts new file mode 100644 index 000000000000..ef15dc871be8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/operations.ts @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiVersionSetContract, + apiVersionSetContractSerializer, + apiVersionSetContractDeserializer, + ApiVersionSetUpdateParameters, + apiVersionSetUpdateParametersSerializer, + _ApiVersionSetCollection, + _apiVersionSetCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiVersionSetListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiVersionSetCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiVersionSetCollectionDeserializer(result.body); +} + +/** Lists a collection of API Version Sets in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ApiVersionSetListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options: ApiVersionSetDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Api Version Set. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options: ApiVersionSetDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options: ApiVersionSetUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiVersionSetUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Updates the details of the Api VersionSet specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options: ApiVersionSetUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + versionSetId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options: ApiVersionSetCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiVersionSetContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Creates or Updates a Api Version Set. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options: ApiVersionSetCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + versionSetId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options: ApiVersionSetGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options: ApiVersionSetGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + versionSetId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options: ApiVersionSetGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Gets the details of the Api Version Set specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options: ApiVersionSetGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, versionSetId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/options.ts new file mode 100644 index 000000000000..b4b52c74d978 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiVersionSet/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiVersionSetListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ApiVersionSetDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiVersionSetUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiVersionSetCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiVersionSetGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiVersionSetGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/index.ts new file mode 100644 index 000000000000..ff28d1328fd7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ApiWikiDeleteOptionalParams, + ApiWikiUpdateOptionalParams, + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/operations.ts new file mode 100644 index 000000000000..f6be87a71d11 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/operations.ts @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WikiContract, + wikiContractSerializer, + wikiContractDeserializer, + WikiUpdateContract, + wikiUpdateContractSerializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ApiWikiDeleteOptionalParams, + ApiWikiUpdateOptionalParams, + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options: ApiWikiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Wiki from an API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options: ApiWikiDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options: ApiWikiUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: wikiUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Updates the details of the Wiki for an API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options: ApiWikiUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options: ApiWikiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: wikiContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Creates a new Wiki for an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options: ApiWikiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikiGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikiGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, apiId, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikiGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Gets the details of the Wiki for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikiGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, apiId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/options.ts new file mode 100644 index 000000000000..7a837f21b7b6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWiki/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiWikiDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiWikiUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiWikiCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ApiWikiGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ApiWikiGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/index.ts new file mode 100644 index 000000000000..6a448f7dfa7d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ApiWikisListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/operations.ts new file mode 100644 index 000000000000..e5fe1e1d3047 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/operations.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WikiContract, + _WikiCollection, + _wikiCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ApiWikisListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikisListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_WikiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _wikiCollectionDeserializer(result.body); +} + +/** Gets the wikis for an API specified by its identifier. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: ApiWikisListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, apiId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/options.ts new file mode 100644 index 000000000000..f5528e5caeea --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/apiWikis/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApiWikisListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorization/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorization/index.ts new file mode 100644 index 000000000000..874bfdc757ed --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorization/index.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + confirmConsentCode, + listByAuthorizationProvider, + $delete, + createOrUpdate, + get, +} from "./operations.js"; +export type { + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationDeleteOptionalParams, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorization/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorization/operations.ts new file mode 100644 index 000000000000..3154f7b20f12 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorization/operations.ts @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AuthorizationContract, + authorizationContractSerializer, + authorizationContractDeserializer, + _AuthorizationCollection, + _authorizationCollectionDeserializer, + AuthorizationConfirmConsentCodeRequestContract, + authorizationConfirmConsentCodeRequestContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationDeleteOptionalParams, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _confirmConsentCodeSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options: AuthorizationConfirmConsentCodeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: authorizationConfirmConsentCodeRequestContractSerializer(parameters), + }); +} + +export async function _confirmConsentCodeDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Confirm valid consent code to suppress Authorizations anti-phishing page. */ +export async function confirmConsentCode( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options: AuthorizationConfirmConsentCodeOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _confirmConsentCodeSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ); + return _confirmConsentCodeDeserialize(result); +} + +export function _listByAuthorizationProviderSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationListByAuthorizationProviderOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByAuthorizationProviderDeserialize( + result: PathUncheckedResponse, +): Promise<_AuthorizationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _authorizationCollectionDeserializer(result.body); +} + +/** Lists a collection of authorization providers defined within a authorization provider. */ +export function listByAuthorizationProvider( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationListByAuthorizationProviderOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByAuthorizationProviderSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + options, + ), + _listByAuthorizationProviderDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options: AuthorizationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Authorization from the Authorization provider. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options: AuthorizationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options: AuthorizationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: authorizationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationContractDeserializer(result.body); +} + +/** Creates or updates authorization. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options: AuthorizationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options: AuthorizationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationContractDeserializer(result.body); +} + +/** Gets the details of the authorization specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options: AuthorizationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorization/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorization/options.ts new file mode 100644 index 000000000000..9f9c2fb602e7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorization/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationConfirmConsentCodeOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationListByAuthorizationProviderOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface AuthorizationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface AuthorizationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/index.ts new file mode 100644 index 000000000000..a7eb5c373db1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByAuthorization, $delete, createOrUpdate, get } from "./operations.js"; +export type { + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/operations.ts new file mode 100644 index 000000000000..13db19c9acae --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/operations.ts @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AuthorizationAccessPolicyContract, + authorizationAccessPolicyContractSerializer, + authorizationAccessPolicyContractDeserializer, + _AuthorizationAccessPolicyCollection, + _authorizationAccessPolicyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByAuthorizationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options: AuthorizationAccessPolicyListByAuthorizationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByAuthorizationDeserialize( + result: PathUncheckedResponse, +): Promise<_AuthorizationAccessPolicyCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _authorizationAccessPolicyCollectionDeserializer(result.body); +} + +/** Lists a collection of authorization access policy defined within a authorization. */ +export function listByAuthorization( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options: AuthorizationAccessPolicyListByAuthorizationOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByAuthorizationSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + ), + _listByAuthorizationDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options: AuthorizationAccessPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + authorizationAccessPolicyId: authorizationAccessPolicyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific access policy from the Authorization. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options: AuthorizationAccessPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options: AuthorizationAccessPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + authorizationAccessPolicyId: authorizationAccessPolicyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: authorizationAccessPolicyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationAccessPolicyContractDeserializer(result.body); +} + +/** Creates or updates Authorization Access Policy. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options: AuthorizationAccessPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options: AuthorizationAccessPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + authorizationAccessPolicyId: authorizationAccessPolicyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationAccessPolicyContractDeserializer(result.body); +} + +/** Gets the details of the authorization access policy specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options: AuthorizationAccessPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/options.ts new file mode 100644 index 000000000000..d7a118c11b2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationAccessPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface AuthorizationAccessPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface AuthorizationAccessPolicyGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/index.ts new file mode 100644 index 000000000000..5e4746dc77a5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { post } from "./operations.js"; +export type { AuthorizationLoginLinksPostOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/operations.ts new file mode 100644 index 000000000000..130d97e96fd1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/operations.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AuthorizationLoginRequestContract, + authorizationLoginRequestContractSerializer, + AuthorizationLoginResponseContract, + authorizationLoginResponseContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { AuthorizationLoginLinksPostOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _postSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options: AuthorizationLoginLinksPostOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + authorizationId: authorizationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: authorizationLoginRequestContractSerializer(parameters), + }); +} + +export async function _postDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationLoginResponseContractDeserializer(result.body); +} + +/** Gets authorization login links. */ +export async function post( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options: AuthorizationLoginLinksPostOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _postSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ); + return _postDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/options.ts new file mode 100644 index 000000000000..220b2a8f0611 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationLoginLinks/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationLoginLinksPostOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/index.ts new file mode 100644 index 000000000000..59139675bfee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { refreshSecret, listByService, $delete, createOrUpdate, get } from "./operations.js"; +export type { + AuthorizationProviderRefreshSecretOptionalParams, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/operations.ts new file mode 100644 index 000000000000..9cdead67fc03 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/operations.ts @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AuthorizationProviderContract, + authorizationProviderContractSerializer, + authorizationProviderContractDeserializer, + _AuthorizationProviderCollection, + _authorizationProviderCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AuthorizationProviderRefreshSecretOptionalParams, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationProviderRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshSecretDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationProviderContractDeserializer(result.body); +} + +/** Refreshes the Key Vault reference secret for the specified authorization provider. */ +export async function refreshSecret( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationProviderRefreshSecretOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _refreshSecretSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + options, + ); + return _refreshSecretDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AuthorizationProviderListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_AuthorizationProviderCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _authorizationProviderCollectionDeserializer(result.body); +} + +/** Lists a collection of authorization providers defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AuthorizationProviderListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options: AuthorizationProviderDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific authorization provider from the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options: AuthorizationProviderDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options: AuthorizationProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: authorizationProviderContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationProviderContractDeserializer(result.body); +} + +/** Creates or updates authorization provider. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options: AuthorizationProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationProviderGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authorizationProviderId: authorizationProviderId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationProviderContractDeserializer(result.body); +} + +/** Gets the details of the authorization provider specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options: AuthorizationProviderGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/options.ts new file mode 100644 index 000000000000..b23ddce90b72 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationProvider/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationProviderRefreshSecretOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationProviderListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface AuthorizationProviderDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationProviderCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface AuthorizationProviderGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/index.ts new file mode 100644 index 000000000000..14463a5f0e65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/operations.ts new file mode 100644 index 000000000000..e34c01d76ab2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/operations.ts @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AuthorizationServerContract, + authorizationServerContractSerializer, + authorizationServerContractDeserializer, + AuthorizationServerUpdateContract, + authorizationServerUpdateContractSerializer, + _AuthorizationServerCollection, + _authorizationServerCollectionDeserializer, + AuthorizationServerSecretsContract, + authorizationServerSecretsContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationServerSecretsContractDeserializer(result.body); +} + +/** Gets the client secret details of the authorization server. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend(context, resourceGroupName, serviceName, authsid, options); + return _listSecretsDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AuthorizationServerListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_AuthorizationServerCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _authorizationServerCollectionDeserializer(result.body); +} + +/** Lists a collection of authorization servers defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: AuthorizationServerListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options: AuthorizationServerDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific authorization server instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options: AuthorizationServerDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + authsid, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options: AuthorizationServerUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: authorizationServerUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationServerContractDeserializer(result.body); +} + +/** Updates the details of the authorization server specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options: AuthorizationServerUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + authsid, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options: AuthorizationServerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: authorizationServerContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationServerContractDeserializer(result.body); +} + +/** Creates new authorization server or updates an existing authorization server. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options: AuthorizationServerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + authsid, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the authorizationServer specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, authsid, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + authsid: authsid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return authorizationServerContractDeserializer(result.body); +} + +/** Gets the details of the authorization server specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + authsid: string, + options: AuthorizationServerGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, authsid, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/options.ts new file mode 100644 index 000000000000..1b4feead4307 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/authorizationServer/options.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface AuthorizationServerListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationServerListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface AuthorizationServerDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationServerUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationServerCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface AuthorizationServerGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface AuthorizationServerGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/backend/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/backend/index.ts new file mode 100644 index 000000000000..939575319c01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/backend/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + reconnect, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + BackendReconnectOptionalParams, + BackendListByServiceOptionalParams, + BackendDeleteOptionalParams, + BackendUpdateOptionalParams, + BackendCreateOrUpdateOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/backend/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/backend/operations.ts new file mode 100644 index 000000000000..a692a47914da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/backend/operations.ts @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + BackendContract, + backendContractSerializer, + backendContractDeserializer, + BackendUpdateParameters, + backendUpdateParametersSerializer, + _BackendCollection, + _backendCollectionDeserializer, + backendReconnectContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + BackendReconnectOptionalParams, + BackendListByServiceOptionalParams, + BackendDeleteOptionalParams, + BackendUpdateOptionalParams, + BackendCreateOrUpdateOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _reconnectSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendReconnectOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: !options?.parameters + ? options?.parameters + : backendReconnectContractSerializer(options?.parameters), + }); +} + +export async function _reconnectDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. */ +export async function reconnect( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendReconnectOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _reconnectSend(context, resourceGroupName, serviceName, backendId, options); + return _reconnectDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: BackendListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_BackendCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _backendCollectionDeserializer(result.body); +} + +/** Lists a collection of backends in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: BackendListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options: BackendDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified backend. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options: BackendDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + backendId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options: BackendUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: backendUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Updates an existing backend. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options: BackendUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + backendId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options: BackendCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: backendContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Creates or Updates a backend. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options: BackendCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + backendId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the backend specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + backendId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Gets the details of the backend specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + backendId: string, + options: BackendGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, backendId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/backend/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/backend/options.ts new file mode 100644 index 000000000000..13d0ef6866fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/backend/options.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { BackendReconnectContract } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface BackendReconnectOptionalParams extends OperationOptions { + /** Reconnect request parameters. */ + parameters?: BackendReconnectContract; +} + +/** Optional parameters. */ +export interface BackendListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface BackendDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BackendUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BackendCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface BackendGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface BackendGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/cache/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/cache/index.ts new file mode 100644 index 000000000000..dd817dd5cb4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/cache/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + CacheListByServiceOptionalParams, + CacheDeleteOptionalParams, + CacheUpdateOptionalParams, + CacheCreateOrUpdateOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/cache/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/cache/operations.ts new file mode 100644 index 000000000000..bf2fb233ea19 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/cache/operations.ts @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + CacheContract, + cacheContractSerializer, + cacheContractDeserializer, + CacheUpdateParameters, + cacheUpdateParametersSerializer, + _CacheCollection, + _cacheCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + CacheListByServiceOptionalParams, + CacheDeleteOptionalParams, + CacheUpdateOptionalParams, + CacheCreateOrUpdateOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: CacheListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_CacheCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _cacheCollectionDeserializer(result.body); +} + +/** Lists a collection of all external Caches in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: CacheListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options: CacheDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + cacheId: cacheId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Cache. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options: CacheDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + cacheId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options: CacheUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + cacheId: cacheId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: cacheUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cacheContractDeserializer(result.body); +} + +/** Updates the details of the cache specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options: CacheUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + cacheId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options: CacheCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + cacheId: cacheId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: cacheContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cacheContractDeserializer(result.body); +} + +/** Creates or updates an External Cache to be used in Api Management instance. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options: CacheCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + cacheId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + options: CacheGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + cacheId: cacheId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Cache specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + options: CacheGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, cacheId, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + options: CacheGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + cacheId: cacheId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return cacheContractDeserializer(result.body); +} + +/** Gets the details of the Cache specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + cacheId: string, + options: CacheGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, cacheId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/cache/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/cache/options.ts new file mode 100644 index 000000000000..f2692d85166a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/cache/options.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CacheListByServiceOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface CacheDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CacheUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CacheCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface CacheGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CacheGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/certificate/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/certificate/index.ts new file mode 100644 index 000000000000..fd8236520dc2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/certificate/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + refreshSecret, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + CertificateRefreshSecretOptionalParams, + CertificateListByServiceOptionalParams, + CertificateDeleteOptionalParams, + CertificateCreateOrUpdateOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/certificate/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/certificate/operations.ts new file mode 100644 index 000000000000..a39b3030db35 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/certificate/operations.ts @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + CertificateContract, + certificateContractDeserializer, + CertificateCreateOrUpdateParameters, + certificateCreateOrUpdateParametersSerializer, + _CertificateCollection, + _certificateCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + CertificateRefreshSecretOptionalParams, + CertificateListByServiceOptionalParams, + CertificateDeleteOptionalParams, + CertificateCreateOrUpdateOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshSecretDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** From KeyVault, Refresh the certificate being used for authentication with the backend. */ +export async function refreshSecret( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateRefreshSecretOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _refreshSecretSend( + context, + resourceGroupName, + serviceName, + certificateId, + options, + ); + return _refreshSecretDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: CertificateListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates{?api%2Dversion,%24filter,%24top,%24skip,isKeyVaultRefreshFailed}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + isKeyVaultRefreshFailed: options?.isKeyVaultRefreshFailed, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_CertificateCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _certificateCollectionDeserializer(result.body); +} + +/** Lists a collection of all certificates in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: CertificateListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options: CertificateDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific certificate. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options: CertificateDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + certificateId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options: CertificateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: certificateCreateOrUpdateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** Creates or updates the certificate being used for authentication with the backend. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options: CertificateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + certificateId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the certificate specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + certificateId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** Gets the details of the certificate specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + certificateId: string, + options: CertificateGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, certificateId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/certificate/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/certificate/options.ts new file mode 100644 index 000000000000..3dbfa8a59c2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/certificate/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface CertificateRefreshSecretOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CertificateListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only certificates entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; +} + +/** Optional parameters. */ +export interface CertificateDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CertificateCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface CertificateGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface CertificateGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/index.ts new file mode 100644 index 000000000000..45c12cc6cab2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + ClientApplicationListSecretsOptionalParams, + ClientApplicationListByServiceOptionalParams, + ClientApplicationDeleteOptionalParams, + ClientApplicationCreateOrUpdateOptionalParams, + ClientApplicationGetEntityTagOptionalParams, + ClientApplicationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/operations.ts new file mode 100644 index 000000000000..249b612c82c9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/operations.ts @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ClientApplicationContract, + clientApplicationContractSerializer, + clientApplicationContractDeserializer, + _ClientApplicationCollection, + _clientApplicationCollectionDeserializer, + ClientApplicationSecretsContract, + clientApplicationSecretsContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ClientApplicationListSecretsOptionalParams, + ClientApplicationListByServiceOptionalParams, + ClientApplicationDeleteOptionalParams, + ClientApplicationCreateOrUpdateOptionalParams, + ClientApplicationGetEntityTagOptionalParams, + ClientApplicationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientApplicationSecretsContractDeserializer(result.body); +} + +/** Retrived client application secrets. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ); + return _listSecretsDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ClientApplicationListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ClientApplicationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clientApplicationCollectionDeserializer(result.body); +} + +/** Lists a collection of client applications in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ClientApplicationListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete client application. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + parameters: ClientApplicationContract, + options: ClientApplicationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: clientApplicationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientApplicationContractDeserializer(result.body); +} + +/** Creates or Updates a client application. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + parameters: ClientApplicationContract, + options: ClientApplicationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the product specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientApplicationContractDeserializer(result.body); +} + +/** Gets the details of the client application specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/options.ts new file mode 100644 index 000000000000..950ae2423a79 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplication/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ClientApplicationListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
state | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| */ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ClientApplicationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/index.ts new file mode 100644 index 000000000000..d1ddcbb408c3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByClientApplications, $delete, create, get } from "./operations.js"; +export type { + ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ClientApplicationProductLinkDeleteOptionalParams, + ClientApplicationProductLinkCreateOptionalParams, + ClientApplicationProductLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/operations.ts new file mode 100644 index 000000000000..ceff2fb59722 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/operations.ts @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ClientApplicationProductLinkContract, + clientApplicationProductLinkContractSerializer, + clientApplicationProductLinkContractDeserializer, + _ClientApplicationProductLinkCollection, + _clientApplicationProductLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ClientApplicationProductLinkDeleteOptionalParams, + ClientApplicationProductLinkCreateOptionalParams, + ClientApplicationProductLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByClientApplicationsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationProductLinkListByClientApplicationsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByClientApplicationsDeserialize( + result: PathUncheckedResponse, +): Promise<_ClientApplicationProductLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _clientApplicationProductLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of product links associated with the specified client application. */ +export function listByClientApplications( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options: ClientApplicationProductLinkListByClientApplicationsOptionalParams = { + requestOptions: {}, + }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByClientApplicationsSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ), + _listByClientApplicationsDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options: ClientApplicationProductLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + clientApplicationProductLinkId: clientApplicationProductLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Product from the specified client application. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options: ClientApplicationProductLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + parameters: ClientApplicationProductLinkContract, + options: ClientApplicationProductLinkCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + clientApplicationProductLinkId: clientApplicationProductLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: clientApplicationProductLinkContractSerializer(parameters), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientApplicationProductLinkContractDeserializer(result.body); +} + +/** Adds an Product to the specified Client Application via link. */ +export async function create( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + parameters: ClientApplicationProductLinkContract, + options: ClientApplicationProductLinkCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + parameters, + options, + ); + return _createDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options: ClientApplicationProductLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/clientApplications/{clientApplicationId}/productLinks/{clientApplicationProductLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + clientApplicationId: clientApplicationId, + clientApplicationProductLinkId: clientApplicationProductLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientApplicationProductLinkContractDeserializer(result.body); +} + +/** Gets the product link for the client application. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options: ClientApplicationProductLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/options.ts new file mode 100644 index 000000000000..ee7f00fd86ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/clientApplicationProductLink/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ClientApplicationProductLinkListByClientApplicationsOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ClientApplicationProductLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationProductLinkCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ClientApplicationProductLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentItem/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/index.ts new file mode 100644 index 000000000000..ea263e9c954f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ContentItemListByServiceOptionalParams, + ContentItemDeleteOptionalParams, + ContentItemCreateOrUpdateOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentItem/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/operations.ts new file mode 100644 index 000000000000..e21a94dab5af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/operations.ts @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ContentItemContract, + contentItemContractSerializer, + contentItemContractDeserializer, + _ContentItemCollection, + _contentItemCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ContentItemListByServiceOptionalParams, + ContentItemDeleteOptionalParams, + ContentItemCreateOrUpdateOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options: ContentItemListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ContentItemCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _contentItemCollectionDeserializer(result.body); +} + +/** Lists developer portal's content items specified by the provided content type. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options: ContentItemListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, contentTypeId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options: ContentItemDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + contentItemId: contentItemId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the specified developer portal's content item. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options: ContentItemDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options: ContentItemCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + contentItemId: contentItemId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: contentItemContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return contentItemContractDeserializer(result.body); +} + +/** Creates a new developer portal's content item specified by the provided content type. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options: ContentItemCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options: ContentItemGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + contentItemId: contentItemId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options: ContentItemGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options: ContentItemGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + contentItemId: contentItemId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return contentItemContractDeserializer(result.body); +} + +/** Returns the developer portal's content item specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options: ContentItemGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentItem/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/options.ts new file mode 100644 index 000000000000..7679d9aad6c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentItem/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ContentItemListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ContentItemDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ContentItemCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ContentItemGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ContentItemGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentType/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentType/index.ts new file mode 100644 index 000000000000..33f1d69b0f2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentType/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ContentTypeListByServiceOptionalParams, + ContentTypeDeleteOptionalParams, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentType/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentType/operations.ts new file mode 100644 index 000000000000..249113bd28cd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentType/operations.ts @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ContentTypeContract, + contentTypeContractSerializer, + contentTypeContractDeserializer, + _ContentTypeCollection, + _contentTypeCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ContentTypeListByServiceOptionalParams, + ContentTypeDeleteOptionalParams, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ContentTypeListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ContentTypeCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _contentTypeCollectionDeserializer(result.body); +} + +/** Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ContentTypeListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options: ContentTypeDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options: ContentTypeDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options: ContentTypeCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: contentTypeContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return contentTypeContractDeserializer(result.body); +} + +/** Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options: ContentTypeCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + contentTypeId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options: ContentTypeGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + contentTypeId: contentTypeId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return contentTypeContractDeserializer(result.body); +} + +/** Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options: ContentTypeGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, contentTypeId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/contentType/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/contentType/options.ts new file mode 100644 index 000000000000..635e52d59c7e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/contentType/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ContentTypeListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ContentTypeDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ContentTypeCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ContentTypeGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/index.ts new file mode 100644 index 000000000000..bf5df2c5ea34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listSecrets, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsUpdateOptionalParams, + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/operations.ts new file mode 100644 index 000000000000..7851c1057186 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/operations.ts @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalDelegationSettings, + portalDelegationSettingsSerializer, + portalDelegationSettingsDeserializer, + PortalSettingValidationKeyContract, + portalSettingValidationKeyContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsUpdateOptionalParams, + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSettingValidationKeyContractDeserializer(result.body); +} + +/** Gets the secret validation key of the DelegationSettings. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend(context, resourceGroupName, serviceName, options); + return _listSecretsDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options: DelegationSettingsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + body: portalDelegationSettingsSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Update Delegation settings. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options: DelegationSettingsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options: DelegationSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalDelegationSettingsSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalDelegationSettingsDeserializer(result.body); +} + +/** Create or Update Delegation settings. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options: DelegationSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the DelegationSettings. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalDelegationSettingsDeserializer(result.body); +} + +/** Get Delegation Settings for the Portal. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DelegationSettingsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/options.ts new file mode 100644 index 000000000000..32b22bcff3d1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/delegationSettings/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DelegationSettingsListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DelegationSettingsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DelegationSettingsCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface DelegationSettingsGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DelegationSettingsGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/index.ts new file mode 100644 index 000000000000..22608448069d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listBySubscription, purge, getByName } from "./operations.js"; +export type { + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams, + DeletedServicesGetByNameOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/operations.ts new file mode 100644 index 000000000000..5ef1f6e411e4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/operations.ts @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DeletedServiceContract, + deletedServiceContractDeserializer, + _DeletedServicesCollection, + _deletedServicesCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams, + DeletedServicesGetByNameOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listBySubscriptionSend( + context: Client, + options: DeletedServicesListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_DeletedServicesCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _deletedServicesCollectionDeserializer(result.body); +} + +/** Lists all soft-deleted services available for undelete for the given subscription. */ +export function listBySubscription( + context: Client, + options: DeletedServicesListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _purgeSend( + context: Client, + location: string, + serviceName: string, + options: DeletedServicesPurgeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _purgeDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return deletedServiceContractDeserializer(result.body); +} + +/** Purges Api Management Service (deletes it with no option to undelete). */ +export function purge( + context: Client, + location: string, + serviceName: string, + options: DeletedServicesPurgeOptionalParams = { requestOptions: {} }, +): PollerLike, DeletedServiceContract> { + return getLongRunningPoller(context, _purgeDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _purgeSend(context, location, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, DeletedServiceContract>; +} + +export function _getByNameSend( + context: Client, + location: string, + serviceName: string, + options: DeletedServicesGetByNameOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getByNameDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return deletedServiceContractDeserializer(result.body); +} + +/** Get soft-deleted Api Management Service by name. */ +export async function getByName( + context: Client, + location: string, + serviceName: string, + options: DeletedServicesGetByNameOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getByNameSend(context, location, serviceName, options); + return _getByNameDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/options.ts new file mode 100644 index 000000000000..b03554ac6fb3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/deletedServices/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DeletedServicesListBySubscriptionOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DeletedServicesPurgeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface DeletedServicesGetByNameOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/index.ts new file mode 100644 index 000000000000..5fc597683434 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + DiagnosticListByServiceOptionalParams, + DiagnosticDeleteOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/operations.ts new file mode 100644 index 000000000000..a7612085143c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/operations.ts @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DiagnosticContract, + diagnosticContractSerializer, + diagnosticContractDeserializer, + _DiagnosticCollection, + _diagnosticCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DiagnosticListByServiceOptionalParams, + DiagnosticDeleteOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DiagnosticListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_DiagnosticCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _diagnosticCollectionDeserializer(result.body); +} + +/** Lists all diagnostics of the API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DiagnosticListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options: DiagnosticDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Diagnostic. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options: DiagnosticDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options: DiagnosticUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Updates the details of the Diagnostic specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options: DiagnosticUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + diagnosticId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: DiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Creates a new Diagnostic or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: DiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + diagnosticId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options: DiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Diagnostic specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options: DiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + diagnosticId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options: DiagnosticGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Gets the details of the Diagnostic specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options: DiagnosticGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, diagnosticId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/options.ts new file mode 100644 index 000000000000..5261daf270ed --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/diagnostic/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DiagnosticListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface DiagnosticDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiagnosticUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface DiagnosticGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DiagnosticGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/documentation/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/documentation/index.ts new file mode 100644 index 000000000000..4229e3120838 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/documentation/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + DocumentationListByServiceOptionalParams, + DocumentationDeleteOptionalParams, + DocumentationUpdateOptionalParams, + DocumentationCreateOrUpdateOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/documentation/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/documentation/operations.ts new file mode 100644 index 000000000000..1af6c630dae4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/documentation/operations.ts @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DocumentationContract, + documentationContractSerializer, + documentationContractDeserializer, + DocumentationUpdateContract, + documentationUpdateContractSerializer, + _DocumentationCollection, + _documentationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + DocumentationListByServiceOptionalParams, + DocumentationDeleteOptionalParams, + DocumentationUpdateOptionalParams, + DocumentationCreateOrUpdateOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DocumentationListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_DocumentationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _documentationCollectionDeserializer(result.body); +} + +/** Lists all Documentations of the API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: DocumentationListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options: DocumentationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + documentationId: documentationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Documentation from an API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options: DocumentationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + documentationId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options: DocumentationUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + documentationId: documentationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: documentationUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return documentationContractDeserializer(result.body); +} + +/** Updates the details of the Documentation for an API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options: DocumentationUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options: DocumentationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + documentationId: documentationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: documentationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return documentationContractDeserializer(result.body); +} + +/** Creates a new Documentation or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options: DocumentationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + documentationId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + options: DocumentationGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + documentationId: documentationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Documentation by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + options: DocumentationGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + documentationId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + options: DocumentationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + documentationId: documentationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return documentationContractDeserializer(result.body); +} + +/** Gets the details of the Documentation specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + documentationId: string, + options: DocumentationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, documentationId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/documentation/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/documentation/options.ts new file mode 100644 index 000000000000..79fc4a2372bc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/documentation/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface DocumentationListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface DocumentationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DocumentationUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DocumentationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface DocumentationGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface DocumentationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/index.ts new file mode 100644 index 000000000000..32b3d17d8703 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + EmailTemplateListByServiceOptionalParams, + EmailTemplateDeleteOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/operations.ts new file mode 100644 index 000000000000..047a82fb0860 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/operations.ts @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + EmailTemplateContract, + emailTemplateContractDeserializer, + TemplateName, + EmailTemplateUpdateParameters, + emailTemplateUpdateParametersSerializer, + _EmailTemplateCollection, + _emailTemplateCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + EmailTemplateListByServiceOptionalParams, + EmailTemplateDeleteOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: EmailTemplateListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_EmailTemplateCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _emailTemplateCollectionDeserializer(result.body); +} + +/** Gets all email templates */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: EmailTemplateListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options: EmailTemplateDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + templateName: templateName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Reset the Email Template to default template provided by the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options: EmailTemplateDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + templateName, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options: EmailTemplateUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + templateName: templateName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: emailTemplateUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return emailTemplateContractDeserializer(result.body); +} + +/** Updates API Management email template */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options: EmailTemplateUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + templateName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options: EmailTemplateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + templateName: templateName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: emailTemplateUpdateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return emailTemplateContractDeserializer(result.body); +} + +/** Updates an Email Template. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options: EmailTemplateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + templateName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options: EmailTemplateGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + templateName: templateName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the email template specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options: EmailTemplateGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + templateName, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options: EmailTemplateGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + templateName: templateName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return emailTemplateContractDeserializer(result.body); +} + +/** Gets the details of the email template specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options: EmailTemplateGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, templateName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/options.ts new file mode 100644 index 000000000000..117736dc4212 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/emailTemplate/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface EmailTemplateListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface EmailTemplateDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EmailTemplateUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EmailTemplateCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface EmailTemplateGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface EmailTemplateGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gateway/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/gateway/index.ts new file mode 100644 index 000000000000..d2596b8b458d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gateway/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listTrace, + listDebugCredentials, + invalidateDebugCredentials, + generateToken, + regenerateKey, + listKeys, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + GatewayListTraceOptionalParams, + GatewayListDebugCredentialsOptionalParams, + GatewayInvalidateDebugCredentialsOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayRegenerateKeyOptionalParams, + GatewayListKeysOptionalParams, + GatewayListByServiceOptionalParams, + GatewayDeleteOptionalParams, + GatewayUpdateOptionalParams, + GatewayCreateOrUpdateOptionalParams, + GatewayGetEntityTagOptionalParams, + GatewayGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gateway/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/gateway/operations.ts new file mode 100644 index 000000000000..3f641ab2c42e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gateway/operations.ts @@ -0,0 +1,765 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GatewayContract, + gatewayContractSerializer, + gatewayContractDeserializer, + _GatewayCollection, + _gatewayCollectionDeserializer, + GatewayKeysContract, + gatewayKeysContractDeserializer, + GatewayKeyRegenerationRequestContract, + gatewayKeyRegenerationRequestContractSerializer, + GatewayTokenRequestContract, + gatewayTokenRequestContractSerializer, + GatewayTokenContract, + gatewayTokenContractDeserializer, + GatewayListDebugCredentialsContract, + gatewayListDebugCredentialsContractSerializer, + GatewayDebugCredentialsContract, + gatewayDebugCredentialsContractDeserializer, + GatewayListTraceContract, + gatewayListTraceContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GatewayListTraceOptionalParams, + GatewayListDebugCredentialsOptionalParams, + GatewayInvalidateDebugCredentialsOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayRegenerateKeyOptionalParams, + GatewayListKeysOptionalParams, + GatewayListByServiceOptionalParams, + GatewayDeleteOptionalParams, + GatewayUpdateOptionalParams, + GatewayCreateOrUpdateOptionalParams, + GatewayGetEntityTagOptionalParams, + GatewayGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listTraceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListTraceContract, + options: GatewayListTraceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: gatewayListTraceContractSerializer(parameters), + }); +} + +export async function _listTraceDeserialize( + result: PathUncheckedResponse, +): Promise> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return Object.fromEntries(Object.entries(result.body).map(([k, p]: [string, any]) => [k, p])); +} + +/** Fetches trace collected by gateway. */ +export async function listTrace( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListTraceContract, + options: GatewayListTraceOptionalParams = { requestOptions: {} }, +): Promise> { + const result = await _listTraceSend( + context, + resourceGroupName, + serviceName, + gatewayId, + parameters, + options, + ); + return _listTraceDeserialize(result); +} + +export function _listDebugCredentialsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListDebugCredentialsContract, + options: GatewayListDebugCredentialsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: gatewayListDebugCredentialsContractSerializer(parameters), + }); +} + +export async function _listDebugCredentialsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayDebugCredentialsContractDeserializer(result.body); +} + +/** Create new debug credentials for gateway. */ +export async function listDebugCredentials( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListDebugCredentialsContract, + options: GatewayListDebugCredentialsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listDebugCredentialsSend( + context, + resourceGroupName, + serviceName, + gatewayId, + parameters, + options, + ); + return _listDebugCredentialsDeserialize(result); +} + +export function _invalidateDebugCredentialsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayInvalidateDebugCredentialsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _invalidateDebugCredentialsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Action is invalidating all debug credentials issued for gateway. */ +export async function invalidateDebugCredentials( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayInvalidateDebugCredentialsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _invalidateDebugCredentialsSend( + context, + resourceGroupName, + serviceName, + gatewayId, + options, + ); + return _invalidateDebugCredentialsDeserialize(result); +} + +export function _generateTokenSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options: GatewayGenerateTokenOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: gatewayTokenRequestContractSerializer(parameters), + }); +} + +export async function _generateTokenDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayTokenContractDeserializer(result.body); +} + +/** Gets the Shared Access Authorization Token for the gateway. */ +export async function generateToken( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options: GatewayGenerateTokenOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _generateTokenSend( + context, + resourceGroupName, + serviceName, + gatewayId, + parameters, + options, + ); + return _generateTokenDeserialize(result); +} + +export function _regenerateKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options: GatewayRegenerateKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + body: gatewayKeyRegenerationRequestContractSerializer(parameters), + }); +} + +export async function _regenerateKeyDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerates specified gateway key invalidating any tokens created with it. */ +export async function regenerateKey( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options: GatewayRegenerateKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regenerateKeySend( + context, + resourceGroupName, + serviceName, + gatewayId, + parameters, + options, + ); + return _regenerateKeyDeserialize(result); +} + +export function _listKeysSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayListKeysOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listKeysDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayKeysContractDeserializer(result.body); +} + +/** Retrieves gateway keys. */ +export async function listKeys( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayListKeysOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listKeysSend(context, resourceGroupName, serviceName, gatewayId, options); + return _listKeysDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GatewayListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GatewayCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _gatewayCollectionDeserializer(result.body); +} + +/** Lists a collection of gateways registered with service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GatewayListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options: GatewayDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Gateway. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options: GatewayDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options: GatewayUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: gatewayContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayContractDeserializer(result.body); +} + +/** Updates the details of the gateway specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options: GatewayUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + gatewayId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options: GatewayCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: gatewayContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayContractDeserializer(result.body); +} + +/** Creates or updates a Gateway to be used in Api Management instance. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options: GatewayCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + gatewayId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Gateway specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + gatewayId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayContractDeserializer(result.body); +} + +/** Gets the details of the Gateway specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, gatewayId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gateway/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/gateway/options.ts new file mode 100644 index 000000000000..473e7dfbc982 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gateway/options.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GatewayListTraceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayListDebugCredentialsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayInvalidateDebugCredentialsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayGenerateTokenOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayRegenerateKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayListKeysOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GatewayDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GatewayGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/index.ts new file mode 100644 index 000000000000..414ff7e24427 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, getEntityTag, listByService } from "./operations.js"; +export type { + GatewayApiDeleteOptionalParams, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiListByServiceOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/operations.ts new file mode 100644 index 000000000000..46cc517340c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/operations.ts @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + ApiContract, + apiContractDeserializer, + errorResponseDeserializer, + _ApiCollection, + _apiCollectionDeserializer, + associationContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GatewayApiDeleteOptionalParams, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiListByServiceOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified Gateway. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + gatewayId, + apiId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: !options?.parameters + ? options?.parameters + : associationContractSerializer(options?.parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Adds an API to the specified Gateway. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + gatewayId, + apiId, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that API entity specified by identifier is associated with the Gateway entity. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options: GatewayApiGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + gatewayId, + apiId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayApiListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiCollectionDeserializer(result.body); +} + +/** Lists a collection of the APIs associated with a gateway. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayApiListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, gatewayId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/options.ts new file mode 100644 index 000000000000..f4f153367c33 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayApi/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AssociationContract } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GatewayApiDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayApiCreateOrUpdateOptionalParams extends OperationOptions { + parameters?: AssociationContract; +} + +/** Optional parameters. */ +export interface GatewayApiGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayApiListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/index.ts new file mode 100644 index 000000000000..26df79a10f96 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/operations.ts new file mode 100644 index 000000000000..4713db4b2efa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/operations.ts @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GatewayCertificateAuthorityContract, + gatewayCertificateAuthorityContractSerializer, + gatewayCertificateAuthorityContractDeserializer, + _GatewayCertificateAuthorityCollection, + _gatewayCertificateAuthorityCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayCertificateAuthorityListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GatewayCertificateAuthorityCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _gatewayCertificateAuthorityCollectionDeserializer(result.body); +} + +/** Lists the collection of Certificate Authorities for the specified Gateway entity. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayCertificateAuthorityListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, gatewayId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options: GatewayCertificateAuthorityDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Remove relationship between Certificate Authority and Gateway entity. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options: GatewayCertificateAuthorityDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + gatewayId, + certificateId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options: GatewayCertificateAuthorityCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: gatewayCertificateAuthorityContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayCertificateAuthorityContractDeserializer(result.body); +} + +/** Assign Certificate entity to Gateway entity as Certificate Authority. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options: GatewayCertificateAuthorityCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options: GatewayCertificateAuthorityGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options: GatewayCertificateAuthorityGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + gatewayId, + certificateId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options: GatewayCertificateAuthorityGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayCertificateAuthorityContractDeserializer(result.body); +} + +/** Get assigned Gateway Certificate Authority details. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options: GatewayCertificateAuthorityGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + gatewayId, + certificateId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/options.ts new file mode 100644 index 000000000000..2171d442370b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayCertificateAuthority/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GatewayCertificateAuthorityListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GatewayCertificateAuthorityDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GatewayCertificateAuthorityGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayCertificateAuthorityGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/index.ts new file mode 100644 index 000000000000..0949b6f32391 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/operations.ts new file mode 100644 index 000000000000..6624d170ce5b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/operations.ts @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GatewayHostnameConfigurationContract, + gatewayHostnameConfigurationContractSerializer, + gatewayHostnameConfigurationContractDeserializer, + _GatewayHostnameConfigurationCollection, + _gatewayHostnameConfigurationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayHostnameConfigurationListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GatewayHostnameConfigurationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _gatewayHostnameConfigurationCollectionDeserializer(result.body); +} + +/** Lists the collection of hostname configurations for the specified gateway. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options: GatewayHostnameConfigurationListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, gatewayId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options: GatewayHostnameConfigurationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + hcId: hcId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified hostname configuration from the specified Gateway. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options: GatewayHostnameConfigurationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + gatewayId, + hcId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options: GatewayHostnameConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + hcId: hcId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: gatewayHostnameConfigurationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayHostnameConfigurationContractDeserializer(result.body); +} + +/** Creates of updates hostname configuration for a Gateway. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options: GatewayHostnameConfigurationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + gatewayId, + hcId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options: GatewayHostnameConfigurationGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + hcId: hcId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options: GatewayHostnameConfigurationGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + gatewayId, + hcId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options: GatewayHostnameConfigurationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + gatewayId: gatewayId, + hcId: hcId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return gatewayHostnameConfigurationContractDeserializer(result.body); +} + +/** Get details of a hostname configuration */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options: GatewayHostnameConfigurationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, gatewayId, hcId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/options.ts new file mode 100644 index 000000000000..dbe8ba1d8bef --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/gatewayHostnameConfiguration/options.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GatewayHostnameConfigurationListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GatewayHostnameConfigurationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GatewayHostnameConfigurationGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GatewayHostnameConfigurationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/index.ts new file mode 100644 index 000000000000..7cccdba149d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/operations.ts new file mode 100644 index 000000000000..033e36bbbd1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/operations.ts @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GlobalSchemaContract, + globalSchemaContractSerializer, + globalSchemaContractDeserializer, + _GlobalSchemaCollection, + _globalSchemaCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GlobalSchemaListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GlobalSchemaCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _globalSchemaCollectionDeserializer(result.body); +} + +/** Lists a collection of schemas registered with service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GlobalSchemaListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options: GlobalSchemaDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Schema. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options: GlobalSchemaDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + schemaId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options: GlobalSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: globalSchemaContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return globalSchemaContractDeserializer(result.body); +} + +/** Creates new or updates existing specified Schema of the API Management service instance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options: GlobalSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, GlobalSchemaContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceName, schemaId, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, GlobalSchemaContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + options: GlobalSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Schema specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + options: GlobalSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + schemaId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + options: GlobalSchemaGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return globalSchemaContractDeserializer(result.body); +} + +/** Gets the details of the Schema specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + schemaId: string, + options: GlobalSchemaGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, schemaId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/options.ts new file mode 100644 index 000000000000..1e0005bcac5c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/globalSchema/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GlobalSchemaListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GlobalSchemaDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GlobalSchemaCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GlobalSchemaGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GlobalSchemaGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/index.ts new file mode 100644 index 000000000000..461b913bfaaf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/operations.ts new file mode 100644 index 000000000000..a4128018c3af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/operations.ts @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ResolverContract, + resolverContractSerializer, + resolverContractDeserializer, + ResolverUpdateContract, + resolverUpdateContractSerializer, + _ResolverCollection, + _resolverCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: GraphQLApiResolverListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_ResolverCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _resolverCollectionDeserializer(result.body); +} + +/** Lists a collection of the resolvers for the specified GraphQL API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: GraphQLApiResolverListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options: GraphQLApiResolverDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified resolver in the GraphQL API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options: GraphQLApiResolverDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options: GraphQLApiResolverUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: resolverUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return resolverContractDeserializer(result.body); +} + +/** Updates the details of the resolver in the GraphQL API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options: GraphQLApiResolverUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options: GraphQLApiResolverCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: resolverContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return resolverContractDeserializer(result.body); +} + +/** Creates a new resolver in the GraphQL API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options: GraphQLApiResolverCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return resolverContractDeserializer(result.body); +} + +/** Gets the details of the GraphQL API Resolver specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/options.ts new file mode 100644 index 000000000000..6e8d0070f708 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolver/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GraphQLApiResolverListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GraphQLApiResolverDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GraphQLApiResolverGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/index.ts new file mode 100644 index 000000000000..96d94f8641ec --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByResolver, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/operations.ts new file mode 100644 index 000000000000..9a2ea5dbd8b5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/operations.ts @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByResolverSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverPolicyListByResolverOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByResolverDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the list of policy configuration at the GraphQL API Resolver level. */ +export function listByResolver( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options: GraphQLApiResolverPolicyListByResolverOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByResolverSend(context, resourceGroupName, serviceName, apiId, resolverId, options), + _listByResolverDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options: GraphQLApiResolverPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the GraphQL Api Resolver. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options: GraphQLApiResolverPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the GraphQL API Resolver level. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options: GraphQLApiResolverPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options: GraphQLApiResolverPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options: GraphQLApiResolverPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + resolverId: resolverId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the GraphQL API Resolver level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options: GraphQLApiResolverPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/options.ts new file mode 100644 index 000000000000..f6e751d7bc0b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/graphQLApiResolverPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GraphQLApiResolverPolicyListByResolverOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GraphQLApiResolverPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/group/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/group/index.ts new file mode 100644 index 000000000000..63e18c642362 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/group/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + GroupListByServiceOptionalParams, + GroupDeleteOptionalParams, + GroupUpdateOptionalParams, + GroupCreateOrUpdateOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/group/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/group/operations.ts new file mode 100644 index 000000000000..dc50398cc61b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/group/operations.ts @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GroupContract, + groupContractDeserializer, + GroupCreateParameters, + groupCreateParametersSerializer, + GroupUpdateParameters, + groupUpdateParametersSerializer, + _GroupCollection, + _groupCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GroupListByServiceOptionalParams, + GroupDeleteOptionalParams, + GroupUpdateOptionalParams, + GroupCreateOrUpdateOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GroupListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GroupCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _groupCollectionDeserializer(result.body); +} + +/** Lists a collection of groups defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: GroupListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options: GroupDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific group of the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options: GroupDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + groupId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options: GroupUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: groupUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Updates the details of the group specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options: GroupUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + groupId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options: GroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: groupCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Creates or Updates a group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options: GroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + groupId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the group specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, groupId, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Gets the details of the group specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, groupId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/group/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/group/options.ts new file mode 100644 index 000000000000..053ba62a433e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/group/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GroupListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface GroupDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface GroupGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/groupUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/index.ts new file mode 100644 index 000000000000..4b303a8e4720 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, create, checkEntityExists, list } from "./operations.js"; +export type { + GroupUserDeleteOptionalParams, + GroupUserCreateOptionalParams, + GroupUserCheckEntityExistsOptionalParams, + GroupUserListOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/groupUser/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/operations.ts new file mode 100644 index 000000000000..5ab0cf494e65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/operations.ts @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _UserCollection, + _userCollectionDeserializer, + UserContract, + userContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + GroupUserDeleteOptionalParams, + GroupUserCreateOptionalParams, + GroupUserCheckEntityExistsOptionalParams, + GroupUserListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Remove existing user from existing group. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + groupId, + userId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userContractDeserializer(result.body); +} + +/** Add existing user to existing group */ +export async function create( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + serviceName, + groupId, + userId, + options, + ); + return _createDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that user entity specified by identifier is associated with the group entity. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options: GroupUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + groupId, + userId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupUserListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_UserCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _userCollectionDeserializer(result.body); +} + +/** Lists a collection of user entities associated with the group. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + groupId: string, + options: GroupUserListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, groupId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/groupUser/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/options.ts new file mode 100644 index 000000000000..60417c7c1c41 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/groupUser/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface GroupUserDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupUserCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupUserCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface GroupUserListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/index.ts new file mode 100644 index 000000000000..a5e40658659b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + IdentityProviderListSecretsOptionalParams, + IdentityProviderListByServiceOptionalParams, + IdentityProviderDeleteOptionalParams, + IdentityProviderUpdateOptionalParams, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/operations.ts new file mode 100644 index 000000000000..ab50367b0f95 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/operations.ts @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IdentityProviderContract, + identityProviderContractDeserializer, + IdentityProviderType, + IdentityProviderCreateContract, + identityProviderCreateContractSerializer, + IdentityProviderUpdateParameters, + identityProviderUpdateParametersSerializer, + _IdentityProviderList, + _identityProviderListDeserializer, + ClientSecretContract, + clientSecretContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + IdentityProviderListSecretsOptionalParams, + IdentityProviderListByServiceOptionalParams, + IdentityProviderDeleteOptionalParams, + IdentityProviderUpdateOptionalParams, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientSecretContractDeserializer(result.body); +} + +/** Gets the client secret details of the Identity Provider. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + options, + ); + return _listSecretsDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: IdentityProviderListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_IdentityProviderList> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _identityProviderListDeserializer(result.body); +} + +/** Lists a collection of Identity Provider configured in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: IdentityProviderListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options: IdentityProviderDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified identity provider configuration. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options: IdentityProviderDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options: IdentityProviderUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: identityProviderUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return identityProviderContractDeserializer(result.body); +} + +/** Updates an existing IdentityProvider configuration. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options: IdentityProviderUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options: IdentityProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: identityProviderCreateContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return identityProviderContractDeserializer(result.body); +} + +/** Creates or Updates the IdentityProvider configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options: IdentityProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the identityProvider specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + identityProviderName: identityProviderName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return identityProviderContractDeserializer(result.body); +} + +/** Gets the configuration details of the identity Provider configured in specified service instance. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options: IdentityProviderGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + identityProviderName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/options.ts new file mode 100644 index 000000000000..162d3a771068 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/identityProvider/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IdentityProviderListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IdentityProviderListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IdentityProviderDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IdentityProviderUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IdentityProviderCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface IdentityProviderGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface IdentityProviderGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/index.ts new file mode 100644 index 000000000000..4d464c0182b2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { + ApiManagementContext, + ApiManagementClientOptionalParams, +} from "./apiManagementContext.js"; +export { createApiManagement } from "./apiManagementContext.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/issue/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/issue/index.ts new file mode 100644 index 000000000000..59ffbdf6f27a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/issue/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, get } from "./operations.js"; +export type { IssueListByServiceOptionalParams, IssueGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/issue/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/issue/operations.ts new file mode 100644 index 000000000000..426068632bfd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/issue/operations.ts @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + IssueContract, + issueContractDeserializer, + _IssueCollection, + _issueCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { IssueListByServiceOptionalParams, IssueGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: IssueListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_IssueCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _issueCollectionDeserializer(result.body); +} + +/** Lists a collection of issues in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: IssueListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + issueId: string, + options: IssueGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + issueId: issueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return issueContractDeserializer(result.body); +} + +/** Gets API Management issue details */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + issueId: string, + options: IssueGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, issueId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/issue/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/issue/options.ts new file mode 100644 index 000000000000..efe024e86ad0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/issue/options.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface IssueListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface IssueGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/logger/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/logger/index.ts new file mode 100644 index 000000000000..a77010eb4ec5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/logger/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + LoggerListByServiceOptionalParams, + LoggerDeleteOptionalParams, + LoggerUpdateOptionalParams, + LoggerCreateOrUpdateOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/logger/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/logger/operations.ts new file mode 100644 index 000000000000..f1fec8fa27e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/logger/operations.ts @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + LoggerContract, + loggerContractSerializer, + loggerContractDeserializer, + LoggerUpdateContract, + loggerUpdateContractSerializer, + _LoggerCollection, + _loggerCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + LoggerListByServiceOptionalParams, + LoggerDeleteOptionalParams, + LoggerUpdateOptionalParams, + LoggerCreateOrUpdateOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: LoggerListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_LoggerCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _loggerCollectionDeserializer(result.body); +} + +/** Lists a collection of loggers in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: LoggerListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options: LoggerDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified logger. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options: LoggerDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + loggerId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options: LoggerUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: loggerUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Updates an existing logger. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options: LoggerUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + loggerId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options: LoggerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: loggerContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Creates or Updates a logger. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options: LoggerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + loggerId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + options: LoggerGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the logger specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + options: LoggerGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + loggerId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + options: LoggerGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Gets the details of the logger specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + loggerId: string, + options: LoggerGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, loggerId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/logger/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/logger/options.ts new file mode 100644 index 000000000000..aac1e43b752f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/logger/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface LoggerListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface LoggerDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoggerUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoggerCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface LoggerGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface LoggerGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/namedValue/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/index.ts new file mode 100644 index 000000000000..ddb7738d0c90 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + refreshSecret, + listValue, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + NamedValueRefreshSecretOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListByServiceOptionalParams, + NamedValueDeleteOptionalParams, + NamedValueUpdateOptionalParams, + NamedValueCreateOrUpdateOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/namedValue/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/operations.ts new file mode 100644 index 000000000000..742f21375dce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/operations.ts @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NamedValueContract, + namedValueContractDeserializer, + NamedValueCreateContract, + namedValueCreateContractSerializer, + NamedValueUpdateParameters, + namedValueUpdateParametersSerializer, + _NamedValueCollection, + _namedValueCollectionDeserializer, + NamedValueSecretContract, + namedValueSecretContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NamedValueRefreshSecretOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListByServiceOptionalParams, + NamedValueDeleteOptionalParams, + NamedValueUpdateOptionalParams, + NamedValueCreateOrUpdateOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshSecretDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Refresh the secret of the named value specified by its identifier. */ +export function refreshSecret( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueRefreshSecretOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _refreshSecretDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _refreshSecretSend(context, resourceGroupName, serviceName, namedValueId, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _listValueSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueListValueOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listValueDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueSecretContractDeserializer(result.body); +} + +/** Gets the secret of the named value specified by its identifier. */ +export async function listValue( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueListValueOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listValueSend( + context, + resourceGroupName, + serviceName, + namedValueId, + options, + ); + return _listValueDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NamedValueListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues{?api%2Dversion,%24filter,%24top,%24skip,isKeyVaultRefreshFailed}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + isKeyVaultRefreshFailed: options?.isKeyVaultRefreshFailed, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_NamedValueCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _namedValueCollectionDeserializer(result.body); +} + +/** Lists a collection of named values defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NamedValueListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options: NamedValueDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific named value from the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options: NamedValueDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options: NamedValueUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: namedValueUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Updates the specific named value. */ +export function update( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options: NamedValueUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options: NamedValueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: namedValueCreateContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Creates or updates named value. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options: NamedValueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + namedValueId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the named value specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + namedValueId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Gets the details of the named value specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options: NamedValueGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, namedValueId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/namedValue/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/options.ts new file mode 100644 index 000000000000..6cd9836c0856 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/namedValue/options.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NamedValueRefreshSecretOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NamedValueListValueOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NamedValueListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only named value entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; +} + +/** Optional parameters. */ +export interface NamedValueDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NamedValueUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface NamedValueCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface NamedValueGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NamedValueGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/index.ts new file mode 100644 index 000000000000..e1a9b2754dc2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByLocation, listByService } from "./operations.js"; +export type { + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByServiceOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/operations.ts new file mode 100644 index 000000000000..f5f4b8db234d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/operations.ts @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NetworkStatusContractByLocation, + NetworkStatusContract, + networkStatusContractDeserializer, + networkStatusContractByLocationArrayDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByServiceOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByLocationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + locationName: string, + options: NetworkStatusListByLocationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + locationName: locationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByLocationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkStatusContractDeserializer(result.body); +} + +/** Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ +export async function listByLocation( + context: Client, + resourceGroupName: string, + serviceName: string, + locationName: string, + options: NetworkStatusListByLocationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByLocationSend( + context, + resourceGroupName, + serviceName, + locationName, + options, + ); + return _listByLocationDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NetworkStatusListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return networkStatusContractByLocationArrayDeserializer(result.body); +} + +/** Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ +export async function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NetworkStatusListByServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByServiceSend(context, resourceGroupName, serviceName, options); + return _listByServiceDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/options.ts new file mode 100644 index 000000000000..b3e307d636c8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/networkStatus/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NetworkStatusListByLocationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NetworkStatusListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notification/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/notification/index.ts new file mode 100644 index 000000000000..0678bd09c629 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notification/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, createOrUpdate, get } from "./operations.js"; +export type { + NotificationListByServiceOptionalParams, + NotificationCreateOrUpdateOptionalParams, + NotificationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notification/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/notification/operations.ts new file mode 100644 index 000000000000..5ac8beb5c038 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notification/operations.ts @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationContract, + notificationContractDeserializer, + NotificationName, + _NotificationCollection, + _notificationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NotificationListByServiceOptionalParams, + NotificationCreateOrUpdateOptionalParams, + NotificationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NotificationListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_NotificationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _notificationCollectionDeserializer(result.body); +} + +/** Lists a collection of properties defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: NotificationListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return notificationContractDeserializer(result.body); +} + +/** Create or Update API Management publisher notification. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + notificationName, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return notificationContractDeserializer(result.body); +} + +/** Gets the details of the Notification specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, notificationName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notification/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/notification/options.ts new file mode 100644 index 000000000000..ae6903872832 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notification/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NotificationListByServiceOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface NotificationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface NotificationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/index.ts new file mode 100644 index 000000000000..ff5cb340bf4f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByNotification } from "./operations.js"; +export type { + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/operations.ts new file mode 100644 index 000000000000..4c4b065ccd05 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/operations.ts @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationName, + RecipientEmailCollection, + recipientEmailCollectionDeserializer, + RecipientEmailContract, + recipientEmailContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the email from the list of Notification. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + notificationName, + email, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientEmailContractDeserializer(result.body); +} + +/** Adds the Email address to the list of Recipients for the Notification. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + notificationName, + email, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Determine if Notification Recipient Email subscribed to the notification. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options: NotificationRecipientEmailCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + notificationName, + email, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByNotificationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationRecipientEmailListByNotificationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByNotificationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientEmailCollectionDeserializer(result.body); +} + +/** Gets the list of the Notification Recipient Emails subscribed to a notification. */ +export async function listByNotification( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationRecipientEmailListByNotificationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByNotificationSend( + context, + resourceGroupName, + serviceName, + notificationName, + options, + ); + return _listByNotificationDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/options.ts new file mode 100644 index 000000000000..037bc865bbf2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientEmail/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NotificationRecipientEmailDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientEmailCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientEmailCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientEmailListByNotificationOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/index.ts new file mode 100644 index 000000000000..a7b07b5e4a2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByNotification } from "./operations.js"; +export type { + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/operations.ts new file mode 100644 index 000000000000..5c7049431a65 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/operations.ts @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationName, + RecipientUserCollection, + recipientUserCollectionDeserializer, + RecipientUserContract, + recipientUserContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the API Management user from the list of Notification. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + notificationName, + userId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientUserContractDeserializer(result.body); +} + +/** Adds the API Management User to the list of Recipients for the Notification. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + notificationName, + userId, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Determine if the Notification Recipient User is subscribed to the notification. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options: NotificationRecipientUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + notificationName, + userId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByNotificationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationRecipientUserListByNotificationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByNotificationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientUserCollectionDeserializer(result.body); +} + +/** Gets the list of the Notification Recipient User subscribed to the notification. */ +export async function listByNotification( + context: Client, + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options: NotificationRecipientUserListByNotificationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByNotificationSend( + context, + resourceGroupName, + serviceName, + notificationName, + options, + ); + return _listByNotificationDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/options.ts new file mode 100644 index 000000000000..c1b7557b8e63 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/notificationRecipientUser/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface NotificationRecipientUserDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientUserCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientUserCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface NotificationRecipientUserListByNotificationOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/index.ts new file mode 100644 index 000000000000..d51f78f619cb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/operations.ts new file mode 100644 index 000000000000..31cc3595aeb5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/operations.ts @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ClientSecretContract, + clientSecretContractDeserializer, + OpenidConnectProviderContract, + openidConnectProviderContractSerializer, + openidConnectProviderContractDeserializer, + OpenidConnectProviderUpdateContract, + openidConnectProviderUpdateContractSerializer, + _OpenIdConnectProviderCollection, + _openIdConnectProviderCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return clientSecretContractDeserializer(result.body); +} + +/** Gets the client secret details of the OpenID Connect Provider. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend(context, resourceGroupName, serviceName, opid, options); + return _listSecretsDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: OpenIdConnectProviderListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_OpenIdConnectProviderCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _openIdConnectProviderCollectionDeserializer(result.body); +} + +/** Lists of all the OpenId Connect Providers. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: OpenIdConnectProviderListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options: OpenIdConnectProviderDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific OpenID Connect Provider of the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options: OpenIdConnectProviderDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + opid, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options: OpenIdConnectProviderUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: openidConnectProviderUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return openidConnectProviderContractDeserializer(result.body); +} + +/** Updates the specific OpenID Connect Provider. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options: OpenIdConnectProviderUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + opid, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options: OpenIdConnectProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: openidConnectProviderContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return openidConnectProviderContractDeserializer(result.body); +} + +/** Creates or updates the OpenID Connect Provider. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options: OpenIdConnectProviderCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + opid, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, opid, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + opid: opid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return openidConnectProviderContractDeserializer(result.body); +} + +/** Gets specific OpenID Connect Provider without secrets. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + opid: string, + options: OpenIdConnectProviderGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, opid, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/options.ts new file mode 100644 index 000000000000..7b3b17cb1c92 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/openIdConnectProvider/options.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OpenIdConnectProviderListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OpenIdConnectProviderListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface OpenIdConnectProviderDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OpenIdConnectProviderUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OpenIdConnectProviderCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface OpenIdConnectProviderGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface OpenIdConnectProviderGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operation/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/operation/index.ts new file mode 100644 index 000000000000..f6acd62d811b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operation/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByTags } from "./operations.js"; +export type { OperationListByTagsOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operation/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/operation/operations.ts new file mode 100644 index 000000000000..f2c5fcc927ed --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operation/operations.ts @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _TagResourceCollection, + _tagResourceCollectionDeserializer, + TagResourceContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OperationListByTagsOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByTagsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: OperationListByTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags{?api%2Dversion,%24filter,%24top,%24skip,includeNotTaggedOperations}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + includeNotTaggedOperations: options?.includeNotTaggedOperations, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByTagsDeserialize( + result: PathUncheckedResponse, +): Promise<_TagResourceCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagResourceCollectionDeserializer(result.body); +} + +/** Lists a collection of operations associated with tags. */ +export function listByTags( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: OperationListByTagsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByTagsSend(context, resourceGroupName, serviceName, apiId, options), + _listByTagsDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operation/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/operation/options.ts new file mode 100644 index 000000000000..502e4638481d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operation/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationListByTagsOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Operations. */ + includeNotTaggedOperations?: boolean; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/index.ts new file mode 100644 index 000000000000..f32ba55f8f1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { OperationStatusGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/operations.ts new file mode 100644 index 000000000000..2ee408094653 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/operations.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationStatusResult, + operationStatusResultDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OperationStatusGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationStatusResultDeserializer(result.body); +} + +/** Returns the current status of an async operation. */ +export async function get( + context: Client, + location: string, + operationId: string, + options: OperationStatusGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, operationId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/options.ts new file mode 100644 index 000000000000..00cfd502d57b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationStatus/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationStatusGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/index.ts new file mode 100644 index 000000000000..aad4cb30676e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { OperationsResultsGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/operations.ts new file mode 100644 index 000000000000..20f788a6532e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/operations.ts @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { errorResponseDeserializer } from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OperationsResultsGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + location: string, + operationId: string, + options: OperationsResultsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + location: location, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Returns operation results for long running operations executing DELETE or PATCH on the resource. */ +export async function get( + context: Client, + location: string, + operationId: string, + options: OperationsResultsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, location, operationId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/options.ts new file mode 100644 index 000000000000..7fa8d48bf4bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/operationsResults/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OperationsResultsGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/index.ts new file mode 100644 index 000000000000..2da1f35afc2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { OutboundNetworkDependenciesEndpointsListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/operations.ts new file mode 100644 index 000000000000..9096cff35046 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/operations.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OutboundEnvironmentEndpointList, + outboundEnvironmentEndpointListDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { OutboundNetworkDependenciesEndpointsListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return outboundEnvironmentEndpointListDeserializer(result.body); +} + +/** Gets the network endpoints of all outbound dependencies of a ApiManagement service. */ +export async function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByServiceSend(context, resourceGroupName, serviceName, options); + return _listByServiceDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/options.ts new file mode 100644 index 000000000000..6b84b8bb03a6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/outboundNetworkDependenciesEndpoints/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/policy/index.ts new file mode 100644 index 000000000000..d360c23ffe31 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + PolicyListByServiceOptionalParams, + PolicyDeleteOptionalParams, + PolicyCreateOrUpdateOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/policy/operations.ts new file mode 100644 index 000000000000..97aaf138df9c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policy/operations.ts @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PolicyListByServiceOptionalParams, + PolicyDeleteOptionalParams, + PolicyCreateOrUpdateOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Lists all the Global Policy definitions of the Api Management service. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options: PolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the global policy configuration of the Api Management Service. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options: PolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: PolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates the global policy configuration of the Api Management service. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: PolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options: PolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Global policy definition in the Api Management service. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options: PolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options: PolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the Global policy definition of the Api Management service. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options: PolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, policyId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/policy/options.ts new file mode 100644 index 000000000000..412025a20f62 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PolicyListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface PolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/index.ts new file mode 100644 index 000000000000..dc67538c0dcc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { PolicyDescriptionListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/operations.ts new file mode 100644 index 000000000000..c196d21fede6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/operations.ts @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyDescriptionCollection, + policyDescriptionCollectionDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { PolicyDescriptionListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyDescriptionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions{?api%2Dversion,scope}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + scope: options?.scope, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyDescriptionCollectionDeserializer(result.body); +} + +/** Lists all policy descriptions. */ +export async function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyDescriptionListByServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByServiceSend(context, resourceGroupName, serviceName, options); + return _listByServiceDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/options.ts new file mode 100644 index 000000000000..f697cb22def1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyDescription/options.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyScopeContract } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PolicyDescriptionListByServiceOptionalParams extends OperationOptions { + /** Policy scope. */ + scope?: PolicyScopeContract; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/index.ts new file mode 100644 index 000000000000..575926262f37 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listReferences, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/operations.ts new file mode 100644 index 000000000000..31ca49123c9b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/operations.ts @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyFragmentContract, + policyFragmentContractSerializer, + policyFragmentContractDeserializer, + _PolicyFragmentCollection, + _policyFragmentCollectionDeserializer, + ResourceCollection, + resourceCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listReferencesSend( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentListReferencesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listReferencesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return resourceCollectionDeserializer(result.body); +} + +/** Lists policy resources that reference the policy fragment. */ +export async function listReferences( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentListReferencesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listReferencesSend(context, resourceGroupName, serviceName, id, options); + return _listReferencesDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyFragmentListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments{?api%2Dversion,%24filter,%24orderby,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24orderby": options?.orderby, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PolicyFragmentCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _policyFragmentCollectionDeserializer(result.body); +} + +/** Gets all policy fragments. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyFragmentListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options: PolicyFragmentDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a policy fragment. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options: PolicyFragmentDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend(context, resourceGroupName, serviceName, id, ifMatch, options); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options: PolicyFragmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyFragmentContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyFragmentContractDeserializer(result.body); +} + +/** Creates or updates a policy fragment. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options: PolicyFragmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PolicyFragmentContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend(context, resourceGroupName, serviceName, id, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, PolicyFragmentContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of a policy fragment. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, id, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyFragmentContractDeserializer(result.body); +} + +/** Gets a policy fragment. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + id: string, + options: PolicyFragmentGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, id, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/options.ts new file mode 100644 index 000000000000..c8e2c0cc73b4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyFragment/options.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyFragmentContentFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PolicyFragmentListReferencesOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface PolicyFragmentListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** OData order by query option. */ + orderby?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface PolicyFragmentDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyFragmentCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface PolicyFragmentGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyFragmentGetOptionalParams extends OperationOptions { + /** Policy fragment content format. */ + format?: PolicyFragmentContentFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/index.ts new file mode 100644 index 000000000000..cb1d8bc366da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + PolicyRestrictionListByServiceOptionalParams, + PolicyRestrictionDeleteOptionalParams, + PolicyRestrictionUpdateOptionalParams, + PolicyRestrictionCreateOrUpdateOptionalParams, + PolicyRestrictionGetEntityTagOptionalParams, + PolicyRestrictionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/operations.ts new file mode 100644 index 000000000000..26bbd3db755f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/operations.ts @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyRestrictionContract, + policyRestrictionContractSerializer, + policyRestrictionContractDeserializer, + PolicyRestrictionUpdateContract, + policyRestrictionUpdateContractSerializer, + _PolicyRestrictionCollection, + _policyRestrictionCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PolicyRestrictionListByServiceOptionalParams, + PolicyRestrictionDeleteOptionalParams, + PolicyRestrictionUpdateOptionalParams, + PolicyRestrictionCreateOrUpdateOptionalParams, + PolicyRestrictionGetEntityTagOptionalParams, + PolicyRestrictionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyRestrictionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PolicyRestrictionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _policyRestrictionCollectionDeserializer(result.body); +} + +/** Gets all policy restrictions of API Management services. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyRestrictionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyRestrictionId: policyRestrictionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + ...options.requestOptions?.headers, + }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy restriction configuration of the Api Management Service. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + ifMatch: string, + parameters: PolicyRestrictionUpdateContract, + options: PolicyRestrictionUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyRestrictionId: policyRestrictionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyRestrictionUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyRestrictionContractDeserializer(result.body); +} + +/** Updates the policy restriction configuration of the Api Management service. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + ifMatch: string, + parameters: PolicyRestrictionUpdateContract, + options: PolicyRestrictionUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + parameters: PolicyRestrictionContract, + options: PolicyRestrictionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyRestrictionId: policyRestrictionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyRestrictionContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyRestrictionContractDeserializer(result.body); +} + +/** Creates or updates the policy restriction configuration of the Api Management service. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + parameters: PolicyRestrictionContract, + options: PolicyRestrictionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyRestrictionId: policyRestrictionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the policy restriction in the Api Management service. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + policyRestrictionId: policyRestrictionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyRestrictionContractDeserializer(result.body); +} + +/** Get the policy restriction of the Api Management service. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options: PolicyRestrictionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/options.ts new file mode 100644 index 000000000000..bc4fc0d5ae95 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestriction/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PolicyRestrictionListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyRestrictionDeleteOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface PolicyRestrictionUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyRestrictionCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface PolicyRestrictionGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PolicyRestrictionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/index.ts new file mode 100644 index 000000000000..2c141d7f677c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { byService } from "./operations.js"; +export type { PolicyRestrictionValidationsByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/operations.ts new file mode 100644 index 000000000000..266ef7cdd5fd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/operations.ts @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationResultContract, + operationResultContractDeserializer, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { PolicyRestrictionValidationsByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _byServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyRestrictionValidationsByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _byServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationResultContractDeserializer(result.body); +} + +/** Validate all policies of API Management services. */ +export function byService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PolicyRestrictionValidationsByServiceOptionalParams = { requestOptions: {} }, +): PollerLike, OperationResultContract> { + return getLongRunningPoller(context, _byServiceDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => _byServiceSend(context, resourceGroupName, serviceName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, OperationResultContract>; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/options.ts new file mode 100644 index 000000000000..159d2aeb6ec4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/policyRestrictionValidations/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PolicyRestrictionValidationsByServiceOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/index.ts new file mode 100644 index 000000000000..da8b35d5528e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + PortalConfigListByServiceOptionalParams, + PortalConfigUpdateOptionalParams, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/operations.ts new file mode 100644 index 000000000000..acdbf525ecba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/operations.ts @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalConfigContract, + portalConfigContractSerializer, + portalConfigContractDeserializer, + _PortalConfigCollection, + _portalConfigCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PortalConfigListByServiceOptionalParams, + PortalConfigUpdateOptionalParams, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalConfigListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PortalConfigCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _portalConfigCollectionDeserializer(result.body); +} + +/** Lists the developer portal configurations. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalConfigListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options: PortalConfigUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalConfigId: portalConfigId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalConfigContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalConfigContractDeserializer(result.body); +} + +/** Update the developer portal configuration. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options: PortalConfigUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options: PortalConfigCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalConfigId: portalConfigId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalConfigContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalConfigContractDeserializer(result.body); +} + +/** Create or update the developer portal configuration. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options: PortalConfigCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options: PortalConfigGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalConfigId: portalConfigId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the developer portal configuration. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options: PortalConfigGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + portalConfigId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options: PortalConfigGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalConfigId: portalConfigId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalConfigContractDeserializer(result.body); +} + +/** Get the developer portal configuration. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options: PortalConfigGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, portalConfigId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/options.ts new file mode 100644 index 000000000000..2beadfecc2f4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalConfig/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PortalConfigListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PortalConfigUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PortalConfigCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PortalConfigGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PortalConfigGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/index.ts new file mode 100644 index 000000000000..64282af1112d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/operations.ts new file mode 100644 index 000000000000..0d1c9b212937 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/operations.ts @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalRevisionContract, + portalRevisionContractSerializer, + portalRevisionContractDeserializer, + _PortalRevisionCollection, + _portalRevisionCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalRevisionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PortalRevisionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _portalRevisionCollectionDeserializer(result.body); +} + +/** Lists developer portal's revisions. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalRevisionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options: PortalRevisionUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalRevisionId: portalRevisionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalRevisionContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalRevisionContractDeserializer(result.body); +} + +/** Updates the description of specified portal revision or makes it current. */ +export function update( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options: PortalRevisionUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PortalRevisionContract> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, PortalRevisionContract>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options: PortalRevisionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalRevisionId: portalRevisionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: portalRevisionContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["201", "200", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalRevisionContractDeserializer(result.body); +} + +/** Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options: PortalRevisionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PortalRevisionContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["201", "200", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, PortalRevisionContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options: PortalRevisionGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalRevisionId: portalRevisionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the developer portal revision specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options: PortalRevisionGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + portalRevisionId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options: PortalRevisionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + portalRevisionId: portalRevisionId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalRevisionContractDeserializer(result.body); +} + +/** Gets the developer portal's revision specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options: PortalRevisionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, portalRevisionId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/options.ts new file mode 100644 index 000000000000..682eff95e1de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalRevision/options.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PortalRevisionListByServiceOptionalParams extends OperationOptions { + /** + * | Field | Supported operators | Supported functions | + * |-------------|------------------------|-----------------------------------| + * + * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |isCurrent | eq, ne | | + */ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface PortalRevisionUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PortalRevisionCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PortalRevisionGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PortalRevisionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/index.ts new file mode 100644 index 000000000000..3f2078b00cff --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { PortalSettingsListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/operations.ts new file mode 100644 index 000000000000..1ef7448efb38 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/operations.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalSettingsCollection, + portalSettingsCollectionDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { PortalSettingsListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalSettingsListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSettingsCollectionDeserializer(result.body); +} + +/** Lists a collection of portalsettings defined within a service instance.. */ +export async function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PortalSettingsListByServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByServiceSend(context, resourceGroupName, serviceName, options); + return _listByServiceDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/options.ts new file mode 100644 index 000000000000..0d0a3ef81865 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/portalSettings/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PortalSettingsListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/index.ts new file mode 100644 index 000000000000..265affe74ca2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listPrivateLinkResources, + getPrivateLinkResource, + listByService, + $delete, + createOrUpdate, + getByName, +} from "./operations.js"; +export type { + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/operations.ts new file mode 100644 index 000000000000..d3785b1d37c1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/operations.ts @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PrivateEndpointConnection, + privateEndpointConnectionDeserializer, + PrivateEndpointConnectionRequest, + privateEndpointConnectionRequestSerializer, + _PrivateEndpointConnectionListResult, + _privateEndpointConnectionListResultDeserializer, + PrivateLinkResource, + privateLinkResourceDeserializer, + PrivateLinkResourceListResult, + privateLinkResourceListResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listPrivateLinkResourcesSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listPrivateLinkResourcesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return privateLinkResourceListResultDeserializer(result.body); +} + +/** Gets the private link resources */ +export async function listPrivateLinkResources( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listPrivateLinkResourcesSend( + context, + resourceGroupName, + serviceName, + options, + ); + return _listPrivateLinkResourcesDeserialize(result); +} + +export function _getPrivateLinkResourceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + privateLinkSubResourceName: privateLinkSubResourceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getPrivateLinkResourceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return privateLinkResourceDeserializer(result.body); +} + +/** Gets the private link resources */ +export async function getPrivateLinkResource( + context: Client, + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getPrivateLinkResourceSend( + context, + resourceGroupName, + serviceName, + privateLinkSubResourceName, + options, + ); + return _getPrivateLinkResourceDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateEndpointConnectionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PrivateEndpointConnectionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _privateEndpointConnectionListResultDeserializer(result.body); +} + +/** Lists all private endpoint connections of the API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: PrivateEndpointConnectionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options: PrivateEndpointConnectionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + privateEndpointConnectionName: privateEndpointConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "202", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Private Endpoint Connection. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options: PrivateEndpointConnectionDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["200", "202", "204"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, serviceName, privateEndpointConnectionName, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options: PrivateEndpointConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + privateEndpointConnectionName: privateEndpointConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: privateEndpointConnectionRequestSerializer(privateEndpointConnectionRequest), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return privateEndpointConnectionDeserializer(result.body); +} + +/** Creates a new Private Endpoint Connection or updates an existing one. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options: PrivateEndpointConnectionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PrivateEndpointConnection> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, PrivateEndpointConnection>; +} + +export function _getByNameSend( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options: PrivateEndpointConnectionGetByNameOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + privateEndpointConnectionName: privateEndpointConnectionName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getByNameDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return privateEndpointConnectionDeserializer(result.body); +} + +/** Gets the details of the Private Endpoint Connection specified by its identifier. */ +export async function getByName( + context: Client, + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options: PrivateEndpointConnectionGetByNameOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getByNameSend( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options, + ); + return _getByNameDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/options.ts new file mode 100644 index 000000000000..2a33a8eb4c15 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/privateEndpointConnection/options.ts @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionListByServiceOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface PrivateEndpointConnectionGetByNameOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/product/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/product/index.ts new file mode 100644 index 000000000000..9c5fbdaf2bf4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/product/index.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, + listByTags, +} from "./operations.js"; +export type { + ProductListByServiceOptionalParams, + ProductDeleteOptionalParams, + ProductUpdateOptionalParams, + ProductCreateOrUpdateOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetOptionalParams, + ProductListByTagsOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/product/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/product/operations.ts new file mode 100644 index 000000000000..5a3839d96d6a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/product/operations.ts @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductContract, + productContractSerializer, + productContractDeserializer, + ProductUpdateParameters, + productUpdateParametersSerializer, + _ProductCollection, + _productCollectionDeserializer, + _TagResourceCollection, + _tagResourceCollectionDeserializer, + TagResourceContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductListByServiceOptionalParams, + ProductDeleteOptionalParams, + ProductUpdateOptionalParams, + ProductCreateOrUpdateOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetOptionalParams, + ProductListByTagsOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ProductListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products{?api%2Dversion,%24filter,%24top,%24skip,expandGroups,tags}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + expandGroups: options?.expandGroups, + tags: options?.tags, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productCollectionDeserializer(result.body); +} + +/** Lists a collection of products in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ProductListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options: ProductDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}{?api%2Dversion,deleteSubscriptions}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + deleteSubscriptions: options?.deleteSubscriptions, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options: ProductDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options: ProductUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: productUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Update existing product details. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options: ProductUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options: ProductCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: productContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Creates or Updates a product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options: ProductCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the product specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + productId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Gets the details of the product specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, productId, options); + return _getDeserialize(result); +} + +export function _listByTagsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ProductListByTagsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags{?api%2Dversion,%24filter,%24top,%24skip,includeNotTaggedProducts}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + includeNotTaggedProducts: options?.includeNotTaggedProducts, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByTagsDeserialize( + result: PathUncheckedResponse, +): Promise<_TagResourceCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagResourceCollectionDeserializer(result.body); +} + +/** Lists a collection of products associated with tags. */ +export function listByTags( + context: Client, + resourceGroupName: string, + serviceName: string, + options: ProductListByTagsOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByTagsSend(context, resourceGroupName, serviceName, options), + _listByTagsDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/product/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/product/options.ts new file mode 100644 index 000000000000..a00595d59aff --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/product/options.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ + expandGroups?: boolean; + /** Products which are part of a specific tag. */ + tags?: string; +} + +/** Optional parameters. */ +export interface ProductDeleteOptionalParams extends OperationOptions { + /** Delete existing subscriptions associated with the product or not. */ + deleteSubscriptions?: boolean; +} + +/** Optional parameters. */ +export interface ProductUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ProductGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductListByTagsOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include not tagged Products. */ + includeNotTaggedProducts?: boolean; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApi/index.ts new file mode 100644 index 000000000000..471a0d812665 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApi/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByProduct } from "./operations.js"; +export type { + ProductApiDeleteOptionalParams, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCheckEntityExistsOptionalParams, + ProductApiListByProductOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApi/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApi/operations.ts new file mode 100644 index 000000000000..4b23dca6ba97 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApi/operations.ts @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + ApiContract, + apiContractDeserializer, + errorResponseDeserializer, + _ApiCollection, + _apiCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductApiDeleteOptionalParams, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCheckEntityExistsOptionalParams, + ProductApiListByProductOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + apiId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Adds an API to the specified product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + apiId, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that API entity specified by identifier is associated with the Product entity. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options: ProductApiCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + productId, + apiId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductApiListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiCollectionDeserializer(result.body); +} + +/** Lists a collection of the APIs associated with a product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductApiListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApi/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApi/options.ts new file mode 100644 index 000000000000..d07aec86d9c4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApi/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductApiDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductApiCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductApiCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductApiListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/index.ts new file mode 100644 index 000000000000..f81069982246 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ProductApiLinkListByProductOptionalParams, + ProductApiLinkDeleteOptionalParams, + ProductApiLinkCreateOrUpdateOptionalParams, + ProductApiLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/operations.ts new file mode 100644 index 000000000000..8714f84fbcf4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductApiLinkContract, + productApiLinkContractSerializer, + productApiLinkContractDeserializer, + _ProductApiLinkCollection, + _productApiLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductApiLinkListByProductOptionalParams, + ProductApiLinkDeleteOptionalParams, + ProductApiLinkCreateOrUpdateOptionalParams, + ProductApiLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductApiLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductApiLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productApiLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the API links associated with a product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductApiLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options: ProductApiLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options: ProductApiLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + apiLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options: ProductApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: productApiLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productApiLinkContractDeserializer(result.body); +} + +/** Adds an API to the specified product via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options: ProductApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + apiLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options: ProductApiLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productApiLinkContractDeserializer(result.body); +} + +/** Gets the API link for the product. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options: ProductApiLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + productId, + apiLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/options.ts new file mode 100644 index 000000000000..78448eec353b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productApiLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductApiLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ProductApiLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductApiLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductApiLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/index.ts new file mode 100644 index 000000000000..dfe1a23ffaee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByProduct } from "./operations.js"; +export type { + ProductGroupDeleteOptionalParams, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupListByProductOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroup/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/operations.ts new file mode 100644 index 000000000000..9878030096c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/operations.ts @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GroupContract, + groupContractDeserializer, + _GroupCollection, + _groupCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductGroupDeleteOptionalParams, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupListByProductOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the association between the specified group and product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + groupId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Adds the association between the specified developer group with the specified product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + groupId, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that Group entity specified by identifier is associated with the Product entity. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options: ProductGroupCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + productId, + groupId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGroupListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_GroupCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _groupCollectionDeserializer(result.body); +} + +/** Lists the collection of developer groups associated with the specified product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGroupListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroup/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/options.ts new file mode 100644 index 000000000000..14dc647898aa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroup/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductGroupDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGroupCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGroupCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGroupListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/index.ts new file mode 100644 index 000000000000..5a3fa638675c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + ProductGroupLinkListByProductOptionalParams, + ProductGroupLinkDeleteOptionalParams, + ProductGroupLinkCreateOrUpdateOptionalParams, + ProductGroupLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/operations.ts new file mode 100644 index 000000000000..da801e1bd680 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductGroupLinkContract, + productGroupLinkContractSerializer, + productGroupLinkContractDeserializer, + _ProductGroupLinkCollection, + _productGroupLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductGroupLinkListByProductOptionalParams, + ProductGroupLinkDeleteOptionalParams, + ProductGroupLinkCreateOrUpdateOptionalParams, + ProductGroupLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGroupLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductGroupLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productGroupLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the group links associated with a product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductGroupLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options: ProductGroupLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified group from the specified product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options: ProductGroupLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + groupLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options: ProductGroupLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: productGroupLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productGroupLinkContractDeserializer(result.body); +} + +/** Adds a group to the specified product via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options: ProductGroupLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + groupLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options: ProductGroupLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productGroupLinkContractDeserializer(result.body); +} + +/** Gets the group link for the product. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options: ProductGroupLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + productId, + groupLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/options.ts new file mode 100644 index 000000000000..769162ab43e6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productGroupLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductGroupLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ProductGroupLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGroupLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductGroupLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/index.ts new file mode 100644 index 000000000000..11e986aaab2a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ProductPolicyListByProductOptionalParams, + ProductPolicyDeleteOptionalParams, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/operations.ts new file mode 100644 index 000000000000..7ee4284d9585 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductPolicyListByProductOptionalParams, + ProductPolicyDeleteOptionalParams, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductPolicyListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the policy configuration at the Product level. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductPolicyListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ProductPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options: ProductPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ProductPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the Product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: ProductPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options: ProductPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Get the ETag of the policy configuration at the Product level. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options: ProductPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + productId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options: ProductPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the Product level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options: ProductPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + productId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/options.ts new file mode 100644 index 000000000000..d928458cb477 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductPolicyListByProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ProductPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/index.ts new file mode 100644 index 000000000000..1041899fa9dc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ProductSubscriptionsListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/operations.ts new file mode 100644 index 000000000000..3f5b3db61bf2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/operations.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SubscriptionContract, + _SubscriptionCollection, + _subscriptionCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ProductSubscriptionsListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductSubscriptionsListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SubscriptionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _subscriptionCollectionDeserializer(result.body); +} + +/** Lists the collection of subscriptions to the specified product. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductSubscriptionsListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, productId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/options.ts new file mode 100644 index 000000000000..58f3b87310f3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productSubscriptions/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductSubscriptionsListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWiki/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/index.ts new file mode 100644 index 000000000000..7fa6d37ca87e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + ProductWikiDeleteOptionalParams, + ProductWikiUpdateOptionalParams, + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWiki/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/operations.ts new file mode 100644 index 000000000000..364058f19760 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/operations.ts @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WikiContract, + wikiContractSerializer, + wikiContractDeserializer, + WikiUpdateContract, + wikiUpdateContractSerializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ProductWikiDeleteOptionalParams, + ProductWikiUpdateOptionalParams, + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options: ProductWikiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Wiki from a Product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options: ProductWikiDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + productId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options: ProductWikiUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: wikiUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Updates the details of the Wiki for a Product specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options: ProductWikiUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + productId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options: ProductWikiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: wikiContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Creates a new Wiki for a Product or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options: ProductWikiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + productId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikiGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikiGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + productId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikiGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return wikiContractDeserializer(result.body); +} + +/** Gets the details of the Wiki for a Product specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikiGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, productId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWiki/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/options.ts new file mode 100644 index 000000000000..9b94c7951377 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWiki/options.ts @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductWikiDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductWikiUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductWikiCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface ProductWikiGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface ProductWikiGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWikis/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/index.ts new file mode 100644 index 000000000000..f44c310d0095 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { ProductWikisListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWikis/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/operations.ts new file mode 100644 index 000000000000..c26169d1d794 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/operations.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WikiContract, + _WikiCollection, + _wikiCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { ProductWikisListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikisListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_WikiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _wikiCollectionDeserializer(result.body); +} + +/** Gets the details of the Wiki for a Product specified by its identifier. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: ProductWikisListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, productId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/productWikis/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/options.ts new file mode 100644 index 000000000000..f5580f186388 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/productWikis/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ProductWikisListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/index.ts new file mode 100644 index 000000000000..6a9d0226442b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { update, listByService } from "./operations.js"; +export type { + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysListByServiceOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/operations.ts new file mode 100644 index 000000000000..8408a3c3d0bc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/operations.ts @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + QuotaCounterCollection, + quotaCounterCollectionDeserializer, + QuotaCounterValueUpdateContract, + quotaCounterValueUpdateContractSerializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysListByServiceOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options: QuotaByCounterKeysUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + quotaCounterKey: quotaCounterKey, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: quotaCounterValueUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return quotaCounterCollectionDeserializer(result.body); +} + +/** Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options: QuotaByCounterKeysUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + quotaCounterKey, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options: QuotaByCounterKeysListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + quotaCounterKey: quotaCounterKey, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return quotaCounterCollectionDeserializer(result.body); +} + +/** Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. */ +export async function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options: QuotaByCounterKeysListByServiceOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByServiceSend( + context, + resourceGroupName, + serviceName, + quotaCounterKey, + options, + ); + return _listByServiceDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/options.ts new file mode 100644 index 000000000000..0c4fe7616271 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByCounterKeys/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface QuotaByCounterKeysUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface QuotaByCounterKeysListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/index.ts new file mode 100644 index 000000000000..cc27f84b17a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { update, get } from "./operations.js"; +export type { + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/operations.ts new file mode 100644 index 000000000000..07fd6fca2985 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/operations.ts @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + QuotaCounterContract, + quotaCounterContractDeserializer, + QuotaCounterValueUpdateContract, + quotaCounterValueUpdateContractSerializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options: QuotaByPeriodKeysUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + quotaCounterKey: quotaCounterKey, + quotaPeriodKey: quotaPeriodKey, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: quotaCounterValueUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return quotaCounterContractDeserializer(result.body); +} + +/** Updates an existing quota counter value in the specified service instance. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options: QuotaByPeriodKeysUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options: QuotaByPeriodKeysGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + quotaCounterKey: quotaCounterKey, + quotaPeriodKey: quotaPeriodKey, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return quotaCounterContractDeserializer(result.body); +} + +/** Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options: QuotaByPeriodKeysGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/options.ts new file mode 100644 index 000000000000..dc3939e86757 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/quotaByPeriodKeys/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface QuotaByPeriodKeysUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface QuotaByPeriodKeysGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/region/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/region/index.ts new file mode 100644 index 000000000000..b5ff6190682d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/region/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { RegionListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/region/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/region/operations.ts new file mode 100644 index 000000000000..e89ff8e20e30 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/region/operations.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _RegionListResult, + _regionListResultDeserializer, + RegionContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { RegionListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: RegionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_RegionListResult> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _regionListResultDeserializer(result.body); +} + +/** Lists all azure regions in which the service exists. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: RegionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/region/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/region/options.ts new file mode 100644 index 000000000000..cd9b6257239f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/region/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface RegionListByServiceOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/reports/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/reports/index.ts new file mode 100644 index 000000000000..7c4a676a0f9f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/reports/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByRequest, + listByTime, + listBySubscription, + listByGeo, + listByProduct, + listByOperation, + listByUser, + listByApi, +} from "./operations.js"; +export type { + ReportsListByRequestOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByUserOptionalParams, + ReportsListByApiOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/reports/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/reports/operations.ts new file mode 100644 index 000000000000..066a16cc681a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/reports/operations.ts @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ReportCollection, + _reportCollectionDeserializer, + ReportRecordContract, + _RequestReportCollection, + _requestReportCollectionDeserializer, + RequestReportRecordContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + ReportsListByRequestOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByUserOptionalParams, + ReportsListByApiOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByRequestSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByRequestOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByRequestDeserialize( + result: PathUncheckedResponse, +): Promise<_RequestReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _requestReportCollectionDeserializer(result.body); +} + +/** Lists report records by Request. */ +export function listByRequest( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByRequestOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByRequestSend(context, resourceGroupName, serviceName, filter, options), + _listByRequestDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByTimeSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options: ReportsListByTimeOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime{?api%2Dversion,%24filter,%24top,%24skip,%24orderby,interval}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + interval: interval, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByTimeDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by Time. */ +export function listByTime( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options: ReportsListByTimeOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByTimeSend(context, resourceGroupName, serviceName, filter, interval, options), + _listByTimeDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listBySubscriptionSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListBySubscriptionOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription{?api%2Dversion,%24filter,%24top,%24skip,%24orderby}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listBySubscriptionDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by subscription. */ +export function listBySubscription( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListBySubscriptionOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listBySubscriptionSend(context, resourceGroupName, serviceName, filter, options), + _listBySubscriptionDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByGeoSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByGeoOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByGeoDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by geography. */ +export function listByGeo( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByGeoOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByGeoSend(context, resourceGroupName, serviceName, filter, options), + _listByGeoDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct{?api%2Dversion,%24filter,%24top,%24skip,%24orderby}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by Product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, filter, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation{?api%2Dversion,%24filter,%24top,%24skip,%24orderby}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByOperationDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by API Operations. */ +export function listByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByOperationOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByOperationSend(context, resourceGroupName, serviceName, filter, options), + _listByOperationDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByUserSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByUserOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser{?api%2Dversion,%24filter,%24top,%24skip,%24orderby}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByUserDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by User. */ +export function listByUser( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByUserOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByUserSend(context, resourceGroupName, serviceName, filter, options), + _listByUserDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi{?api%2Dversion,%24filter,%24top,%24skip,%24orderby}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": filter, + "%24top": options?.top, + "%24skip": options?.skip, + "%24orderby": options?.orderby, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_ReportCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _reportCollectionDeserializer(result.body); +} + +/** Lists report records by API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + filter: string, + options: ReportsListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, filter, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/reports/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/reports/options.ts new file mode 100644 index 000000000000..11cc72f55cf4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/reports/options.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ReportsListByRequestOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ReportsListByTimeOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} + +/** Optional parameters. */ +export interface ReportsListBySubscriptionOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} + +/** Optional parameters. */ +export interface ReportsListByGeoOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface ReportsListByProductOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} + +/** Optional parameters. */ +export interface ReportsListByOperationOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} + +/** Optional parameters. */ +export interface ReportsListByUserOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} + +/** Optional parameters. */ +export interface ReportsListByApiOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** OData order by query option. */ + orderby?: string; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/index.ts new file mode 100644 index 000000000000..23877c0a5691 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + SignInSettingsUpdateOptionalParams, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/operations.ts new file mode 100644 index 000000000000..b0dc627ec605 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/operations.ts @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalSigninSettings, + portalSigninSettingsSerializer, + portalSigninSettingsDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SignInSettingsUpdateOptionalParams, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options: SignInSettingsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + body: portalSigninSettingsSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Update Sign-In settings. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options: SignInSettingsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options: SignInSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalSigninSettingsSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSigninSettingsDeserializer(result.body); +} + +/** Create or Update Sign-In settings. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options: SignInSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignInSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the SignInSettings. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignInSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignInSettingsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSigninSettingsDeserializer(result.body); +} + +/** Get Sign In Settings for the Portal */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignInSettingsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/options.ts new file mode 100644 index 000000000000..1b51fd02e009 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signInSettings/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SignInSettingsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SignInSettingsCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface SignInSettingsGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SignInSettingsGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/index.ts new file mode 100644 index 000000000000..ba9a956a73d0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + SignUpSettingsUpdateOptionalParams, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/operations.ts new file mode 100644 index 000000000000..1fce9ffc5ed0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/operations.ts @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PortalSignupSettings, + portalSignupSettingsSerializer, + portalSignupSettingsDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SignUpSettingsUpdateOptionalParams, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options: SignUpSettingsUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + body: portalSignupSettingsSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Update Sign-Up settings. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options: SignUpSettingsUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options: SignUpSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: portalSignupSettingsSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSignupSettingsDeserializer(result.body); +} + +/** Create or Update Sign-Up settings. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options: SignUpSettingsCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignUpSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the SignUpSettings. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignUpSettingsGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignUpSettingsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return portalSignupSettingsDeserializer(result.body); +} + +/** Get Sign Up Settings for the Portal */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SignUpSettingsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/options.ts new file mode 100644 index 000000000000..91f8707d7bee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/signUpSettings/options.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SignUpSettingsUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SignUpSettingsCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface SignUpSettingsGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SignUpSettingsGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/subscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/subscription/index.ts new file mode 100644 index 000000000000..57aea4267eeb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/subscription/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + list, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + SubscriptionListSecretsOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionListOptionalParams, + SubscriptionDeleteOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/subscription/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/subscription/operations.ts new file mode 100644 index 000000000000..74e39b0616cb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/subscription/operations.ts @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SubscriptionContract, + subscriptionContractDeserializer, + _SubscriptionCollection, + _subscriptionCollectionDeserializer, + SubscriptionCreateParameters, + subscriptionCreateParametersSerializer, + SubscriptionUpdateParameters, + subscriptionUpdateParametersSerializer, + SubscriptionKeysContract, + subscriptionKeysContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + SubscriptionListSecretsOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionListOptionalParams, + SubscriptionDeleteOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionKeysContractDeserializer(result.body); +} + +/** Gets the specified Subscription keys. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend(context, resourceGroupName, serviceName, sid, options); + return _listSecretsDeserialize(result); +} + +export function _regenerateSecondaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regenerateSecondaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerates secondary key of existing subscription of the API Management service instance. */ +export async function regenerateSecondaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regenerateSecondaryKeySend( + context, + resourceGroupName, + serviceName, + sid, + options, + ); + return _regenerateSecondaryKeyDeserialize(result); +} + +export function _regeneratePrimaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regeneratePrimaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerates primary key of existing subscription of the API Management service instance. */ +export async function regeneratePrimaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regeneratePrimaryKeySend( + context, + resourceGroupName, + serviceName, + sid, + options, + ); + return _regeneratePrimaryKeyDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SubscriptionListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SubscriptionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _subscriptionCollectionDeserializer(result.body); +} + +/** Lists all subscriptions of the API Management service instance. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + options: SubscriptionListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options: SubscriptionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified subscription. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options: SubscriptionDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend(context, resourceGroupName, serviceName, sid, ifMatch, options); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options: SubscriptionUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}{?api%2Dversion,notify,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + notify: options?.notify, + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: subscriptionUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Updates the details of a subscription specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options: SubscriptionUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + sid, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options: SubscriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}{?api%2Dversion,notify,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + notify: options?.notify, + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: subscriptionCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Creates or updates the subscription of specified user to the specified product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options: SubscriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + sid, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, sid, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Gets the specified Subscription entity. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + sid: string, + options: SubscriptionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, sid, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/subscription/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/subscription/options.ts new file mode 100644 index 000000000000..ff2281f14765 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/subscription/options.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AppType } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface SubscriptionListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionRegenerateSecondaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionRegeneratePrimaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface SubscriptionDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionUpdateOptionalParams extends OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} + +/** Optional parameters. */ +export interface SubscriptionCreateOrUpdateOptionalParams extends OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} + +/** Optional parameters. */ +export interface SubscriptionGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface SubscriptionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tag/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tag/index.ts new file mode 100644 index 000000000000..8f60a095f831 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tag/index.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByService, + $delete, + update, + createOrUpdate, + getEntityState, + get, + listByProduct, + detachFromProduct, + assignToProduct, + getEntityStateByProduct, + getByProduct, + listByOperation, + detachFromOperation, + assignToOperation, + getEntityStateByOperation, + getByOperation, + listByApi, + detachFromApi, + assignToApi, + getEntityStateByApi, + getByApi, +} from "./operations.js"; +export type { + TagListByServiceOptionalParams, + TagDeleteOptionalParams, + TagUpdateOptionalParams, + TagCreateOrUpdateOptionalParams, + TagGetEntityStateOptionalParams, + TagGetOptionalParams, + TagListByProductOptionalParams, + TagDetachFromProductOptionalParams, + TagAssignToProductOptionalParams, + TagGetEntityStateByProductOptionalParams, + TagGetByProductOptionalParams, + TagListByOperationOptionalParams, + TagDetachFromOperationOptionalParams, + TagAssignToOperationOptionalParams, + TagGetEntityStateByOperationOptionalParams, + TagGetByOperationOptionalParams, + TagListByApiOptionalParams, + TagDetachFromApiOptionalParams, + TagAssignToApiOptionalParams, + TagGetEntityStateByApiOptionalParams, + TagGetByApiOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tag/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tag/operations.ts new file mode 100644 index 000000000000..ce051bbcffac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tag/operations.ts @@ -0,0 +1,1330 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagContract, + tagContractDeserializer, + _TagCollection, + _tagCollectionDeserializer, + TagCreateUpdateParameters, + tagCreateUpdateParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TagListByServiceOptionalParams, + TagDeleteOptionalParams, + TagUpdateOptionalParams, + TagCreateOrUpdateOptionalParams, + TagGetEntityStateOptionalParams, + TagGetOptionalParams, + TagListByProductOptionalParams, + TagDetachFromProductOptionalParams, + TagAssignToProductOptionalParams, + TagGetEntityStateByProductOptionalParams, + TagGetByProductOptionalParams, + TagListByOperationOptionalParams, + TagDetachFromOperationOptionalParams, + TagAssignToOperationOptionalParams, + TagGetEntityStateByOperationOptionalParams, + TagGetByOperationOptionalParams, + TagListByApiOptionalParams, + TagDetachFromApiOptionalParams, + TagAssignToApiOptionalParams, + TagGetEntityStateByApiOptionalParams, + TagGetByApiOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TagListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags{?api%2Dversion,%24filter,%24top,%24skip,scope}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + scope: options?.scope, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_TagCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagCollectionDeserializer(result.body); +} + +/** Lists a collection of tags defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TagListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options: TagDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific tag of the API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options: TagDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + tagId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options: TagUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: tagCreateUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Updates the details of the tag specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options: TagUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + tagId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options: TagCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: tagCreateUpdateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Creates a tag. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options: TagCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + tagId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityStateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagGetEntityStateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityStateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityState( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagGetEntityStateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityStateSend(context, resourceGroupName, serviceName, tagId, options); + return _getEntityStateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Gets the details of the tag specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, tagId, options); + return _getDeserialize(result); +} + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: TagListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagCollectionDeserializer(result.body); +} + +/** Lists all Tags associated with the Product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + options: TagListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _detachFromProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagDetachFromProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _detachFromProductDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Detach the tag from the Product. */ +export async function detachFromProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagDetachFromProductOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _detachFromProductSend( + context, + resourceGroupName, + serviceName, + productId, + tagId, + options, + ); + return _detachFromProductDeserialize(result); +} + +export function _assignToProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagAssignToProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _assignToProductDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Assign tag to the Product. */ +export async function assignToProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagAssignToProductOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _assignToProductSend( + context, + resourceGroupName, + serviceName, + productId, + tagId, + options, + ); + return _assignToProductDeserialize(result); +} + +export function _getEntityStateByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagGetEntityStateByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityStateByProductDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityStateByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagGetEntityStateByProductOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityStateByProductSend( + context, + resourceGroupName, + serviceName, + productId, + tagId, + options, + ); + return _getEntityStateByProductDeserialize(result); +} + +export function _getByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagGetByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + productId: productId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getByProductDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Get tag associated with the Product. */ +export async function getByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options: TagGetByProductOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getByProductSend( + context, + resourceGroupName, + serviceName, + productId, + tagId, + options, + ); + return _getByProductDeserialize(result); +} + +export function _listByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: TagListByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByOperationDeserialize( + result: PathUncheckedResponse, +): Promise<_TagCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagCollectionDeserializer(result.body); +} + +/** Lists all Tags associated with the Operation. */ +export function listByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options: TagListByOperationOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByOperationSend(context, resourceGroupName, serviceName, apiId, operationId, options), + _listByOperationDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _detachFromOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagDetachFromOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _detachFromOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Detach the tag from the Operation. */ +export async function detachFromOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagDetachFromOperationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _detachFromOperationSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ); + return _detachFromOperationDeserialize(result); +} + +export function _assignToOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagAssignToOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _assignToOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Assign tag to the Operation. */ +export async function assignToOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagAssignToOperationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _assignToOperationSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ); + return _assignToOperationDeserialize(result); +} + +export function _getEntityStateByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagGetEntityStateByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityStateByOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityStateByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagGetEntityStateByOperationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityStateByOperationSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ); + return _getEntityStateByOperationDeserialize(result); +} + +export function _getByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagGetByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + operationId: operationId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getByOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Get tag associated with the Operation. */ +export async function getByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options: TagGetByOperationOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getByOperationSend( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ); + return _getByOperationDeserialize(result); +} + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: TagListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_TagCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagCollectionDeserializer(result.body); +} + +/** Lists all Tags associated with the API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + options: TagListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _detachFromApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagDetachFromApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _detachFromApiDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Detach the tag from the Api. */ +export async function detachFromApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagDetachFromApiOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _detachFromApiSend( + context, + resourceGroupName, + serviceName, + apiId, + tagId, + options, + ); + return _detachFromApiDeserialize(result); +} + +export function _assignToApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagAssignToApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _assignToApiDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Assign tag to the Api. */ +export async function assignToApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagAssignToApiOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _assignToApiSend( + context, + resourceGroupName, + serviceName, + apiId, + tagId, + options, + ); + return _assignToApiDeserialize(result); +} + +export function _getEntityStateByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagGetEntityStateByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityStateByApiDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityStateByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagGetEntityStateByApiOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityStateByApiSend( + context, + resourceGroupName, + serviceName, + apiId, + tagId, + options, + ); + return _getEntityStateByApiDeserialize(result); +} + +export function _getByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagGetByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + apiId: apiId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getByApiDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Get tag associated with the API. */ +export async function getByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options: TagGetByApiOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getByApiSend( + context, + resourceGroupName, + serviceName, + apiId, + tagId, + options, + ); + return _getByApiDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tag/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tag/options.ts new file mode 100644 index 000000000000..45e62f2e7dcf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tag/options.ts @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TagListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Scope like 'apis', 'products' or 'apis/{apiId} */ + scope?: string; +} + +/** Optional parameters. */ +export interface TagDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface TagGetEntityStateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagDetachFromProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagAssignToProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetEntityStateByProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetByProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagListByOperationOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagDetachFromOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagAssignToOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetEntityStateByOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetByOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagDetachFromApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagAssignToApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetEntityStateByApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagGetByApiOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/index.ts new file mode 100644 index 000000000000..a4900f7997a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + TagApiLinkListByProductOptionalParams, + TagApiLinkDeleteOptionalParams, + TagApiLinkCreateOrUpdateOptionalParams, + TagApiLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/operations.ts new file mode 100644 index 000000000000..9e60a021ebac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/operations.ts @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagApiLinkContract, + tagApiLinkContractSerializer, + tagApiLinkContractDeserializer, + _TagApiLinkCollection, + _tagApiLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TagApiLinkListByProductOptionalParams, + TagApiLinkDeleteOptionalParams, + TagApiLinkCreateOrUpdateOptionalParams, + TagApiLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagApiLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagApiLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagApiLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the API links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagApiLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options: TagApiLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options: TagApiLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + tagId, + apiLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options: TagApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagApiLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagApiLinkContractDeserializer(result.body); +} + +/** Adds an API to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options: TagApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + tagId, + apiLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options: TagApiLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagApiLinkContractDeserializer(result.body); +} + +/** Gets the API link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options: TagApiLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, tagId, apiLinkId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/options.ts new file mode 100644 index 000000000000..c790816283b2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagApiLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TagApiLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagApiLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagApiLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagApiLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/index.ts new file mode 100644 index 000000000000..80b563868afb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + TagOperationLinkListByProductOptionalParams, + TagOperationLinkDeleteOptionalParams, + TagOperationLinkCreateOrUpdateOptionalParams, + TagOperationLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/operations.ts new file mode 100644 index 000000000000..00a3b7f2b673 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagOperationLinkContract, + tagOperationLinkContractSerializer, + tagOperationLinkContractDeserializer, + _TagOperationLinkCollection, + _tagOperationLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TagOperationLinkListByProductOptionalParams, + TagOperationLinkDeleteOptionalParams, + TagOperationLinkCreateOrUpdateOptionalParams, + TagOperationLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagOperationLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagOperationLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagOperationLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the operation links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagOperationLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options: TagOperationLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified operation from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options: TagOperationLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + tagId, + operationLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options: TagOperationLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagOperationLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagOperationLinkContractDeserializer(result.body); +} + +/** Adds an operation to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options: TagOperationLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + tagId, + operationLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options: TagOperationLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagOperationLinkContractDeserializer(result.body); +} + +/** Gets the operation link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options: TagOperationLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + tagId, + operationLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/options.ts new file mode 100644 index 000000000000..184d453f7f6e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagOperationLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TagOperationLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagOperationLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagOperationLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagOperationLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/index.ts new file mode 100644 index 000000000000..93e48866506f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + TagProductLinkListByProductOptionalParams, + TagProductLinkDeleteOptionalParams, + TagProductLinkCreateOrUpdateOptionalParams, + TagProductLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/operations.ts new file mode 100644 index 000000000000..093eee5a1742 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagProductLinkContract, + tagProductLinkContractSerializer, + tagProductLinkContractDeserializer, + _TagProductLinkCollection, + _tagProductLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TagProductLinkListByProductOptionalParams, + TagProductLinkDeleteOptionalParams, + TagProductLinkCreateOrUpdateOptionalParams, + TagProductLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagProductLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagProductLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagProductLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the product links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + options: TagProductLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options: TagProductLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified product from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options: TagProductLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + tagId, + productLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options: TagProductLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagProductLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagProductLinkContractDeserializer(result.body); +} + +/** Adds a product to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options: TagProductLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + tagId, + productLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options: TagProductLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagProductLinkContractDeserializer(result.body); +} + +/** Gets the product link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options: TagProductLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + tagId, + productLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/options.ts new file mode 100644 index 000000000000..442339cfdc28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagProductLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TagProductLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface TagProductLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagProductLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TagProductLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagResource/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/index.ts new file mode 100644 index 000000000000..4adc698bccb8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { TagResourceListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagResource/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/operations.ts new file mode 100644 index 000000000000..453d8c1e026d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/operations.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _TagResourceCollection, + _tagResourceCollectionDeserializer, + TagResourceContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { TagResourceListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TagResourceListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_TagResourceCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagResourceCollectionDeserializer(result.body); +} + +/** Lists a collection of resources associated with tags. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TagResourceListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tagResource/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/options.ts new file mode 100644 index 000000000000..4a474085bdc8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tagResource/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TagResourceListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/index.ts new file mode 100644 index 000000000000..8c28aa10cee8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + listByService, + update, + create, + getEntityTag, + get, +} from "./operations.js"; +export type { + TenantAccessListSecretsOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessListByServiceOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessCreateOptionalParams, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/operations.ts new file mode 100644 index 000000000000..3c024c55f553 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/operations.ts @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + AccessInformationContract, + accessInformationContractDeserializer, + AccessIdName, + AccessInformationCreateParameters, + accessInformationCreateParametersSerializer, + AccessInformationUpdateParameters, + accessInformationUpdateParametersSerializer, + _AccessInformationCollection, + _accessInformationCollectionDeserializer, + AccessInformationSecretsContract, + accessInformationSecretsContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TenantAccessListSecretsOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessListByServiceOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessCreateOptionalParams, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessInformationSecretsContractDeserializer(result.body); +} + +/** Get tenant access information details. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _listSecretsDeserialize(result); +} + +export function _regenerateSecondaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regenerateSecondaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerate secondary access key */ +export async function regenerateSecondaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regenerateSecondaryKeySend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _regenerateSecondaryKeyDeserialize(result); +} + +export function _regeneratePrimaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regeneratePrimaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerate primary access key */ +export async function regeneratePrimaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regeneratePrimaryKeySend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _regeneratePrimaryKeyDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TenantAccessListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant{?api%2Dversion,%24filter}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_AccessInformationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _accessInformationCollectionDeserializer(result.body); +} + +/** Returns list of access infos - for Git and Management endpoints. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TenantAccessListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options: TenantAccessUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: accessInformationUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessInformationContractDeserializer(result.body); +} + +/** Update tenant access information details. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options: TenantAccessUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options: TenantAccessCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: accessInformationCreateParametersSerializer(parameters), + }); +} + +export async function _createDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessInformationContractDeserializer(result.body); +} + +/** Update tenant access information details. */ +export async function create( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options: TenantAccessCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + serviceName, + accessName, + ifMatch, + parameters, + options, + ); + return _createDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Tenant access metadata */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return accessInformationContractDeserializer(result.body); +} + +/** Get tenant access information details without secrets. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, accessName, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/options.ts new file mode 100644 index 000000000000..3fc87722c3f1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccess/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TenantAccessListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessRegenerateSecondaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessRegeneratePrimaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessListByServiceOptionalParams extends OperationOptions { + /** Not used */ + filter?: string; +} + +/** Optional parameters. */ +export interface TenantAccessUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/index.ts new file mode 100644 index 000000000000..ef3638cc5be0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { regenerateSecondaryKey, regeneratePrimaryKey } from "./operations.js"; +export type { + TenantAccessGitRegenerateSecondaryKeyOptionalParams, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/operations.ts new file mode 100644 index 000000000000..ed14142a3698 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/operations.ts @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { errorResponseDeserializer, AccessIdName } from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TenantAccessGitRegenerateSecondaryKeyOptionalParams, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _regenerateSecondaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGitRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regenerateSecondaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerate secondary access key for GIT. */ +export async function regenerateSecondaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGitRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regenerateSecondaryKeySend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _regenerateSecondaryKeyDeserialize(result); +} + +export function _regeneratePrimaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGitRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + accessName: accessName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regeneratePrimaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerate primary access key for GIT. */ +export async function regeneratePrimaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options: TenantAccessGitRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regeneratePrimaryKeySend( + context, + resourceGroupName, + serviceName, + accessName, + options, + ); + return _regeneratePrimaryKeyDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/options.ts new file mode 100644 index 000000000000..82facc6a7545 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantAccessGit/options.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/index.ts new file mode 100644 index 000000000000..4c28aeefdf25 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { getSyncState, validate, save, deploy } from "./operations.js"; +export type { + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationValidateOptionalParams, + TenantConfigurationSaveOptionalParams, + TenantConfigurationDeployOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/operations.ts new file mode 100644 index 000000000000..035c8938b35a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/operations.ts @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationResultContract, + operationResultContractDeserializer, + DeployConfigurationParameters, + deployConfigurationParametersSerializer, + SaveConfigurationParameter, + saveConfigurationParameterSerializer, + TenantConfigurationSyncStateContract, + tenantConfigurationSyncStateContractDeserializer, + ConfigurationIdName, +} from "../../models/models.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationValidateOptionalParams, + TenantConfigurationSaveOptionalParams, + TenantConfigurationDeployOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getSyncStateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options: TenantConfigurationGetSyncStateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + configurationName: configurationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getSyncStateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tenantConfigurationSyncStateContractDeserializer(result.body); +} + +/** Gets the status of the most recent synchronization between the configuration database and the Git repository. */ +export async function getSyncState( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options: TenantConfigurationGetSyncStateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSyncStateSend( + context, + resourceGroupName, + serviceName, + configurationName, + options, + ); + return _getSyncStateDeserialize(result); +} + +export function _validateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options: TenantConfigurationValidateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + configurationName: configurationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: deployConfigurationParametersSerializer(parameters), + }); +} + +export async function _validateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationResultContractDeserializer(result.body); +} + +/** This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. */ +export function validate( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options: TenantConfigurationValidateOptionalParams = { requestOptions: {} }, +): PollerLike, OperationResultContract> { + return getLongRunningPoller(context, _validateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _validateSend( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, OperationResultContract>; +} + +export function _saveSend( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options: TenantConfigurationSaveOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + configurationName: configurationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: saveConfigurationParameterSerializer(parameters), + }); +} + +export async function _saveDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationResultContractDeserializer(result.body); +} + +/** This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. */ +export function save( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options: TenantConfigurationSaveOptionalParams = { requestOptions: {} }, +): PollerLike, OperationResultContract> { + return getLongRunningPoller(context, _saveDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _saveSend(context, resourceGroupName, serviceName, configurationName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, OperationResultContract>; +} + +export function _deploySend( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options: TenantConfigurationDeployOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + configurationName: configurationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: deployConfigurationParametersSerializer(parameters), + }); +} + +export async function _deployDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationResultContractDeserializer(result.body); +} + +/** This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. */ +export function deploy( + context: Client, + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options: TenantConfigurationDeployOptionalParams = { requestOptions: {} }, +): PollerLike, OperationResultContract> { + return getLongRunningPoller(context, _deployDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _deploySend(context, resourceGroupName, serviceName, configurationName, parameters, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, OperationResultContract>; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/options.ts new file mode 100644 index 000000000000..ade76117b0e8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantConfiguration/options.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TenantConfigurationGetSyncStateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface TenantConfigurationValidateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface TenantConfigurationSaveOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface TenantConfigurationDeployOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/index.ts new file mode 100644 index 000000000000..2127b7841452 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, get } from "./operations.js"; +export type { + TenantSettingsListByServiceOptionalParams, + TenantSettingsGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/operations.ts new file mode 100644 index 000000000000..26befc8fd80f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/operations.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TenantSettingsContract, + tenantSettingsContractDeserializer, + SettingsTypeName, + _TenantSettingsCollection, + _tenantSettingsCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + TenantSettingsListByServiceOptionalParams, + TenantSettingsGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TenantSettingsListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings{?api%2Dversion,%24filter}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_TenantSettingsCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tenantSettingsCollectionDeserializer(result.body); +} + +/** Public settings. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: TenantSettingsListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options: TenantSettingsGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + settingsType: settingsType, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tenantSettingsContractDeserializer(result.body); +} + +/** Get tenant settings. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options: TenantSettingsGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, settingsType, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/options.ts new file mode 100644 index 000000000000..2e028882d9ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/tenantSettings/options.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface TenantSettingsListByServiceOptionalParams extends OperationOptions { + /** Not used */ + filter?: string; +} + +/** Optional parameters. */ +export interface TenantSettingsGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/user/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/user/index.ts new file mode 100644 index 000000000000..c7cc01686abf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/user/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + getSharedAccessToken, + generateSsoUrl, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + UserGetSharedAccessTokenOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserListByServiceOptionalParams, + UserDeleteOptionalParams, + UserUpdateOptionalParams, + UserCreateOrUpdateOptionalParams, + UserGetEntityTagOptionalParams, + UserGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/user/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/user/operations.ts new file mode 100644 index 000000000000..bd860c079e3b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/user/operations.ts @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _UserCollection, + _userCollectionDeserializer, + UserContract, + userContractDeserializer, + UserCreateParameters, + userCreateParametersSerializer, + UserUpdateParameters, + userUpdateParametersSerializer, + GenerateSsoUrlResult, + generateSsoUrlResultDeserializer, + UserTokenParameters, + userTokenParametersSerializer, + UserTokenResult, + userTokenResultDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + UserGetSharedAccessTokenOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserListByServiceOptionalParams, + UserDeleteOptionalParams, + UserUpdateOptionalParams, + UserCreateOrUpdateOptionalParams, + UserGetEntityTagOptionalParams, + UserGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _getSharedAccessTokenSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options: UserGetSharedAccessTokenOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: userTokenParametersSerializer(parameters), + }); +} + +export async function _getSharedAccessTokenDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userTokenResultDeserializer(result.body); +} + +/** Gets the Shared Access Authorization Token for the User. */ +export async function getSharedAccessToken( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options: UserGetSharedAccessTokenOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSharedAccessTokenSend( + context, + resourceGroupName, + serviceName, + userId, + parameters, + options, + ); + return _getSharedAccessTokenDeserialize(result); +} + +export function _generateSsoUrlSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGenerateSsoUrlOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _generateSsoUrlDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return generateSsoUrlResultDeserializer(result.body); +} + +/** Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. */ +export async function generateSsoUrl( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGenerateSsoUrlOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _generateSsoUrlSend( + context, + resourceGroupName, + serviceName, + userId, + options, + ); + return _generateSsoUrlDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: UserListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users{?api%2Dversion,%24filter,%24top,%24skip,expandGroups}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + expandGroups: options?.expandGroups, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_UserCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _userCollectionDeserializer(result.body); +} + +/** Lists a collection of registered users in the specified service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: UserListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options: UserDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}{?api%2Dversion,deleteSubscriptions,notify,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + deleteSubscriptions: options?.deleteSubscriptions, + notify: options?.notify, + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "204", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific user. */ +export function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options: UserDeleteOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _$deleteSend(context, resourceGroupName, serviceName, userId, ifMatch, options), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, void>; +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options: UserUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: userUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userContractDeserializer(result.body); +} + +/** Updates the details of the user specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options: UserUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + userId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options: UserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}{?api%2Dversion,notify}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + notify: options?.notify, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: userCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userContractDeserializer(result.body); +} + +/** Creates or Updates a user. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options: UserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + userId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the user specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend(context, resourceGroupName, serviceName, userId, options); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userContractDeserializer(result.body); +} + +/** Gets the details of the user specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, userId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/user/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/user/options.ts new file mode 100644 index 000000000000..8638480e9b2e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/user/options.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AppType } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UserGetSharedAccessTokenOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface UserGenerateSsoUrlOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface UserListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Detailed Group in response. */ + expandGroups?: boolean; +} + +/** Optional parameters. */ +export interface UserDeleteOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** Whether to delete user's subscription or not. */ + deleteSubscriptions?: boolean; + /** Send an Account Closed Email notification to the User. */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} + +/** Optional parameters. */ +export interface UserUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface UserCreateOrUpdateOptionalParams extends OperationOptions { + /** Send an Email notification to the User. */ + notify?: boolean; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface UserGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface UserGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/index.ts new file mode 100644 index 000000000000..a5c69c4b0579 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { send } from "./operations.js"; +export type { UserConfirmationPasswordSendOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/operations.ts new file mode 100644 index 000000000000..9941296ca578 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/operations.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { errorResponseDeserializer } from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { UserConfirmationPasswordSendOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _sendSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserConfirmationPasswordSendOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send{?api%2Dversion,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _sendDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Sends confirmation */ +export async function send( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserConfirmationPasswordSendOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _sendSend(context, resourceGroupName, serviceName, userId, options); + return _sendDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/options.ts new file mode 100644 index 000000000000..09a3d3534aac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userConfirmationPassword/options.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AppType } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UserConfirmationPasswordSendOptionalParams extends OperationOptions { + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/index.ts new file mode 100644 index 000000000000..603a868ed274 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { UserGroupListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userGroup/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/operations.ts new file mode 100644 index 000000000000..285370414556 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/operations.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GroupContract, + _GroupCollection, + _groupCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { UserGroupListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGroupListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_GroupCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _groupCollectionDeserializer(result.body); +} + +/** Lists all user groups. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserGroupListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, userId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userGroup/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/options.ts new file mode 100644 index 000000000000..cb648972d6a1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userGroup/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UserGroupListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/index.ts new file mode 100644 index 000000000000..3dd735daed78 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list } from "./operations.js"; +export type { UserIdentitiesListOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/operations.ts new file mode 100644 index 000000000000..816021edb929 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/operations.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + UserIdentityContract, + _UserIdentityCollection, + _userIdentityCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { UserIdentitiesListOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserIdentitiesListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_UserIdentityCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _userIdentityCollectionDeserializer(result.body); +} + +/** List of all user identities. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserIdentitiesListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, userId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/options.ts new file mode 100644 index 000000000000..c71256eacfa9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userIdentities/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UserIdentitiesListOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/index.ts new file mode 100644 index 000000000000..e5dea1e08109 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/index.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { list, get } from "./operations.js"; +export type { + UserSubscriptionListOptionalParams, + UserSubscriptionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/operations.ts new file mode 100644 index 000000000000..2cf7a28302c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/operations.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SubscriptionContract, + subscriptionContractDeserializer, + _SubscriptionCollection, + _subscriptionCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + UserSubscriptionListOptionalParams, + UserSubscriptionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserSubscriptionListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SubscriptionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _subscriptionCollectionDeserializer(result.body); +} + +/** Lists the collection of subscriptions of the specified user. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + options: UserSubscriptionListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, userId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options: UserSubscriptionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + userId: userId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Gets the specified Subscription entity associated with a particular user. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options: UserSubscriptionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, userId, sid, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/options.ts new file mode 100644 index 000000000000..87968668a497 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/userSubscription/options.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface UserSubscriptionListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface UserSubscriptionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspace/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspace/index.ts new file mode 100644 index 000000000000..499906829d34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspace/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceListByServiceOptionalParams, + WorkspaceDeleteOptionalParams, + WorkspaceUpdateOptionalParams, + WorkspaceCreateOrUpdateOptionalParams, + WorkspaceGetEntityTagOptionalParams, + WorkspaceGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspace/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspace/operations.ts new file mode 100644 index 000000000000..39c43e8e0dc1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspace/operations.ts @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + WorkspaceContract, + workspaceContractSerializer, + workspaceContractDeserializer, + _WorkspaceCollection, + _workspaceCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceListByServiceOptionalParams, + WorkspaceDeleteOptionalParams, + WorkspaceUpdateOptionalParams, + WorkspaceCreateOrUpdateOptionalParams, + WorkspaceGetEntityTagOptionalParams, + WorkspaceGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + options: WorkspaceListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_WorkspaceCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _workspaceCollectionDeserializer(result.body); +} + +/** Lists all workspaces of the API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + options: WorkspaceListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + options: WorkspaceDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified workspace. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + options: WorkspaceDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + parameters: WorkspaceContract, + options: WorkspaceUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workspaceContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return workspaceContractDeserializer(result.body); +} + +/** Updates the details of the workspace specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + parameters: WorkspaceContract, + options: WorkspaceUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + parameters: WorkspaceContract, + options: WorkspaceCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: workspaceContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return workspaceContractDeserializer(result.body); +} + +/** Creates a new workspace or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + parameters: WorkspaceContract, + options: WorkspaceCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the workspace specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return workspaceContractDeserializer(result.body); +} + +/** Gets the details of the workspace specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, workspaceId, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspace/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspace/options.ts new file mode 100644 index 000000000000..714d416381f2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspace/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/index.ts new file mode 100644 index 000000000000..30cd310b5448 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiListByServiceOptionalParams, + WorkspaceApiDeleteOptionalParams, + WorkspaceApiUpdateOptionalParams, + WorkspaceApiCreateOrUpdateOptionalParams, + WorkspaceApiGetEntityTagOptionalParams, + WorkspaceApiGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/operations.ts new file mode 100644 index 000000000000..ee2cfc612d6d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/operations.ts @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + ApiContract, + apiContractDeserializer, + errorResponseDeserializer, + ApiCreateOrUpdateParameter, + apiCreateOrUpdateParameterSerializer, + ApiUpdateContract, + apiUpdateContractSerializer, + _ApiCollection, + _apiCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiListByServiceOptionalParams, + WorkspaceApiDeleteOptionalParams, + WorkspaceApiUpdateOptionalParams, + WorkspaceApiCreateOrUpdateOptionalParams, + WorkspaceApiGetEntityTagOptionalParams, + WorkspaceApiGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceApiListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis{?api%2Dversion,%24filter,%24top,%24skip,tags,expandApiVersionSet}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + tags: options?.tags, + expandApiVersionSet: options?.expandApiVersionSet, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiCollectionDeserializer(result.body); +} + +/** Lists all APIs of the workspace in an API Management service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceApiListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + options: WorkspaceApiDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}{?api%2Dversion,deleteRevisions}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + deleteRevisions: options?.deleteRevisions, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API of the workspace in an API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + options: WorkspaceApiDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options: WorkspaceApiUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Updates the specified API of the workspace in an API Management service instance. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options: WorkspaceApiUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options: WorkspaceApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiCreateOrUpdateParameterSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Creates new or updates existing specified API of the workspace in an API Management service instance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options: WorkspaceApiCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, ApiContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, ApiContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiContractDeserializer(result.body); +} + +/** Gets the details of the API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/options.ts new file mode 100644 index 000000000000..0bd1362ac4ce --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApi/options.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; + /** Include full ApiVersionSet resource in response */ + expandApiVersionSet?: boolean; +} + +/** Optional parameters. */ +export interface WorkspaceApiDeleteOptionalParams extends OperationOptions { + /** Delete all revisions of the Api. */ + deleteRevisions?: boolean; +} + +/** Optional parameters. */ +export interface WorkspaceApiUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/index.ts new file mode 100644 index 000000000000..f0159723e9e7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + WorkspaceApiDiagnosticDeleteOptionalParams, + WorkspaceApiDiagnosticUpdateOptionalParams, + WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + WorkspaceApiDiagnosticGetEntityTagOptionalParams, + WorkspaceApiDiagnosticGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/operations.ts new file mode 100644 index 000000000000..bad9df125f2c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/operations.ts @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DiagnosticContract, + diagnosticContractSerializer, + diagnosticContractDeserializer, + _DiagnosticCollection, + _diagnosticCollectionDeserializer, + DiagnosticUpdateContract, + diagnosticUpdateContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + WorkspaceApiDiagnosticDeleteOptionalParams, + WorkspaceApiDiagnosticUpdateOptionalParams, + WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + WorkspaceApiDiagnosticGetEntityTagOptionalParams, + WorkspaceApiDiagnosticGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByWorkspaceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiDiagnosticListByWorkspaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByWorkspaceDeserialize( + result: PathUncheckedResponse, +): Promise<_DiagnosticCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _diagnosticCollectionDeserializer(result.body); +} + +/** Lists all diagnostics of an API. */ +export function listByWorkspace( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiDiagnosticListByWorkspaceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByWorkspaceSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByWorkspaceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options: WorkspaceApiDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Diagnostic from an API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options: WorkspaceApiDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options: WorkspaceApiDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Updates the details of the Diagnostic for an API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options: WorkspaceApiDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Creates a new Diagnostic for an API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options: WorkspaceApiDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options: WorkspaceApiDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options: WorkspaceApiDiagnosticGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Gets the details of the Diagnostic for an API specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options: WorkspaceApiDiagnosticGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/options.ts new file mode 100644 index 000000000000..eb884069fa01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiDiagnostic/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticListByWorkspaceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiDiagnosticGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/index.ts new file mode 100644 index 000000000000..0b2df8aaba01 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { get } from "./operations.js"; +export type { WorkspaceApiExportGetOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/operations.ts new file mode 100644 index 000000000000..0cbbd5ef5d24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/operations.ts @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiExportResult, + apiExportResultDeserializer, + ExportFormat, + ExportApi, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { WorkspaceApiExportGetOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options: WorkspaceApiExportGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}?export=true{?api%2Dversion,format,export}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: format, + export: exportParam, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiExportResultDeserializer(result.body); +} + +/** Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options: WorkspaceApiExportGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + format, + exportParam, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/options.ts new file mode 100644 index 000000000000..d07671080db8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiExport/options.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiExportGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/index.ts new file mode 100644 index 000000000000..0041044dda21 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiOperationListByApiOptionalParams, + WorkspaceApiOperationDeleteOptionalParams, + WorkspaceApiOperationUpdateOptionalParams, + WorkspaceApiOperationCreateOrUpdateOptionalParams, + WorkspaceApiOperationGetEntityTagOptionalParams, + WorkspaceApiOperationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/operations.ts new file mode 100644 index 000000000000..93fe382620a0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/operations.ts @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + OperationContract, + operationContractSerializer, + operationContractDeserializer, + OperationUpdateContract, + operationUpdateContractSerializer, + _OperationCollection, + _operationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiOperationListByApiOptionalParams, + WorkspaceApiOperationDeleteOptionalParams, + WorkspaceApiOperationUpdateOptionalParams, + WorkspaceApiOperationCreateOrUpdateOptionalParams, + WorkspaceApiOperationGetEntityTagOptionalParams, + WorkspaceApiOperationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiOperationListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations{?api%2Dversion,%24filter,%24top,%24skip,tags}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + tags: options?.tags, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_OperationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _operationCollectionDeserializer(result.body); +} + +/** Lists a collection of the operations for the specified API. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiOperationListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + options: WorkspaceApiOperationDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified operation in the API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + options: WorkspaceApiOperationDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options: WorkspaceApiOperationUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: operationUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Updates the details of the operation in the API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options: WorkspaceApiOperationUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options: WorkspaceApiOperationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: operationContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Creates a new operation in the API or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options: WorkspaceApiOperationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API operation specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return operationContractDeserializer(result.body); +} + +/** Gets the details of the API Operation specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/options.ts new file mode 100644 index 000000000000..2cef338770c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperation/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiOperationListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Include tags in the response. */ + tags?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiOperationDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiOperationGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/index.ts new file mode 100644 index 000000000000..4d3f0db1850b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByOperation, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiOperationPolicyListByOperationOptionalParams, + WorkspaceApiOperationPolicyDeleteOptionalParams, + WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + WorkspaceApiOperationPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/operations.ts new file mode 100644 index 000000000000..fd2369385414 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/operations.ts @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiOperationPolicyListByOperationOptionalParams, + WorkspaceApiOperationPolicyDeleteOptionalParams, + WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + WorkspaceApiOperationPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByOperationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationPolicyListByOperationOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByOperationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the list of policy configuration at the API Operation level. */ +export function listByOperation( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options: WorkspaceApiOperationPolicyListByOperationOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByOperationSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + options, + ), + _listByOperationDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceApiOperationPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Api Operation. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceApiOperationPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the API Operation level. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: WorkspaceApiOperationPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: WorkspaceApiOperationPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: WorkspaceApiOperationPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + operationId: operationId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the API Operation level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options: WorkspaceApiOperationPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/options.ts new file mode 100644 index 000000000000..6a8eca437ac6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiOperationPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiOperationPolicyListByOperationOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiOperationPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiOperationPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/index.ts new file mode 100644 index 000000000000..f60e942576d0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiPolicyListByApiOptionalParams, + WorkspaceApiPolicyDeleteOptionalParams, + WorkspaceApiPolicyCreateOrUpdateOptionalParams, + WorkspaceApiPolicyGetEntityTagOptionalParams, + WorkspaceApiPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/operations.ts new file mode 100644 index 000000000000..99b66850a2d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/operations.ts @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiPolicyListByApiOptionalParams, + WorkspaceApiPolicyDeleteOptionalParams, + WorkspaceApiPolicyCreateOrUpdateOptionalParams, + WorkspaceApiPolicyGetEntityTagOptionalParams, + WorkspaceApiPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiPolicyListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the policy configuration at the API level. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiPolicyListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceApiPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Api. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceApiPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceApiPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the API. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceApiPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options: WorkspaceApiPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the API policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options: WorkspaceApiPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options: WorkspaceApiPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the API level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options: WorkspaceApiPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/options.ts new file mode 100644 index 000000000000..d1b44a860405 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiPolicyListByApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/index.ts new file mode 100644 index 000000000000..8c41ceb266c3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiReleaseListByServiceOptionalParams, + WorkspaceApiReleaseDeleteOptionalParams, + WorkspaceApiReleaseUpdateOptionalParams, + WorkspaceApiReleaseCreateOrUpdateOptionalParams, + WorkspaceApiReleaseGetEntityTagOptionalParams, + WorkspaceApiReleaseGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/operations.ts new file mode 100644 index 000000000000..e05c38cc7b87 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/operations.ts @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiReleaseContract, + apiReleaseContractSerializer, + apiReleaseContractDeserializer, + _ApiReleaseCollection, + _apiReleaseCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiReleaseListByServiceOptionalParams, + WorkspaceApiReleaseDeleteOptionalParams, + WorkspaceApiReleaseUpdateOptionalParams, + WorkspaceApiReleaseCreateOrUpdateOptionalParams, + WorkspaceApiReleaseGetEntityTagOptionalParams, + WorkspaceApiReleaseGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiReleaseListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiReleaseCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiReleaseCollectionDeserializer(result.body); +} + +/** Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiReleaseListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + options: WorkspaceApiReleaseDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified release in the API. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + options: WorkspaceApiReleaseDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options: WorkspaceApiReleaseUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiReleaseContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Updates the details of the release of the API specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options: WorkspaceApiReleaseUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options: WorkspaceApiReleaseCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiReleaseContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Creates a new Release for the API. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options: WorkspaceApiReleaseCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options: WorkspaceApiReleaseGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Returns the etag of an API release. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options: WorkspaceApiReleaseGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options: WorkspaceApiReleaseGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + releaseId: releaseId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiReleaseContractDeserializer(result.body); +} + +/** Returns the details of an API release. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options: WorkspaceApiReleaseGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/options.ts new file mode 100644 index 000000000000..9b1202e7838b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRelease/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiReleaseListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceApiReleaseDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiReleaseUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiReleaseCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiReleaseGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiReleaseGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/index.ts new file mode 100644 index 000000000000..42f8573ecf6d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/index.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService } from "./operations.js"; +export type { WorkspaceApiRevisionListByServiceOptionalParams } from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/operations.ts new file mode 100644 index 000000000000..494ace5828c0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/operations.ts @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _ApiRevisionCollection, + _apiRevisionCollectionDeserializer, + ApiRevisionContract, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { WorkspaceApiRevisionListByServiceOptionalParams } from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiRevisionListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiRevisionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiRevisionCollectionDeserializer(result.body); +} + +/** Lists all revisions of an API. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiRevisionListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/options.ts new file mode 100644 index 000000000000..c897f8fd3ed4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiRevision/options.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiRevisionListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/index.ts new file mode 100644 index 000000000000..bc6ab248ed6c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiSchemaListByApiOptionalParams, + WorkspaceApiSchemaDeleteOptionalParams, + WorkspaceApiSchemaCreateOrUpdateOptionalParams, + WorkspaceApiSchemaGetEntityTagOptionalParams, + WorkspaceApiSchemaGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/operations.ts new file mode 100644 index 000000000000..5b0a6a8509f3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/operations.ts @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SchemaContract, + schemaContractSerializer, + schemaContractDeserializer, + _SchemaCollection, + _schemaCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiSchemaListByApiOptionalParams, + WorkspaceApiSchemaDeleteOptionalParams, + WorkspaceApiSchemaCreateOrUpdateOptionalParams, + WorkspaceApiSchemaGetEntityTagOptionalParams, + WorkspaceApiSchemaGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiSchemaListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise<_SchemaCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _schemaCollectionDeserializer(result.body); +} + +/** Get the schema configuration at the API level. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options: WorkspaceApiSchemaListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, workspaceId, apiId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + ifMatch: string, + options: WorkspaceApiSchemaDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion,force}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + force: options?.force, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the schema configuration at the Api. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + ifMatch: string, + options: WorkspaceApiSchemaDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options: WorkspaceApiSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: schemaContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return schemaContractDeserializer(result.body); +} + +/** Creates or updates schema configuration for the API. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options: WorkspaceApiSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, SchemaContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, SchemaContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options: WorkspaceApiSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the schema specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options: WorkspaceApiSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options: WorkspaceApiSchemaGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + apiId: apiId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return schemaContractDeserializer(result.body); +} + +/** Get the schema configuration at the API level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options: WorkspaceApiSchemaGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/options.ts new file mode 100644 index 000000000000..2ab8d61c39e1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiSchema/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiSchemaListByApiOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceApiSchemaDeleteOptionalParams extends OperationOptions { + /** If true removes all references to the schema before deleting it. */ + force?: boolean; +} + +/** Optional parameters. */ +export interface WorkspaceApiSchemaCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiSchemaGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiSchemaGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/index.ts new file mode 100644 index 000000000000..9b482b6350d4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceApiVersionSetListByServiceOptionalParams, + WorkspaceApiVersionSetDeleteOptionalParams, + WorkspaceApiVersionSetUpdateOptionalParams, + WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + WorkspaceApiVersionSetGetEntityTagOptionalParams, + WorkspaceApiVersionSetGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/operations.ts new file mode 100644 index 000000000000..4616083314e4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/operations.ts @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ApiVersionSetContract, + apiVersionSetContractSerializer, + apiVersionSetContractDeserializer, + ApiVersionSetUpdateParameters, + apiVersionSetUpdateParametersSerializer, + _ApiVersionSetCollection, + _apiVersionSetCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceApiVersionSetListByServiceOptionalParams, + WorkspaceApiVersionSetDeleteOptionalParams, + WorkspaceApiVersionSetUpdateOptionalParams, + WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + WorkspaceApiVersionSetGetEntityTagOptionalParams, + WorkspaceApiVersionSetGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceApiVersionSetListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ApiVersionSetCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _apiVersionSetCollectionDeserializer(result.body); +} + +/** Lists a collection of API Version Sets in the specified workspace with a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceApiVersionSetListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + options: WorkspaceApiVersionSetDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Api Version Set. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + options: WorkspaceApiVersionSetDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options: WorkspaceApiVersionSetUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiVersionSetUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Updates the details of the Api VersionSet specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options: WorkspaceApiVersionSetUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options: WorkspaceApiVersionSetCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: apiVersionSetContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Creates or Updates a Api Version Set. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options: WorkspaceApiVersionSetCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options: WorkspaceApiVersionSetGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options: WorkspaceApiVersionSetGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options: WorkspaceApiVersionSetGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + versionSetId: versionSetId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return apiVersionSetContractDeserializer(result.body); +} + +/** Gets the details of the Api Version Set specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options: WorkspaceApiVersionSetGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/options.ts new file mode 100644 index 000000000000..1c2acc53b30b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceApiVersionSet/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceApiVersionSetGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/index.ts new file mode 100644 index 000000000000..dae116df797e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceBackendListByWorkspaceOptionalParams, + WorkspaceBackendDeleteOptionalParams, + WorkspaceBackendUpdateOptionalParams, + WorkspaceBackendCreateOrUpdateOptionalParams, + WorkspaceBackendGetEntityTagOptionalParams, + WorkspaceBackendGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/operations.ts new file mode 100644 index 000000000000..23a724d6c022 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/operations.ts @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + BackendContract, + backendContractSerializer, + backendContractDeserializer, + BackendUpdateParameters, + backendUpdateParametersSerializer, + _BackendCollection, + _backendCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceBackendListByWorkspaceOptionalParams, + WorkspaceBackendDeleteOptionalParams, + WorkspaceBackendUpdateOptionalParams, + WorkspaceBackendCreateOrUpdateOptionalParams, + WorkspaceBackendGetEntityTagOptionalParams, + WorkspaceBackendGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByWorkspaceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceBackendListByWorkspaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByWorkspaceDeserialize( + result: PathUncheckedResponse, +): Promise<_BackendCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _backendCollectionDeserializer(result.body); +} + +/** Lists a collection of backends in the specified workspace. */ +export function listByWorkspace( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceBackendListByWorkspaceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByWorkspaceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByWorkspaceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + options: WorkspaceBackendDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified backend. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + options: WorkspaceBackendDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options: WorkspaceBackendUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: backendUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Updates an existing backend. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options: WorkspaceBackendUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + parameters: BackendContract, + options: WorkspaceBackendCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: backendContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Creates or Updates a backend. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + parameters: BackendContract, + options: WorkspaceBackendCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options: WorkspaceBackendGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the backend specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options: WorkspaceBackendGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options: WorkspaceBackendGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + backendId: backendId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return backendContractDeserializer(result.body); +} + +/** Gets the details of the backend specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options: WorkspaceBackendGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/options.ts new file mode 100644 index 000000000000..6afbf4b3706d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceBackend/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceBackendListByWorkspaceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceBackendDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceBackendUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceBackendCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceBackendGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceBackendGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/index.ts new file mode 100644 index 000000000000..4c316d2a3dc9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + refreshSecret, + listByWorkspace, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceCertificateRefreshSecretOptionalParams, + WorkspaceCertificateListByWorkspaceOptionalParams, + WorkspaceCertificateDeleteOptionalParams, + WorkspaceCertificateCreateOrUpdateOptionalParams, + WorkspaceCertificateGetEntityTagOptionalParams, + WorkspaceCertificateGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/operations.ts new file mode 100644 index 000000000000..1fd931cc6b98 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/operations.ts @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + CertificateContract, + certificateContractDeserializer, + CertificateCreateOrUpdateParameters, + certificateCreateOrUpdateParametersSerializer, + _CertificateCollection, + _certificateCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceCertificateRefreshSecretOptionalParams, + WorkspaceCertificateListByWorkspaceOptionalParams, + WorkspaceCertificateDeleteOptionalParams, + WorkspaceCertificateCreateOrUpdateOptionalParams, + WorkspaceCertificateGetEntityTagOptionalParams, + WorkspaceCertificateGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshSecretDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** From KeyVault, Refresh the certificate being used for authentication with the backend. */ +export async function refreshSecret( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateRefreshSecretOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _refreshSecretSend( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + options, + ); + return _refreshSecretDeserialize(result); +} + +export function _listByWorkspaceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceCertificateListByWorkspaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates{?api%2Dversion,%24filter,%24top,%24skip,isKeyVaultRefreshFailed}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + isKeyVaultRefreshFailed: options?.isKeyVaultRefreshFailed, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByWorkspaceDeserialize( + result: PathUncheckedResponse, +): Promise<_CertificateCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _certificateCollectionDeserializer(result.body); +} + +/** Lists a collection of all certificates in the specified workspace. */ +export function listByWorkspace( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceCertificateListByWorkspaceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByWorkspaceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByWorkspaceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + ifMatch: string, + options: WorkspaceCertificateDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific certificate. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + ifMatch: string, + options: WorkspaceCertificateDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options: WorkspaceCertificateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: certificateCreateOrUpdateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** Creates or updates the certificate being used for authentication with the backend. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options: WorkspaceCertificateCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the certificate specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + certificateId: certificateId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return certificateContractDeserializer(result.body); +} + +/** Gets the details of the certificate specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options: WorkspaceCertificateGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/options.ts new file mode 100644 index 000000000000..cf52db1ab095 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceCertificate/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceCertificateRefreshSecretOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceCertificateListByWorkspaceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains only certificates entities which failed refresh. */ + isKeyVaultRefreshFailed?: boolean; +} + +/** Optional parameters. */ +export interface WorkspaceCertificateDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceCertificateCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceCertificateGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceCertificateGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/index.ts new file mode 100644 index 000000000000..e2d58afad0d4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceDiagnosticListByWorkspaceOptionalParams, + WorkspaceDiagnosticDeleteOptionalParams, + WorkspaceDiagnosticUpdateOptionalParams, + WorkspaceDiagnosticCreateOrUpdateOptionalParams, + WorkspaceDiagnosticGetEntityTagOptionalParams, + WorkspaceDiagnosticGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/operations.ts new file mode 100644 index 000000000000..9f029ffc0804 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/operations.ts @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + DiagnosticContract, + diagnosticContractSerializer, + diagnosticContractDeserializer, + _DiagnosticCollection, + _diagnosticCollectionDeserializer, + DiagnosticUpdateContract, + diagnosticUpdateContractSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceDiagnosticListByWorkspaceOptionalParams, + WorkspaceDiagnosticDeleteOptionalParams, + WorkspaceDiagnosticUpdateOptionalParams, + WorkspaceDiagnosticCreateOrUpdateOptionalParams, + WorkspaceDiagnosticGetEntityTagOptionalParams, + WorkspaceDiagnosticGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByWorkspaceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceDiagnosticListByWorkspaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByWorkspaceDeserialize( + result: PathUncheckedResponse, +): Promise<_DiagnosticCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _diagnosticCollectionDeserializer(result.body); +} + +/** Lists all diagnostics in the specified workspace. */ +export function listByWorkspace( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceDiagnosticListByWorkspaceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByWorkspaceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByWorkspaceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + options: WorkspaceDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified Diagnostic. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + options: WorkspaceDiagnosticDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options: WorkspaceDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Updates the details of the Diagnostic specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options: WorkspaceDiagnosticUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: WorkspaceDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: diagnosticContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Creates a new Diagnostic or updates an existing one. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options: WorkspaceDiagnosticCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options: WorkspaceDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Diagnostic specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options: WorkspaceDiagnosticGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options: WorkspaceDiagnosticGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + diagnosticId: diagnosticId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return diagnosticContractDeserializer(result.body); +} + +/** Gets the details of the Diagnostic specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options: WorkspaceDiagnosticGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/options.ts new file mode 100644 index 000000000000..efeefb7a6891 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceDiagnostic/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceDiagnosticListByWorkspaceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceDiagnosticDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceDiagnosticUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceDiagnosticCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceDiagnosticGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceDiagnosticGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/index.ts new file mode 100644 index 000000000000..978dbd5aec6e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceGlobalSchemaListByServiceOptionalParams, + WorkspaceGlobalSchemaDeleteOptionalParams, + WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + WorkspaceGlobalSchemaGetEntityTagOptionalParams, + WorkspaceGlobalSchemaGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/operations.ts new file mode 100644 index 000000000000..12d8bb3e5667 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/operations.ts @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GlobalSchemaContract, + globalSchemaContractSerializer, + globalSchemaContractDeserializer, + _GlobalSchemaCollection, + _globalSchemaCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceGlobalSchemaListByServiceOptionalParams, + WorkspaceGlobalSchemaDeleteOptionalParams, + WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + WorkspaceGlobalSchemaGetEntityTagOptionalParams, + WorkspaceGlobalSchemaGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGlobalSchemaListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GlobalSchemaCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _globalSchemaCollectionDeserializer(result.body); +} + +/** Lists a collection of schemas registered with workspace in a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGlobalSchemaListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + ifMatch: string, + options: WorkspaceGlobalSchemaDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific Schema. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + ifMatch: string, + options: WorkspaceGlobalSchemaDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: globalSchemaContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return globalSchemaContractDeserializer(result.body); +} + +/** Creates new or updates existing specified Schema of the workspace in an API Management service instance. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, GlobalSchemaContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, GlobalSchemaContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options: WorkspaceGlobalSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the Schema specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options: WorkspaceGlobalSchemaGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options: WorkspaceGlobalSchemaGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + schemaId: schemaId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return globalSchemaContractDeserializer(result.body); +} + +/** Gets the details of the Schema specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options: WorkspaceGlobalSchemaGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/options.ts new file mode 100644 index 000000000000..b473ee6e76c6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGlobalSchema/options.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceGlobalSchemaListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceGlobalSchemaDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGlobalSchemaCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceGlobalSchemaGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGlobalSchemaGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/index.ts new file mode 100644 index 000000000000..65de4f4235c3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceGroupListByServiceOptionalParams, + WorkspaceGroupDeleteOptionalParams, + WorkspaceGroupUpdateOptionalParams, + WorkspaceGroupCreateOrUpdateOptionalParams, + WorkspaceGroupGetEntityTagOptionalParams, + WorkspaceGroupGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/operations.ts new file mode 100644 index 000000000000..9fce789a1c72 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/operations.ts @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + GroupContract, + groupContractDeserializer, + GroupCreateParameters, + groupCreateParametersSerializer, + GroupUpdateParameters, + groupUpdateParametersSerializer, + _GroupCollection, + _groupCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceGroupListByServiceOptionalParams, + WorkspaceGroupDeleteOptionalParams, + WorkspaceGroupUpdateOptionalParams, + WorkspaceGroupCreateOrUpdateOptionalParams, + WorkspaceGroupGetEntityTagOptionalParams, + WorkspaceGroupGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGroupListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_GroupCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _groupCollectionDeserializer(result.body); +} + +/** Lists a collection of groups defined within a workspace in a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceGroupListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + options: WorkspaceGroupDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific group of the workspace in an API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + options: WorkspaceGroupDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options: WorkspaceGroupUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: groupUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Updates the details of the group specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options: WorkspaceGroupUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + parameters: GroupCreateParameters, + options: WorkspaceGroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: groupCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Creates or Updates a group. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + parameters: GroupCreateParameters, + options: WorkspaceGroupCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the group specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return groupContractDeserializer(result.body); +} + +/** Gets the details of the group specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/options.ts new file mode 100644 index 000000000000..4ecd7f283378 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroup/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceGroupListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceGroupDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceGroupGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/index.ts new file mode 100644 index 000000000000..f55cfe603ba1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, create, checkEntityExists, list } from "./operations.js"; +export type { + WorkspaceGroupUserDeleteOptionalParams, + WorkspaceGroupUserCreateOptionalParams, + WorkspaceGroupUserCheckEntityExistsOptionalParams, + WorkspaceGroupUserListOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/operations.ts new file mode 100644 index 000000000000..3737299018e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/operations.ts @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + _UserCollection, + _userCollectionDeserializer, + UserContract, + userContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceGroupUserDeleteOptionalParams, + WorkspaceGroupUserCreateOptionalParams, + WorkspaceGroupUserCheckEntityExistsOptionalParams, + WorkspaceGroupUserListOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Remove existing user from existing group. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + userId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserCreateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return userContractDeserializer(result.body); +} + +/** Add existing user to existing group */ +export async function create( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserCreateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + userId, + options, + ); + return _createDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Checks that user entity specified by identifier is associated with the group entity. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options: WorkspaceGroupUserCheckEntityExistsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + userId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupUserListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + groupId: groupId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize(result: PathUncheckedResponse): Promise<_UserCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _userCollectionDeserializer(result.body); +} + +/** Lists a collection of user entities associated with the group. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options: WorkspaceGroupUserListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, workspaceId, groupId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/options.ts new file mode 100644 index 000000000000..af2fcab8af1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceGroupUser/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceGroupUserDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupUserCreateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupUserCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceGroupUserListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/index.ts new file mode 100644 index 000000000000..bcf442eeeb26 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceLoggerListByWorkspaceOptionalParams, + WorkspaceLoggerDeleteOptionalParams, + WorkspaceLoggerUpdateOptionalParams, + WorkspaceLoggerCreateOrUpdateOptionalParams, + WorkspaceLoggerGetEntityTagOptionalParams, + WorkspaceLoggerGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/operations.ts new file mode 100644 index 000000000000..8c1453ab9e19 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/operations.ts @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + LoggerContract, + loggerContractSerializer, + loggerContractDeserializer, + LoggerUpdateContract, + loggerUpdateContractSerializer, + _LoggerCollection, + _loggerCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceLoggerListByWorkspaceOptionalParams, + WorkspaceLoggerDeleteOptionalParams, + WorkspaceLoggerUpdateOptionalParams, + WorkspaceLoggerCreateOrUpdateOptionalParams, + WorkspaceLoggerGetEntityTagOptionalParams, + WorkspaceLoggerGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByWorkspaceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceLoggerListByWorkspaceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByWorkspaceDeserialize( + result: PathUncheckedResponse, +): Promise<_LoggerCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _loggerCollectionDeserializer(result.body); +} + +/** Lists a collection of loggers in the specified workspace. */ +export function listByWorkspace( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceLoggerListByWorkspaceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByWorkspaceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByWorkspaceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + options: WorkspaceLoggerDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified logger. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + options: WorkspaceLoggerDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options: WorkspaceLoggerUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: loggerUpdateContractSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Updates an existing logger. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options: WorkspaceLoggerUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + parameters: LoggerContract, + options: WorkspaceLoggerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: loggerContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Creates or Updates a logger. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + parameters: LoggerContract, + options: WorkspaceLoggerCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options: WorkspaceLoggerGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the logger specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options: WorkspaceLoggerGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options: WorkspaceLoggerGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + loggerId: loggerId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return loggerContractDeserializer(result.body); +} + +/** Gets the details of the logger specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options: WorkspaceLoggerGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/options.ts new file mode 100644 index 000000000000..4ec6e61bdab2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceLogger/options.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceLoggerListByWorkspaceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceLoggerDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceLoggerUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceLoggerCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceLoggerGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceLoggerGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/index.ts new file mode 100644 index 000000000000..493a0b4431d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/index.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + refreshSecret, + listValue, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceNamedValueRefreshSecretOptionalParams, + WorkspaceNamedValueListValueOptionalParams, + WorkspaceNamedValueListByServiceOptionalParams, + WorkspaceNamedValueDeleteOptionalParams, + WorkspaceNamedValueUpdateOptionalParams, + WorkspaceNamedValueCreateOrUpdateOptionalParams, + WorkspaceNamedValueGetEntityTagOptionalParams, + WorkspaceNamedValueGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/operations.ts new file mode 100644 index 000000000000..f98bc9b306d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/operations.ts @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NamedValueContract, + namedValueContractDeserializer, + NamedValueCreateContract, + namedValueCreateContractSerializer, + NamedValueUpdateParameters, + namedValueUpdateParametersSerializer, + _NamedValueCollection, + _namedValueCollectionDeserializer, + NamedValueSecretContract, + namedValueSecretContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceNamedValueRefreshSecretOptionalParams, + WorkspaceNamedValueListValueOptionalParams, + WorkspaceNamedValueListByServiceOptionalParams, + WorkspaceNamedValueDeleteOptionalParams, + WorkspaceNamedValueUpdateOptionalParams, + WorkspaceNamedValueCreateOrUpdateOptionalParams, + WorkspaceNamedValueGetEntityTagOptionalParams, + WorkspaceNamedValueGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _refreshSecretSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueRefreshSecretOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _refreshSecretDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Refresh the secret of the named value specified by its identifier. */ +export function refreshSecret( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueRefreshSecretOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _refreshSecretDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _refreshSecretSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _listValueSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueListValueOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listValueDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueSecretContractDeserializer(result.body); +} + +/** Gets the secret of the named value specified by its identifier. */ +export async function listValue( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueListValueOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listValueSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ); + return _listValueDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceNamedValueListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues{?api%2Dversion,%24filter,%24top,%24skip,isKeyVaultRefreshFailed}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + isKeyVaultRefreshFailed: options?.isKeyVaultRefreshFailed, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_NamedValueCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _namedValueCollectionDeserializer(result.body); +} + +/** Lists a collection of named values defined within a workspace in a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceNamedValueListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + options: WorkspaceNamedValueDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific named value from the workspace in an API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + options: WorkspaceNamedValueDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options: WorkspaceNamedValueUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: namedValueUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "202", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Updates the specific named value. */ +export function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options: WorkspaceNamedValueUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + ifMatch, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options: WorkspaceNamedValueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: namedValueCreateContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Creates or updates named value. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options: WorkspaceNamedValueCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, NamedValueContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, NamedValueContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the named value specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + namedValueId: namedValueId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return namedValueContractDeserializer(result.body); +} + +/** Gets the details of the named value specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options: WorkspaceNamedValueGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/options.ts new file mode 100644 index 000000000000..2bd5f5b2012f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNamedValue/options.ts @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { KeyVaultRefreshState } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceNamedValueRefreshSecretOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkspaceNamedValueListValueOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNamedValueListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Query parameter to fetch named value entities based on refresh status. */ + isKeyVaultRefreshFailed?: KeyVaultRefreshState; +} + +/** Optional parameters. */ +export interface WorkspaceNamedValueDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNamedValueUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} + +/** Optional parameters. */ +export interface WorkspaceNamedValueCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceNamedValueGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNamedValueGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/index.ts new file mode 100644 index 000000000000..528fc565b83c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/index.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceNotificationListByServiceOptionalParams, + WorkspaceNotificationCreateOrUpdateOptionalParams, + WorkspaceNotificationGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/operations.ts new file mode 100644 index 000000000000..95c0e1eaaaaa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/operations.ts @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationContract, + notificationContractDeserializer, + NotificationName, + _NotificationCollection, + _notificationCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceNotificationListByServiceOptionalParams, + WorkspaceNotificationCreateOrUpdateOptionalParams, + WorkspaceNotificationGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceNotificationListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_NotificationCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _notificationCollectionDeserializer(result.body); +} + +/** Lists a collection of properties defined within a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceNotificationListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return notificationContractDeserializer(result.body); +} + +/** Create or Update API Management publisher notification for the workspace. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return notificationContractDeserializer(result.body); +} + +/** Gets the details of the Notification specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/options.ts new file mode 100644 index 000000000000..7bb65f67dd4f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotification/options.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceNotificationListByServiceOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceNotificationCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceNotificationGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/index.ts new file mode 100644 index 000000000000..3095b3bb2963 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByNotification } from "./operations.js"; +export type { + WorkspaceNotificationRecipientEmailDeleteOptionalParams, + WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/operations.ts new file mode 100644 index 000000000000..859032474be1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/operations.ts @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationName, + RecipientEmailCollection, + recipientEmailCollectionDeserializer, + RecipientEmailContract, + recipientEmailContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceNotificationRecipientEmailDeleteOptionalParams, + WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the email from the list of Notification. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientEmailContractDeserializer(result.body); +} + +/** Adds the Email address to the list of Recipients for the Notification. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + email: email, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Determine if Notification Recipient Email subscribed to the notification. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByNotificationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByNotificationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientEmailCollectionDeserializer(result.body); +} + +/** Gets the list of the Notification Recipient Emails subscribed to a notification. */ +export async function listByNotification( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _listByNotificationSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ); + return _listByNotificationDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/options.ts new file mode 100644 index 000000000000..8927c1ea07aa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientEmail/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientEmailDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientEmailListByNotificationOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/index.ts new file mode 100644 index 000000000000..8061410de45a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { $delete, createOrUpdate, checkEntityExists, listByNotification } from "./operations.js"; +export type { + WorkspaceNotificationRecipientUserDeleteOptionalParams, + WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientUserListByNotificationOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/operations.ts new file mode 100644 index 000000000000..66e366c4dece --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/operations.ts @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + NotificationName, + RecipientUserCollection, + recipientUserCollectionDeserializer, + RecipientUserContract, + recipientUserContractDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceNotificationRecipientUserDeleteOptionalParams, + WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientUserListByNotificationOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Removes the API Management user from the list of Notification. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientUserContractDeserializer(result.body); +} + +/** Adds the API Management User to the list of Recipients for the Notification. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _checkEntityExistsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + userId: userId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _checkEntityExistsDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["204", "404"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Determine if the Notification Recipient User is subscribed to the notification. */ +export async function checkEntityExists( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _checkEntityExistsSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ); + return _checkEntityExistsDeserialize(result); +} + +export function _listByNotificationSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationRecipientUserListByNotificationOptionalParams = { + requestOptions: {}, + }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + notificationName: notificationName, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByNotificationDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return recipientUserCollectionDeserializer(result.body); +} + +/** Gets the list of the Notification Recipient User subscribed to the notification. */ +export async function listByNotification( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options: WorkspaceNotificationRecipientUserListByNotificationOptionalParams = { + requestOptions: {}, + }, +): Promise { + const result = await _listByNotificationSend( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ); + return _listByNotificationDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/options.ts new file mode 100644 index 000000000000..4b17820bd96b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceNotificationRecipientUser/options.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientUserDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceNotificationRecipientUserListByNotificationOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/index.ts new file mode 100644 index 000000000000..42df324d4c91 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByApi, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspacePolicyListByApiOptionalParams, + WorkspacePolicyDeleteOptionalParams, + WorkspacePolicyCreateOrUpdateOptionalParams, + WorkspacePolicyGetEntityTagOptionalParams, + WorkspacePolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/operations.ts new file mode 100644 index 000000000000..0e5d9a007f40 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/operations.ts @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspacePolicyListByApiOptionalParams, + WorkspacePolicyDeleteOptionalParams, + WorkspacePolicyCreateOrUpdateOptionalParams, + WorkspacePolicyGetEntityTagOptionalParams, + WorkspacePolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByApiSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspacePolicyListByApiOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByApiDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the policy configuration at the workspace level. */ +export function listByApi( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspacePolicyListByApiOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByApiSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByApiDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspacePolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the workspace. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspacePolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspacePolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the workspace. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspacePolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options: WorkspacePolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the workspace policy specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options: WorkspacePolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options: WorkspacePolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the API level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options: WorkspacePolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/options.ts new file mode 100644 index 000000000000..17eac0d203b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspacePolicyListByApiOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacePolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacePolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspacePolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacePolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/index.ts new file mode 100644 index 000000000000..84c675290e33 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listReferences, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspacePolicyFragmentListReferencesOptionalParams, + WorkspacePolicyFragmentListByServiceOptionalParams, + WorkspacePolicyFragmentDeleteOptionalParams, + WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + WorkspacePolicyFragmentGetEntityTagOptionalParams, + WorkspacePolicyFragmentGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/operations.ts new file mode 100644 index 000000000000..813ab1851f63 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/operations.ts @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyFragmentContract, + policyFragmentContractSerializer, + policyFragmentContractDeserializer, + _PolicyFragmentCollection, + _policyFragmentCollectionDeserializer, + ResourceCollection, + resourceCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspacePolicyFragmentListReferencesOptionalParams, + WorkspacePolicyFragmentListByServiceOptionalParams, + WorkspacePolicyFragmentDeleteOptionalParams, + WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + WorkspacePolicyFragmentGetEntityTagOptionalParams, + WorkspacePolicyFragmentGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +export function _listReferencesSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentListReferencesOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences{?api%2Dversion,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listReferencesDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return resourceCollectionDeserializer(result.body); +} + +/** Lists policy resources that reference the policy fragment. */ +export async function listReferences( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentListReferencesOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listReferencesSend( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + options, + ); + return _listReferencesDeserialize(result); +} + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspacePolicyFragmentListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments{?api%2Dversion,%24filter,%24orderby,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24orderby": options?.orderby, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_PolicyFragmentCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _policyFragmentCollectionDeserializer(result.body); +} + +/** Gets all policy fragments defined within a workspace. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspacePolicyFragmentListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + ifMatch: string, + options: WorkspacePolicyFragmentDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes a policy fragment. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + ifMatch: string, + options: WorkspacePolicyFragmentDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options: WorkspacePolicyFragmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyFragmentContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201", "202"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyFragmentContractDeserializer(result.body); +} + +/** Creates or updates a policy fragment. */ +export function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options: WorkspacePolicyFragmentCreateOrUpdateOptionalParams = { requestOptions: {} }, +): PollerLike, PolicyFragmentContract> { + return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201", "202"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + parameters, + options, + ), + resourceLocationConfig: "location", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }) as PollerLike, PolicyFragmentContract>; +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of a policy fragment. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + id: id, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyFragmentContractDeserializer(result.body); +} + +/** Gets a policy fragment. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options: WorkspacePolicyFragmentGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, workspaceId, id, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/options.ts new file mode 100644 index 000000000000..ac7149854896 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspacePolicyFragment/options.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyFragmentContentFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentListReferencesOptionalParams extends OperationOptions { + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** OData order by query option. */ + orderby?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentCreateOrUpdateOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspacePolicyFragmentGetOptionalParams extends OperationOptions { + /** Policy fragment content format. */ + format?: PolicyFragmentContentFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/index.ts new file mode 100644 index 000000000000..3b6f6fb09918 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/index.ts @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByService, $delete, update, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceProductListByServiceOptionalParams, + WorkspaceProductDeleteOptionalParams, + WorkspaceProductUpdateOptionalParams, + WorkspaceProductCreateOrUpdateOptionalParams, + WorkspaceProductGetEntityTagOptionalParams, + WorkspaceProductGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/operations.ts new file mode 100644 index 000000000000..f266d2eb5d8f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/operations.ts @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductContract, + productContractSerializer, + productContractDeserializer, + ProductUpdateParameters, + productUpdateParametersSerializer, + _ProductCollection, + _productCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceProductListByServiceOptionalParams, + WorkspaceProductDeleteOptionalParams, + WorkspaceProductUpdateOptionalParams, + WorkspaceProductCreateOrUpdateOptionalParams, + WorkspaceProductGetEntityTagOptionalParams, + WorkspaceProductGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceProductListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products{?api%2Dversion,%24filter,%24top,%24skip,expandGroups,tags}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + expandGroups: options?.expandGroups, + tags: options?.tags, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productCollectionDeserializer(result.body); +} + +/** Lists a collection of products in the specified workspace in a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceProductListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + options: WorkspaceProductDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}{?api%2Dversion,deleteSubscriptions}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + deleteSubscriptions: options?.deleteSubscriptions, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Delete product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + options: WorkspaceProductDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options: WorkspaceProductUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: productUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Update existing product details. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options: WorkspaceProductUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + parameters: ProductContract, + options: WorkspaceProductCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: productContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Creates or Updates a product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + parameters: ProductContract, + options: WorkspaceProductCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the product specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productContractDeserializer(result.body); +} + +/** Gets the details of the product specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/options.ts new file mode 100644 index 000000000000..f505b4bf9100 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProduct/options.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceProductListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ + expandGroups?: boolean; + /** Products which are part of a specific tag. */ + tags?: string; +} + +/** Optional parameters. */ +export interface WorkspaceProductDeleteOptionalParams extends OperationOptions { + /** Delete existing subscriptions associated with the product or not. */ + deleteSubscriptions?: boolean; +} + +/** Optional parameters. */ +export interface WorkspaceProductUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceProductGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/index.ts new file mode 100644 index 000000000000..061e4ca1b3bc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceProductApiLinkListByProductOptionalParams, + WorkspaceProductApiLinkDeleteOptionalParams, + WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + WorkspaceProductApiLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/operations.ts new file mode 100644 index 000000000000..dc578fd1b802 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/operations.ts @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductApiLinkContract, + productApiLinkContractSerializer, + productApiLinkContractDeserializer, + _ProductApiLinkCollection, + _productApiLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceProductApiLinkListByProductOptionalParams, + WorkspaceProductApiLinkDeleteOptionalParams, + WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + WorkspaceProductApiLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductApiLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductApiLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productApiLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the API links associated with a product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductApiLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByProductSend(context, resourceGroupName, serviceName, workspaceId, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options: WorkspaceProductApiLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options: WorkspaceProductApiLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + apiLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options: WorkspaceProductApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: productApiLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productApiLinkContractDeserializer(result.body); +} + +/** Adds an API to the specified product via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options: WorkspaceProductApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + apiLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options: WorkspaceProductApiLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productApiLinkContractDeserializer(result.body); +} + +/** Gets the API link for the product. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options: WorkspaceProductApiLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + apiLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/options.ts new file mode 100644 index 000000000000..9879be6fddad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductApiLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceProductApiLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceProductApiLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductApiLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductApiLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/index.ts new file mode 100644 index 000000000000..50674b5c061a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceProductGroupLinkListByProductOptionalParams, + WorkspaceProductGroupLinkDeleteOptionalParams, + WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + WorkspaceProductGroupLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/operations.ts new file mode 100644 index 000000000000..e45085e6a928 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/operations.ts @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + ProductGroupLinkContract, + productGroupLinkContractSerializer, + productGroupLinkContractDeserializer, + _ProductGroupLinkCollection, + _productGroupLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceProductGroupLinkListByProductOptionalParams, + WorkspaceProductGroupLinkDeleteOptionalParams, + WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + WorkspaceProductGroupLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGroupLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_ProductGroupLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _productGroupLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the group links associated with a product. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductGroupLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => + _listByProductSend(context, resourceGroupName, serviceName, workspaceId, productId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options: WorkspaceProductGroupLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified group from the specified product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options: WorkspaceProductGroupLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + groupLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: productGroupLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productGroupLinkContractDeserializer(result.body); +} + +/** Adds a group to the specified product via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + groupLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options: WorkspaceProductGroupLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + groupLinkId: groupLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return productGroupLinkContractDeserializer(result.body); +} + +/** Gets the group link for the product. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options: WorkspaceProductGroupLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + groupLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/options.ts new file mode 100644 index 000000000000..4392ac01f3c9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductGroupLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceProductGroupLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceProductGroupLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductGroupLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductGroupLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/index.ts new file mode 100644 index 000000000000..45df7b962cbf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/index.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, getEntityTag, get } from "./operations.js"; +export type { + WorkspaceProductPolicyListByProductOptionalParams, + WorkspaceProductPolicyDeleteOptionalParams, + WorkspaceProductPolicyCreateOrUpdateOptionalParams, + WorkspaceProductPolicyGetEntityTagOptionalParams, + WorkspaceProductPolicyGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/operations.ts new file mode 100644 index 000000000000..f8e28a4f0202 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/operations.ts @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + PolicyContract, + policyContractSerializer, + policyContractDeserializer, + PolicyIdName, + PolicyCollection, + policyCollectionDeserializer, +} from "../../models/models.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceProductPolicyListByProductOptionalParams, + WorkspaceProductPolicyDeleteOptionalParams, + WorkspaceProductPolicyCreateOrUpdateOptionalParams, + WorkspaceProductPolicyGetEntityTagOptionalParams, + WorkspaceProductPolicyGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductPolicyListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyCollectionDeserializer(result.body); +} + +/** Get the policy configuration at the Product level. */ +export async function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options: WorkspaceProductPolicyListByProductOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listByProductSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + options, + ); + return _listByProductDeserialize(result); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceProductPolicyDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the policy configuration at the Product. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options: WorkspaceProductPolicyDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceProductPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: policyContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Creates or updates policy configuration for the Product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options: WorkspaceProductPolicyCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options: WorkspaceProductPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Get the ETag of the policy configuration at the Product level. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options: WorkspaceProductPolicyGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options: WorkspaceProductPolicyGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}{?api%2Dversion,format}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + productId: productId, + policyId: policyId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + format: options?.format ?? "xml", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return policyContractDeserializer(result.body); +} + +/** Get the policy configuration at the Product level. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options: WorkspaceProductPolicyGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/options.ts new file mode 100644 index 000000000000..1d1184d628e3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceProductPolicy/options.ts @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PolicyExportFormat } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceProductPolicyListByProductOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductPolicyDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductPolicyCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceProductPolicyGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceProductPolicyGetOptionalParams extends OperationOptions { + /** Policy Export Format. */ + format?: PolicyExportFormat; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/index.ts new file mode 100644 index 000000000000..df5d3d860e1b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/index.ts @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + list, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "./operations.js"; +export type { + WorkspaceSubscriptionListSecretsOptionalParams, + WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + WorkspaceSubscriptionListOptionalParams, + WorkspaceSubscriptionDeleteOptionalParams, + WorkspaceSubscriptionUpdateOptionalParams, + WorkspaceSubscriptionCreateOrUpdateOptionalParams, + WorkspaceSubscriptionGetEntityTagOptionalParams, + WorkspaceSubscriptionGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/operations.ts new file mode 100644 index 000000000000..34d1eb2820e7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/operations.ts @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + SubscriptionContract, + subscriptionContractDeserializer, + _SubscriptionCollection, + _subscriptionCollectionDeserializer, + SubscriptionCreateParameters, + subscriptionCreateParametersSerializer, + SubscriptionUpdateParameters, + subscriptionUpdateParametersSerializer, + SubscriptionKeysContract, + subscriptionKeysContractDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceSubscriptionListSecretsOptionalParams, + WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + WorkspaceSubscriptionListOptionalParams, + WorkspaceSubscriptionDeleteOptionalParams, + WorkspaceSubscriptionUpdateOptionalParams, + WorkspaceSubscriptionCreateOrUpdateOptionalParams, + WorkspaceSubscriptionGetEntityTagOptionalParams, + WorkspaceSubscriptionGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listSecretsSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionListSecretsOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listSecretsDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionKeysContractDeserializer(result.body); +} + +/** Gets the specified Subscription keys. */ +export async function listSecrets( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionListSecretsOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _listSecretsSend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + options, + ); + return _listSecretsDeserialize(result); +} + +export function _regenerateSecondaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regenerateSecondaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerates secondary key of existing subscription of the workspace in an API Management service instance. */ +export async function regenerateSecondaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regenerateSecondaryKeySend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + options, + ); + return _regenerateSecondaryKeyDeserialize(result); +} + +export function _regeneratePrimaryKeySend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _regeneratePrimaryKeyDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Regenerates primary key of existing subscription of the workspace in an API Management service instance. */ +export async function regeneratePrimaryKey( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _regeneratePrimaryKeySend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + options, + ); + return _regeneratePrimaryKeyDeserialize(result); +} + +export function _listSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceSubscriptionListOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listDeserialize( + result: PathUncheckedResponse, +): Promise<_SubscriptionCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _subscriptionCollectionDeserializer(result.body); +} + +/** Lists all subscriptions of the workspace in an API Management service instance. */ +export function list( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceSubscriptionListOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listSend(context, resourceGroupName, serviceName, workspaceId, options), + _listDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + options: WorkspaceSubscriptionDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified subscription. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + options: WorkspaceSubscriptionDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options: WorkspaceSubscriptionUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}{?api%2Dversion,notify,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + notify: options?.notify, + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: subscriptionUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Updates the details of a subscription specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options: WorkspaceSubscriptionUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + parameters: SubscriptionCreateParameters, + options: WorkspaceSubscriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}{?api%2Dversion,notify,appType}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + notify: options?.notify, + appType: options?.appType, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: subscriptionCreateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Creates or updates the subscription of specified user to the specified product. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + parameters: SubscriptionCreateParameters, + options: WorkspaceSubscriptionCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityTagSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityTagDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ +export async function getEntityTag( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionGetEntityTagOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityTagSend( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + options, + ); + return _getEntityTagDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + sid: sid, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return subscriptionContractDeserializer(result.body); +} + +/** Gets the specified Subscription entity. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options: WorkspaceSubscriptionGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend(context, resourceGroupName, serviceName, workspaceId, sid, options); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/options.ts new file mode 100644 index 000000000000..fe86b49441ab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceSubscription/options.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AppType } from "../../models/models.js"; +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceSubscriptionListSecretsOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionListOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionUpdateOptionalParams extends OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionCreateOrUpdateOptionalParams extends OperationOptions { + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ + notify?: boolean; + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; + /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ + appType?: AppType; +} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionGetEntityTagOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceSubscriptionGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/index.ts new file mode 100644 index 000000000000..e497cc6590bf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/index.ts @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { + listByService, + $delete, + update, + createOrUpdate, + getEntityState, + get, +} from "./operations.js"; +export type { + WorkspaceTagListByServiceOptionalParams, + WorkspaceTagDeleteOptionalParams, + WorkspaceTagUpdateOptionalParams, + WorkspaceTagCreateOrUpdateOptionalParams, + WorkspaceTagGetEntityStateOptionalParams, + WorkspaceTagGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/operations.ts new file mode 100644 index 000000000000..077909b1e231 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/operations.ts @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagContract, + tagContractDeserializer, + _TagCollection, + _tagCollectionDeserializer, + TagCreateUpdateParameters, + tagCreateUpdateParametersSerializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceTagListByServiceOptionalParams, + WorkspaceTagDeleteOptionalParams, + WorkspaceTagUpdateOptionalParams, + WorkspaceTagCreateOrUpdateOptionalParams, + WorkspaceTagGetEntityStateOptionalParams, + WorkspaceTagGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByServiceSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceTagListByServiceOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags{?api%2Dversion,%24filter,%24top,%24skip,scope}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + scope: options?.scope, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByServiceDeserialize( + result: PathUncheckedResponse, +): Promise<_TagCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagCollectionDeserializer(result.body); +} + +/** Lists a collection of tags defined within a workspace in a service instance. */ +export function listByService( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options: WorkspaceTagListByServiceOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByServiceSend(context, resourceGroupName, serviceName, workspaceId, options), + _listByServiceDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + options: WorkspaceTagDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ + ...operationOptionsToRequestParameters(options), + headers: { "if-match": ifMatch, ...options.requestOptions?.headers }, + }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes specific tag of the workspace in an API Management service instance. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + options: WorkspaceTagDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + ifMatch, + options, + ); + return _$deleteDeserialize(result); +} + +export function _updateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options: WorkspaceTagUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).patch({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + "if-match": ifMatch, + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: tagCreateUpdateParametersSerializer(parameters), + }); +} + +export async function _updateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Updates the details of the tag specified by its identifier. */ +export async function update( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options: WorkspaceTagUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _updateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + ifMatch, + parameters, + options, + ); + return _updateDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options: WorkspaceTagCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { + ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}), + accept: "application/json", + ...options.requestOptions?.headers, + }, + body: tagCreateUpdateParametersSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Creates a tag. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options: WorkspaceTagCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getEntityStateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagGetEntityStateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).head({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _getEntityStateDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Gets the entity state version of the tag specified by its identifier. */ +export async function getEntityState( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagGetEntityStateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getEntityStateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + options, + ); + return _getEntityStateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagContractDeserializer(result.body); +} + +/** Gets the details of the tag specified by its identifier. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/options.ts new file mode 100644 index 000000000000..580a5c5ed496 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTag/options.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceTagListByServiceOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; + /** Scope like 'apis', 'products' or 'apis/{apiId} */ + scope?: string; +} + +/** Optional parameters. */ +export interface WorkspaceTagDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagCreateOrUpdateOptionalParams extends OperationOptions { + /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ + ifMatch?: string; +} + +/** Optional parameters. */ +export interface WorkspaceTagGetEntityStateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/index.ts new file mode 100644 index 000000000000..3bfc91446c04 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceTagApiLinkListByProductOptionalParams, + WorkspaceTagApiLinkDeleteOptionalParams, + WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + WorkspaceTagApiLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/operations.ts new file mode 100644 index 000000000000..81080efc41d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/operations.ts @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagApiLinkContract, + tagApiLinkContractSerializer, + tagApiLinkContractDeserializer, + _TagApiLinkCollection, + _tagApiLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceTagApiLinkListByProductOptionalParams, + WorkspaceTagApiLinkDeleteOptionalParams, + WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + WorkspaceTagApiLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagApiLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagApiLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagApiLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the API links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagApiLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, workspaceId, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options: WorkspaceTagApiLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified API from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options: WorkspaceTagApiLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + apiLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options: WorkspaceTagApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagApiLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagApiLinkContractDeserializer(result.body); +} + +/** Adds an API to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options: WorkspaceTagApiLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + apiLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options: WorkspaceTagApiLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + apiLinkId: apiLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagApiLinkContractDeserializer(result.body); +} + +/** Gets the API link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options: WorkspaceTagApiLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + apiLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/options.ts new file mode 100644 index 000000000000..1799443bbfb3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagApiLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceTagApiLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceTagApiLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagApiLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagApiLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/index.ts new file mode 100644 index 000000000000..dd7a76e1ffd1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceTagOperationLinkListByProductOptionalParams, + WorkspaceTagOperationLinkDeleteOptionalParams, + WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + WorkspaceTagOperationLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/operations.ts new file mode 100644 index 000000000000..ec2d1b355b0b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/operations.ts @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagOperationLinkContract, + tagOperationLinkContractSerializer, + tagOperationLinkContractDeserializer, + _TagOperationLinkCollection, + _tagOperationLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceTagOperationLinkListByProductOptionalParams, + WorkspaceTagOperationLinkDeleteOptionalParams, + WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + WorkspaceTagOperationLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagOperationLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagOperationLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagOperationLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the operation links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagOperationLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, workspaceId, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options: WorkspaceTagOperationLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified operation from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options: WorkspaceTagOperationLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + operationLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagOperationLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagOperationLinkContractDeserializer(result.body); +} + +/** Adds an operation to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + operationLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options: WorkspaceTagOperationLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + operationLinkId: operationLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagOperationLinkContractDeserializer(result.body); +} + +/** Gets the operation link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options: WorkspaceTagOperationLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + operationLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/options.ts new file mode 100644 index 000000000000..569561a85995 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagOperationLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceTagOperationLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceTagOperationLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagOperationLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagOperationLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/index.ts new file mode 100644 index 000000000000..2d8796896da7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/index.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export { listByProduct, $delete, createOrUpdate, get } from "./operations.js"; +export type { + WorkspaceTagProductLinkListByProductOptionalParams, + WorkspaceTagProductLinkDeleteOptionalParams, + WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + WorkspaceTagProductLinkGetOptionalParams, +} from "./options.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/operations.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/operations.ts new file mode 100644 index 000000000000..6eb64c185fca --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/operations.ts @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext as Client } from "../index.js"; +import { + errorResponseDeserializer, + TagProductLinkContract, + tagProductLinkContractSerializer, + tagProductLinkContractDeserializer, + _TagProductLinkCollection, + _tagProductLinkCollectionDeserializer, +} from "../../models/models.js"; +import { + PagedAsyncIterableIterator, + buildPagedAsyncIterator, +} from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import { + WorkspaceTagProductLinkListByProductOptionalParams, + WorkspaceTagProductLinkDeleteOptionalParams, + WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + WorkspaceTagProductLinkGetOptionalParams, +} from "./options.js"; +import { + StreamableMethod, + PathUncheckedResponse, + createRestError, + operationOptionsToRequestParameters, +} from "@azure-rest/core-client"; + +export function _listByProductSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagProductLinkListByProductOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks{?api%2Dversion,%24filter,%24top,%24skip}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + "%24filter": options?.filter, + "%24top": options?.top, + "%24skip": options?.skip, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _listByProductDeserialize( + result: PathUncheckedResponse, +): Promise<_TagProductLinkCollection> { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return _tagProductLinkCollectionDeserializer(result.body); +} + +/** Lists a collection of the product links associated with a tag. */ +export function listByProduct( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options: WorkspaceTagProductLinkListByProductOptionalParams = { requestOptions: {} }, +): PagedAsyncIterableIterator { + return buildPagedAsyncIterator( + context, + () => _listByProductSend(context, resourceGroupName, serviceName, workspaceId, tagId, options), + _listByProductDeserialize, + ["200"], + { + itemName: "value", + nextLinkName: "nextLink", + apiVersion: context.apiVersion ?? "2025-09-01-preview", + }, + ); +} + +export function _$deleteSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options: WorkspaceTagProductLinkDeleteOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); +} + +export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["200", "204"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return; +} + +/** Deletes the specified product from the specified tag. */ +export async function $delete( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options: WorkspaceTagProductLinkDeleteOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _$deleteSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + productLinkId, + options, + ); + return _$deleteDeserialize(result); +} + +export function _createOrUpdateSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options: WorkspaceTagProductLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).put({ + ...operationOptionsToRequestParameters(options), + contentType: "application/json", + headers: { accept: "application/json", ...options.requestOptions?.headers }, + body: tagProductLinkContractSerializer(parameters), + }); +} + +export async function _createOrUpdateDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200", "201"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagProductLinkContractDeserializer(result.body); +} + +/** Adds a product to the specified tag via link. */ +export async function createOrUpdate( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options: WorkspaceTagProductLinkCreateOrUpdateOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _createOrUpdateSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + productLinkId, + parameters, + options, + ); + return _createOrUpdateDeserialize(result); +} + +export function _getSend( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options: WorkspaceTagProductLinkGetOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + serviceName: serviceName, + workspaceId: workspaceId, + tagId: tagId, + productLinkId: productLinkId, + "api%2Dversion": context.apiVersion ?? "2025-09-01-preview", + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).get({ + ...operationOptionsToRequestParameters(options), + headers: { accept: "application/json", ...options.requestOptions?.headers }, + }); +} + +export async function _getDeserialize( + result: PathUncheckedResponse, +): Promise { + const expectedStatuses = ["200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + + throw error; + } + + return tagProductLinkContractDeserializer(result.body); +} + +/** Gets the product link for the tag. */ +export async function get( + context: Client, + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options: WorkspaceTagProductLinkGetOptionalParams = { requestOptions: {} }, +): Promise { + const result = await _getSend( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + productLinkId, + options, + ); + return _getDeserialize(result); +} diff --git a/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/options.ts b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/options.ts new file mode 100644 index 000000000000..0678ddd621af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/api/workspaceTagProductLink/options.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface WorkspaceTagProductLinkListByProductOptionalParams extends OperationOptions { + /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ + filter?: string; + /** Number of records to return. */ + top?: number; + /** Number of records to skip. */ + skip?: number; +} + +/** Optional parameters. */ +export interface WorkspaceTagProductLinkDeleteOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagProductLinkCreateOrUpdateOptionalParams extends OperationOptions {} + +/** Optional parameters. */ +export interface WorkspaceTagProductLinkGetOptionalParams extends OperationOptions {} diff --git a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts index 4693539cdc19..e78d2fb9a047 100644 --- a/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts +++ b/sdk/apimanagement/arm-apimanagement/src/apiManagementClient.ts @@ -1,339 +1,480 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. -import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "./lroImpl.js"; -import { - ApiGatewayImpl, - ApiManagementGatewaySkusImpl, - AllPoliciesImpl, - ApiImpl, - ApiRevisionImpl, - ApiReleaseImpl, - ApiOperationImpl, - ApiOperationPolicyImpl, - TagImpl, - GraphQLApiResolverImpl, - GraphQLApiResolverPolicyImpl, - ApiProductImpl, - ApiPolicyImpl, - ApiSchemaImpl, - ApiDiagnosticImpl, - ApiIssueImpl, - ApiIssueCommentImpl, - ApiIssueAttachmentImpl, - ApiTagDescriptionImpl, - OperationOperationsImpl, - ApiWikiImpl, - ApiWikisImpl, - ApiExportImpl, - ApiVersionSetImpl, - AuthorizationProviderImpl, - AuthorizationImpl, - AuthorizationLoginLinksImpl, - AuthorizationAccessPolicyImpl, - AuthorizationServerImpl, - BackendImpl, - CacheImpl, - CertificateImpl, - ContentTypeImpl, - ContentItemImpl, - DeletedServicesImpl, - ApiManagementOperationsImpl, - ApiManagementServiceSkusImpl, - ApiManagementServiceImpl, - DiagnosticImpl, - DocumentationImpl, - EmailTemplateImpl, - ApiGatewayConfigConnectionImpl, - GatewayImpl, - GatewayHostnameConfigurationImpl, - GatewayApiImpl, - GatewayCertificateAuthorityImpl, - GroupImpl, - GroupUserImpl, - IdentityProviderImpl, - IssueImpl, - LoggerImpl, - NamedValueImpl, - NetworkStatusImpl, - NotificationImpl, - NotificationRecipientUserImpl, - NotificationRecipientEmailImpl, - OpenIdConnectProviderImpl, - OutboundNetworkDependenciesEndpointsImpl, - PolicyImpl, - PolicyDescriptionImpl, - PolicyFragmentImpl, - PolicyRestrictionImpl, - PolicyRestrictionValidationsImpl, - PortalConfigImpl, - PortalRevisionImpl, - PortalSettingsImpl, - SignInSettingsImpl, - SignUpSettingsImpl, - DelegationSettingsImpl, - PrivateEndpointConnectionOperationsImpl, - ProductImpl, - ProductApiImpl, - ProductGroupImpl, - ProductSubscriptionsImpl, - ProductPolicyImpl, - ProductWikiImpl, - ProductWikisImpl, - ProductApiLinkImpl, - ProductGroupLinkImpl, - QuotaByCounterKeysImpl, - QuotaByPeriodKeysImpl, - RegionImpl, - ReportsImpl, - GlobalSchemaImpl, - TenantSettingsImpl, - ApiManagementSkusImpl, - SubscriptionImpl, - TagResourceImpl, - TagApiLinkImpl, - TagOperationLinkImpl, - TagProductLinkImpl, - TenantAccessImpl, - TenantAccessGitImpl, - TenantConfigurationImpl, - UserImpl, - UserGroupImpl, - UserSubscriptionImpl, - UserIdentitiesImpl, - UserConfirmationPasswordImpl, - WorkspaceBackendImpl, - WorkspaceCertificateImpl, - WorkspaceDiagnosticImpl, - WorkspaceApiDiagnosticImpl, - ApiManagementWorkspaceLinksImpl, - ApiManagementWorkspaceLinkImpl, - WorkspaceLoggerImpl, - WorkspaceImpl, - WorkspacePolicyImpl, - WorkspaceNamedValueImpl, - WorkspaceGlobalSchemaImpl, - WorkspaceNotificationImpl, - WorkspaceNotificationRecipientUserImpl, - WorkspaceNotificationRecipientEmailImpl, - WorkspacePolicyFragmentImpl, - WorkspaceGroupImpl, - WorkspaceGroupUserImpl, - WorkspaceSubscriptionImpl, - WorkspaceApiVersionSetImpl, - WorkspaceApiImpl, - WorkspaceApiRevisionImpl, - WorkspaceApiReleaseImpl, - WorkspaceApiOperationImpl, - WorkspaceApiOperationPolicyImpl, - WorkspaceApiPolicyImpl, - WorkspaceApiSchemaImpl, - WorkspaceProductImpl, - WorkspaceProductApiLinkImpl, - WorkspaceProductGroupLinkImpl, - WorkspaceProductPolicyImpl, - WorkspaceTagImpl, - WorkspaceTagApiLinkImpl, - WorkspaceTagOperationLinkImpl, - WorkspaceTagProductLinkImpl, - WorkspaceApiExportImpl, - OperationStatusImpl, - OperationsResultsImpl, -} from "./operations/index.js"; -import { - ApiGateway, - ApiManagementGatewaySkus, - AllPolicies, - Api, - ApiRevision, - ApiRelease, - ApiOperation, - ApiOperationPolicy, - Tag, - GraphQLApiResolver, - GraphQLApiResolverPolicy, - ApiProduct, - ApiPolicy, - ApiSchema, - ApiDiagnostic, - ApiIssue, - ApiIssueComment, - ApiIssueAttachment, - ApiTagDescription, - OperationOperations, - ApiWiki, - ApiWikis, - ApiExport, - ApiVersionSet, - AuthorizationProvider, - Authorization, - AuthorizationLoginLinks, - AuthorizationAccessPolicy, - AuthorizationServer, - Backend, - Cache, - Certificate, - ContentType, - ContentItem, - DeletedServices, - ApiManagementOperations, - ApiManagementServiceSkus, - ApiManagementService, - Diagnostic, - Documentation, - EmailTemplate, - ApiGatewayConfigConnection, - Gateway, - GatewayHostnameConfiguration, - GatewayApi, - GatewayCertificateAuthority, - Group, - GroupUser, - IdentityProvider, - Issue, - Logger, - NamedValue, - NetworkStatus, - Notification, - NotificationRecipientUser, - NotificationRecipientEmail, - OpenIdConnectProvider, - OutboundNetworkDependenciesEndpoints, - Policy, - PolicyDescription, - PolicyFragment, - PolicyRestriction, - PolicyRestrictionValidations, - PortalConfig, - PortalRevision, - PortalSettings, - SignInSettings, - SignUpSettings, - DelegationSettings, - PrivateEndpointConnectionOperations, - Product, - ProductApi, - ProductGroup, - ProductSubscriptions, - ProductPolicy, - ProductWiki, - ProductWikis, - ProductApiLink, - ProductGroupLink, - QuotaByCounterKeys, - QuotaByPeriodKeys, - Region, - Reports, - GlobalSchema, - TenantSettings, - ApiManagementSkus, - Subscription, - TagResource, - TagApiLink, - TagOperationLink, - TagProductLink, - TenantAccess, - TenantAccessGit, - TenantConfiguration, - User, - UserGroup, - UserSubscription, - UserIdentities, - UserConfirmationPassword, - WorkspaceBackend, - WorkspaceCertificate, - WorkspaceDiagnostic, - WorkspaceApiDiagnostic, - ApiManagementWorkspaceLinks, - ApiManagementWorkspaceLink, - WorkspaceLogger, - Workspace, - WorkspacePolicy, - WorkspaceNamedValue, - WorkspaceGlobalSchema, - WorkspaceNotification, - WorkspaceNotificationRecipientUser, - WorkspaceNotificationRecipientEmail, - WorkspacePolicyFragment, - WorkspaceGroup, - WorkspaceGroupUser, - WorkspaceSubscription, - WorkspaceApiVersionSet, - WorkspaceApi, - WorkspaceApiRevision, - WorkspaceApiRelease, - WorkspaceApiOperation, - WorkspaceApiOperationPolicy, - WorkspaceApiPolicy, - WorkspaceApiSchema, - WorkspaceProduct, - WorkspaceProductApiLink, - WorkspaceProductGroupLink, - WorkspaceProductPolicy, - WorkspaceTag, - WorkspaceTagApiLink, - WorkspaceTagOperationLink, - WorkspaceTagProductLink, - WorkspaceApiExport, - OperationStatus, - OperationsResults, -} from "./operationsInterfaces/index.js"; -import * as Parameters from "./models/parameters.js"; -import * as Mappers from "./models/mappers.js"; import { + ApiManagementContext, ApiManagementClientOptionalParams, - ConnectivityCheckRequest, - PerformConnectivityCheckAsyncOptionalParams, - PerformConnectivityCheckAsyncResponse, -} from "./models/index.js"; + createApiManagement, +} from "./api/index.js"; +import { AllPoliciesOperations, _getAllPoliciesOperations } from "./classic/allPolicies/index.js"; +import { ApiOperations, _getApiOperations } from "./classic/api/index.js"; +import { + ApiDiagnosticOperations, + _getApiDiagnosticOperations, +} from "./classic/apiDiagnostic/index.js"; +import { ApiExportOperations, _getApiExportOperations } from "./classic/apiExport/index.js"; +import { ApiGatewayOperations, _getApiGatewayOperations } from "./classic/apiGateway/index.js"; +import { + ApiGatewayConfigConnectionOperations, + _getApiGatewayConfigConnectionOperations, +} from "./classic/apiGatewayConfigConnection/index.js"; +import { + ApiGatewayHostnameBindingOperations, + _getApiGatewayHostnameBindingOperations, +} from "./classic/apiGatewayHostnameBinding/index.js"; +import { ApiIssueOperations, _getApiIssueOperations } from "./classic/apiIssue/index.js"; +import { + ApiIssueAttachmentOperations, + _getApiIssueAttachmentOperations, +} from "./classic/apiIssueAttachment/index.js"; +import { + ApiIssueCommentOperations, + _getApiIssueCommentOperations, +} from "./classic/apiIssueComment/index.js"; +import { + ApiManagementGatewaySkusOperations, + _getApiManagementGatewaySkusOperations, +} from "./classic/apiManagementGatewaySkus/index.js"; +import { + ApiManagementOperationsOperations, + _getApiManagementOperationsOperations, +} from "./classic/apiManagementOperations/index.js"; +import { + ApiManagementServiceOperations, + _getApiManagementServiceOperations, +} from "./classic/apiManagementService/index.js"; +import { + ApiManagementServiceResourcesOperations, + _getApiManagementServiceResourcesOperations, +} from "./classic/apiManagementServiceResources/index.js"; +import { + ApiManagementServiceSkusOperations, + _getApiManagementServiceSkusOperations, +} from "./classic/apiManagementServiceSkus/index.js"; +import { + ApiManagementSkusOperations, + _getApiManagementSkusOperations, +} from "./classic/apiManagementSkus/index.js"; +import { + ApiManagementWorkspaceLinkOperations, + _getApiManagementWorkspaceLinkOperations, +} from "./classic/apiManagementWorkspaceLink/index.js"; +import { + ApiManagementWorkspaceLinksOperations, + _getApiManagementWorkspaceLinksOperations, +} from "./classic/apiManagementWorkspaceLinks/index.js"; +import { + ApiOperationOperations, + _getApiOperationOperations, +} from "./classic/apiOperation/index.js"; +import { + ApiOperationPolicyOperations, + _getApiOperationPolicyOperations, +} from "./classic/apiOperationPolicy/index.js"; +import { ApiPolicyOperations, _getApiPolicyOperations } from "./classic/apiPolicy/index.js"; +import { ApiProductOperations, _getApiProductOperations } from "./classic/apiProduct/index.js"; +import { ApiReleaseOperations, _getApiReleaseOperations } from "./classic/apiRelease/index.js"; +import { ApiRevisionOperations, _getApiRevisionOperations } from "./classic/apiRevision/index.js"; +import { ApiSchemaOperations, _getApiSchemaOperations } from "./classic/apiSchema/index.js"; +import { + ApiTagDescriptionOperations, + _getApiTagDescriptionOperations, +} from "./classic/apiTagDescription/index.js"; +import { ApiToolOperations, _getApiToolOperations } from "./classic/apiTool/index.js"; +import { + ApiVersionSetOperations, + _getApiVersionSetOperations, +} from "./classic/apiVersionSet/index.js"; +import { ApiWikiOperations, _getApiWikiOperations } from "./classic/apiWiki/index.js"; +import { ApiWikisOperations, _getApiWikisOperations } from "./classic/apiWikis/index.js"; +import { + AuthorizationOperations, + _getAuthorizationOperations, +} from "./classic/authorization/index.js"; +import { + AuthorizationAccessPolicyOperations, + _getAuthorizationAccessPolicyOperations, +} from "./classic/authorizationAccessPolicy/index.js"; +import { + AuthorizationLoginLinksOperations, + _getAuthorizationLoginLinksOperations, +} from "./classic/authorizationLoginLinks/index.js"; +import { + AuthorizationProviderOperations, + _getAuthorizationProviderOperations, +} from "./classic/authorizationProvider/index.js"; +import { + AuthorizationServerOperations, + _getAuthorizationServerOperations, +} from "./classic/authorizationServer/index.js"; +import { BackendOperations, _getBackendOperations } from "./classic/backend/index.js"; +import { CacheOperations, _getCacheOperations } from "./classic/cache/index.js"; +import { CertificateOperations, _getCertificateOperations } from "./classic/certificate/index.js"; +import { + ClientApplicationOperations, + _getClientApplicationOperations, +} from "./classic/clientApplication/index.js"; +import { + ClientApplicationProductLinkOperations, + _getClientApplicationProductLinkOperations, +} from "./classic/clientApplicationProductLink/index.js"; +import { ContentItemOperations, _getContentItemOperations } from "./classic/contentItem/index.js"; +import { ContentTypeOperations, _getContentTypeOperations } from "./classic/contentType/index.js"; +import { + DelegationSettingsOperations, + _getDelegationSettingsOperations, +} from "./classic/delegationSettings/index.js"; +import { + DeletedServicesOperations, + _getDeletedServicesOperations, +} from "./classic/deletedServices/index.js"; +import { DiagnosticOperations, _getDiagnosticOperations } from "./classic/diagnostic/index.js"; +import { + DocumentationOperations, + _getDocumentationOperations, +} from "./classic/documentation/index.js"; +import { + EmailTemplateOperations, + _getEmailTemplateOperations, +} from "./classic/emailTemplate/index.js"; +import { GatewayOperations, _getGatewayOperations } from "./classic/gateway/index.js"; +import { GatewayApiOperations, _getGatewayApiOperations } from "./classic/gatewayApi/index.js"; +import { + GatewayCertificateAuthorityOperations, + _getGatewayCertificateAuthorityOperations, +} from "./classic/gatewayCertificateAuthority/index.js"; +import { + GatewayHostnameConfigurationOperations, + _getGatewayHostnameConfigurationOperations, +} from "./classic/gatewayHostnameConfiguration/index.js"; +import { + GlobalSchemaOperations, + _getGlobalSchemaOperations, +} from "./classic/globalSchema/index.js"; +import { + GraphQLApiResolverOperations, + _getGraphQLApiResolverOperations, +} from "./classic/graphQLApiResolver/index.js"; +import { + GraphQLApiResolverPolicyOperations, + _getGraphQLApiResolverPolicyOperations, +} from "./classic/graphQLApiResolverPolicy/index.js"; +import { GroupOperations, _getGroupOperations } from "./classic/group/index.js"; +import { GroupUserOperations, _getGroupUserOperations } from "./classic/groupUser/index.js"; +import { + IdentityProviderOperations, + _getIdentityProviderOperations, +} from "./classic/identityProvider/index.js"; +import { IssueOperations, _getIssueOperations } from "./classic/issue/index.js"; +import { LoggerOperations, _getLoggerOperations } from "./classic/logger/index.js"; +import { NamedValueOperations, _getNamedValueOperations } from "./classic/namedValue/index.js"; +import { + NetworkStatusOperations, + _getNetworkStatusOperations, +} from "./classic/networkStatus/index.js"; +import { + NotificationOperations, + _getNotificationOperations, +} from "./classic/notification/index.js"; +import { + NotificationRecipientEmailOperations, + _getNotificationRecipientEmailOperations, +} from "./classic/notificationRecipientEmail/index.js"; +import { + NotificationRecipientUserOperations, + _getNotificationRecipientUserOperations, +} from "./classic/notificationRecipientUser/index.js"; +import { + OpenIdConnectProviderOperations, + _getOpenIdConnectProviderOperations, +} from "./classic/openIdConnectProvider/index.js"; +import { OperationOperations, _getOperationOperations } from "./classic/operation/index.js"; +import { + OperationStatusOperations, + _getOperationStatusOperations, +} from "./classic/operationStatus/index.js"; +import { + OperationsResultsOperations, + _getOperationsResultsOperations, +} from "./classic/operationsResults/index.js"; +import { + OutboundNetworkDependenciesEndpointsOperations, + _getOutboundNetworkDependenciesEndpointsOperations, +} from "./classic/outboundNetworkDependenciesEndpoints/index.js"; +import { PolicyOperations, _getPolicyOperations } from "./classic/policy/index.js"; +import { + PolicyDescriptionOperations, + _getPolicyDescriptionOperations, +} from "./classic/policyDescription/index.js"; +import { + PolicyFragmentOperations, + _getPolicyFragmentOperations, +} from "./classic/policyFragment/index.js"; +import { + PolicyRestrictionOperations, + _getPolicyRestrictionOperations, +} from "./classic/policyRestriction/index.js"; +import { + PolicyRestrictionValidationsOperations, + _getPolicyRestrictionValidationsOperations, +} from "./classic/policyRestrictionValidations/index.js"; +import { + PortalConfigOperations, + _getPortalConfigOperations, +} from "./classic/portalConfig/index.js"; +import { + PortalRevisionOperations, + _getPortalRevisionOperations, +} from "./classic/portalRevision/index.js"; +import { + PortalSettingsOperations, + _getPortalSettingsOperations, +} from "./classic/portalSettings/index.js"; +import { + PrivateEndpointConnectionOperations, + _getPrivateEndpointConnectionOperations, +} from "./classic/privateEndpointConnection/index.js"; +import { ProductOperations, _getProductOperations } from "./classic/product/index.js"; +import { ProductApiOperations, _getProductApiOperations } from "./classic/productApi/index.js"; +import { + ProductApiLinkOperations, + _getProductApiLinkOperations, +} from "./classic/productApiLink/index.js"; +import { + ProductGroupOperations, + _getProductGroupOperations, +} from "./classic/productGroup/index.js"; +import { + ProductGroupLinkOperations, + _getProductGroupLinkOperations, +} from "./classic/productGroupLink/index.js"; +import { + ProductPolicyOperations, + _getProductPolicyOperations, +} from "./classic/productPolicy/index.js"; +import { + ProductSubscriptionsOperations, + _getProductSubscriptionsOperations, +} from "./classic/productSubscriptions/index.js"; +import { ProductWikiOperations, _getProductWikiOperations } from "./classic/productWiki/index.js"; +import { + ProductWikisOperations, + _getProductWikisOperations, +} from "./classic/productWikis/index.js"; +import { + QuotaByCounterKeysOperations, + _getQuotaByCounterKeysOperations, +} from "./classic/quotaByCounterKeys/index.js"; +import { + QuotaByPeriodKeysOperations, + _getQuotaByPeriodKeysOperations, +} from "./classic/quotaByPeriodKeys/index.js"; +import { RegionOperations, _getRegionOperations } from "./classic/region/index.js"; +import { ReportsOperations, _getReportsOperations } from "./classic/reports/index.js"; +import { + SignInSettingsOperations, + _getSignInSettingsOperations, +} from "./classic/signInSettings/index.js"; +import { + SignUpSettingsOperations, + _getSignUpSettingsOperations, +} from "./classic/signUpSettings/index.js"; +import { + SubscriptionOperations, + _getSubscriptionOperations, +} from "./classic/subscription/index.js"; +import { TagOperations, _getTagOperations } from "./classic/tag/index.js"; +import { TagApiLinkOperations, _getTagApiLinkOperations } from "./classic/tagApiLink/index.js"; +import { + TagOperationLinkOperations, + _getTagOperationLinkOperations, +} from "./classic/tagOperationLink/index.js"; +import { + TagProductLinkOperations, + _getTagProductLinkOperations, +} from "./classic/tagProductLink/index.js"; +import { TagResourceOperations, _getTagResourceOperations } from "./classic/tagResource/index.js"; +import { + TenantAccessOperations, + _getTenantAccessOperations, +} from "./classic/tenantAccess/index.js"; +import { + TenantAccessGitOperations, + _getTenantAccessGitOperations, +} from "./classic/tenantAccessGit/index.js"; +import { + TenantConfigurationOperations, + _getTenantConfigurationOperations, +} from "./classic/tenantConfiguration/index.js"; +import { + TenantSettingsOperations, + _getTenantSettingsOperations, +} from "./classic/tenantSettings/index.js"; +import { UserOperations, _getUserOperations } from "./classic/user/index.js"; +import { + UserConfirmationPasswordOperations, + _getUserConfirmationPasswordOperations, +} from "./classic/userConfirmationPassword/index.js"; +import { UserGroupOperations, _getUserGroupOperations } from "./classic/userGroup/index.js"; +import { + UserIdentitiesOperations, + _getUserIdentitiesOperations, +} from "./classic/userIdentities/index.js"; +import { + UserSubscriptionOperations, + _getUserSubscriptionOperations, +} from "./classic/userSubscription/index.js"; +import { WorkspaceOperations, _getWorkspaceOperations } from "./classic/workspace/index.js"; +import { + WorkspaceApiOperations, + _getWorkspaceApiOperations, +} from "./classic/workspaceApi/index.js"; +import { + WorkspaceApiDiagnosticOperations, + _getWorkspaceApiDiagnosticOperations, +} from "./classic/workspaceApiDiagnostic/index.js"; +import { + WorkspaceApiExportOperations, + _getWorkspaceApiExportOperations, +} from "./classic/workspaceApiExport/index.js"; +import { + WorkspaceApiOperationOperations, + _getWorkspaceApiOperationOperations, +} from "./classic/workspaceApiOperation/index.js"; +import { + WorkspaceApiOperationPolicyOperations, + _getWorkspaceApiOperationPolicyOperations, +} from "./classic/workspaceApiOperationPolicy/index.js"; +import { + WorkspaceApiPolicyOperations, + _getWorkspaceApiPolicyOperations, +} from "./classic/workspaceApiPolicy/index.js"; +import { + WorkspaceApiReleaseOperations, + _getWorkspaceApiReleaseOperations, +} from "./classic/workspaceApiRelease/index.js"; +import { + WorkspaceApiRevisionOperations, + _getWorkspaceApiRevisionOperations, +} from "./classic/workspaceApiRevision/index.js"; +import { + WorkspaceApiSchemaOperations, + _getWorkspaceApiSchemaOperations, +} from "./classic/workspaceApiSchema/index.js"; +import { + WorkspaceApiVersionSetOperations, + _getWorkspaceApiVersionSetOperations, +} from "./classic/workspaceApiVersionSet/index.js"; +import { + WorkspaceBackendOperations, + _getWorkspaceBackendOperations, +} from "./classic/workspaceBackend/index.js"; +import { + WorkspaceCertificateOperations, + _getWorkspaceCertificateOperations, +} from "./classic/workspaceCertificate/index.js"; +import { + WorkspaceDiagnosticOperations, + _getWorkspaceDiagnosticOperations, +} from "./classic/workspaceDiagnostic/index.js"; +import { + WorkspaceGlobalSchemaOperations, + _getWorkspaceGlobalSchemaOperations, +} from "./classic/workspaceGlobalSchema/index.js"; +import { + WorkspaceGroupOperations, + _getWorkspaceGroupOperations, +} from "./classic/workspaceGroup/index.js"; +import { + WorkspaceGroupUserOperations, + _getWorkspaceGroupUserOperations, +} from "./classic/workspaceGroupUser/index.js"; +import { + WorkspaceLoggerOperations, + _getWorkspaceLoggerOperations, +} from "./classic/workspaceLogger/index.js"; +import { + WorkspaceNamedValueOperations, + _getWorkspaceNamedValueOperations, +} from "./classic/workspaceNamedValue/index.js"; +import { + WorkspaceNotificationOperations, + _getWorkspaceNotificationOperations, +} from "./classic/workspaceNotification/index.js"; +import { + WorkspaceNotificationRecipientEmailOperations, + _getWorkspaceNotificationRecipientEmailOperations, +} from "./classic/workspaceNotificationRecipientEmail/index.js"; +import { + WorkspaceNotificationRecipientUserOperations, + _getWorkspaceNotificationRecipientUserOperations, +} from "./classic/workspaceNotificationRecipientUser/index.js"; +import { + WorkspacePolicyOperations, + _getWorkspacePolicyOperations, +} from "./classic/workspacePolicy/index.js"; +import { + WorkspacePolicyFragmentOperations, + _getWorkspacePolicyFragmentOperations, +} from "./classic/workspacePolicyFragment/index.js"; +import { + WorkspaceProductOperations, + _getWorkspaceProductOperations, +} from "./classic/workspaceProduct/index.js"; +import { + WorkspaceProductApiLinkOperations, + _getWorkspaceProductApiLinkOperations, +} from "./classic/workspaceProductApiLink/index.js"; +import { + WorkspaceProductGroupLinkOperations, + _getWorkspaceProductGroupLinkOperations, +} from "./classic/workspaceProductGroupLink/index.js"; +import { + WorkspaceProductPolicyOperations, + _getWorkspaceProductPolicyOperations, +} from "./classic/workspaceProductPolicy/index.js"; +import { + WorkspaceSubscriptionOperations, + _getWorkspaceSubscriptionOperations, +} from "./classic/workspaceSubscription/index.js"; +import { + WorkspaceTagOperations, + _getWorkspaceTagOperations, +} from "./classic/workspaceTag/index.js"; +import { + WorkspaceTagApiLinkOperations, + _getWorkspaceTagApiLinkOperations, +} from "./classic/workspaceTagApiLink/index.js"; +import { + WorkspaceTagOperationLinkOperations, + _getWorkspaceTagOperationLinkOperations, +} from "./classic/workspaceTagOperationLink/index.js"; +import { + WorkspaceTagProductLinkOperations, + _getWorkspaceTagProductLinkOperations, +} from "./classic/workspaceTagProductLink/index.js"; +import { TokenCredential } from "@azure/core-auth"; +import { Pipeline } from "@azure/core-rest-pipeline"; -export class ApiManagementClient extends coreClient.ServiceClient { - $host: string; - apiVersion: string; - subscriptionId?: string; +export type { ApiManagementClientOptionalParams } from "./api/apiManagementContext.js"; - /** - * Initializes a new instance of the ApiManagementClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param options The parameter options - */ +export class ApiManagementClient { + private _client: ApiManagementContext; + /** The pipeline used by this client to make requests */ + public readonly pipeline: Pipeline; + + constructor(credential: TokenCredential, options?: ApiManagementClientOptionalParams); constructor( - credentials: coreAuth.TokenCredential, + credential: TokenCredential, subscriptionId: string, options?: ApiManagementClientOptionalParams, ); + /** Resource provider operation status. */ constructor( - credentials: coreAuth.TokenCredential, - options?: ApiManagementClientOptionalParams, - ); - constructor( - credentials: coreAuth.TokenCredential, - subscriptionIdOrOptions?: ApiManagementClientOptionalParams | string, + credential: TokenCredential, + subscriptionIdOrOptions?: string | ApiManagementClientOptionalParams, options?: ApiManagementClientOptionalParams, ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - let subscriptionId: string | undefined; if (typeof subscriptionIdOrOptions === "string") { @@ -342,522 +483,445 @@ export class ApiManagementClient extends coreClient.ServiceClient { options = subscriptionIdOrOptions; } - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: ApiManagementClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-apimanagement/10.0.0`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, + options = options ?? {}; + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-client` + : `azsdk-js-client`; + this._client = createApiManagement(credential, subscriptionId ?? "", { ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-05-01"; - this.apiGateway = new ApiGatewayImpl(this); - this.apiManagementGatewaySkus = new ApiManagementGatewaySkusImpl(this); - this.allPolicies = new AllPoliciesImpl(this); - this.api = new ApiImpl(this); - this.apiRevision = new ApiRevisionImpl(this); - this.apiRelease = new ApiReleaseImpl(this); - this.apiOperation = new ApiOperationImpl(this); - this.apiOperationPolicy = new ApiOperationPolicyImpl(this); - this.tag = new TagImpl(this); - this.graphQLApiResolver = new GraphQLApiResolverImpl(this); - this.graphQLApiResolverPolicy = new GraphQLApiResolverPolicyImpl(this); - this.apiProduct = new ApiProductImpl(this); - this.apiPolicy = new ApiPolicyImpl(this); - this.apiSchema = new ApiSchemaImpl(this); - this.apiDiagnostic = new ApiDiagnosticImpl(this); - this.apiIssue = new ApiIssueImpl(this); - this.apiIssueComment = new ApiIssueCommentImpl(this); - this.apiIssueAttachment = new ApiIssueAttachmentImpl(this); - this.apiTagDescription = new ApiTagDescriptionImpl(this); - this.operationOperations = new OperationOperationsImpl(this); - this.apiWiki = new ApiWikiImpl(this); - this.apiWikis = new ApiWikisImpl(this); - this.apiExport = new ApiExportImpl(this); - this.apiVersionSet = new ApiVersionSetImpl(this); - this.authorizationProvider = new AuthorizationProviderImpl(this); - this.authorization = new AuthorizationImpl(this); - this.authorizationLoginLinks = new AuthorizationLoginLinksImpl(this); - this.authorizationAccessPolicy = new AuthorizationAccessPolicyImpl(this); - this.authorizationServer = new AuthorizationServerImpl(this); - this.backend = new BackendImpl(this); - this.cache = new CacheImpl(this); - this.certificate = new CertificateImpl(this); - this.contentType = new ContentTypeImpl(this); - this.contentItem = new ContentItemImpl(this); - this.deletedServices = new DeletedServicesImpl(this); - this.apiManagementOperations = new ApiManagementOperationsImpl(this); - this.apiManagementServiceSkus = new ApiManagementServiceSkusImpl(this); - this.apiManagementService = new ApiManagementServiceImpl(this); - this.diagnostic = new DiagnosticImpl(this); - this.documentation = new DocumentationImpl(this); - this.emailTemplate = new EmailTemplateImpl(this); - this.apiGatewayConfigConnection = new ApiGatewayConfigConnectionImpl(this); - this.gateway = new GatewayImpl(this); - this.gatewayHostnameConfiguration = new GatewayHostnameConfigurationImpl( - this, - ); - this.gatewayApi = new GatewayApiImpl(this); - this.gatewayCertificateAuthority = new GatewayCertificateAuthorityImpl( - this, - ); - this.group = new GroupImpl(this); - this.groupUser = new GroupUserImpl(this); - this.identityProvider = new IdentityProviderImpl(this); - this.issue = new IssueImpl(this); - this.logger = new LoggerImpl(this); - this.namedValue = new NamedValueImpl(this); - this.networkStatus = new NetworkStatusImpl(this); - this.notification = new NotificationImpl(this); - this.notificationRecipientUser = new NotificationRecipientUserImpl(this); - this.notificationRecipientEmail = new NotificationRecipientEmailImpl(this); - this.openIdConnectProvider = new OpenIdConnectProviderImpl(this); - this.outboundNetworkDependenciesEndpoints = - new OutboundNetworkDependenciesEndpointsImpl(this); - this.policy = new PolicyImpl(this); - this.policyDescription = new PolicyDescriptionImpl(this); - this.policyFragment = new PolicyFragmentImpl(this); - this.policyRestriction = new PolicyRestrictionImpl(this); - this.policyRestrictionValidations = new PolicyRestrictionValidationsImpl( - this, - ); - this.portalConfig = new PortalConfigImpl(this); - this.portalRevision = new PortalRevisionImpl(this); - this.portalSettings = new PortalSettingsImpl(this); - this.signInSettings = new SignInSettingsImpl(this); - this.signUpSettings = new SignUpSettingsImpl(this); - this.delegationSettings = new DelegationSettingsImpl(this); - this.privateEndpointConnectionOperations = - new PrivateEndpointConnectionOperationsImpl(this); - this.product = new ProductImpl(this); - this.productApi = new ProductApiImpl(this); - this.productGroup = new ProductGroupImpl(this); - this.productSubscriptions = new ProductSubscriptionsImpl(this); - this.productPolicy = new ProductPolicyImpl(this); - this.productWiki = new ProductWikiImpl(this); - this.productWikis = new ProductWikisImpl(this); - this.productApiLink = new ProductApiLinkImpl(this); - this.productGroupLink = new ProductGroupLinkImpl(this); - this.quotaByCounterKeys = new QuotaByCounterKeysImpl(this); - this.quotaByPeriodKeys = new QuotaByPeriodKeysImpl(this); - this.region = new RegionImpl(this); - this.reports = new ReportsImpl(this); - this.globalSchema = new GlobalSchemaImpl(this); - this.tenantSettings = new TenantSettingsImpl(this); - this.apiManagementSkus = new ApiManagementSkusImpl(this); - this.subscription = new SubscriptionImpl(this); - this.tagResource = new TagResourceImpl(this); - this.tagApiLink = new TagApiLinkImpl(this); - this.tagOperationLink = new TagOperationLinkImpl(this); - this.tagProductLink = new TagProductLinkImpl(this); - this.tenantAccess = new TenantAccessImpl(this); - this.tenantAccessGit = new TenantAccessGitImpl(this); - this.tenantConfiguration = new TenantConfigurationImpl(this); - this.user = new UserImpl(this); - this.userGroup = new UserGroupImpl(this); - this.userSubscription = new UserSubscriptionImpl(this); - this.userIdentities = new UserIdentitiesImpl(this); - this.userConfirmationPassword = new UserConfirmationPasswordImpl(this); - this.workspaceBackend = new WorkspaceBackendImpl(this); - this.workspaceCertificate = new WorkspaceCertificateImpl(this); - this.workspaceDiagnostic = new WorkspaceDiagnosticImpl(this); - this.workspaceApiDiagnostic = new WorkspaceApiDiagnosticImpl(this); - this.apiManagementWorkspaceLinks = new ApiManagementWorkspaceLinksImpl( - this, + userAgentOptions: { userAgentPrefix }, + }); + this.pipeline = this._client.pipeline; + this.operationsResults = _getOperationsResultsOperations(this._client); + this.operationStatus = _getOperationStatusOperations(this._client); + this.workspaceApiExport = _getWorkspaceApiExportOperations(this._client); + this.apiManagementSkus = _getApiManagementSkusOperations(this._client); + this.apiExport = _getApiExportOperations(this._client); + this.workspace = _getWorkspaceOperations(this._client); + this.apiManagementWorkspaceLinks = _getApiManagementWorkspaceLinksOperations(this._client); + this.apiManagementWorkspaceLink = _getApiManagementWorkspaceLinkOperations(this._client); + this.userConfirmationPassword = _getUserConfirmationPasswordOperations(this._client); + this.userIdentities = _getUserIdentitiesOperations(this._client); + this.userGroup = _getUserGroupOperations(this._client); + this.user = _getUserOperations(this._client); + this.tenantConfiguration = _getTenantConfigurationOperations(this._client); + this.tenantAccessGit = _getTenantAccessGitOperations(this._client); + this.tenantAccess = _getTenantAccessOperations(this._client); + this.tagProductLink = _getTagProductLinkOperations(this._client); + this.tagOperationLink = _getTagOperationLinkOperations(this._client); + this.tagApiLink = _getTagApiLinkOperations(this._client); + this.subscription = _getSubscriptionOperations(this._client); + this.tenantSettings = _getTenantSettingsOperations(this._client); + this.globalSchema = _getGlobalSchemaOperations(this._client); + this.productGroupLink = _getProductGroupLinkOperations(this._client); + this.productApiLink = _getProductApiLinkOperations(this._client); + this.productSubscriptions = _getProductSubscriptionsOperations(this._client); + this.productGroup = _getProductGroupOperations(this._client); + this.productApi = _getProductApiOperations(this._client); + this.privateEndpointConnection = _getPrivateEndpointConnectionOperations(this._client); + this.portalRevision = _getPortalRevisionOperations(this._client); + this.clientApplicationProductLink = _getClientApplicationProductLinkOperations(this._client); + this.clientApplication = _getClientApplicationOperations(this._client); + this.portalConfig = _getPortalConfigOperations(this._client); + this.policyRestriction = _getPolicyRestrictionOperations(this._client); + this.policyFragment = _getPolicyFragmentOperations(this._client); + this.openIdConnectProvider = _getOpenIdConnectProviderOperations(this._client); + this.workspaceNotificationRecipientEmail = _getWorkspaceNotificationRecipientEmailOperations( + this._client, ); - this.apiManagementWorkspaceLink = new ApiManagementWorkspaceLinkImpl(this); - this.workspaceLogger = new WorkspaceLoggerImpl(this); - this.workspace = new WorkspaceImpl(this); - this.workspacePolicy = new WorkspacePolicyImpl(this); - this.workspaceNamedValue = new WorkspaceNamedValueImpl(this); - this.workspaceGlobalSchema = new WorkspaceGlobalSchemaImpl(this); - this.workspaceNotification = new WorkspaceNotificationImpl(this); - this.workspaceNotificationRecipientUser = - new WorkspaceNotificationRecipientUserImpl(this); - this.workspaceNotificationRecipientEmail = - new WorkspaceNotificationRecipientEmailImpl(this); - this.workspacePolicyFragment = new WorkspacePolicyFragmentImpl(this); - this.workspaceGroup = new WorkspaceGroupImpl(this); - this.workspaceGroupUser = new WorkspaceGroupUserImpl(this); - this.workspaceSubscription = new WorkspaceSubscriptionImpl(this); - this.workspaceApiVersionSet = new WorkspaceApiVersionSetImpl(this); - this.workspaceApi = new WorkspaceApiImpl(this); - this.workspaceApiRevision = new WorkspaceApiRevisionImpl(this); - this.workspaceApiRelease = new WorkspaceApiReleaseImpl(this); - this.workspaceApiOperation = new WorkspaceApiOperationImpl(this); - this.workspaceApiOperationPolicy = new WorkspaceApiOperationPolicyImpl( - this, + this.workspaceNotificationRecipientUser = _getWorkspaceNotificationRecipientUserOperations( + this._client, ); - this.workspaceApiPolicy = new WorkspaceApiPolicyImpl(this); - this.workspaceApiSchema = new WorkspaceApiSchemaImpl(this); - this.workspaceProduct = new WorkspaceProductImpl(this); - this.workspaceProductApiLink = new WorkspaceProductApiLinkImpl(this); - this.workspaceProductGroupLink = new WorkspaceProductGroupLinkImpl(this); - this.workspaceProductPolicy = new WorkspaceProductPolicyImpl(this); - this.workspaceTag = new WorkspaceTagImpl(this); - this.workspaceTagApiLink = new WorkspaceTagApiLinkImpl(this); - this.workspaceTagOperationLink = new WorkspaceTagOperationLinkImpl(this); - this.workspaceTagProductLink = new WorkspaceTagProductLinkImpl(this); - this.workspaceApiExport = new WorkspaceApiExportImpl(this); - this.operationStatus = new OperationStatusImpl(this); - this.operationsResults = new OperationsResultsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest, - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - }, - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsync( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PerformConnectivityCheckAsyncResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options, - }, - spec: performConnectivityCheckAsyncOperationSpec, - }); - const poller = await createHttpPoller< - PerformConnectivityCheckAsyncResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Performs a connectivity check between the API Management service and a given destination, and - * returns metrics for the connection, as well as errors encountered while trying to establish it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param connectivityCheckRequestParams Connectivity Check request parameters. - * @param options The options parameters. - */ - async beginPerformConnectivityCheckAsyncAndWait( - resourceGroupName: string, - serviceName: string, - connectivityCheckRequestParams: ConnectivityCheckRequest, - options?: PerformConnectivityCheckAsyncOptionalParams, - ): Promise { - const poller = await this.beginPerformConnectivityCheckAsync( - resourceGroupName, - serviceName, - connectivityCheckRequestParams, - options, + this.notificationRecipientEmail = _getNotificationRecipientEmailOperations(this._client); + this.notificationRecipientUser = _getNotificationRecipientUserOperations(this._client); + this.notification = _getNotificationOperations(this._client); + this.namedValue = _getNamedValueOperations(this._client); + this.logger = _getLoggerOperations(this._client); + this.identityProvider = _getIdentityProviderOperations(this._client); + this.workspaceGroupUser = _getWorkspaceGroupUserOperations(this._client); + this.groupUser = _getGroupUserOperations(this._client); + this.group = _getGroupOperations(this._client); + this.gatewayCertificateAuthority = _getGatewayCertificateAuthorityOperations(this._client); + this.gatewayHostnameConfiguration = _getGatewayHostnameConfigurationOperations(this._client); + this.gatewayApi = _getGatewayApiOperations(this._client); + this.gateway = _getGatewayOperations(this._client); + this.apiGatewayHostnameBinding = _getApiGatewayHostnameBindingOperations(this._client); + this.apiGatewayConfigConnection = _getApiGatewayConfigConnectionOperations(this._client); + this.emailTemplate = _getEmailTemplateOperations(this._client); + this.documentation = _getDocumentationOperations(this._client); + this.deletedServices = _getDeletedServicesOperations(this._client); + this.contentItem = _getContentItemOperations(this._client); + this.contentType = _getContentTypeOperations(this._client); + this.certificate = _getCertificateOperations(this._client); + this.cache = _getCacheOperations(this._client); + this.backend = _getBackendOperations(this._client); + this.authorizationServer = _getAuthorizationServerOperations(this._client); + this.authorizationAccessPolicy = _getAuthorizationAccessPolicyOperations(this._client); + this.authorizationLoginLinks = _getAuthorizationLoginLinksOperations(this._client); + this.authorization = _getAuthorizationOperations(this._client); + this.authorizationProvider = _getAuthorizationProviderOperations(this._client); + this.apiVersionSet = _getApiVersionSetOperations(this._client); + this.apiTool = _getApiToolOperations(this._client); + this.productWikis = _getProductWikisOperations(this._client); + this.apiWikis = _getApiWikisOperations(this._client); + this.apiWiki = _getApiWikiOperations(this._client); + this.apiTagDescription = _getApiTagDescriptionOperations(this._client); + this.apiIssueAttachment = _getApiIssueAttachmentOperations(this._client); + this.apiIssueComment = _getApiIssueCommentOperations(this._client); + this.apiIssue = _getApiIssueOperations(this._client); + this.apiDiagnostic = _getApiDiagnosticOperations(this._client); + this.apiSchema = _getApiSchemaOperations(this._client); + this.graphQLApiResolver = _getGraphQLApiResolverOperations(this._client); + this.apiOperationPolicy = _getApiOperationPolicyOperations(this._client); + this.apiOperation = _getApiOperationOperations(this._client); + this.apiRelease = _getApiReleaseOperations(this._client); + this.tagResource = _getTagResourceOperations(this._client); + this.reports = _getReportsOperations(this._client); + this.region = _getRegionOperations(this._client); + this.quotaByPeriodKeys = _getQuotaByPeriodKeysOperations(this._client); + this.quotaByCounterKeys = _getQuotaByCounterKeysOperations(this._client); + this.product = _getProductOperations(this._client); + this.portalSettings = _getPortalSettingsOperations(this._client); + this.policyRestrictionValidations = _getPolicyRestrictionValidationsOperations(this._client); + this.policyDescription = _getPolicyDescriptionOperations(this._client); + this.outboundNetworkDependenciesEndpoints = _getOutboundNetworkDependenciesEndpointsOperations( + this._client, ); - return poller.pollUntilDone(); + this.networkStatus = _getNetworkStatusOperations(this._client); + this.apiManagementServiceSkus = _getApiManagementServiceSkusOperations(this._client); + this.allPolicies = _getAllPoliciesOperations(this._client); + this.apiManagementService = _getApiManagementServiceOperations(this._client); + this.workspaceApiRevision = _getWorkspaceApiRevisionOperations(this._client); + this.operation = _getOperationOperations(this._client); + this.apiProduct = _getApiProductOperations(this._client); + this.apiRevision = _getApiRevisionOperations(this._client); + this.api = _getApiOperations(this._client); + this.apiManagementGatewaySkus = _getApiManagementGatewaySkusOperations(this._client); + this.apiGateway = _getApiGatewayOperations(this._client); + this.apiManagementOperations = _getApiManagementOperationsOperations(this._client); + this.workspaceTagProductLink = _getWorkspaceTagProductLinkOperations(this._client); + this.workspaceTagOperationLink = _getWorkspaceTagOperationLinkOperations(this._client); + this.workspaceTagApiLink = _getWorkspaceTagApiLinkOperations(this._client); + this.workspaceSubscription = _getWorkspaceSubscriptionOperations(this._client); + this.userSubscription = _getUserSubscriptionOperations(this._client); + this.workspaceGlobalSchema = _getWorkspaceGlobalSchemaOperations(this._client); + this.workspaceProductGroupLink = _getWorkspaceProductGroupLinkOperations(this._client); + this.workspaceProductApiLink = _getWorkspaceProductApiLinkOperations(this._client); + this.workspaceProduct = _getWorkspaceProductOperations(this._client); + this.delegationSettings = _getDelegationSettingsOperations(this._client); + this.signUpSettings = _getSignUpSettingsOperations(this._client); + this.signInSettings = _getSignInSettingsOperations(this._client); + this.workspacePolicyFragment = _getWorkspacePolicyFragmentOperations(this._client); + this.workspaceNotification = _getWorkspaceNotificationOperations(this._client); + this.workspaceNamedValue = _getWorkspaceNamedValueOperations(this._client); + this.workspaceLogger = _getWorkspaceLoggerOperations(this._client); + this.workspaceGroup = _getWorkspaceGroupOperations(this._client); + this.workspaceCertificate = _getWorkspaceCertificateOperations(this._client); + this.workspaceBackend = _getWorkspaceBackendOperations(this._client); + this.workspaceApiVersionSet = _getWorkspaceApiVersionSetOperations(this._client); + this.productWiki = _getProductWikiOperations(this._client); + this.issue = _getIssueOperations(this._client); + this.workspaceApiDiagnostic = _getWorkspaceApiDiagnosticOperations(this._client); + this.workspaceDiagnostic = _getWorkspaceDiagnosticOperations(this._client); + this.diagnostic = _getDiagnosticOperations(this._client); + this.workspaceApiSchema = _getWorkspaceApiSchemaOperations(this._client); + this.workspaceTag = _getWorkspaceTagOperations(this._client); + this.tag = _getTagOperations(this._client); + this.workspaceProductPolicy = _getWorkspaceProductPolicyOperations(this._client); + this.workspaceApiPolicy = _getWorkspaceApiPolicyOperations(this._client); + this.workspaceApiOperationPolicy = _getWorkspaceApiOperationPolicyOperations(this._client); + this.workspacePolicy = _getWorkspacePolicyOperations(this._client); + this.productPolicy = _getProductPolicyOperations(this._client); + this.policy = _getPolicyOperations(this._client); + this.apiPolicy = _getApiPolicyOperations(this._client); + this.graphQLApiResolverPolicy = _getGraphQLApiResolverPolicyOperations(this._client); + this.workspaceApiOperation = _getWorkspaceApiOperationOperations(this._client); + this.workspaceApiRelease = _getWorkspaceApiReleaseOperations(this._client); + this.apiManagementServiceResources = _getApiManagementServiceResourcesOperations(this._client); + this.workspaceApi = _getWorkspaceApiOperations(this._client); } - apiGateway: ApiGateway; - apiManagementGatewaySkus: ApiManagementGatewaySkus; - allPolicies: AllPolicies; - api: Api; - apiRevision: ApiRevision; - apiRelease: ApiRelease; - apiOperation: ApiOperation; - apiOperationPolicy: ApiOperationPolicy; - tag: Tag; - graphQLApiResolver: GraphQLApiResolver; - graphQLApiResolverPolicy: GraphQLApiResolverPolicy; - apiProduct: ApiProduct; - apiPolicy: ApiPolicy; - apiSchema: ApiSchema; - apiDiagnostic: ApiDiagnostic; - apiIssue: ApiIssue; - apiIssueComment: ApiIssueComment; - apiIssueAttachment: ApiIssueAttachment; - apiTagDescription: ApiTagDescription; - operationOperations: OperationOperations; - apiWiki: ApiWiki; - apiWikis: ApiWikis; - apiExport: ApiExport; - apiVersionSet: ApiVersionSet; - authorizationProvider: AuthorizationProvider; - authorization: Authorization; - authorizationLoginLinks: AuthorizationLoginLinks; - authorizationAccessPolicy: AuthorizationAccessPolicy; - authorizationServer: AuthorizationServer; - backend: Backend; - cache: Cache; - certificate: Certificate; - contentType: ContentType; - contentItem: ContentItem; - deletedServices: DeletedServices; - apiManagementOperations: ApiManagementOperations; - apiManagementServiceSkus: ApiManagementServiceSkus; - apiManagementService: ApiManagementService; - diagnostic: Diagnostic; - documentation: Documentation; - emailTemplate: EmailTemplate; - apiGatewayConfigConnection: ApiGatewayConfigConnection; - gateway: Gateway; - gatewayHostnameConfiguration: GatewayHostnameConfiguration; - gatewayApi: GatewayApi; - gatewayCertificateAuthority: GatewayCertificateAuthority; - group: Group; - groupUser: GroupUser; - identityProvider: IdentityProvider; - issue: Issue; - logger: Logger; - namedValue: NamedValue; - networkStatus: NetworkStatus; - notification: Notification; - notificationRecipientUser: NotificationRecipientUser; - notificationRecipientEmail: NotificationRecipientEmail; - openIdConnectProvider: OpenIdConnectProvider; - outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints; - policy: Policy; - policyDescription: PolicyDescription; - policyFragment: PolicyFragment; - policyRestriction: PolicyRestriction; - policyRestrictionValidations: PolicyRestrictionValidations; - portalConfig: PortalConfig; - portalRevision: PortalRevision; - portalSettings: PortalSettings; - signInSettings: SignInSettings; - signUpSettings: SignUpSettings; - delegationSettings: DelegationSettings; - privateEndpointConnectionOperations: PrivateEndpointConnectionOperations; - product: Product; - productApi: ProductApi; - productGroup: ProductGroup; - productSubscriptions: ProductSubscriptions; - productPolicy: ProductPolicy; - productWiki: ProductWiki; - productWikis: ProductWikis; - productApiLink: ProductApiLink; - productGroupLink: ProductGroupLink; - quotaByCounterKeys: QuotaByCounterKeys; - quotaByPeriodKeys: QuotaByPeriodKeys; - region: Region; - reports: Reports; - globalSchema: GlobalSchema; - tenantSettings: TenantSettings; - apiManagementSkus: ApiManagementSkus; - subscription: Subscription; - tagResource: TagResource; - tagApiLink: TagApiLink; - tagOperationLink: TagOperationLink; - tagProductLink: TagProductLink; - tenantAccess: TenantAccess; - tenantAccessGit: TenantAccessGit; - tenantConfiguration: TenantConfiguration; - user: User; - userGroup: UserGroup; - userSubscription: UserSubscription; - userIdentities: UserIdentities; - userConfirmationPassword: UserConfirmationPassword; - workspaceBackend: WorkspaceBackend; - workspaceCertificate: WorkspaceCertificate; - workspaceDiagnostic: WorkspaceDiagnostic; - workspaceApiDiagnostic: WorkspaceApiDiagnostic; - apiManagementWorkspaceLinks: ApiManagementWorkspaceLinks; - apiManagementWorkspaceLink: ApiManagementWorkspaceLink; - workspaceLogger: WorkspaceLogger; - workspace: Workspace; - workspacePolicy: WorkspacePolicy; - workspaceNamedValue: WorkspaceNamedValue; - workspaceGlobalSchema: WorkspaceGlobalSchema; - workspaceNotification: WorkspaceNotification; - workspaceNotificationRecipientUser: WorkspaceNotificationRecipientUser; - workspaceNotificationRecipientEmail: WorkspaceNotificationRecipientEmail; - workspacePolicyFragment: WorkspacePolicyFragment; - workspaceGroup: WorkspaceGroup; - workspaceGroupUser: WorkspaceGroupUser; - workspaceSubscription: WorkspaceSubscription; - workspaceApiVersionSet: WorkspaceApiVersionSet; - workspaceApi: WorkspaceApi; - workspaceApiRevision: WorkspaceApiRevision; - workspaceApiRelease: WorkspaceApiRelease; - workspaceApiOperation: WorkspaceApiOperation; - workspaceApiOperationPolicy: WorkspaceApiOperationPolicy; - workspaceApiPolicy: WorkspaceApiPolicy; - workspaceApiSchema: WorkspaceApiSchema; - workspaceProduct: WorkspaceProduct; - workspaceProductApiLink: WorkspaceProductApiLink; - workspaceProductGroupLink: WorkspaceProductGroupLink; - workspaceProductPolicy: WorkspaceProductPolicy; - workspaceTag: WorkspaceTag; - workspaceTagApiLink: WorkspaceTagApiLink; - workspaceTagOperationLink: WorkspaceTagOperationLink; - workspaceTagProductLink: WorkspaceTagProductLink; - workspaceApiExport: WorkspaceApiExport; - operationStatus: OperationStatus; - operationsResults: OperationsResults; + /** The operation groups for operationsResults */ + public readonly operationsResults: OperationsResultsOperations; + /** The operation groups for operationStatus */ + public readonly operationStatus: OperationStatusOperations; + /** The operation groups for workspaceApiExport */ + public readonly workspaceApiExport: WorkspaceApiExportOperations; + /** The operation groups for apiManagementSkus */ + public readonly apiManagementSkus: ApiManagementSkusOperations; + /** The operation groups for apiExport */ + public readonly apiExport: ApiExportOperations; + /** The operation groups for workspace */ + public readonly workspace: WorkspaceOperations; + /** The operation groups for apiManagementWorkspaceLinks */ + public readonly apiManagementWorkspaceLinks: ApiManagementWorkspaceLinksOperations; + /** The operation groups for apiManagementWorkspaceLink */ + public readonly apiManagementWorkspaceLink: ApiManagementWorkspaceLinkOperations; + /** The operation groups for userConfirmationPassword */ + public readonly userConfirmationPassword: UserConfirmationPasswordOperations; + /** The operation groups for userIdentities */ + public readonly userIdentities: UserIdentitiesOperations; + /** The operation groups for userGroup */ + public readonly userGroup: UserGroupOperations; + /** The operation groups for user */ + public readonly user: UserOperations; + /** The operation groups for tenantConfiguration */ + public readonly tenantConfiguration: TenantConfigurationOperations; + /** The operation groups for tenantAccessGit */ + public readonly tenantAccessGit: TenantAccessGitOperations; + /** The operation groups for tenantAccess */ + public readonly tenantAccess: TenantAccessOperations; + /** The operation groups for tagProductLink */ + public readonly tagProductLink: TagProductLinkOperations; + /** The operation groups for tagOperationLink */ + public readonly tagOperationLink: TagOperationLinkOperations; + /** The operation groups for tagApiLink */ + public readonly tagApiLink: TagApiLinkOperations; + /** The operation groups for subscription */ + public readonly subscription: SubscriptionOperations; + /** The operation groups for tenantSettings */ + public readonly tenantSettings: TenantSettingsOperations; + /** The operation groups for globalSchema */ + public readonly globalSchema: GlobalSchemaOperations; + /** The operation groups for productGroupLink */ + public readonly productGroupLink: ProductGroupLinkOperations; + /** The operation groups for productApiLink */ + public readonly productApiLink: ProductApiLinkOperations; + /** The operation groups for productSubscriptions */ + public readonly productSubscriptions: ProductSubscriptionsOperations; + /** The operation groups for productGroup */ + public readonly productGroup: ProductGroupOperations; + /** The operation groups for productApi */ + public readonly productApi: ProductApiOperations; + /** The operation groups for privateEndpointConnection */ + public readonly privateEndpointConnection: PrivateEndpointConnectionOperations; + /** The operation groups for portalRevision */ + public readonly portalRevision: PortalRevisionOperations; + /** The operation groups for clientApplicationProductLink */ + public readonly clientApplicationProductLink: ClientApplicationProductLinkOperations; + /** The operation groups for clientApplication */ + public readonly clientApplication: ClientApplicationOperations; + /** The operation groups for portalConfig */ + public readonly portalConfig: PortalConfigOperations; + /** The operation groups for policyRestriction */ + public readonly policyRestriction: PolicyRestrictionOperations; + /** The operation groups for policyFragment */ + public readonly policyFragment: PolicyFragmentOperations; + /** The operation groups for openIdConnectProvider */ + public readonly openIdConnectProvider: OpenIdConnectProviderOperations; + /** The operation groups for workspaceNotificationRecipientEmail */ + public readonly workspaceNotificationRecipientEmail: WorkspaceNotificationRecipientEmailOperations; + /** The operation groups for workspaceNotificationRecipientUser */ + public readonly workspaceNotificationRecipientUser: WorkspaceNotificationRecipientUserOperations; + /** The operation groups for notificationRecipientEmail */ + public readonly notificationRecipientEmail: NotificationRecipientEmailOperations; + /** The operation groups for notificationRecipientUser */ + public readonly notificationRecipientUser: NotificationRecipientUserOperations; + /** The operation groups for notification */ + public readonly notification: NotificationOperations; + /** The operation groups for namedValue */ + public readonly namedValue: NamedValueOperations; + /** The operation groups for logger */ + public readonly logger: LoggerOperations; + /** The operation groups for identityProvider */ + public readonly identityProvider: IdentityProviderOperations; + /** The operation groups for workspaceGroupUser */ + public readonly workspaceGroupUser: WorkspaceGroupUserOperations; + /** The operation groups for groupUser */ + public readonly groupUser: GroupUserOperations; + /** The operation groups for group */ + public readonly group: GroupOperations; + /** The operation groups for gatewayCertificateAuthority */ + public readonly gatewayCertificateAuthority: GatewayCertificateAuthorityOperations; + /** The operation groups for gatewayHostnameConfiguration */ + public readonly gatewayHostnameConfiguration: GatewayHostnameConfigurationOperations; + /** The operation groups for gatewayApi */ + public readonly gatewayApi: GatewayApiOperations; + /** The operation groups for gateway */ + public readonly gateway: GatewayOperations; + /** The operation groups for apiGatewayHostnameBinding */ + public readonly apiGatewayHostnameBinding: ApiGatewayHostnameBindingOperations; + /** The operation groups for apiGatewayConfigConnection */ + public readonly apiGatewayConfigConnection: ApiGatewayConfigConnectionOperations; + /** The operation groups for emailTemplate */ + public readonly emailTemplate: EmailTemplateOperations; + /** The operation groups for documentation */ + public readonly documentation: DocumentationOperations; + /** The operation groups for deletedServices */ + public readonly deletedServices: DeletedServicesOperations; + /** The operation groups for contentItem */ + public readonly contentItem: ContentItemOperations; + /** The operation groups for contentType */ + public readonly contentType: ContentTypeOperations; + /** The operation groups for certificate */ + public readonly certificate: CertificateOperations; + /** The operation groups for cache */ + public readonly cache: CacheOperations; + /** The operation groups for backend */ + public readonly backend: BackendOperations; + /** The operation groups for authorizationServer */ + public readonly authorizationServer: AuthorizationServerOperations; + /** The operation groups for authorizationAccessPolicy */ + public readonly authorizationAccessPolicy: AuthorizationAccessPolicyOperations; + /** The operation groups for authorizationLoginLinks */ + public readonly authorizationLoginLinks: AuthorizationLoginLinksOperations; + /** The operation groups for authorization */ + public readonly authorization: AuthorizationOperations; + /** The operation groups for authorizationProvider */ + public readonly authorizationProvider: AuthorizationProviderOperations; + /** The operation groups for apiVersionSet */ + public readonly apiVersionSet: ApiVersionSetOperations; + /** The operation groups for apiTool */ + public readonly apiTool: ApiToolOperations; + /** The operation groups for productWikis */ + public readonly productWikis: ProductWikisOperations; + /** The operation groups for apiWikis */ + public readonly apiWikis: ApiWikisOperations; + /** The operation groups for apiWiki */ + public readonly apiWiki: ApiWikiOperations; + /** The operation groups for apiTagDescription */ + public readonly apiTagDescription: ApiTagDescriptionOperations; + /** The operation groups for apiIssueAttachment */ + public readonly apiIssueAttachment: ApiIssueAttachmentOperations; + /** The operation groups for apiIssueComment */ + public readonly apiIssueComment: ApiIssueCommentOperations; + /** The operation groups for apiIssue */ + public readonly apiIssue: ApiIssueOperations; + /** The operation groups for apiDiagnostic */ + public readonly apiDiagnostic: ApiDiagnosticOperations; + /** The operation groups for apiSchema */ + public readonly apiSchema: ApiSchemaOperations; + /** The operation groups for graphQLApiResolver */ + public readonly graphQLApiResolver: GraphQLApiResolverOperations; + /** The operation groups for apiOperationPolicy */ + public readonly apiOperationPolicy: ApiOperationPolicyOperations; + /** The operation groups for apiOperation */ + public readonly apiOperation: ApiOperationOperations; + /** The operation groups for apiRelease */ + public readonly apiRelease: ApiReleaseOperations; + /** The operation groups for tagResource */ + public readonly tagResource: TagResourceOperations; + /** The operation groups for reports */ + public readonly reports: ReportsOperations; + /** The operation groups for region */ + public readonly region: RegionOperations; + /** The operation groups for quotaByPeriodKeys */ + public readonly quotaByPeriodKeys: QuotaByPeriodKeysOperations; + /** The operation groups for quotaByCounterKeys */ + public readonly quotaByCounterKeys: QuotaByCounterKeysOperations; + /** The operation groups for product */ + public readonly product: ProductOperations; + /** The operation groups for portalSettings */ + public readonly portalSettings: PortalSettingsOperations; + /** The operation groups for policyRestrictionValidations */ + public readonly policyRestrictionValidations: PolicyRestrictionValidationsOperations; + /** The operation groups for policyDescription */ + public readonly policyDescription: PolicyDescriptionOperations; + /** The operation groups for outboundNetworkDependenciesEndpoints */ + public readonly outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpointsOperations; + /** The operation groups for networkStatus */ + public readonly networkStatus: NetworkStatusOperations; + /** The operation groups for apiManagementServiceSkus */ + public readonly apiManagementServiceSkus: ApiManagementServiceSkusOperations; + /** The operation groups for allPolicies */ + public readonly allPolicies: AllPoliciesOperations; + /** The operation groups for apiManagementService */ + public readonly apiManagementService: ApiManagementServiceOperations; + /** The operation groups for workspaceApiRevision */ + public readonly workspaceApiRevision: WorkspaceApiRevisionOperations; + /** The operation groups for operation */ + public readonly operation: OperationOperations; + /** The operation groups for apiProduct */ + public readonly apiProduct: ApiProductOperations; + /** The operation groups for apiRevision */ + public readonly apiRevision: ApiRevisionOperations; + /** The operation groups for api */ + public readonly api: ApiOperations; + /** The operation groups for apiManagementGatewaySkus */ + public readonly apiManagementGatewaySkus: ApiManagementGatewaySkusOperations; + /** The operation groups for apiGateway */ + public readonly apiGateway: ApiGatewayOperations; + /** The operation groups for apiManagementOperations */ + public readonly apiManagementOperations: ApiManagementOperationsOperations; + /** The operation groups for workspaceTagProductLink */ + public readonly workspaceTagProductLink: WorkspaceTagProductLinkOperations; + /** The operation groups for workspaceTagOperationLink */ + public readonly workspaceTagOperationLink: WorkspaceTagOperationLinkOperations; + /** The operation groups for workspaceTagApiLink */ + public readonly workspaceTagApiLink: WorkspaceTagApiLinkOperations; + /** The operation groups for workspaceSubscription */ + public readonly workspaceSubscription: WorkspaceSubscriptionOperations; + /** The operation groups for userSubscription */ + public readonly userSubscription: UserSubscriptionOperations; + /** The operation groups for workspaceGlobalSchema */ + public readonly workspaceGlobalSchema: WorkspaceGlobalSchemaOperations; + /** The operation groups for workspaceProductGroupLink */ + public readonly workspaceProductGroupLink: WorkspaceProductGroupLinkOperations; + /** The operation groups for workspaceProductApiLink */ + public readonly workspaceProductApiLink: WorkspaceProductApiLinkOperations; + /** The operation groups for workspaceProduct */ + public readonly workspaceProduct: WorkspaceProductOperations; + /** The operation groups for delegationSettings */ + public readonly delegationSettings: DelegationSettingsOperations; + /** The operation groups for signUpSettings */ + public readonly signUpSettings: SignUpSettingsOperations; + /** The operation groups for signInSettings */ + public readonly signInSettings: SignInSettingsOperations; + /** The operation groups for workspacePolicyFragment */ + public readonly workspacePolicyFragment: WorkspacePolicyFragmentOperations; + /** The operation groups for workspaceNotification */ + public readonly workspaceNotification: WorkspaceNotificationOperations; + /** The operation groups for workspaceNamedValue */ + public readonly workspaceNamedValue: WorkspaceNamedValueOperations; + /** The operation groups for workspaceLogger */ + public readonly workspaceLogger: WorkspaceLoggerOperations; + /** The operation groups for workspaceGroup */ + public readonly workspaceGroup: WorkspaceGroupOperations; + /** The operation groups for workspaceCertificate */ + public readonly workspaceCertificate: WorkspaceCertificateOperations; + /** The operation groups for workspaceBackend */ + public readonly workspaceBackend: WorkspaceBackendOperations; + /** The operation groups for workspaceApiVersionSet */ + public readonly workspaceApiVersionSet: WorkspaceApiVersionSetOperations; + /** The operation groups for productWiki */ + public readonly productWiki: ProductWikiOperations; + /** The operation groups for issue */ + public readonly issue: IssueOperations; + /** The operation groups for workspaceApiDiagnostic */ + public readonly workspaceApiDiagnostic: WorkspaceApiDiagnosticOperations; + /** The operation groups for workspaceDiagnostic */ + public readonly workspaceDiagnostic: WorkspaceDiagnosticOperations; + /** The operation groups for diagnostic */ + public readonly diagnostic: DiagnosticOperations; + /** The operation groups for workspaceApiSchema */ + public readonly workspaceApiSchema: WorkspaceApiSchemaOperations; + /** The operation groups for workspaceTag */ + public readonly workspaceTag: WorkspaceTagOperations; + /** The operation groups for tag */ + public readonly tag: TagOperations; + /** The operation groups for workspaceProductPolicy */ + public readonly workspaceProductPolicy: WorkspaceProductPolicyOperations; + /** The operation groups for workspaceApiPolicy */ + public readonly workspaceApiPolicy: WorkspaceApiPolicyOperations; + /** The operation groups for workspaceApiOperationPolicy */ + public readonly workspaceApiOperationPolicy: WorkspaceApiOperationPolicyOperations; + /** The operation groups for workspacePolicy */ + public readonly workspacePolicy: WorkspacePolicyOperations; + /** The operation groups for productPolicy */ + public readonly productPolicy: ProductPolicyOperations; + /** The operation groups for policy */ + public readonly policy: PolicyOperations; + /** The operation groups for apiPolicy */ + public readonly apiPolicy: ApiPolicyOperations; + /** The operation groups for graphQLApiResolverPolicy */ + public readonly graphQLApiResolverPolicy: GraphQLApiResolverPolicyOperations; + /** The operation groups for workspaceApiOperation */ + public readonly workspaceApiOperation: WorkspaceApiOperationOperations; + /** The operation groups for workspaceApiRelease */ + public readonly workspaceApiRelease: WorkspaceApiReleaseOperations; + /** The operation groups for apiManagementServiceResources */ + public readonly apiManagementServiceResources: ApiManagementServiceResourcesOperations; + /** The operation groups for workspaceApi */ + public readonly workspaceApi: WorkspaceApiOperations; } -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const performConnectivityCheckAsyncOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ConnectivityCheckResponse, - }, - 201: { - bodyMapper: Mappers.ConnectivityCheckResponse, - }, - 202: { - bodyMapper: Mappers.ConnectivityCheckResponse, - }, - 204: { - bodyMapper: Mappers.ConnectivityCheckResponse, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.connectivityCheckRequestParams, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/allPolicies/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/allPolicies/index.ts new file mode 100644 index 000000000000..696aa7d68526 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/allPolicies/index.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/allPolicies/operations.js"; +import { AllPoliciesListByServiceOptionalParams } from "../../api/allPolicies/options.js"; +import { AllPoliciesContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AllPolicies operations. */ +export interface AllPoliciesOperations { + /** Status of all policies of API Management services. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AllPoliciesListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getAllPolicies(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AllPoliciesListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getAllPoliciesOperations(context: ApiManagementContext): AllPoliciesOperations { + return { + ..._getAllPolicies(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/api/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/api/index.ts new file mode 100644 index 000000000000..c89b8d5bebfa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/api/index.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByTags, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/api/operations.js"; +import { + ApiListByTagsOptionalParams, + ApiListByServiceOptionalParams, + ApiDeleteOptionalParams, + ApiUpdateOptionalParams, + ApiCreateOrUpdateOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetOptionalParams, +} from "../../api/api/options.js"; +import { + ApiContract, + ApiCreateOrUpdateParameter, + ApiUpdateContract, + TagResourceContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a Api operations. */ +export interface ApiOperations { + /** Lists a collection of apis associated with tags. */ + listByTags: ( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists all APIs of the API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API of the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => Promise; + /** Updates the specified API of the API Management service instance. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams, + ) => Promise; + /** Creates new or updates existing specified API of the API Management service instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => PollerLike, ApiContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => Promise, ApiContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams, + ) => Promise; +} + +function _getApi(context: ApiManagementContext) { + return { + listByTags: ( + resourceGroupName: string, + serviceName: string, + options?: ApiListByTagsOptionalParams, + ) => listByTags(context, resourceGroupName, serviceName, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, ifMatch, options), + beginDelete: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceName, apiId, ifMatch, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceName, apiId, ifMatch, options); + }, + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: ApiUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, apiId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, apiId, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: ApiCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getApiOperations(context: ApiManagementContext): ApiOperations { + return { + ..._getApi(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiDiagnostic/index.ts new file mode 100644 index 000000000000..9466e779b6ba --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiDiagnostic/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiDiagnostic/operations.js"; +import { + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetOptionalParams, +} from "../../api/apiDiagnostic/options.js"; +import { DiagnosticContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiDiagnostic operations. */ +export interface ApiDiagnosticOperations { + /** Lists all diagnostics of an API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Diagnostic from an API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Diagnostic for an API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams, + ) => Promise; + /** Creates a new Diagnostic for an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Diagnostic for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams, + ) => Promise; +} + +function _getApiDiagnostic(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiDiagnosticListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: ApiDiagnosticDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: ApiDiagnosticCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + diagnosticId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, diagnosticId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + diagnosticId: string, + options?: ApiDiagnosticGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, diagnosticId, options), + }; +} + +export function _getApiDiagnosticOperations( + context: ApiManagementContext, +): ApiDiagnosticOperations { + return { + ..._getApiDiagnostic(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiExport/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiExport/index.ts new file mode 100644 index 000000000000..b0ed061bc1a4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiExport/index.ts @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { get } from "../../api/apiExport/operations.js"; +import { ApiExportGetOptionalParams } from "../../api/apiExport/options.js"; +import { ApiExportResult, ExportFormat, ExportApi } from "../../models/models.js"; + +/** Interface representing a ApiExport operations. */ +export interface ApiExportOperations { + /** Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams, + ) => Promise; +} + +function _getApiExport(context: ApiManagementContext) { + return { + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: ApiExportGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, format, exportParam, options), + }; +} + +export function _getApiExportOperations(context: ApiManagementContext): ApiExportOperations { + return { + ..._getApiExport(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiGateway/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiGateway/index.ts new file mode 100644 index 000000000000..c004c0ea70d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiGateway/index.ts @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + list, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/apiGateway/operations.js"; +import { + ApiGatewayListOptionalParams, + ApiGatewayListByResourceGroupOptionalParams, + ApiGatewayDeleteOptionalParams, + ApiGatewayUpdateOptionalParams, + ApiGatewayCreateOrUpdateOptionalParams, + ApiGatewayGetOptionalParams, +} from "../../api/apiGateway/options.js"; +import { + ApiManagementGatewayResource, + ApiManagementGatewayUpdateParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiGateway operations. */ +export interface ApiGatewayOperations { + /** List all API Management gateways within a subscription. */ + list: ( + options?: ApiGatewayListOptionalParams, + ) => PagedAsyncIterableIterator; + /** List all API Management gateways within a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ApiGatewayListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an existing API Management gateway. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => PollerLike, ApiManagementGatewayResource>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementGatewayResource> + >; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => Promise; + /** Updates an existing API Management gateway. */ + update: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => PollerLike, ApiManagementGatewayResource>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementGatewayResource> + >; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => Promise; + /** Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => PollerLike, ApiManagementGatewayResource>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementGatewayResource> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets an API Management gateway resource description. */ + get: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayGetOptionalParams, + ) => Promise; +} + +function _getApiGateway(context: ApiManagementContext) { + return { + list: (options?: ApiGatewayListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ApiGatewayListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, gatewayName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, gatewayName, options); + }, + update: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => update(context, resourceGroupName, gatewayName, parameters, options), + beginUpdate: async ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, gatewayName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayUpdateParameters, + options?: ApiGatewayUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, gatewayName, parameters, options); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, gatewayName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, gatewayName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + parameters: ApiManagementGatewayResource, + options?: ApiGatewayCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, gatewayName, parameters, options); + }, + get: (resourceGroupName: string, gatewayName: string, options?: ApiGatewayGetOptionalParams) => + get(context, resourceGroupName, gatewayName, options), + }; +} + +export function _getApiGatewayOperations(context: ApiManagementContext): ApiGatewayOperations { + return { + ..._getApiGateway(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayConfigConnection/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayConfigConnection/index.ts new file mode 100644 index 000000000000..4bb7d7576c20 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayConfigConnection/index.ts @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByGateway, + $delete, + createOrUpdate, + get, +} from "../../api/apiGatewayConfigConnection/operations.js"; +import { + ApiGatewayConfigConnectionListByGatewayOptionalParams, + ApiGatewayConfigConnectionDeleteOptionalParams, + ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ApiGatewayConfigConnectionGetOptionalParams, +} from "../../api/apiGatewayConfigConnection/options.js"; +import { ApiManagementGatewayConfigConnectionResource } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiGatewayConfigConnection operations. */ +export interface ApiGatewayConfigConnectionOperations { + /** List all API Management gateway config connections within a gateway. */ + listByGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an existing API Management gateway config connection. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => Promise; + /** Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => PollerLike< + OperationState, + ApiManagementGatewayConfigConnectionResource + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike< + OperationState, + ApiManagementGatewayConfigConnectionResource + > + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets an API Management gateway config connection resource description. */ + get: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + options?: ApiGatewayConfigConnectionGetOptionalParams, + ) => Promise; +} + +function _getApiGatewayConfigConnection(context: ApiManagementContext) { + return { + listByGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, + ) => listByGateway(context, resourceGroupName, gatewayName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, configConnectionName, ifMatch, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + gatewayName, + configConnectionName, + ifMatch, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + ifMatch: string, + options?: ApiGatewayConfigConnectionDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + gatewayName, + configConnectionName, + ifMatch, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + gatewayName, + configConnectionName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + configConnectionName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + parameters: ApiManagementGatewayConfigConnectionResource, + options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + configConnectionName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + gatewayName: string, + configConnectionName: string, + options?: ApiGatewayConfigConnectionGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, configConnectionName, options), + }; +} + +export function _getApiGatewayConfigConnectionOperations( + context: ApiManagementContext, +): ApiGatewayConfigConnectionOperations { + return { + ..._getApiGatewayConfigConnection(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayHostnameBinding/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayHostnameBinding/index.ts new file mode 100644 index 000000000000..584ed82b215e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiGatewayHostnameBinding/index.ts @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listByGateway, + $delete, + createOrUpdate, + get, +} from "../../api/apiGatewayHostnameBinding/operations.js"; +import { + ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ApiGatewayHostnameBindingListByGatewayOptionalParams, + ApiGatewayHostnameBindingDeleteOptionalParams, + ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ApiGatewayHostnameBindingGetOptionalParams, +} from "../../api/apiGatewayHostnameBinding/options.js"; +import { GatewayHostnameBindingResource } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiGatewayHostnameBinding operations. */ +export interface ApiGatewayHostnameBindingOperations { + /** Refresh the secret for an API Management gateway hostname binding. */ + refreshSecret: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => PollerLike, void>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecret: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => Promise, void>>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecretAndWait: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => Promise; + /** List all API Management gateway hostname bindings within a gateway. */ + listByGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayHostnameBindingListByGatewayOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an existing API Management gateway hostname binding. */ + delete: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => Promise; + /** Creates or updates an API Management gateway hostname binding. This is long running operation and could take several minutes to complete. */ + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => PollerLike, GatewayHostnameBindingResource>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, GatewayHostnameBindingResource> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets an API Management gateway hostname binding resource description. */ + get: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingGetOptionalParams, + ) => Promise; +} + +function _getApiGatewayHostnameBinding(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => refreshSecret(context, resourceGroupName, gatewayName, hostnameBindingName, options), + beginRefreshSecret: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => { + const poller = refreshSecret( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRefreshSecretAndWait: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ) => { + return await refreshSecret( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + options, + ); + }, + listByGateway: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiGatewayHostnameBindingListByGatewayOptionalParams, + ) => listByGateway(context, resourceGroupName, gatewayName, options), + delete: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => $delete(context, resourceGroupName, gatewayName, hostnameBindingName, ifMatch, options), + beginDelete: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + ifMatch, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + ifMatch: string, + options?: ApiGatewayHostnameBindingDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + ifMatch, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + parameters: GatewayHostnameBindingResource, + options?: ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + gatewayName, + hostnameBindingName, + parameters, + options, + ); + }, + get: ( + resourceGroupName: string, + gatewayName: string, + hostnameBindingName: string, + options?: ApiGatewayHostnameBindingGetOptionalParams, + ) => get(context, resourceGroupName, gatewayName, hostnameBindingName, options), + }; +} + +export function _getApiGatewayHostnameBindingOperations( + context: ApiManagementContext, +): ApiGatewayHostnameBindingOperations { + return { + ..._getApiGatewayHostnameBinding(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiIssue/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssue/index.ts new file mode 100644 index 000000000000..074fbe5e053d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssue/index.ts @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiIssue/operations.js"; +import { + ApiIssueListByServiceOptionalParams, + ApiIssueDeleteOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetOptionalParams, +} from "../../api/apiIssue/options.js"; +import { IssueContract, IssueUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiIssue operations. */ +export interface ApiIssueOperations { + /** Lists all issues associated with the specified API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Issue from an API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams, + ) => Promise; + /** Updates an existing issue for an API. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams, + ) => Promise; + /** Creates a new Issue for an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Issue for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Issue for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams, + ) => Promise; +} + +function _getApiIssue(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiIssueListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + options?: ApiIssueDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, issueId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + ifMatch: string, + parameters: IssueUpdateContract, + options?: ApiIssueUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, apiId, issueId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + parameters: IssueContract, + options?: ApiIssueCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, apiId, issueId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, issueId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, issueId, options), + }; +} + +export function _getApiIssueOperations(context: ApiManagementContext): ApiIssueOperations { + return { + ..._getApiIssue(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueAttachment/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueAttachment/index.ts new file mode 100644 index 000000000000..6e56c0b2cab9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueAttachment/index.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiIssueAttachment/operations.js"; +import { + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetOptionalParams, +} from "../../api/apiIssueAttachment/options.js"; +import { IssueAttachmentContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiIssueAttachment operations. */ +export interface ApiIssueAttachmentOperations { + /** Lists all attachments for the Issue associated with the specified API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified comment from an Issue. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams, + ) => Promise; + /** Creates a new Attachment for the Issue in an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the issue Attachment for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams, + ) => Promise; +} + +function _getApiIssueAttachment(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueAttachmentListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, issueId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + ifMatch: string, + options?: ApiIssueAttachmentDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + parameters: IssueAttachmentContract, + options?: ApiIssueAttachmentCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + attachmentId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, apiId, issueId, attachmentId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + attachmentId: string, + options?: ApiIssueAttachmentGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, issueId, attachmentId, options), + }; +} + +export function _getApiIssueAttachmentOperations( + context: ApiManagementContext, +): ApiIssueAttachmentOperations { + return { + ..._getApiIssueAttachment(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueComment/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueComment/index.ts new file mode 100644 index 000000000000..19e915d01c00 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiIssueComment/index.ts @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiIssueComment/operations.js"; +import { + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetOptionalParams, +} from "../../api/apiIssueComment/options.js"; +import { IssueCommentContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiIssueComment operations. */ +export interface ApiIssueCommentOperations { + /** Lists all comments for the Issue associated with the specified API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified comment from an Issue. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams, + ) => Promise; + /** Creates a new Comment for the Issue in an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the issue Comment for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams, + ) => Promise; +} + +function _getApiIssueComment(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + options?: ApiIssueCommentListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, issueId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + ifMatch: string, + options?: ApiIssueCommentDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, apiId, issueId, commentId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + parameters: IssueCommentContract, + options?: ApiIssueCommentCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + issueId, + commentId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, issueId, commentId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + issueId: string, + commentId: string, + options?: ApiIssueCommentGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, issueId, commentId, options), + }; +} + +export function _getApiIssueCommentOperations( + context: ApiManagementContext, +): ApiIssueCommentOperations { + return { + ..._getApiIssueComment(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementGatewaySkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementGatewaySkus/index.ts new file mode 100644 index 000000000000..29fdb5016078 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementGatewaySkus/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listAvailableSkus } from "../../api/apiManagementGatewaySkus/operations.js"; +import { ApiManagementGatewaySkusListAvailableSkusOptionalParams } from "../../api/apiManagementGatewaySkus/options.js"; +import { GatewayResourceSkuResult } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiManagementGatewaySkus operations. */ +export interface ApiManagementGatewaySkusOperations { + /** Gets all available SKU for a given API Management gateway */ + listAvailableSkus: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiManagementGatewaySkus(context: ApiManagementContext) { + return { + listAvailableSkus: ( + resourceGroupName: string, + gatewayName: string, + options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, + ) => listAvailableSkus(context, resourceGroupName, gatewayName, options), + }; +} + +export function _getApiManagementGatewaySkusOperations( + context: ApiManagementContext, +): ApiManagementGatewaySkusOperations { + return { + ..._getApiManagementGatewaySkus(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementOperations/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementOperations/index.ts new file mode 100644 index 000000000000..d2ada3af7e3f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementOperations/index.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/apiManagementOperations/operations.js"; +import { ApiManagementOperationsListOptionalParams } from "../../api/apiManagementOperations/options.js"; +import { Operation } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiManagementOperations operations. */ +export interface ApiManagementOperationsOperations { + /** Lists all of the available REST API operations of the Microsoft.ApiManagement provider. */ + list: ( + options?: ApiManagementOperationsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiManagementOperations(context: ApiManagementContext) { + return { + list: (options?: ApiManagementOperationsListOptionalParams) => list(context, options), + }; +} + +export function _getApiManagementOperationsOperations( + context: ApiManagementContext, +): ApiManagementOperationsOperations { + return { + ..._getApiManagementOperations(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementService/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementService/index.ts new file mode 100644 index 000000000000..e939226f96d5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementService/index.ts @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + getDomainOwnershipIdentifier, + checkNameAvailability, + refreshHostnames, + applyNetworkConfigurationUpdates, + getSsoToken, + migrateToStv2, + backup, + restore, + list, + listByResourceGroup, + $delete, + update, + createOrUpdate, + get, +} from "../../api/apiManagementService/operations.js"; +import { + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceRefreshHostnamesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceGetOptionalParams, +} from "../../api/apiManagementService/options.js"; +import { + ApiManagementServiceResource, + ApiManagementServiceUpdateParameters, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceGetSsoTokenResult, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceNameAvailabilityResult, + ApiManagementServiceGetDomainOwnershipIdentifierResult, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiManagementService operations. */ +export interface ApiManagementServiceOperations { + /** Get the custom domain ownership identifier for an API Management service. */ + getDomainOwnershipIdentifier: ( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ) => Promise; + /** Checks availability and correctness of a name for an API Management service. */ + checkNameAvailability: ( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams, + ) => Promise; + /** Force Refresh the SSL certificate attached to the Custom Hostnames configured using secret from KeyVault on the Api Management service. */ + refreshHostnames: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use refreshHostnames instead */ + beginRefreshHostnames: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use refreshHostnames instead */ + beginRefreshHostnamesAndWait: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => Promise; + /** Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. */ + applyNetworkConfigurationUpdates: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use applyNetworkConfigurationUpdates instead */ + beginApplyNetworkConfigurationUpdates: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use applyNetworkConfigurationUpdates instead */ + beginApplyNetworkConfigurationUpdatesAndWait: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => Promise; + /** Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. */ + getSsoToken: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams, + ) => Promise; + /** Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. */ + migrateToStv2: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use migrateToStv2 instead */ + beginMigrateToStv2: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use migrateToStv2 instead */ + beginMigrateToStv2AndWait: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => Promise; + /** Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. */ + backup: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use backup instead */ + beginBackup: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use backup instead */ + beginBackupAndWait: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => Promise; + /** Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. */ + restore: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use restore instead */ + beginRestore: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use restore instead */ + beginRestoreAndWait: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => Promise; + /** Lists all API Management services within an Azure subscription. */ + list: ( + options?: ApiManagementServiceListOptionalParams, + ) => PagedAsyncIterableIterator; + /** List all API Management services within a resource group. */ + listByResourceGroup: ( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes an existing API Management service. */ + delete: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => Promise; + /** Updates an existing API Management service. */ + update: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => Promise; + /** Creates or updates an API Management service. This is long running operation and could take several minutes to complete. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => PollerLike, ApiManagementServiceResource>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, ApiManagementServiceResource> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets an API Management service resource description. */ + get: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams, + ) => Promise; +} + +function _getApiManagementService(context: ApiManagementContext) { + return { + getDomainOwnershipIdentifier: ( + options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ) => getDomainOwnershipIdentifier(context, options), + checkNameAvailability: ( + parameters: ApiManagementServiceCheckNameAvailabilityParameters, + options?: ApiManagementServiceCheckNameAvailabilityOptionalParams, + ) => checkNameAvailability(context, parameters, options), + refreshHostnames: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => refreshHostnames(context, resourceGroupName, serviceName, options), + beginRefreshHostnames: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => { + const poller = refreshHostnames(context, resourceGroupName, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRefreshHostnamesAndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceRefreshHostnamesOptionalParams, + ) => { + return await refreshHostnames(context, resourceGroupName, serviceName, options); + }, + applyNetworkConfigurationUpdates: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => applyNetworkConfigurationUpdates(context, resourceGroupName, serviceName, options), + beginApplyNetworkConfigurationUpdates: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => { + const poller = applyNetworkConfigurationUpdates( + context, + resourceGroupName, + serviceName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginApplyNetworkConfigurationUpdatesAndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ) => { + return await applyNetworkConfigurationUpdates( + context, + resourceGroupName, + serviceName, + options, + ); + }, + getSsoToken: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetSsoTokenOptionalParams, + ) => getSsoToken(context, resourceGroupName, serviceName, options), + migrateToStv2: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => migrateToStv2(context, resourceGroupName, serviceName, options), + beginMigrateToStv2: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => { + const poller = migrateToStv2(context, resourceGroupName, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginMigrateToStv2AndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceMigrateToStv2OptionalParams, + ) => { + return await migrateToStv2(context, resourceGroupName, serviceName, options); + }, + backup: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => backup(context, resourceGroupName, serviceName, parameters, options), + beginBackup: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => { + const poller = backup(context, resourceGroupName, serviceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginBackupAndWait: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceBackupOptionalParams, + ) => { + return await backup(context, resourceGroupName, serviceName, parameters, options); + }, + restore: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => restore(context, resourceGroupName, serviceName, parameters, options), + beginRestore: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => { + const poller = restore(context, resourceGroupName, serviceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRestoreAndWait: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceBackupRestoreParameters, + options?: ApiManagementServiceRestoreOptionalParams, + ) => { + return await restore(context, resourceGroupName, serviceName, parameters, options); + }, + list: (options?: ApiManagementServiceListOptionalParams) => list(context, options), + listByResourceGroup: ( + resourceGroupName: string, + options?: ApiManagementServiceListByResourceGroupOptionalParams, + ) => listByResourceGroup(context, resourceGroupName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, options), + beginDelete: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceName, options); + }, + update: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, parameters, options), + beginUpdate: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => { + const poller = update(context, resourceGroupName, serviceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceUpdateParameters, + options?: ApiManagementServiceUpdateOptionalParams, + ) => { + return await update(context, resourceGroupName, serviceName, parameters, options); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate(context, resourceGroupName, serviceName, parameters, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + parameters: ApiManagementServiceResource, + options?: ApiManagementServiceCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, serviceName, parameters, options); + }, + get: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, options), + }; +} + +export function _getApiManagementServiceOperations( + context: ApiManagementContext, +): ApiManagementServiceOperations { + return { + ..._getApiManagementService(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceResources/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceResources/index.ts new file mode 100644 index 000000000000..eb8e1e67297f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceResources/index.ts @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { performConnectivityCheckAsync } from "../../api/apiManagementServiceResources/operations.js"; +import { ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams } from "../../api/apiManagementServiceResources/options.js"; +import { ConnectivityCheckRequest, ConnectivityCheckResponse } from "../../models/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiManagementServiceResources operations. */ +export interface ApiManagementServiceResourcesOperations { + /** Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. */ + performConnectivityCheckAsync: ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => PollerLike, ConnectivityCheckResponse>; + /** @deprecated use performConnectivityCheckAsync instead */ + beginPerformConnectivityCheckAsync: ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => Promise< + SimplePollerLike, ConnectivityCheckResponse> + >; + /** @deprecated use performConnectivityCheckAsync instead */ + beginPerformConnectivityCheckAsyncAndWait: ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => Promise; +} + +function _getApiManagementServiceResources(context: ApiManagementContext) { + return { + performConnectivityCheckAsync: ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => + performConnectivityCheckAsync( + context, + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options, + ), + beginPerformConnectivityCheckAsync: async ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => { + const poller = performConnectivityCheckAsync( + context, + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPerformConnectivityCheckAsyncAndWait: async ( + resourceGroupName: string, + serviceName: string, + connectivityCheckRequestParams: ConnectivityCheckRequest, + options?: ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams, + ) => { + return await performConnectivityCheckAsync( + context, + resourceGroupName, + serviceName, + connectivityCheckRequestParams, + options, + ); + }, + }; +} + +export function _getApiManagementServiceResourcesOperations( + context: ApiManagementContext, +): ApiManagementServiceResourcesOperations { + return { + ..._getApiManagementServiceResources(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceSkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceSkus/index.ts new file mode 100644 index 000000000000..e3a53e5dce43 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementServiceSkus/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listAvailableServiceSkus } from "../../api/apiManagementServiceSkus/operations.js"; +import { ApiManagementServiceSkusListAvailableServiceSkusOptionalParams } from "../../api/apiManagementServiceSkus/options.js"; +import { ResourceSkuResult } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiManagementServiceSkus operations. */ +export interface ApiManagementServiceSkusOperations { + /** Gets all available SKU for a given API Management service */ + listAvailableServiceSkus: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiManagementServiceSkus(context: ApiManagementContext) { + return { + listAvailableServiceSkus: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, + ) => listAvailableServiceSkus(context, resourceGroupName, serviceName, options), + }; +} + +export function _getApiManagementServiceSkusOperations( + context: ApiManagementContext, +): ApiManagementServiceSkusOperations { + return { + ..._getApiManagementServiceSkus(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementSkus/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementSkus/index.ts new file mode 100644 index 000000000000..b32f50b453d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementSkus/index.ts @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/apiManagementSkus/operations.js"; +import { ApiManagementSkusListOptionalParams } from "../../api/apiManagementSkus/options.js"; +import { ApiManagementSku } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiManagementSkus operations. */ +export interface ApiManagementSkusOperations { + /** Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. */ + list: ( + options?: ApiManagementSkusListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiManagementSkus(context: ApiManagementContext) { + return { + list: (options?: ApiManagementSkusListOptionalParams) => list(context, options), + }; +} + +export function _getApiManagementSkusOperations( + context: ApiManagementContext, +): ApiManagementSkusOperations { + return { + ..._getApiManagementSkus(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLink/index.ts new file mode 100644 index 000000000000..ac24fd9e9e44 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLink/index.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { get } from "../../api/apiManagementWorkspaceLink/operations.js"; +import { ApiManagementWorkspaceLinkGetOptionalParams } from "../../api/apiManagementWorkspaceLink/options.js"; +import { ApiManagementWorkspaceLinksResource } from "../../models/models.js"; + +/** Interface representing a ApiManagementWorkspaceLink operations. */ +export interface ApiManagementWorkspaceLinkOperations { + /** Gets an API Management WorkspaceLink resource description. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: ApiManagementWorkspaceLinkGetOptionalParams, + ) => Promise; +} + +function _getApiManagementWorkspaceLink(context: ApiManagementContext) { + return { + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: ApiManagementWorkspaceLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, options), + }; +} + +export function _getApiManagementWorkspaceLinkOperations( + context: ApiManagementContext, +): ApiManagementWorkspaceLinkOperations { + return { + ..._getApiManagementWorkspaceLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLinks/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLinks/index.ts new file mode 100644 index 000000000000..8420f0f67b3f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiManagementWorkspaceLinks/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/apiManagementWorkspaceLinks/operations.js"; +import { ApiManagementWorkspaceLinksListByServiceOptionalParams } from "../../api/apiManagementWorkspaceLinks/options.js"; +import { ApiManagementWorkspaceLinksResource } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiManagementWorkspaceLinks operations. */ +export interface ApiManagementWorkspaceLinksOperations { + /** List all API Management workspaceLinks for a service. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiManagementWorkspaceLinks(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getApiManagementWorkspaceLinksOperations( + context: ApiManagementContext, +): ApiManagementWorkspaceLinksOperations { + return { + ..._getApiManagementWorkspaceLinks(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiOperation/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiOperation/index.ts new file mode 100644 index 000000000000..1ba15953f0ac --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiOperation/index.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiOperation/operations.js"; +import { + ApiOperationListByApiOptionalParams, + ApiOperationDeleteOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetOptionalParams, +} from "../../api/apiOperation/options.js"; +import { OperationContract, OperationUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiOperation operations. */ +export interface ApiOperationOperations { + /** Lists a collection of the operations for the specified API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified operation in the API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams, + ) => Promise; + /** Updates the details of the operation in the API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams, + ) => Promise; + /** Creates a new operation in the API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API operation specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the API Operation specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams, + ) => Promise; +} + +function _getApiOperation(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiOperationListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: ApiOperationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, operationId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: ApiOperationUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: ApiOperationCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, operationId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, operationId, options), + }; +} + +export function _getApiOperationOperations(context: ApiManagementContext): ApiOperationOperations { + return { + ..._getApiOperation(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiOperationPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiOperationPolicy/index.ts new file mode 100644 index 000000000000..fee8bba2a67a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiOperationPolicy/index.ts @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByOperation, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiOperationPolicy/operations.js"; +import { + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetOptionalParams, +} from "../../api/apiOperationPolicy/options.js"; +import { PolicyContract, PolicyIdName, PolicyCollection } from "../../models/models.js"; + +/** Interface representing a ApiOperationPolicy operations. */ +export interface ApiOperationPolicyOperations { + /** Get the list of policy configuration at the API Operation level. */ + listByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams, + ) => Promise; + /** Deletes the policy configuration at the Api Operation. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the API Operation level. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the API Operation level. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams, + ) => Promise; +} + +function _getApiOperationPolicy(context: ApiManagementContext) { + return { + listByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: ApiOperationPolicyListByOperationOptionalParams, + ) => listByOperation(context, resourceGroupName, serviceName, apiId, operationId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiOperationPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiOperationPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, apiId, operationId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: ApiOperationPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, operationId, policyId, options), + }; +} + +export function _getApiOperationPolicyOperations( + context: ApiManagementContext, +): ApiOperationPolicyOperations { + return { + ..._getApiOperationPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiPolicy/index.ts new file mode 100644 index 000000000000..1a6077c48084 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiPolicy/index.ts @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiPolicy/operations.js"; +import { + ApiPolicyListByApiOptionalParams, + ApiPolicyDeleteOptionalParams, + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetOptionalParams, +} from "../../api/apiPolicy/options.js"; +import { PolicyContract, PolicyIdName, PolicyCollection } from "../../models/models.js"; + +/** Interface representing a ApiPolicy operations. */ +export interface ApiPolicyOperations { + /** Get the policy configuration at the API level. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams, + ) => Promise; + /** Deletes the policy configuration at the Api. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the API level. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams, + ) => Promise; +} + +function _getApiPolicy(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiPolicyListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ApiPolicyDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, policyId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ApiPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, apiId, policyId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + policyId: PolicyIdName, + options?: ApiPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, policyId, options), + }; +} + +export function _getApiPolicyOperations(context: ApiManagementContext): ApiPolicyOperations { + return { + ..._getApiPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiProduct/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiProduct/index.ts new file mode 100644 index 000000000000..3991d519cbad --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiProduct/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByApis } from "../../api/apiProduct/operations.js"; +import { ApiProductListByApisOptionalParams } from "../../api/apiProduct/options.js"; +import { ProductContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiProduct operations. */ +export interface ApiProductOperations { + /** Lists all Products, which the API is part of. */ + listByApis: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiProduct(context: ApiManagementContext) { + return { + listByApis: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiProductListByApisOptionalParams, + ) => listByApis(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getApiProductOperations(context: ApiManagementContext): ApiProductOperations { + return { + ..._getApiProduct(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiRelease/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiRelease/index.ts new file mode 100644 index 000000000000..2840f202fd1d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiRelease/index.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiRelease/operations.js"; +import { + ApiReleaseListByServiceOptionalParams, + ApiReleaseDeleteOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetOptionalParams, +} from "../../api/apiRelease/options.js"; +import { ApiReleaseContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiRelease operations. */ +export interface ApiReleaseOperations { + /** Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified release in the API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams, + ) => Promise; + /** Updates the details of the release of the API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams, + ) => Promise; + /** Creates a new Release for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams, + ) => Promise; + /** Returns the etag of an API release. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams, + ) => Promise; + /** Returns the details of an API release. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams, + ) => Promise; +} + +function _getApiRelease(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiReleaseListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: ApiReleaseDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, releaseId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: ApiReleaseUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: ApiReleaseCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + releaseId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, releaseId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + releaseId: string, + options?: ApiReleaseGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, releaseId, options), + }; +} + +export function _getApiReleaseOperations(context: ApiManagementContext): ApiReleaseOperations { + return { + ..._getApiRelease(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiRevision/index.ts new file mode 100644 index 000000000000..083d20dd7271 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiRevision/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/apiRevision/operations.js"; +import { ApiRevisionListByServiceOptionalParams } from "../../api/apiRevision/options.js"; +import { ApiRevisionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiRevision operations. */ +export interface ApiRevisionOperations { + /** Lists all revisions of an API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiRevision(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiRevisionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getApiRevisionOperations(context: ApiManagementContext): ApiRevisionOperations { + return { + ..._getApiRevision(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiSchema/index.ts new file mode 100644 index 000000000000..9c42d3215ff5 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiSchema/index.ts @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiSchema/operations.js"; +import { + ApiSchemaListByApiOptionalParams, + ApiSchemaDeleteOptionalParams, + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetOptionalParams, +} from "../../api/apiSchema/options.js"; +import { SchemaContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a ApiSchema operations. */ +export interface ApiSchemaOperations { + /** Get the schema configuration at the API level. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the schema configuration at the Api. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams, + ) => Promise; + /** Creates or updates schema configuration for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => PollerLike, SchemaContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => Promise, SchemaContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the schema specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams, + ) => Promise; + /** Get the schema configuration at the API level. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams, + ) => Promise; +} + +function _getApiSchema(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiSchemaListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: ApiSchemaDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, schemaId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, apiId, schemaId, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: ApiSchemaCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + schemaId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, schemaId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + schemaId: string, + options?: ApiSchemaGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, schemaId, options), + }; +} + +export function _getApiSchemaOperations(context: ApiManagementContext): ApiSchemaOperations { + return { + ..._getApiSchema(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiTagDescription/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiTagDescription/index.ts new file mode 100644 index 000000000000..7d6c8cacbb12 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiTagDescription/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiTagDescription/operations.js"; +import { + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetOptionalParams, +} from "../../api/apiTagDescription/options.js"; +import { TagDescriptionContract, TagDescriptionCreateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiTagDescription operations. */ +export interface ApiTagDescriptionOperations { + /** Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations */ + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete tag description for the Api. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams, + ) => Promise; + /** Create/Update tag description in scope of the Api. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams, + ) => Promise; + /** Get Tag description in scope of API */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams, + ) => Promise; +} + +function _getApiTagDescription(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiTagDescriptionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + ifMatch: string, + options?: ApiTagDescriptionDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, apiId, tagDescriptionId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + parameters: TagDescriptionCreateParameters, + options?: ApiTagDescriptionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + tagDescriptionId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, tagDescriptionId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagDescriptionId: string, + options?: ApiTagDescriptionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, tagDescriptionId, options), + }; +} + +export function _getApiTagDescriptionOperations( + context: ApiManagementContext, +): ApiTagDescriptionOperations { + return { + ..._getApiTagDescription(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiTool/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiTool/index.ts new file mode 100644 index 000000000000..e9da31dd75bc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiTool/index.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiTool/operations.js"; +import { + ApiToolListByApiOptionalParams, + ApiToolDeleteOptionalParams, + ApiToolUpdateOptionalParams, + ApiToolCreateOrUpdateOptionalParams, + ApiToolGetEntityTagOptionalParams, + ApiToolGetOptionalParams, +} from "../../api/apiTool/options.js"; +import { ToolContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiTool operations. */ +export interface ApiToolOperations { + /** Lists a collection of the MCP tools for the specified API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiToolListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified tool in the API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolDeleteOptionalParams, + ) => Promise; + /** Updates the details of the tool in the API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options?: ApiToolUpdateOptionalParams, + ) => Promise; + /** Creates a new tool in the API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options?: ApiToolCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API tool specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the API Tool specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolGetOptionalParams, + ) => Promise; +} + +function _getApiTool(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiToolListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, toolId, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options?: ApiToolUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, apiId, toolId, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + parameters: ToolContract, + options?: ApiToolCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, apiId, toolId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, toolId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + toolId: string, + options?: ApiToolGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, toolId, options), + }; +} + +export function _getApiToolOperations(context: ApiManagementContext): ApiToolOperations { + return { + ..._getApiTool(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiVersionSet/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiVersionSet/index.ts new file mode 100644 index 000000000000..8aa3cc21a335 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiVersionSet/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiVersionSet/operations.js"; +import { + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetOptionalParams, +} from "../../api/apiVersionSet/options.js"; +import { ApiVersionSetContract, ApiVersionSetUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiVersionSet operations. */ +export interface ApiVersionSetOperations { + /** Lists a collection of API Version Sets in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Api Version Set. */ + delete: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Api VersionSet specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a Api Version Set. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Api Version Set specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams, + ) => Promise; +} + +function _getApiVersionSet(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ApiVersionSetListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + options?: ApiVersionSetDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, versionSetId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: ApiVersionSetUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, versionSetId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: ApiVersionSetCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, versionSetId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, versionSetId, options), + get: ( + resourceGroupName: string, + serviceName: string, + versionSetId: string, + options?: ApiVersionSetGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, versionSetId, options), + }; +} + +export function _getApiVersionSetOperations( + context: ApiManagementContext, +): ApiVersionSetOperations { + return { + ..._getApiVersionSet(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiWiki/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiWiki/index.ts new file mode 100644 index 000000000000..4121bb07b90d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiWiki/index.ts @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/apiWiki/operations.js"; +import { + ApiWikiDeleteOptionalParams, + ApiWikiUpdateOptionalParams, + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetOptionalParams, +} from "../../api/apiWiki/options.js"; +import { WikiContract, WikiUpdateContract } from "../../models/models.js"; + +/** Interface representing a ApiWiki operations. */ +export interface ApiWikiOperations { + /** Deletes the specified Wiki from an API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Wiki for an API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams, + ) => Promise; + /** Creates a new Wiki for an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Wiki for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams, + ) => Promise; +} + +function _getApiWiki(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + options?: ApiWikiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ApiWikiUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, apiId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + parameters: WikiContract, + options?: ApiWikiCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, apiId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikiGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getApiWikiOperations(context: ApiManagementContext): ApiWikiOperations { + return { + ..._getApiWiki(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/apiWikis/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/apiWikis/index.ts new file mode 100644 index 000000000000..f44b2a834dc3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/apiWikis/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/apiWikis/operations.js"; +import { ApiWikisListOptionalParams } from "../../api/apiWikis/options.js"; +import { WikiContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ApiWikis operations. */ +export interface ApiWikisOperations { + /** Gets the wikis for an API specified by its identifier. */ + list: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getApiWikis(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: ApiWikisListOptionalParams, + ) => list(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getApiWikisOperations(context: ApiManagementContext): ApiWikisOperations { + return { + ..._getApiWikis(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/authorization/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/authorization/index.ts new file mode 100644 index 000000000000..64d019449699 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/authorization/index.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + confirmConsentCode, + listByAuthorizationProvider, + $delete, + createOrUpdate, + get, +} from "../../api/authorization/operations.js"; +import { + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationDeleteOptionalParams, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationGetOptionalParams, +} from "../../api/authorization/options.js"; +import { + AuthorizationContract, + AuthorizationConfirmConsentCodeRequestContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Authorization operations. */ +export interface AuthorizationOperations { + /** Confirm valid consent code to suppress Authorizations anti-phishing page. */ + confirmConsentCode: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams, + ) => Promise; + /** Lists a collection of authorization providers defined within a authorization provider. */ + listByAuthorizationProvider: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Authorization from the Authorization provider. */ + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams, + ) => Promise; + /** Creates or updates authorization. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the authorization specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams, + ) => Promise; +} + +function _getAuthorization(context: ApiManagementContext) { + return { + confirmConsentCode: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationConfirmConsentCodeRequestContract, + options?: AuthorizationConfirmConsentCodeOptionalParams, + ) => + confirmConsentCode( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ), + listByAuthorizationProvider: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationListByAuthorizationProviderOptionalParams, + ) => + listByAuthorizationProvider( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + options, + ), + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + ifMatch: string, + options?: AuthorizationDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationContract, + options?: AuthorizationCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + ), + }; +} + +export function _getAuthorizationOperations( + context: ApiManagementContext, +): AuthorizationOperations { + return { + ..._getAuthorization(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/authorizationAccessPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationAccessPolicy/index.ts new file mode 100644 index 000000000000..a578713f5f37 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationAccessPolicy/index.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByAuthorization, + $delete, + createOrUpdate, + get, +} from "../../api/authorizationAccessPolicy/operations.js"; +import { + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, +} from "../../api/authorizationAccessPolicy/options.js"; +import { AuthorizationAccessPolicyContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AuthorizationAccessPolicy operations. */ +export interface AuthorizationAccessPolicyOperations { + /** Lists a collection of authorization access policy defined within a authorization. */ + listByAuthorization: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific access policy from the Authorization. */ + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates Authorization Access Policy. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the authorization access policy specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams, + ) => Promise; +} + +function _getAuthorizationAccessPolicy(context: ApiManagementContext) { + return { + listByAuthorization: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, + ) => + listByAuthorization( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + options, + ), + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + ifMatch: string, + options?: AuthorizationAccessPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + parameters: AuthorizationAccessPolicyContract, + options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + authorizationAccessPolicyId: string, + options?: AuthorizationAccessPolicyGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + authorizationAccessPolicyId, + options, + ), + }; +} + +export function _getAuthorizationAccessPolicyOperations( + context: ApiManagementContext, +): AuthorizationAccessPolicyOperations { + return { + ..._getAuthorizationAccessPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/authorizationLoginLinks/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationLoginLinks/index.ts new file mode 100644 index 000000000000..074298c6e4b1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationLoginLinks/index.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { post } from "../../api/authorizationLoginLinks/operations.js"; +import { AuthorizationLoginLinksPostOptionalParams } from "../../api/authorizationLoginLinks/options.js"; +import { + AuthorizationLoginRequestContract, + AuthorizationLoginResponseContract, +} from "../../models/models.js"; + +/** Interface representing a AuthorizationLoginLinks operations. */ +export interface AuthorizationLoginLinksOperations { + /** Gets authorization login links. */ + post: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams, + ) => Promise; +} + +function _getAuthorizationLoginLinks(context: ApiManagementContext) { + return { + post: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + authorizationId: string, + parameters: AuthorizationLoginRequestContract, + options?: AuthorizationLoginLinksPostOptionalParams, + ) => + post( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + authorizationId, + parameters, + options, + ), + }; +} + +export function _getAuthorizationLoginLinksOperations( + context: ApiManagementContext, +): AuthorizationLoginLinksOperations { + return { + ..._getAuthorizationLoginLinks(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/authorizationProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationProvider/index.ts new file mode 100644 index 000000000000..4a0f9e8859f3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationProvider/index.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listByService, + $delete, + createOrUpdate, + get, +} from "../../api/authorizationProvider/operations.js"; +import { + AuthorizationProviderRefreshSecretOptionalParams, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderGetOptionalParams, +} from "../../api/authorizationProvider/options.js"; +import { AuthorizationProviderContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AuthorizationProvider operations. */ +export interface AuthorizationProviderOperations { + /** Refreshes the Key Vault reference secret for the specified authorization provider. */ + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderRefreshSecretOptionalParams, + ) => Promise; + /** Lists a collection of authorization providers defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific authorization provider from the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams, + ) => Promise; + /** Creates or updates authorization provider. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the authorization provider specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams, + ) => Promise; +} + +function _getAuthorizationProvider(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderRefreshSecretOptionalParams, + ) => refreshSecret(context, resourceGroupName, serviceName, authorizationProviderId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationProviderListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + ifMatch: string, + options?: AuthorizationProviderDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, authorizationProviderId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + parameters: AuthorizationProviderContract, + options?: AuthorizationProviderCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + authorizationProviderId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + authorizationProviderId: string, + options?: AuthorizationProviderGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, authorizationProviderId, options), + }; +} + +export function _getAuthorizationProviderOperations( + context: ApiManagementContext, +): AuthorizationProviderOperations { + return { + ..._getAuthorizationProvider(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/authorizationServer/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationServer/index.ts new file mode 100644 index 000000000000..03ddb9fcb526 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/authorizationServer/index.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/authorizationServer/operations.js"; +import { + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetOptionalParams, +} from "../../api/authorizationServer/options.js"; +import { + AuthorizationServerContract, + AuthorizationServerUpdateContract, + AuthorizationServerSecretsContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a AuthorizationServer operations. */ +export interface AuthorizationServerOperations { + /** Gets the client secret details of the authorization server. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams, + ) => Promise; + /** Lists a collection of authorization servers defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific authorization server instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams, + ) => Promise; + /** Updates the details of the authorization server specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams, + ) => Promise; + /** Creates new authorization server or updates an existing authorization server. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the authorizationServer specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the authorization server specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams, + ) => Promise; +} + +function _getAuthorizationServer(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, authsid, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: AuthorizationServerListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + options?: AuthorizationServerDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, authsid, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + ifMatch: string, + parameters: AuthorizationServerUpdateContract, + options?: AuthorizationServerUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, authsid, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + parameters: AuthorizationServerContract, + options?: AuthorizationServerCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, authsid, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, authsid, options), + get: ( + resourceGroupName: string, + serviceName: string, + authsid: string, + options?: AuthorizationServerGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, authsid, options), + }; +} + +export function _getAuthorizationServerOperations( + context: ApiManagementContext, +): AuthorizationServerOperations { + return { + ..._getAuthorizationServer(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/backend/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/backend/index.ts new file mode 100644 index 000000000000..80ca3a96af28 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/backend/index.ts @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + reconnect, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/backend/operations.js"; +import { + BackendReconnectOptionalParams, + BackendListByServiceOptionalParams, + BackendDeleteOptionalParams, + BackendUpdateOptionalParams, + BackendCreateOrUpdateOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetOptionalParams, +} from "../../api/backend/options.js"; +import { BackendContract, BackendUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Backend operations. */ +export interface BackendOperations { + /** Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. */ + reconnect: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams, + ) => Promise; + /** Lists a collection of backends in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified backend. */ + delete: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams, + ) => Promise; + /** Updates an existing backend. */ + update: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a backend. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the backend specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the backend specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams, + ) => Promise; +} + +function _getBackend(context: ApiManagementContext) { + return { + reconnect: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendReconnectOptionalParams, + ) => reconnect(context, resourceGroupName, serviceName, backendId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: BackendListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + options?: BackendDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, backendId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: BackendUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, backendId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + parameters: BackendContract, + options?: BackendCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, backendId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, backendId, options), + get: ( + resourceGroupName: string, + serviceName: string, + backendId: string, + options?: BackendGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, backendId, options), + }; +} + +export function _getBackendOperations(context: ApiManagementContext): BackendOperations { + return { + ..._getBackend(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/cache/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/cache/index.ts new file mode 100644 index 000000000000..3fcf4b34b0b9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/cache/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/cache/operations.js"; +import { + CacheListByServiceOptionalParams, + CacheDeleteOptionalParams, + CacheUpdateOptionalParams, + CacheCreateOrUpdateOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetOptionalParams, +} from "../../api/cache/options.js"; +import { CacheContract, CacheUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Cache operations. */ +export interface CacheOperations { + /** Lists a collection of all external Caches in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Cache. */ + delete: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams, + ) => Promise; + /** Updates the details of the cache specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams, + ) => Promise; + /** Creates or updates an External Cache to be used in Api Management instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Cache specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Cache specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams, + ) => Promise; +} + +function _getCache(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: CacheListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + options?: CacheDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, cacheId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + ifMatch: string, + parameters: CacheUpdateParameters, + options?: CacheUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, cacheId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + parameters: CacheContract, + options?: CacheCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, cacheId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, cacheId, options), + get: ( + resourceGroupName: string, + serviceName: string, + cacheId: string, + options?: CacheGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, cacheId, options), + }; +} + +export function _getCacheOperations(context: ApiManagementContext): CacheOperations { + return { + ..._getCache(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/certificate/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/certificate/index.ts new file mode 100644 index 000000000000..0786ce8ac821 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/certificate/index.ts @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/certificate/operations.js"; +import { + CertificateRefreshSecretOptionalParams, + CertificateListByServiceOptionalParams, + CertificateDeleteOptionalParams, + CertificateCreateOrUpdateOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetOptionalParams, +} from "../../api/certificate/options.js"; +import { CertificateContract, CertificateCreateOrUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Certificate operations. */ +export interface CertificateOperations { + /** From KeyVault, Refresh the certificate being used for authentication with the backend. */ + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams, + ) => Promise; + /** Lists a collection of all certificates in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific certificate. */ + delete: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams, + ) => Promise; + /** Creates or updates the certificate being used for authentication with the backend. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the certificate specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the certificate specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams, + ) => Promise; +} + +function _getCertificate(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateRefreshSecretOptionalParams, + ) => refreshSecret(context, resourceGroupName, serviceName, certificateId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: CertificateListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + ifMatch: string, + options?: CertificateDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, certificateId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: CertificateCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, certificateId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, certificateId, options), + get: ( + resourceGroupName: string, + serviceName: string, + certificateId: string, + options?: CertificateGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, certificateId, options), + }; +} + +export function _getCertificateOperations(context: ApiManagementContext): CertificateOperations { + return { + ..._getCertificate(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/clientApplication/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/clientApplication/index.ts new file mode 100644 index 000000000000..54b96c10c282 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/clientApplication/index.ts @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/clientApplication/operations.js"; +import { + ClientApplicationListSecretsOptionalParams, + ClientApplicationListByServiceOptionalParams, + ClientApplicationDeleteOptionalParams, + ClientApplicationCreateOrUpdateOptionalParams, + ClientApplicationGetEntityTagOptionalParams, + ClientApplicationGetOptionalParams, +} from "../../api/clientApplication/options.js"; +import { + ClientApplicationContract, + ClientApplicationSecretsContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ClientApplication operations. */ +export interface ClientApplicationOperations { + /** Retrived client application secrets. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationListSecretsOptionalParams, + ) => Promise; + /** Lists a collection of client applications in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ClientApplicationListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete client application. */ + delete: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationDeleteOptionalParams, + ) => Promise; + /** Creates or Updates a client application. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + parameters: ClientApplicationContract, + options?: ClientApplicationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the product specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the client application specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationGetOptionalParams, + ) => Promise; +} + +function _getClientApplication(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, clientApplicationId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ClientApplicationListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, clientApplicationId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + parameters: ClientApplicationContract, + options?: ClientApplicationCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + clientApplicationId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, clientApplicationId, options), + get: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, clientApplicationId, options), + }; +} + +export function _getClientApplicationOperations( + context: ApiManagementContext, +): ClientApplicationOperations { + return { + ..._getClientApplication(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/clientApplicationProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/clientApplicationProductLink/index.ts new file mode 100644 index 000000000000..a035623ea231 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/clientApplicationProductLink/index.ts @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByClientApplications, + $delete, + create, + get, +} from "../../api/clientApplicationProductLink/operations.js"; +import { + ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ClientApplicationProductLinkDeleteOptionalParams, + ClientApplicationProductLinkCreateOptionalParams, + ClientApplicationProductLinkGetOptionalParams, +} from "../../api/clientApplicationProductLink/options.js"; +import { ClientApplicationProductLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ClientApplicationProductLink operations. */ +export interface ClientApplicationProductLinkOperations { + /** Lists a collection of product links associated with the specified client application. */ + listByClientApplications: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Product from the specified client application. */ + delete: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options?: ClientApplicationProductLinkDeleteOptionalParams, + ) => Promise; + /** Adds an Product to the specified Client Application via link. */ + create: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + parameters: ClientApplicationProductLinkContract, + options?: ClientApplicationProductLinkCreateOptionalParams, + ) => Promise; + /** Gets the product link for the client application. */ + get: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options?: ClientApplicationProductLinkGetOptionalParams, + ) => Promise; +} + +function _getClientApplicationProductLink(context: ApiManagementContext) { + return { + listByClientApplications: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + options?: ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ) => + listByClientApplications( + context, + resourceGroupName, + serviceName, + clientApplicationId, + options, + ), + delete: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options?: ClientApplicationProductLinkDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + options, + ), + create: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + parameters: ClientApplicationProductLinkContract, + options?: ClientApplicationProductLinkCreateOptionalParams, + ) => + create( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + clientApplicationId: string, + clientApplicationProductLinkId: string, + options?: ClientApplicationProductLinkGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceName, + clientApplicationId, + clientApplicationProductLinkId, + options, + ), + }; +} + +export function _getClientApplicationProductLinkOperations( + context: ApiManagementContext, +): ClientApplicationProductLinkOperations { + return { + ..._getClientApplicationProductLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/contentItem/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/contentItem/index.ts new file mode 100644 index 000000000000..afbdbd15a4de --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/contentItem/index.ts @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/contentItem/operations.js"; +import { + ContentItemListByServiceOptionalParams, + ContentItemDeleteOptionalParams, + ContentItemCreateOrUpdateOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetOptionalParams, +} from "../../api/contentItem/options.js"; +import { ContentItemContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ContentItem operations. */ +export interface ContentItemOperations { + /** Lists developer portal's content items specified by the provided content type. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Removes the specified developer portal's content item. */ + delete: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams, + ) => Promise; + /** Creates a new developer portal's content item specified by the provided content type. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams, + ) => Promise; + /** Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams, + ) => Promise; + /** Returns the developer portal's content item specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams, + ) => Promise; +} + +function _getContentItem(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentItemListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, contentTypeId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + ifMatch: string, + options?: ContentItemDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + parameters: ContentItemContract, + options?: ContentItemCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + contentTypeId, + contentItemId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, contentTypeId, contentItemId, options), + get: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + contentItemId: string, + options?: ContentItemGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, contentTypeId, contentItemId, options), + }; +} + +export function _getContentItemOperations(context: ApiManagementContext): ContentItemOperations { + return { + ..._getContentItem(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/contentType/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/contentType/index.ts new file mode 100644 index 000000000000..c7cacede90e0 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/contentType/index.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService, $delete, createOrUpdate, get } from "../../api/contentType/operations.js"; +import { + ContentTypeListByServiceOptionalParams, + ContentTypeDeleteOptionalParams, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeGetOptionalParams, +} from "../../api/contentType/options.js"; +import { ContentTypeContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ContentType operations. */ +export interface ContentTypeOperations { + /** Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. */ + delete: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams, + ) => Promise; + /** Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. */ + get: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams, + ) => Promise; +} + +function _getContentType(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ContentTypeListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + ifMatch: string, + options?: ContentTypeDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, contentTypeId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + parameters: ContentTypeContract, + options?: ContentTypeCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, contentTypeId, parameters, options), + get: ( + resourceGroupName: string, + serviceName: string, + contentTypeId: string, + options?: ContentTypeGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, contentTypeId, options), + }; +} + +export function _getContentTypeOperations(context: ApiManagementContext): ContentTypeOperations { + return { + ..._getContentType(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/delegationSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/delegationSettings/index.ts new file mode 100644 index 000000000000..57d50b2cf6da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/delegationSettings/index.ts @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/delegationSettings/operations.js"; +import { + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsUpdateOptionalParams, + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetOptionalParams, +} from "../../api/delegationSettings/options.js"; +import { + PortalDelegationSettings, + PortalSettingValidationKeyContract, +} from "../../models/models.js"; + +/** Interface representing a DelegationSettings operations. */ +export interface DelegationSettingsOperations { + /** Gets the secret validation key of the DelegationSettings. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams, + ) => Promise; + /** Update Delegation settings. */ + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams, + ) => Promise; + /** Create or Update Delegation settings. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the DelegationSettings. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams, + ) => Promise; + /** Get Delegation Settings for the Portal. */ + get: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams, + ) => Promise; +} + +function _getDelegationSettings(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, options), + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalDelegationSettings, + options?: DelegationSettingsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, options), + get: ( + resourceGroupName: string, + serviceName: string, + options?: DelegationSettingsGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, options), + }; +} + +export function _getDelegationSettingsOperations( + context: ApiManagementContext, +): DelegationSettingsOperations { + return { + ..._getDelegationSettings(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/deletedServices/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/deletedServices/index.ts new file mode 100644 index 000000000000..60a1a7ac13f4 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/deletedServices/index.ts @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listBySubscription, purge, getByName } from "../../api/deletedServices/operations.js"; +import { + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams, + DeletedServicesGetByNameOptionalParams, +} from "../../api/deletedServices/options.js"; +import { DeletedServiceContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a DeletedServices operations. */ +export interface DeletedServicesOperations { + /** Lists all soft-deleted services available for undelete for the given subscription. */ + listBySubscription: ( + options?: DeletedServicesListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Purges Api Management Service (deletes it with no option to undelete). */ + purge: ( + location: string, + serviceName: string, + options?: DeletedServicesPurgeOptionalParams, + ) => PollerLike, DeletedServiceContract>; + /** @deprecated use purge instead */ + beginPurge: ( + location: string, + serviceName: string, + options?: DeletedServicesPurgeOptionalParams, + ) => Promise, DeletedServiceContract>>; + /** @deprecated use purge instead */ + beginPurgeAndWait: ( + location: string, + serviceName: string, + options?: DeletedServicesPurgeOptionalParams, + ) => Promise; + /** Get soft-deleted Api Management Service by name. */ + getByName: ( + location: string, + serviceName: string, + options?: DeletedServicesGetByNameOptionalParams, + ) => Promise; +} + +function _getDeletedServices(context: ApiManagementContext) { + return { + listBySubscription: (options?: DeletedServicesListBySubscriptionOptionalParams) => + listBySubscription(context, options), + purge: (location: string, serviceName: string, options?: DeletedServicesPurgeOptionalParams) => + purge(context, location, serviceName, options), + beginPurge: async ( + location: string, + serviceName: string, + options?: DeletedServicesPurgeOptionalParams, + ) => { + const poller = purge(context, location, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginPurgeAndWait: async ( + location: string, + serviceName: string, + options?: DeletedServicesPurgeOptionalParams, + ) => { + return await purge(context, location, serviceName, options); + }, + getByName: ( + location: string, + serviceName: string, + options?: DeletedServicesGetByNameOptionalParams, + ) => getByName(context, location, serviceName, options), + }; +} + +export function _getDeletedServicesOperations( + context: ApiManagementContext, +): DeletedServicesOperations { + return { + ..._getDeletedServices(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/diagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/diagnostic/index.ts new file mode 100644 index 000000000000..2d066e93e9f9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/diagnostic/index.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/diagnostic/operations.js"; +import { + DiagnosticListByServiceOptionalParams, + DiagnosticDeleteOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetOptionalParams, +} from "../../api/diagnostic/options.js"; +import { DiagnosticContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Diagnostic operations. */ +export interface DiagnosticOperations { + /** Lists all diagnostics of the API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Diagnostic. */ + delete: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Diagnostic specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams, + ) => Promise; + /** Creates a new Diagnostic or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Diagnostic specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Diagnostic specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams, + ) => Promise; +} + +function _getDiagnostic(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: DiagnosticListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + options?: DiagnosticDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, diagnosticId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticContract, + options?: DiagnosticUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, diagnosticId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: DiagnosticCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, diagnosticId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, diagnosticId, options), + get: ( + resourceGroupName: string, + serviceName: string, + diagnosticId: string, + options?: DiagnosticGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, diagnosticId, options), + }; +} + +export function _getDiagnosticOperations(context: ApiManagementContext): DiagnosticOperations { + return { + ..._getDiagnostic(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/documentation/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/documentation/index.ts new file mode 100644 index 000000000000..519c8ed282cf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/documentation/index.ts @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/documentation/operations.js"; +import { + DocumentationListByServiceOptionalParams, + DocumentationDeleteOptionalParams, + DocumentationUpdateOptionalParams, + DocumentationCreateOrUpdateOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetOptionalParams, +} from "../../api/documentation/options.js"; +import { DocumentationContract, DocumentationUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Documentation operations. */ +export interface DocumentationOperations { + /** Lists all Documentations of the API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Documentation from an API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Documentation for an API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams, + ) => Promise; + /** Creates a new Documentation or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Documentation by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Documentation specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams, + ) => Promise; +} + +function _getDocumentation(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: DocumentationListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + options?: DocumentationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, documentationId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + ifMatch: string, + parameters: DocumentationUpdateContract, + options?: DocumentationUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + documentationId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + parameters: DocumentationContract, + options?: DocumentationCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, documentationId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, documentationId, options), + get: ( + resourceGroupName: string, + serviceName: string, + documentationId: string, + options?: DocumentationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, documentationId, options), + }; +} + +export function _getDocumentationOperations( + context: ApiManagementContext, +): DocumentationOperations { + return { + ..._getDocumentation(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/emailTemplate/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/emailTemplate/index.ts new file mode 100644 index 000000000000..6779b8634d24 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/emailTemplate/index.ts @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/emailTemplate/operations.js"; +import { + EmailTemplateListByServiceOptionalParams, + EmailTemplateDeleteOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetOptionalParams, +} from "../../api/emailTemplate/options.js"; +import { + EmailTemplateContract, + TemplateName, + EmailTemplateUpdateParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a EmailTemplate operations. */ +export interface EmailTemplateOperations { + /** Gets all email templates */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Reset the Email Template to default template provided by the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams, + ) => Promise; + /** Updates API Management email template */ + update: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams, + ) => Promise; + /** Updates an Email Template. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the email template specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the email template specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams, + ) => Promise; +} + +function _getEmailTemplate(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: EmailTemplateListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + options?: EmailTemplateDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, templateName, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + ifMatch: string, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, templateName, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + parameters: EmailTemplateUpdateParameters, + options?: EmailTemplateCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, templateName, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, templateName, options), + get: ( + resourceGroupName: string, + serviceName: string, + templateName: TemplateName, + options?: EmailTemplateGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, templateName, options), + }; +} + +export function _getEmailTemplateOperations( + context: ApiManagementContext, +): EmailTemplateOperations { + return { + ..._getEmailTemplate(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/gateway/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/gateway/index.ts new file mode 100644 index 000000000000..39d68ff43905 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/gateway/index.ts @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listTrace, + listDebugCredentials, + invalidateDebugCredentials, + generateToken, + regenerateKey, + listKeys, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/gateway/operations.js"; +import { + GatewayListTraceOptionalParams, + GatewayListDebugCredentialsOptionalParams, + GatewayInvalidateDebugCredentialsOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayRegenerateKeyOptionalParams, + GatewayListKeysOptionalParams, + GatewayListByServiceOptionalParams, + GatewayDeleteOptionalParams, + GatewayUpdateOptionalParams, + GatewayCreateOrUpdateOptionalParams, + GatewayGetEntityTagOptionalParams, + GatewayGetOptionalParams, +} from "../../api/gateway/options.js"; +import { + GatewayContract, + GatewayKeysContract, + GatewayKeyRegenerationRequestContract, + GatewayTokenRequestContract, + GatewayTokenContract, + GatewayListDebugCredentialsContract, + GatewayDebugCredentialsContract, + GatewayListTraceContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Gateway operations. */ +export interface GatewayOperations { + /** Fetches trace collected by gateway. */ + listTrace: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListTraceContract, + options?: GatewayListTraceOptionalParams, + ) => Promise>; + /** Create new debug credentials for gateway. */ + listDebugCredentials: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListDebugCredentialsContract, + options?: GatewayListDebugCredentialsOptionalParams, + ) => Promise; + /** Action is invalidating all debug credentials issued for gateway. */ + invalidateDebugCredentials: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayInvalidateDebugCredentialsOptionalParams, + ) => Promise; + /** Gets the Shared Access Authorization Token for the gateway. */ + generateToken: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams, + ) => Promise; + /** Regenerates specified gateway key invalidating any tokens created with it. */ + regenerateKey: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams, + ) => Promise; + /** Retrieves gateway keys. */ + listKeys: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams, + ) => Promise; + /** Lists a collection of gateways registered with service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Gateway. */ + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams, + ) => Promise; + /** Updates the details of the gateway specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams, + ) => Promise; + /** Creates or updates a Gateway to be used in Api Management instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Gateway specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Gateway specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams, + ) => Promise; +} + +function _getGateway(context: ApiManagementContext) { + return { + listTrace: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListTraceContract, + options?: GatewayListTraceOptionalParams, + ) => listTrace(context, resourceGroupName, serviceName, gatewayId, parameters, options), + listDebugCredentials: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayListDebugCredentialsContract, + options?: GatewayListDebugCredentialsOptionalParams, + ) => + listDebugCredentials(context, resourceGroupName, serviceName, gatewayId, parameters, options), + invalidateDebugCredentials: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayInvalidateDebugCredentialsOptionalParams, + ) => invalidateDebugCredentials(context, resourceGroupName, serviceName, gatewayId, options), + generateToken: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayTokenRequestContract, + options?: GatewayGenerateTokenOptionalParams, + ) => generateToken(context, resourceGroupName, serviceName, gatewayId, parameters, options), + regenerateKey: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayKeyRegenerationRequestContract, + options?: GatewayRegenerateKeyOptionalParams, + ) => regenerateKey(context, resourceGroupName, serviceName, gatewayId, parameters, options), + listKeys: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayListKeysOptionalParams, + ) => listKeys(context, resourceGroupName, serviceName, gatewayId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GatewayListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + options?: GatewayDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, gatewayId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + ifMatch: string, + parameters: GatewayContract, + options?: GatewayUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, gatewayId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + parameters: GatewayContract, + options?: GatewayCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, gatewayId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, gatewayId, options), + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, gatewayId, options), + }; +} + +export function _getGatewayOperations(context: ApiManagementContext): GatewayOperations { + return { + ..._getGateway(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/gatewayApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayApi/index.ts new file mode 100644 index 000000000000..2c89d04017fb --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayApi/index.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + getEntityTag, + listByService, +} from "../../api/gatewayApi/operations.js"; +import { + GatewayApiDeleteOptionalParams, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiListByServiceOptionalParams, +} from "../../api/gatewayApi/options.js"; +import { ApiContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GatewayApi operations. */ +export interface GatewayApiOperations { + /** Deletes the specified API from the specified Gateway. */ + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified Gateway. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams, + ) => Promise; + /** Checks that API entity specified by identifier is associated with the Gateway entity. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams, + ) => Promise; + /** Lists a collection of the APIs associated with a gateway. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getGatewayApi(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, gatewayId, apiId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, gatewayId, apiId, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + apiId: string, + options?: GatewayApiGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, gatewayId, apiId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayApiListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, gatewayId, options), + }; +} + +export function _getGatewayApiOperations(context: ApiManagementContext): GatewayApiOperations { + return { + ..._getGatewayApi(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/gatewayCertificateAuthority/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayCertificateAuthority/index.ts new file mode 100644 index 000000000000..e9530feb28d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayCertificateAuthority/index.ts @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/gatewayCertificateAuthority/operations.js"; +import { + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetOptionalParams, +} from "../../api/gatewayCertificateAuthority/options.js"; +import { GatewayCertificateAuthorityContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GatewayCertificateAuthority operations. */ +export interface GatewayCertificateAuthorityOperations { + /** Lists the collection of Certificate Authorities for the specified Gateway entity. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Remove relationship between Certificate Authority and Gateway entity. */ + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams, + ) => Promise; + /** Assign Certificate entity to Gateway entity as Certificate Authority. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + ) => Promise; + /** Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams, + ) => Promise; + /** Get assigned Gateway Certificate Authority details. */ + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams, + ) => Promise; +} + +function _getGatewayCertificateAuthority(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayCertificateAuthorityListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, gatewayId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + ifMatch: string, + options?: GatewayCertificateAuthorityDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, gatewayId, certificateId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + parameters: GatewayCertificateAuthorityContract, + options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + gatewayId, + certificateId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, gatewayId, certificateId, options), + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + certificateId: string, + options?: GatewayCertificateAuthorityGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, gatewayId, certificateId, options), + }; +} + +export function _getGatewayCertificateAuthorityOperations( + context: ApiManagementContext, +): GatewayCertificateAuthorityOperations { + return { + ..._getGatewayCertificateAuthority(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/gatewayHostnameConfiguration/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayHostnameConfiguration/index.ts new file mode 100644 index 000000000000..9e9227e7b1f9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/gatewayHostnameConfiguration/index.ts @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/gatewayHostnameConfiguration/operations.js"; +import { + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetOptionalParams, +} from "../../api/gatewayHostnameConfiguration/options.js"; +import { GatewayHostnameConfigurationContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GatewayHostnameConfiguration operations. */ +export interface GatewayHostnameConfigurationOperations { + /** Lists the collection of hostname configurations for the specified gateway. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified hostname configuration from the specified Gateway. */ + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams, + ) => Promise; + /** Creates of updates hostname configuration for a Gateway. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + ) => Promise; + /** Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams, + ) => Promise; + /** Get details of a hostname configuration */ + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams, + ) => Promise; +} + +function _getGatewayHostnameConfiguration(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + options?: GatewayHostnameConfigurationListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, gatewayId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + ifMatch: string, + options?: GatewayHostnameConfigurationDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + parameters: GatewayHostnameConfigurationContract, + options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, gatewayId, hcId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, gatewayId, hcId, options), + get: ( + resourceGroupName: string, + serviceName: string, + gatewayId: string, + hcId: string, + options?: GatewayHostnameConfigurationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, gatewayId, hcId, options), + }; +} + +export function _getGatewayHostnameConfigurationOperations( + context: ApiManagementContext, +): GatewayHostnameConfigurationOperations { + return { + ..._getGatewayHostnameConfiguration(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/globalSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/globalSchema/index.ts new file mode 100644 index 000000000000..edd13716d216 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/globalSchema/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/globalSchema/operations.js"; +import { + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetOptionalParams, +} from "../../api/globalSchema/options.js"; +import { GlobalSchemaContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a GlobalSchema operations. */ +export interface GlobalSchemaOperations { + /** Lists a collection of schemas registered with service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Schema. */ + delete: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams, + ) => Promise; + /** Creates new or updates existing specified Schema of the API Management service instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => PollerLike, GlobalSchemaContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => Promise, GlobalSchemaContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Schema specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Schema specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams, + ) => Promise; +} + +function _getGlobalSchema(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GlobalSchemaListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + ifMatch: string, + options?: GlobalSchemaDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, schemaId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, schemaId, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + schemaId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: GlobalSchemaCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + schemaId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, schemaId, options), + get: ( + resourceGroupName: string, + serviceName: string, + schemaId: string, + options?: GlobalSchemaGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, schemaId, options), + }; +} + +export function _getGlobalSchemaOperations(context: ApiManagementContext): GlobalSchemaOperations { + return { + ..._getGlobalSchema(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolver/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolver/index.ts new file mode 100644 index 000000000000..e9c07429a81e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolver/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/graphQLApiResolver/operations.js"; +import { + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetOptionalParams, +} from "../../api/graphQLApiResolver/options.js"; +import { ResolverContract, ResolverUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GraphQLApiResolver operations. */ +export interface GraphQLApiResolverOperations { + /** Lists a collection of the resolvers for the specified GraphQL API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified resolver in the GraphQL API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams, + ) => Promise; + /** Updates the details of the resolver in the GraphQL API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams, + ) => Promise; + /** Creates a new resolver in the GraphQL API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the GraphQL API Resolver specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams, + ) => Promise; +} + +function _getGraphQLApiResolver(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: GraphQLApiResolverListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + options?: GraphQLApiResolverDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, apiId, resolverId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + ifMatch: string, + parameters: ResolverUpdateContract, + options?: GraphQLApiResolverUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + parameters: ResolverContract, + options?: GraphQLApiResolverCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, apiId, resolverId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, resolverId, options), + }; +} + +export function _getGraphQLApiResolverOperations( + context: ApiManagementContext, +): GraphQLApiResolverOperations { + return { + ..._getGraphQLApiResolver(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolverPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolverPolicy/index.ts new file mode 100644 index 000000000000..45badcec2081 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/graphQLApiResolverPolicy/index.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByResolver, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/graphQLApiResolverPolicy/operations.js"; +import { + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetOptionalParams, +} from "../../api/graphQLApiResolverPolicy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GraphQLApiResolverPolicy operations. */ +export interface GraphQLApiResolverPolicyOperations { + /** Get the list of policy configuration at the GraphQL API Resolver level. */ + listByResolver: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy configuration at the GraphQL Api Resolver. */ + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the GraphQL API Resolver level. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the GraphQL API Resolver level. */ + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams, + ) => Promise; +} + +function _getGraphQLApiResolverPolicy(context: ApiManagementContext) { + return { + listByResolver: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + options?: GraphQLApiResolverPolicyListByResolverOptionalParams, + ) => listByResolver(context, resourceGroupName, serviceName, apiId, resolverId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: GraphQLApiResolverPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + apiId, + resolverId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, apiId, resolverId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + resolverId: string, + policyId: PolicyIdName, + options?: GraphQLApiResolverPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, apiId, resolverId, policyId, options), + }; +} + +export function _getGraphQLApiResolverPolicyOperations( + context: ApiManagementContext, +): GraphQLApiResolverPolicyOperations { + return { + ..._getGraphQLApiResolverPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/group/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/group/index.ts new file mode 100644 index 000000000000..fdaad5c703c7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/group/index.ts @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/group/operations.js"; +import { + GroupListByServiceOptionalParams, + GroupDeleteOptionalParams, + GroupUpdateOptionalParams, + GroupCreateOrUpdateOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetOptionalParams, +} from "../../api/group/options.js"; +import { + GroupContract, + GroupCreateParameters, + GroupUpdateParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Group operations. */ +export interface GroupOperations { + /** Lists a collection of groups defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific group of the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams, + ) => Promise; + /** Updates the details of the group specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a group. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the group specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the group specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams, + ) => Promise; +} + +function _getGroup(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: GroupListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + options?: GroupDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, groupId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: GroupUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, groupId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + parameters: GroupCreateParameters, + options?: GroupCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, groupId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, groupId, options), + get: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, groupId, options), + }; +} + +export function _getGroupOperations(context: ApiManagementContext): GroupOperations { + return { + ..._getGroup(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/groupUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/groupUser/index.ts new file mode 100644 index 000000000000..b233a0a7641e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/groupUser/index.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { $delete, create, checkEntityExists, list } from "../../api/groupUser/operations.js"; +import { + GroupUserDeleteOptionalParams, + GroupUserCreateOptionalParams, + GroupUserCheckEntityExistsOptionalParams, + GroupUserListOptionalParams, +} from "../../api/groupUser/options.js"; +import { UserContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a GroupUser operations. */ +export interface GroupUserOperations { + /** Remove existing user from existing group. */ + delete: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams, + ) => Promise; + /** Add existing user to existing group */ + create: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams, + ) => Promise; + /** Checks that user entity specified by identifier is associated with the group entity. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams, + ) => Promise; + /** Lists a collection of user entities associated with the group. */ + list: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getGroupUser(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, groupId, userId, options), + create: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCreateOptionalParams, + ) => create(context, resourceGroupName, serviceName, groupId, userId, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + userId: string, + options?: GroupUserCheckEntityExistsOptionalParams, + ) => checkEntityExists(context, resourceGroupName, serviceName, groupId, userId, options), + list: ( + resourceGroupName: string, + serviceName: string, + groupId: string, + options?: GroupUserListOptionalParams, + ) => list(context, resourceGroupName, serviceName, groupId, options), + }; +} + +export function _getGroupUserOperations(context: ApiManagementContext): GroupUserOperations { + return { + ..._getGroupUser(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/identityProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/identityProvider/index.ts new file mode 100644 index 000000000000..81798a56e578 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/identityProvider/index.ts @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/identityProvider/operations.js"; +import { + IdentityProviderListSecretsOptionalParams, + IdentityProviderListByServiceOptionalParams, + IdentityProviderDeleteOptionalParams, + IdentityProviderUpdateOptionalParams, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetOptionalParams, +} from "../../api/identityProvider/options.js"; +import { + IdentityProviderContract, + IdentityProviderType, + IdentityProviderCreateContract, + IdentityProviderUpdateParameters, + ClientSecretContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a IdentityProvider operations. */ +export interface IdentityProviderOperations { + /** Gets the client secret details of the Identity Provider. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams, + ) => Promise; + /** Lists a collection of Identity Provider configured in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified identity provider configuration. */ + delete: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams, + ) => Promise; + /** Updates an existing IdentityProvider configuration. */ + update: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams, + ) => Promise; + /** Creates or Updates the IdentityProvider configuration. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the identityProvider specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams, + ) => Promise; + /** Gets the configuration details of the identity Provider configured in specified service instance. */ + get: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams, + ) => Promise; +} + +function _getIdentityProvider(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, identityProviderName, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: IdentityProviderListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + options?: IdentityProviderDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, identityProviderName, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + ifMatch: string, + parameters: IdentityProviderUpdateParameters, + options?: IdentityProviderUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + identityProviderName, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + parameters: IdentityProviderCreateContract, + options?: IdentityProviderCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + identityProviderName, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, identityProviderName, options), + get: ( + resourceGroupName: string, + serviceName: string, + identityProviderName: IdentityProviderType, + options?: IdentityProviderGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, identityProviderName, options), + }; +} + +export function _getIdentityProviderOperations( + context: ApiManagementContext, +): IdentityProviderOperations { + return { + ..._getIdentityProvider(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/index.ts new file mode 100644 index 000000000000..707df78158b8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/index.ts @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { AllPoliciesOperations } from "./allPolicies/index.js"; +export type { ApiOperations } from "./api/index.js"; +export type { ApiDiagnosticOperations } from "./apiDiagnostic/index.js"; +export type { ApiExportOperations } from "./apiExport/index.js"; +export type { ApiGatewayOperations } from "./apiGateway/index.js"; +export type { ApiGatewayConfigConnectionOperations } from "./apiGatewayConfigConnection/index.js"; +export type { ApiGatewayHostnameBindingOperations } from "./apiGatewayHostnameBinding/index.js"; +export type { ApiIssueOperations } from "./apiIssue/index.js"; +export type { ApiIssueAttachmentOperations } from "./apiIssueAttachment/index.js"; +export type { ApiIssueCommentOperations } from "./apiIssueComment/index.js"; +export type { ApiManagementGatewaySkusOperations } from "./apiManagementGatewaySkus/index.js"; +export type { ApiManagementOperationsOperations } from "./apiManagementOperations/index.js"; +export type { ApiManagementServiceOperations } from "./apiManagementService/index.js"; +export type { ApiManagementServiceResourcesOperations } from "./apiManagementServiceResources/index.js"; +export type { ApiManagementServiceSkusOperations } from "./apiManagementServiceSkus/index.js"; +export type { ApiManagementSkusOperations } from "./apiManagementSkus/index.js"; +export type { ApiManagementWorkspaceLinkOperations } from "./apiManagementWorkspaceLink/index.js"; +export type { ApiManagementWorkspaceLinksOperations } from "./apiManagementWorkspaceLinks/index.js"; +export type { ApiOperationOperations } from "./apiOperation/index.js"; +export type { ApiOperationPolicyOperations } from "./apiOperationPolicy/index.js"; +export type { ApiPolicyOperations } from "./apiPolicy/index.js"; +export type { ApiProductOperations } from "./apiProduct/index.js"; +export type { ApiReleaseOperations } from "./apiRelease/index.js"; +export type { ApiRevisionOperations } from "./apiRevision/index.js"; +export type { ApiSchemaOperations } from "./apiSchema/index.js"; +export type { ApiTagDescriptionOperations } from "./apiTagDescription/index.js"; +export type { ApiToolOperations } from "./apiTool/index.js"; +export type { ApiVersionSetOperations } from "./apiVersionSet/index.js"; +export type { ApiWikiOperations } from "./apiWiki/index.js"; +export type { ApiWikisOperations } from "./apiWikis/index.js"; +export type { AuthorizationOperations } from "./authorization/index.js"; +export type { AuthorizationAccessPolicyOperations } from "./authorizationAccessPolicy/index.js"; +export type { AuthorizationLoginLinksOperations } from "./authorizationLoginLinks/index.js"; +export type { AuthorizationProviderOperations } from "./authorizationProvider/index.js"; +export type { AuthorizationServerOperations } from "./authorizationServer/index.js"; +export type { BackendOperations } from "./backend/index.js"; +export type { CacheOperations } from "./cache/index.js"; +export type { CertificateOperations } from "./certificate/index.js"; +export type { ClientApplicationOperations } from "./clientApplication/index.js"; +export type { ClientApplicationProductLinkOperations } from "./clientApplicationProductLink/index.js"; +export type { ContentItemOperations } from "./contentItem/index.js"; +export type { ContentTypeOperations } from "./contentType/index.js"; +export type { DelegationSettingsOperations } from "./delegationSettings/index.js"; +export type { DeletedServicesOperations } from "./deletedServices/index.js"; +export type { DiagnosticOperations } from "./diagnostic/index.js"; +export type { DocumentationOperations } from "./documentation/index.js"; +export type { EmailTemplateOperations } from "./emailTemplate/index.js"; +export type { GatewayOperations } from "./gateway/index.js"; +export type { GatewayApiOperations } from "./gatewayApi/index.js"; +export type { GatewayCertificateAuthorityOperations } from "./gatewayCertificateAuthority/index.js"; +export type { GatewayHostnameConfigurationOperations } from "./gatewayHostnameConfiguration/index.js"; +export type { GlobalSchemaOperations } from "./globalSchema/index.js"; +export type { GraphQLApiResolverOperations } from "./graphQLApiResolver/index.js"; +export type { GraphQLApiResolverPolicyOperations } from "./graphQLApiResolverPolicy/index.js"; +export type { GroupOperations } from "./group/index.js"; +export type { GroupUserOperations } from "./groupUser/index.js"; +export type { IdentityProviderOperations } from "./identityProvider/index.js"; +export type { IssueOperations } from "./issue/index.js"; +export type { LoggerOperations } from "./logger/index.js"; +export type { NamedValueOperations } from "./namedValue/index.js"; +export type { NetworkStatusOperations } from "./networkStatus/index.js"; +export type { NotificationOperations } from "./notification/index.js"; +export type { NotificationRecipientEmailOperations } from "./notificationRecipientEmail/index.js"; +export type { NotificationRecipientUserOperations } from "./notificationRecipientUser/index.js"; +export type { OpenIdConnectProviderOperations } from "./openIdConnectProvider/index.js"; +export type { OperationOperations } from "./operation/index.js"; +export type { OperationsResultsOperations } from "./operationsResults/index.js"; +export type { OperationStatusOperations } from "./operationStatus/index.js"; +export type { OutboundNetworkDependenciesEndpointsOperations } from "./outboundNetworkDependenciesEndpoints/index.js"; +export type { PolicyOperations } from "./policy/index.js"; +export type { PolicyDescriptionOperations } from "./policyDescription/index.js"; +export type { PolicyFragmentOperations } from "./policyFragment/index.js"; +export type { PolicyRestrictionOperations } from "./policyRestriction/index.js"; +export type { PolicyRestrictionValidationsOperations } from "./policyRestrictionValidations/index.js"; +export type { PortalConfigOperations } from "./portalConfig/index.js"; +export type { PortalRevisionOperations } from "./portalRevision/index.js"; +export type { PortalSettingsOperations } from "./portalSettings/index.js"; +export type { PrivateEndpointConnectionOperations } from "./privateEndpointConnection/index.js"; +export type { ProductOperations } from "./product/index.js"; +export type { ProductApiOperations } from "./productApi/index.js"; +export type { ProductApiLinkOperations } from "./productApiLink/index.js"; +export type { ProductGroupOperations } from "./productGroup/index.js"; +export type { ProductGroupLinkOperations } from "./productGroupLink/index.js"; +export type { ProductPolicyOperations } from "./productPolicy/index.js"; +export type { ProductSubscriptionsOperations } from "./productSubscriptions/index.js"; +export type { ProductWikiOperations } from "./productWiki/index.js"; +export type { ProductWikisOperations } from "./productWikis/index.js"; +export type { QuotaByCounterKeysOperations } from "./quotaByCounterKeys/index.js"; +export type { QuotaByPeriodKeysOperations } from "./quotaByPeriodKeys/index.js"; +export type { RegionOperations } from "./region/index.js"; +export type { ReportsOperations } from "./reports/index.js"; +export type { SignInSettingsOperations } from "./signInSettings/index.js"; +export type { SignUpSettingsOperations } from "./signUpSettings/index.js"; +export type { SubscriptionOperations } from "./subscription/index.js"; +export type { TagOperations } from "./tag/index.js"; +export type { TagApiLinkOperations } from "./tagApiLink/index.js"; +export type { TagOperationLinkOperations } from "./tagOperationLink/index.js"; +export type { TagProductLinkOperations } from "./tagProductLink/index.js"; +export type { TagResourceOperations } from "./tagResource/index.js"; +export type { TenantAccessOperations } from "./tenantAccess/index.js"; +export type { TenantAccessGitOperations } from "./tenantAccessGit/index.js"; +export type { TenantConfigurationOperations } from "./tenantConfiguration/index.js"; +export type { TenantSettingsOperations } from "./tenantSettings/index.js"; +export type { UserOperations } from "./user/index.js"; +export type { UserConfirmationPasswordOperations } from "./userConfirmationPassword/index.js"; +export type { UserGroupOperations } from "./userGroup/index.js"; +export type { UserIdentitiesOperations } from "./userIdentities/index.js"; +export type { UserSubscriptionOperations } from "./userSubscription/index.js"; +export type { WorkspaceOperations } from "./workspace/index.js"; +export type { WorkspaceApiOperations } from "./workspaceApi/index.js"; +export type { WorkspaceApiDiagnosticOperations } from "./workspaceApiDiagnostic/index.js"; +export type { WorkspaceApiExportOperations } from "./workspaceApiExport/index.js"; +export type { WorkspaceApiOperationOperations } from "./workspaceApiOperation/index.js"; +export type { WorkspaceApiOperationPolicyOperations } from "./workspaceApiOperationPolicy/index.js"; +export type { WorkspaceApiPolicyOperations } from "./workspaceApiPolicy/index.js"; +export type { WorkspaceApiReleaseOperations } from "./workspaceApiRelease/index.js"; +export type { WorkspaceApiRevisionOperations } from "./workspaceApiRevision/index.js"; +export type { WorkspaceApiSchemaOperations } from "./workspaceApiSchema/index.js"; +export type { WorkspaceApiVersionSetOperations } from "./workspaceApiVersionSet/index.js"; +export type { WorkspaceBackendOperations } from "./workspaceBackend/index.js"; +export type { WorkspaceCertificateOperations } from "./workspaceCertificate/index.js"; +export type { WorkspaceDiagnosticOperations } from "./workspaceDiagnostic/index.js"; +export type { WorkspaceGlobalSchemaOperations } from "./workspaceGlobalSchema/index.js"; +export type { WorkspaceGroupOperations } from "./workspaceGroup/index.js"; +export type { WorkspaceGroupUserOperations } from "./workspaceGroupUser/index.js"; +export type { WorkspaceLoggerOperations } from "./workspaceLogger/index.js"; +export type { WorkspaceNamedValueOperations } from "./workspaceNamedValue/index.js"; +export type { WorkspaceNotificationOperations } from "./workspaceNotification/index.js"; +export type { WorkspaceNotificationRecipientEmailOperations } from "./workspaceNotificationRecipientEmail/index.js"; +export type { WorkspaceNotificationRecipientUserOperations } from "./workspaceNotificationRecipientUser/index.js"; +export type { WorkspacePolicyOperations } from "./workspacePolicy/index.js"; +export type { WorkspacePolicyFragmentOperations } from "./workspacePolicyFragment/index.js"; +export type { WorkspaceProductOperations } from "./workspaceProduct/index.js"; +export type { WorkspaceProductApiLinkOperations } from "./workspaceProductApiLink/index.js"; +export type { WorkspaceProductGroupLinkOperations } from "./workspaceProductGroupLink/index.js"; +export type { WorkspaceProductPolicyOperations } from "./workspaceProductPolicy/index.js"; +export type { WorkspaceSubscriptionOperations } from "./workspaceSubscription/index.js"; +export type { WorkspaceTagOperations } from "./workspaceTag/index.js"; +export type { WorkspaceTagApiLinkOperations } from "./workspaceTagApiLink/index.js"; +export type { WorkspaceTagOperationLinkOperations } from "./workspaceTagOperationLink/index.js"; +export type { WorkspaceTagProductLinkOperations } from "./workspaceTagProductLink/index.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/issue/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/issue/index.ts new file mode 100644 index 000000000000..269516ddf75b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/issue/index.ts @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService, get } from "../../api/issue/operations.js"; +import { + IssueListByServiceOptionalParams, + IssueGetOptionalParams, +} from "../../api/issue/options.js"; +import { IssueContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Issue operations. */ +export interface IssueOperations { + /** Lists a collection of issues in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets API Management issue details */ + get: ( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams, + ) => Promise; +} + +function _getIssue(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: IssueListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + get: ( + resourceGroupName: string, + serviceName: string, + issueId: string, + options?: IssueGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, issueId, options), + }; +} + +export function _getIssueOperations(context: ApiManagementContext): IssueOperations { + return { + ..._getIssue(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/logger/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/logger/index.ts new file mode 100644 index 000000000000..d84277644f4b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/logger/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/logger/operations.js"; +import { + LoggerListByServiceOptionalParams, + LoggerDeleteOptionalParams, + LoggerUpdateOptionalParams, + LoggerCreateOrUpdateOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetOptionalParams, +} from "../../api/logger/options.js"; +import { LoggerContract, LoggerUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Logger operations. */ +export interface LoggerOperations { + /** Lists a collection of loggers in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified logger. */ + delete: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams, + ) => Promise; + /** Updates an existing logger. */ + update: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a logger. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the logger specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the logger specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams, + ) => Promise; +} + +function _getLogger(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: LoggerListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + options?: LoggerDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, loggerId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: LoggerUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, loggerId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + parameters: LoggerContract, + options?: LoggerCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, loggerId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, loggerId, options), + get: ( + resourceGroupName: string, + serviceName: string, + loggerId: string, + options?: LoggerGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, loggerId, options), + }; +} + +export function _getLoggerOperations(context: ApiManagementContext): LoggerOperations { + return { + ..._getLogger(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/namedValue/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/namedValue/index.ts new file mode 100644 index 000000000000..a8d791e54ca9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/namedValue/index.ts @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listValue, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/namedValue/operations.js"; +import { + NamedValueRefreshSecretOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListByServiceOptionalParams, + NamedValueDeleteOptionalParams, + NamedValueUpdateOptionalParams, + NamedValueCreateOrUpdateOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetOptionalParams, +} from "../../api/namedValue/options.js"; +import { + NamedValueContract, + NamedValueCreateContract, + NamedValueUpdateParameters, + NamedValueSecretContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a NamedValue operations. */ +export interface NamedValueOperations { + /** Refresh the secret of the named value specified by its identifier. */ + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecret: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecretAndWait: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => Promise; + /** Gets the secret of the named value specified by its identifier. */ + listValue: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams, + ) => Promise; + /** Lists a collection of named values defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific named value from the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams, + ) => Promise; + /** Updates the specific named value. */ + update: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => Promise; + /** Creates or updates named value. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the named value specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the named value specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams, + ) => Promise; +} + +function _getNamedValue(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => refreshSecret(context, resourceGroupName, serviceName, namedValueId, options), + beginRefreshSecret: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => { + const poller = refreshSecret(context, resourceGroupName, serviceName, namedValueId, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRefreshSecretAndWait: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueRefreshSecretOptionalParams, + ) => { + return await refreshSecret(context, resourceGroupName, serviceName, namedValueId, options); + }, + listValue: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueListValueOptionalParams, + ) => listValue(context, resourceGroupName, serviceName, namedValueId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NamedValueListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + options?: NamedValueDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, namedValueId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, namedValueId, ifMatch, parameters, options), + beginUpdate: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: NamedValueUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + serviceName, + namedValueId, + ifMatch, + parameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, namedValueId, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + namedValueId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: NamedValueCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + namedValueId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, namedValueId, options), + get: ( + resourceGroupName: string, + serviceName: string, + namedValueId: string, + options?: NamedValueGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, namedValueId, options), + }; +} + +export function _getNamedValueOperations(context: ApiManagementContext): NamedValueOperations { + return { + ..._getNamedValue(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/networkStatus/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/networkStatus/index.ts new file mode 100644 index 000000000000..8e094a45f6da --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/networkStatus/index.ts @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByLocation, listByService } from "../../api/networkStatus/operations.js"; +import { + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByServiceOptionalParams, +} from "../../api/networkStatus/options.js"; +import { NetworkStatusContractByLocation, NetworkStatusContract } from "../../models/models.js"; + +/** Interface representing a NetworkStatus operations. */ +export interface NetworkStatusOperations { + /** Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ + listByLocation: ( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams, + ) => Promise; + /** Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams, + ) => Promise; +} + +function _getNetworkStatus(context: ApiManagementContext) { + return { + listByLocation: ( + resourceGroupName: string, + serviceName: string, + locationName: string, + options?: NetworkStatusListByLocationOptionalParams, + ) => listByLocation(context, resourceGroupName, serviceName, locationName, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NetworkStatusListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getNetworkStatusOperations( + context: ApiManagementContext, +): NetworkStatusOperations { + return { + ..._getNetworkStatus(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/notification/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/notification/index.ts new file mode 100644 index 000000000000..4f6141ba3a73 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/notification/index.ts @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService, createOrUpdate, get } from "../../api/notification/operations.js"; +import { + NotificationListByServiceOptionalParams, + NotificationCreateOrUpdateOptionalParams, + NotificationGetOptionalParams, +} from "../../api/notification/options.js"; +import { NotificationContract, NotificationName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Notification operations. */ +export interface NotificationOperations { + /** Lists a collection of properties defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Create or Update API Management publisher notification. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the Notification specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams, + ) => Promise; +} + +function _getNotification(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: NotificationListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, notificationName, options), + get: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, notificationName, options), + }; +} + +export function _getNotificationOperations(context: ApiManagementContext): NotificationOperations { + return { + ..._getNotification(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientEmail/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientEmail/index.ts new file mode 100644 index 000000000000..916a5090761d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientEmail/index.ts @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByNotification, +} from "../../api/notificationRecipientEmail/operations.js"; +import { + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, +} from "../../api/notificationRecipientEmail/options.js"; +import { + NotificationName, + RecipientEmailCollection, + RecipientEmailContract, +} from "../../models/models.js"; + +/** Interface representing a NotificationRecipientEmail operations. */ +export interface NotificationRecipientEmailOperations { + /** Removes the email from the list of Notification. */ + delete: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams, + ) => Promise; + /** Adds the Email address to the list of Recipients for the Notification. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams, + ) => Promise; + /** Determine if Notification Recipient Email subscribed to the notification. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams, + ) => Promise; + /** Gets the list of the Notification Recipient Emails subscribed to a notification. */ + listByNotification: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams, + ) => Promise; +} + +function _getNotificationRecipientEmail(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, notificationName, email, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, notificationName, email, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + email: string, + options?: NotificationRecipientEmailCheckEntityExistsOptionalParams, + ) => + checkEntityExists(context, resourceGroupName, serviceName, notificationName, email, options), + listByNotification: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientEmailListByNotificationOptionalParams, + ) => listByNotification(context, resourceGroupName, serviceName, notificationName, options), + }; +} + +export function _getNotificationRecipientEmailOperations( + context: ApiManagementContext, +): NotificationRecipientEmailOperations { + return { + ..._getNotificationRecipientEmail(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientUser/index.ts new file mode 100644 index 000000000000..c2b9dc62a175 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/notificationRecipientUser/index.ts @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByNotification, +} from "../../api/notificationRecipientUser/operations.js"; +import { + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, +} from "../../api/notificationRecipientUser/options.js"; +import { + NotificationName, + RecipientUserCollection, + RecipientUserContract, +} from "../../models/models.js"; + +/** Interface representing a NotificationRecipientUser operations. */ +export interface NotificationRecipientUserOperations { + /** Removes the API Management user from the list of Notification. */ + delete: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams, + ) => Promise; + /** Adds the API Management User to the list of Recipients for the Notification. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams, + ) => Promise; + /** Determine if the Notification Recipient User is subscribed to the notification. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams, + ) => Promise; + /** Gets the list of the Notification Recipient User subscribed to the notification. */ + listByNotification: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams, + ) => Promise; +} + +function _getNotificationRecipientUser(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, notificationName, userId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, notificationName, userId, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + userId: string, + options?: NotificationRecipientUserCheckEntityExistsOptionalParams, + ) => + checkEntityExists(context, resourceGroupName, serviceName, notificationName, userId, options), + listByNotification: ( + resourceGroupName: string, + serviceName: string, + notificationName: NotificationName, + options?: NotificationRecipientUserListByNotificationOptionalParams, + ) => listByNotification(context, resourceGroupName, serviceName, notificationName, options), + }; +} + +export function _getNotificationRecipientUserOperations( + context: ApiManagementContext, +): NotificationRecipientUserOperations { + return { + ..._getNotificationRecipientUser(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/openIdConnectProvider/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/openIdConnectProvider/index.ts new file mode 100644 index 000000000000..586311df86d7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/openIdConnectProvider/index.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/openIdConnectProvider/operations.js"; +import { + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetOptionalParams, +} from "../../api/openIdConnectProvider/options.js"; +import { + ClientSecretContract, + OpenidConnectProviderContract, + OpenidConnectProviderUpdateContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a OpenIdConnectProvider operations. */ +export interface OpenIdConnectProviderOperations { + /** Gets the client secret details of the OpenID Connect Provider. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams, + ) => Promise; + /** Lists of all the OpenId Connect Providers. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific OpenID Connect Provider of the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams, + ) => Promise; + /** Updates the specific OpenID Connect Provider. */ + update: ( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams, + ) => Promise; + /** Creates or updates the OpenID Connect Provider. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams, + ) => Promise; + /** Gets specific OpenID Connect Provider without secrets. */ + get: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams, + ) => Promise; +} + +function _getOpenIdConnectProvider(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, opid, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: OpenIdConnectProviderListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + options?: OpenIdConnectProviderDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, opid, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + opid: string, + ifMatch: string, + parameters: OpenidConnectProviderUpdateContract, + options?: OpenIdConnectProviderUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, opid, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + opid: string, + parameters: OpenidConnectProviderContract, + options?: OpenIdConnectProviderCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, opid, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, opid, options), + get: ( + resourceGroupName: string, + serviceName: string, + opid: string, + options?: OpenIdConnectProviderGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, opid, options), + }; +} + +export function _getOpenIdConnectProviderOperations( + context: ApiManagementContext, +): OpenIdConnectProviderOperations { + return { + ..._getOpenIdConnectProvider(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/operation/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/operation/index.ts new file mode 100644 index 000000000000..8bc0ea3ec246 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/operation/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByTags } from "../../api/operation/operations.js"; +import { OperationListByTagsOptionalParams } from "../../api/operation/options.js"; +import { TagResourceContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Operation operations. */ +export interface OperationOperations { + /** Lists a collection of operations associated with tags. */ + listByTags: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getOperation(context: ApiManagementContext) { + return { + listByTags: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: OperationListByTagsOptionalParams, + ) => listByTags(context, resourceGroupName, serviceName, apiId, options), + }; +} + +export function _getOperationOperations(context: ApiManagementContext): OperationOperations { + return { + ..._getOperation(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/operationStatus/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/operationStatus/index.ts new file mode 100644 index 000000000000..494e65dfeccf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/operationStatus/index.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { get } from "../../api/operationStatus/operations.js"; +import { OperationStatusGetOptionalParams } from "../../api/operationStatus/options.js"; +import { OperationStatusResult } from "../../models/models.js"; + +/** Interface representing a OperationStatus operations. */ +export interface OperationStatusOperations { + /** Returns the current status of an async operation. */ + get: ( + location: string, + operationId: string, + options?: OperationStatusGetOptionalParams, + ) => Promise; +} + +function _getOperationStatus(context: ApiManagementContext) { + return { + get: (location: string, operationId: string, options?: OperationStatusGetOptionalParams) => + get(context, location, operationId, options), + }; +} + +export function _getOperationStatusOperations( + context: ApiManagementContext, +): OperationStatusOperations { + return { + ..._getOperationStatus(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/operationsResults/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/operationsResults/index.ts new file mode 100644 index 000000000000..c95de6ff2d4c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/operationsResults/index.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { get } from "../../api/operationsResults/operations.js"; +import { OperationsResultsGetOptionalParams } from "../../api/operationsResults/options.js"; + +/** Interface representing a OperationsResults operations. */ +export interface OperationsResultsOperations { + /** Returns operation results for long running operations executing DELETE or PATCH on the resource. */ + get: ( + location: string, + operationId: string, + options?: OperationsResultsGetOptionalParams, + ) => Promise; +} + +function _getOperationsResults(context: ApiManagementContext) { + return { + get: (location: string, operationId: string, options?: OperationsResultsGetOptionalParams) => + get(context, location, operationId, options), + }; +} + +export function _getOperationsResultsOperations( + context: ApiManagementContext, +): OperationsResultsOperations { + return { + ..._getOperationsResults(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/outboundNetworkDependenciesEndpoints/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/outboundNetworkDependenciesEndpoints/index.ts new file mode 100644 index 000000000000..e9f80d91fdee --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/outboundNetworkDependenciesEndpoints/index.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/outboundNetworkDependenciesEndpoints/operations.js"; +import { OutboundNetworkDependenciesEndpointsListByServiceOptionalParams } from "../../api/outboundNetworkDependenciesEndpoints/options.js"; +import { OutboundEnvironmentEndpointList } from "../../models/models.js"; + +/** Interface representing a OutboundNetworkDependenciesEndpoints operations. */ +export interface OutboundNetworkDependenciesEndpointsOperations { + /** Gets the network endpoints of all outbound dependencies of a ApiManagement service. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + ) => Promise; +} + +function _getOutboundNetworkDependenciesEndpoints(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getOutboundNetworkDependenciesEndpointsOperations( + context: ApiManagementContext, +): OutboundNetworkDependenciesEndpointsOperations { + return { + ..._getOutboundNetworkDependenciesEndpoints(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/policy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/policy/index.ts new file mode 100644 index 000000000000..ab26e843d2dd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/policy/index.ts @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/policy/operations.js"; +import { + PolicyListByServiceOptionalParams, + PolicyDeleteOptionalParams, + PolicyCreateOrUpdateOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetOptionalParams, +} from "../../api/policy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Policy operations. */ +export interface PolicyOperations { + /** Lists all the Global Policy definitions of the Api Management service. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the global policy configuration of the Api Management Service. */ + delete: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates the global policy configuration of the Api Management service. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Global policy definition in the Api Management service. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the Global policy definition of the Api Management service. */ + get: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams, + ) => Promise; +} + +function _getPolicy(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + ifMatch: string, + options?: PolicyDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, policyId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: PolicyCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, policyId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + policyId: PolicyIdName, + options?: PolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, policyId, options), + }; +} + +export function _getPolicyOperations(context: ApiManagementContext): PolicyOperations { + return { + ..._getPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/policyDescription/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/policyDescription/index.ts new file mode 100644 index 000000000000..08abbe51b0b7 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/policyDescription/index.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/policyDescription/operations.js"; +import { PolicyDescriptionListByServiceOptionalParams } from "../../api/policyDescription/options.js"; +import { PolicyDescriptionCollection } from "../../models/models.js"; + +/** Interface representing a PolicyDescription operations. */ +export interface PolicyDescriptionOperations { + /** Lists all policy descriptions. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams, + ) => Promise; +} + +function _getPolicyDescription(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyDescriptionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getPolicyDescriptionOperations( + context: ApiManagementContext, +): PolicyDescriptionOperations { + return { + ..._getPolicyDescription(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/policyFragment/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/policyFragment/index.ts new file mode 100644 index 000000000000..400c44dc0ad9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/policyFragment/index.ts @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listReferences, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/policyFragment/operations.js"; +import { + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetOptionalParams, +} from "../../api/policyFragment/options.js"; +import { PolicyFragmentContract, ResourceCollection } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PolicyFragment operations. */ +export interface PolicyFragmentOperations { + /** Lists policy resources that reference the policy fragment. */ + listReferences: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams, + ) => Promise; + /** Gets all policy fragments. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a policy fragment. */ + delete: ( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams, + ) => Promise; + /** Creates or updates a policy fragment. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => PollerLike, PolicyFragmentContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => Promise, PolicyFragmentContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of a policy fragment. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams, + ) => Promise; + /** Gets a policy fragment. */ + get: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams, + ) => Promise; +} + +function _getPolicyFragment(context: ApiManagementContext) { + return { + listReferences: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentListReferencesOptionalParams, + ) => listReferences(context, resourceGroupName, serviceName, id, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyFragmentListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + id: string, + ifMatch: string, + options?: PolicyFragmentDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, id, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, id, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + id, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + id: string, + parameters: PolicyFragmentContract, + options?: PolicyFragmentCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate(context, resourceGroupName, serviceName, id, parameters, options); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, id, options), + get: ( + resourceGroupName: string, + serviceName: string, + id: string, + options?: PolicyFragmentGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, id, options), + }; +} + +export function _getPolicyFragmentOperations( + context: ApiManagementContext, +): PolicyFragmentOperations { + return { + ..._getPolicyFragment(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/policyRestriction/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/policyRestriction/index.ts new file mode 100644 index 000000000000..f837d47cef32 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/policyRestriction/index.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/policyRestriction/operations.js"; +import { + PolicyRestrictionListByServiceOptionalParams, + PolicyRestrictionDeleteOptionalParams, + PolicyRestrictionUpdateOptionalParams, + PolicyRestrictionCreateOrUpdateOptionalParams, + PolicyRestrictionGetEntityTagOptionalParams, + PolicyRestrictionGetOptionalParams, +} from "../../api/policyRestriction/options.js"; +import { PolicyRestrictionContract, PolicyRestrictionUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a PolicyRestriction operations. */ +export interface PolicyRestrictionOperations { + /** Gets all policy restrictions of API Management services. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy restriction configuration of the Api Management Service. */ + delete: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionDeleteOptionalParams, + ) => Promise; + /** Updates the policy restriction configuration of the Api Management service. */ + update: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + ifMatch: string, + parameters: PolicyRestrictionUpdateContract, + options?: PolicyRestrictionUpdateOptionalParams, + ) => Promise; + /** Creates or updates the policy restriction configuration of the Api Management service. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + parameters: PolicyRestrictionContract, + options?: PolicyRestrictionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the policy restriction in the Api Management service. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy restriction of the Api Management service. */ + get: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionGetOptionalParams, + ) => Promise; +} + +function _getPolicyRestriction(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, policyRestrictionId, options), + update: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + ifMatch: string, + parameters: PolicyRestrictionUpdateContract, + options?: PolicyRestrictionUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + parameters: PolicyRestrictionContract, + options?: PolicyRestrictionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + policyRestrictionId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, policyRestrictionId, options), + get: ( + resourceGroupName: string, + serviceName: string, + policyRestrictionId: string, + options?: PolicyRestrictionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, policyRestrictionId, options), + }; +} + +export function _getPolicyRestrictionOperations( + context: ApiManagementContext, +): PolicyRestrictionOperations { + return { + ..._getPolicyRestriction(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/policyRestrictionValidations/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/policyRestrictionValidations/index.ts new file mode 100644 index 000000000000..94b858c6ccca --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/policyRestrictionValidations/index.ts @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { byService } from "../../api/policyRestrictionValidations/operations.js"; +import { PolicyRestrictionValidationsByServiceOptionalParams } from "../../api/policyRestrictionValidations/options.js"; +import { OperationResultContract } from "../../models/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PolicyRestrictionValidations operations. */ +export interface PolicyRestrictionValidationsOperations { + /** Validate all policies of API Management services. */ + byService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => PollerLike, OperationResultContract>; + /** @deprecated use byService instead */ + beginByService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => Promise, OperationResultContract>>; + /** @deprecated use byService instead */ + beginByServiceAndWait: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => Promise; +} + +function _getPolicyRestrictionValidations(context: ApiManagementContext) { + return { + byService: ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => byService(context, resourceGroupName, serviceName, options), + beginByService: async ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => { + const poller = byService(context, resourceGroupName, serviceName, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginByServiceAndWait: async ( + resourceGroupName: string, + serviceName: string, + options?: PolicyRestrictionValidationsByServiceOptionalParams, + ) => { + return await byService(context, resourceGroupName, serviceName, options); + }, + }; +} + +export function _getPolicyRestrictionValidationsOperations( + context: ApiManagementContext, +): PolicyRestrictionValidationsOperations { + return { + ..._getPolicyRestrictionValidations(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/portalConfig/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/portalConfig/index.ts new file mode 100644 index 000000000000..92b741769ddf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/portalConfig/index.ts @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/portalConfig/operations.js"; +import { + PortalConfigListByServiceOptionalParams, + PortalConfigUpdateOptionalParams, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetOptionalParams, +} from "../../api/portalConfig/options.js"; +import { PortalConfigContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a PortalConfig operations. */ +export interface PortalConfigOperations { + /** Lists the developer portal configurations. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Update the developer portal configuration. */ + update: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams, + ) => Promise; + /** Create or update the developer portal configuration. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the developer portal configuration. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams, + ) => Promise; + /** Get the developer portal configuration. */ + get: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams, + ) => Promise; +} + +function _getPortalConfig(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalConfigListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + update: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigUpdateOptionalParams, + ) => + update(context, resourceGroupName, serviceName, portalConfigId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + ifMatch: string, + parameters: PortalConfigContract, + options?: PortalConfigCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + portalConfigId, + ifMatch, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, portalConfigId, options), + get: ( + resourceGroupName: string, + serviceName: string, + portalConfigId: string, + options?: PortalConfigGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, portalConfigId, options), + }; +} + +export function _getPortalConfigOperations(context: ApiManagementContext): PortalConfigOperations { + return { + ..._getPortalConfig(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/portalRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/portalRevision/index.ts new file mode 100644 index 000000000000..cb2c3d55d75c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/portalRevision/index.ts @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/portalRevision/operations.js"; +import { + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetOptionalParams, +} from "../../api/portalRevision/options.js"; +import { PortalRevisionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PortalRevision operations. */ +export interface PortalRevisionOperations { + /** Lists developer portal's revisions. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Updates the description of specified portal revision or makes it current. */ + update: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => PollerLike, PortalRevisionContract>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => Promise, PortalRevisionContract>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => Promise; + /** Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => PollerLike, PortalRevisionContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => Promise, PortalRevisionContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the developer portal revision specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams, + ) => Promise; + /** Gets the developer portal's revision specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams, + ) => Promise; +} + +function _getPortalRevision(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalRevisionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + update: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options, + ), + beginUpdate: async ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + ifMatch: string, + parameters: PortalRevisionContract, + options?: PortalRevisionUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + serviceName, + portalRevisionId, + ifMatch, + parameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + parameters: PortalRevisionContract, + options?: PortalRevisionCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + portalRevisionId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, portalRevisionId, options), + get: ( + resourceGroupName: string, + serviceName: string, + portalRevisionId: string, + options?: PortalRevisionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, portalRevisionId, options), + }; +} + +export function _getPortalRevisionOperations( + context: ApiManagementContext, +): PortalRevisionOperations { + return { + ..._getPortalRevision(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/portalSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/portalSettings/index.ts new file mode 100644 index 000000000000..ba4ee99a726f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/portalSettings/index.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/portalSettings/operations.js"; +import { PortalSettingsListByServiceOptionalParams } from "../../api/portalSettings/options.js"; +import { PortalSettingsCollection } from "../../models/models.js"; + +/** Interface representing a PortalSettings operations. */ +export interface PortalSettingsOperations { + /** Lists a collection of portalsettings defined within a service instance.. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams, + ) => Promise; +} + +function _getPortalSettings(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PortalSettingsListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getPortalSettingsOperations( + context: ApiManagementContext, +): PortalSettingsOperations { + return { + ..._getPortalSettings(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/privateEndpointConnection/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/privateEndpointConnection/index.ts new file mode 100644 index 000000000000..37a85eac3167 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/privateEndpointConnection/index.ts @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listPrivateLinkResources, + getPrivateLinkResource, + listByService, + $delete, + createOrUpdate, + getByName, +} from "../../api/privateEndpointConnection/operations.js"; +import { + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, +} from "../../api/privateEndpointConnection/options.js"; +import { + PrivateEndpointConnection, + PrivateEndpointConnectionRequest, + PrivateLinkResource, + PrivateLinkResourceListResult, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a PrivateEndpointConnection operations. */ +export interface PrivateEndpointConnectionOperations { + /** Gets the private link resources */ + listPrivateLinkResources: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + ) => Promise; + /** Gets the private link resources */ + getPrivateLinkResource: ( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + ) => Promise; + /** Lists all private endpoint connections of the API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Private Endpoint Connection. */ + delete: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => Promise; + /** Creates a new Private Endpoint Connection or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => PollerLike, PrivateEndpointConnection>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => Promise< + SimplePollerLike, PrivateEndpointConnection> + >; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the Private Endpoint Connection specified by its identifier. */ + getByName: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams, + ) => Promise; +} + +function _getPrivateEndpointConnection(context: ApiManagementContext) { + return { + listPrivateLinkResources: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + ) => listPrivateLinkResources(context, resourceGroupName, serviceName, options), + getPrivateLinkResource: ( + resourceGroupName: string, + serviceName: string, + privateLinkSubResourceName: string, + options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + ) => + getPrivateLinkResource( + context, + resourceGroupName, + serviceName, + privateLinkSubResourceName, + options, + ), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: PrivateEndpointConnectionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, privateEndpointConnectionName, options), + beginDelete: async ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => { + const poller = $delete( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionDeleteOptionalParams, + ) => { + return await $delete( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, + options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + privateEndpointConnectionName, + privateEndpointConnectionRequest, + options, + ); + }, + getByName: ( + resourceGroupName: string, + serviceName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionGetByNameOptionalParams, + ) => getByName(context, resourceGroupName, serviceName, privateEndpointConnectionName, options), + }; +} + +export function _getPrivateEndpointConnectionOperations( + context: ApiManagementContext, +): PrivateEndpointConnectionOperations { + return { + ..._getPrivateEndpointConnection(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/product/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/product/index.ts new file mode 100644 index 000000000000..55dba3a0c9c2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/product/index.ts @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, + listByTags, +} from "../../api/product/operations.js"; +import { + ProductListByServiceOptionalParams, + ProductDeleteOptionalParams, + ProductUpdateOptionalParams, + ProductCreateOrUpdateOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetOptionalParams, + ProductListByTagsOptionalParams, +} from "../../api/product/options.js"; +import { + ProductContract, + ProductUpdateParameters, + TagResourceContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Product operations. */ +export interface ProductOperations { + /** Lists a collection of products in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams, + ) => Promise; + /** Update existing product details. */ + update: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the product specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the product specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams, + ) => Promise; + /** Lists a collection of products associated with tags. */ + listByTags: ( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProduct(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: ProductListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: ProductUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, productId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: ProductContract, + options?: ProductCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, productId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, productId, options), + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, productId, options), + listByTags: ( + resourceGroupName: string, + serviceName: string, + options?: ProductListByTagsOptionalParams, + ) => listByTags(context, resourceGroupName, serviceName, options), + }; +} + +export function _getProductOperations(context: ApiManagementContext): ProductOperations { + return { + ..._getProduct(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productApi/index.ts new file mode 100644 index 000000000000..9e3c9841fe3f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productApi/index.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByProduct, +} from "../../api/productApi/operations.js"; +import { + ProductApiDeleteOptionalParams, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCheckEntityExistsOptionalParams, + ProductApiListByProductOptionalParams, +} from "../../api/productApi/options.js"; +import { ApiContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductApi operations. */ +export interface ProductApiOperations { + /** Deletes the specified API from the specified product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams, + ) => Promise; + /** Checks that API entity specified by identifier is associated with the Product entity. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams, + ) => Promise; + /** Lists a collection of the APIs associated with a product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProductApi(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, apiId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, productId, apiId, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiId: string, + options?: ProductApiCheckEntityExistsOptionalParams, + ) => checkEntityExists(context, resourceGroupName, serviceName, productId, apiId, options), + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + }; +} + +export function _getProductApiOperations(context: ApiManagementContext): ProductApiOperations { + return { + ..._getProductApi(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productApiLink/index.ts new file mode 100644 index 000000000000..0c29d969657d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productApiLink/index.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/productApiLink/operations.js"; +import { + ProductApiLinkListByProductOptionalParams, + ProductApiLinkDeleteOptionalParams, + ProductApiLinkCreateOrUpdateOptionalParams, + ProductApiLinkGetOptionalParams, +} from "../../api/productApiLink/options.js"; +import { ProductApiLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductApiLink operations. */ +export interface ProductApiLinkOperations { + /** Lists a collection of the API links associated with a product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API from the specified product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options?: ProductApiLinkDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified product via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options?: ProductApiLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the API link for the product. */ + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options?: ProductApiLinkGetOptionalParams, + ) => Promise; +} + +function _getProductApiLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductApiLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options?: ProductApiLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, apiLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options?: ProductApiLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + productId, + apiLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + apiLinkId: string, + options?: ProductApiLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, productId, apiLinkId, options), + }; +} + +export function _getProductApiLinkOperations( + context: ApiManagementContext, +): ProductApiLinkOperations { + return { + ..._getProductApiLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productGroup/index.ts new file mode 100644 index 000000000000..6ec470ba8aa2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productGroup/index.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByProduct, +} from "../../api/productGroup/operations.js"; +import { + ProductGroupDeleteOptionalParams, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupListByProductOptionalParams, +} from "../../api/productGroup/options.js"; +import { GroupContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductGroup operations. */ +export interface ProductGroupOperations { + /** Deletes the association between the specified group and product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams, + ) => Promise; + /** Adds the association between the specified developer group with the specified product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams, + ) => Promise; + /** Checks that Group entity specified by identifier is associated with the Product entity. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams, + ) => Promise; + /** Lists the collection of developer groups associated with the specified product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProductGroup(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, groupId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, productId, groupId, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupId: string, + options?: ProductGroupCheckEntityExistsOptionalParams, + ) => checkEntityExists(context, resourceGroupName, serviceName, productId, groupId, options), + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + }; +} + +export function _getProductGroupOperations(context: ApiManagementContext): ProductGroupOperations { + return { + ..._getProductGroup(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productGroupLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productGroupLink/index.ts new file mode 100644 index 000000000000..3fc07a319a1a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productGroupLink/index.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/productGroupLink/operations.js"; +import { + ProductGroupLinkListByProductOptionalParams, + ProductGroupLinkDeleteOptionalParams, + ProductGroupLinkCreateOrUpdateOptionalParams, + ProductGroupLinkGetOptionalParams, +} from "../../api/productGroupLink/options.js"; +import { ProductGroupLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductGroupLink operations. */ +export interface ProductGroupLinkOperations { + /** Lists a collection of the group links associated with a product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified group from the specified product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options?: ProductGroupLinkDeleteOptionalParams, + ) => Promise; + /** Adds a group to the specified product via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options?: ProductGroupLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the group link for the product. */ + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options?: ProductGroupLinkGetOptionalParams, + ) => Promise; +} + +function _getProductGroupLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductGroupLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options?: ProductGroupLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, groupLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options?: ProductGroupLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + productId, + groupLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + groupLinkId: string, + options?: ProductGroupLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, productId, groupLinkId, options), + }; +} + +export function _getProductGroupLinkOperations( + context: ApiManagementContext, +): ProductGroupLinkOperations { + return { + ..._getProductGroupLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productPolicy/index.ts new file mode 100644 index 000000000000..0f3669c27a11 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productPolicy/index.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/productPolicy/operations.js"; +import { + ProductPolicyListByProductOptionalParams, + ProductPolicyDeleteOptionalParams, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetOptionalParams, +} from "../../api/productPolicy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductPolicy operations. */ +export interface ProductPolicyOperations { + /** Get the policy configuration at the Product level. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy configuration at the Product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the Product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the ETag of the policy configuration at the Product level. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the Product level. */ + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams, + ) => Promise; +} + +function _getProductPolicy(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductPolicyListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: ProductPolicyDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, policyId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: ProductPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + productId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, productId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + policyId: PolicyIdName, + options?: ProductPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, productId, policyId, options), + }; +} + +export function _getProductPolicyOperations( + context: ApiManagementContext, +): ProductPolicyOperations { + return { + ..._getProductPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productSubscriptions/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productSubscriptions/index.ts new file mode 100644 index 000000000000..48dd3854b3d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productSubscriptions/index.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/productSubscriptions/operations.js"; +import { ProductSubscriptionsListOptionalParams } from "../../api/productSubscriptions/options.js"; +import { SubscriptionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductSubscriptions operations. */ +export interface ProductSubscriptionsOperations { + /** Lists the collection of subscriptions to the specified product. */ + list: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProductSubscriptions(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductSubscriptionsListOptionalParams, + ) => list(context, resourceGroupName, serviceName, productId, options), + }; +} + +export function _getProductSubscriptionsOperations( + context: ApiManagementContext, +): ProductSubscriptionsOperations { + return { + ..._getProductSubscriptions(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productWiki/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productWiki/index.ts new file mode 100644 index 000000000000..6ac7777d4d88 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productWiki/index.ts @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/productWiki/operations.js"; +import { + ProductWikiDeleteOptionalParams, + ProductWikiUpdateOptionalParams, + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetOptionalParams, +} from "../../api/productWiki/options.js"; +import { WikiContract, WikiUpdateContract } from "../../models/models.js"; + +/** Interface representing a ProductWiki operations. */ +export interface ProductWikiOperations { + /** Deletes the specified Wiki from a Product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Wiki for a Product specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams, + ) => Promise; + /** Creates a new Wiki for a Product or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Wiki for a Product specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams, + ) => Promise; +} + +function _getProductWiki(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + options?: ProductWikiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, productId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + productId: string, + ifMatch: string, + parameters: WikiUpdateContract, + options?: ProductWikiUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, productId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + productId: string, + parameters: WikiContract, + options?: ProductWikiCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, productId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, productId, options), + get: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikiGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, productId, options), + }; +} + +export function _getProductWikiOperations(context: ApiManagementContext): ProductWikiOperations { + return { + ..._getProductWiki(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/productWikis/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/productWikis/index.ts new file mode 100644 index 000000000000..d4f4153c72d8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/productWikis/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/productWikis/operations.js"; +import { ProductWikisListOptionalParams } from "../../api/productWikis/options.js"; +import { WikiContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a ProductWikis operations. */ +export interface ProductWikisOperations { + /** Gets the details of the Wiki for a Product specified by its identifier. */ + list: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getProductWikis(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: ProductWikisListOptionalParams, + ) => list(context, resourceGroupName, serviceName, productId, options), + }; +} + +export function _getProductWikisOperations(context: ApiManagementContext): ProductWikisOperations { + return { + ..._getProductWikis(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/quotaByCounterKeys/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/quotaByCounterKeys/index.ts new file mode 100644 index 000000000000..6b9142be756c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/quotaByCounterKeys/index.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { update, listByService } from "../../api/quotaByCounterKeys/operations.js"; +import { + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysListByServiceOptionalParams, +} from "../../api/quotaByCounterKeys/options.js"; +import { QuotaCounterCollection, QuotaCounterValueUpdateContract } from "../../models/models.js"; + +/** Interface representing a QuotaByCounterKeys operations. */ +export interface QuotaByCounterKeysOperations { + /** Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. */ + update: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams, + ) => Promise; + /** Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams, + ) => Promise; +} + +function _getQuotaByCounterKeys(context: ApiManagementContext) { + return { + update: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByCounterKeysUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, quotaCounterKey, parameters, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + options?: QuotaByCounterKeysListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, quotaCounterKey, options), + }; +} + +export function _getQuotaByCounterKeysOperations( + context: ApiManagementContext, +): QuotaByCounterKeysOperations { + return { + ..._getQuotaByCounterKeys(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/quotaByPeriodKeys/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/quotaByPeriodKeys/index.ts new file mode 100644 index 000000000000..171d7c9a9573 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/quotaByPeriodKeys/index.ts @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { update, get } from "../../api/quotaByPeriodKeys/operations.js"; +import { + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysGetOptionalParams, +} from "../../api/quotaByPeriodKeys/options.js"; +import { QuotaCounterContract, QuotaCounterValueUpdateContract } from "../../models/models.js"; + +/** Interface representing a QuotaByPeriodKeys operations. */ +export interface QuotaByPeriodKeysOperations { + /** Updates an existing quota counter value in the specified service instance. */ + update: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams, + ) => Promise; + /** Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. */ + get: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams, + ) => Promise; +} + +function _getQuotaByPeriodKeys(context: ApiManagementContext) { + return { + update: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + parameters: QuotaCounterValueUpdateContract, + options?: QuotaByPeriodKeysUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + quotaCounterKey, + quotaPeriodKey, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + quotaCounterKey: string, + quotaPeriodKey: string, + options?: QuotaByPeriodKeysGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, options), + }; +} + +export function _getQuotaByPeriodKeysOperations( + context: ApiManagementContext, +): QuotaByPeriodKeysOperations { + return { + ..._getQuotaByPeriodKeys(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/region/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/region/index.ts new file mode 100644 index 000000000000..6815e5480f62 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/region/index.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/region/operations.js"; +import { RegionListByServiceOptionalParams } from "../../api/region/options.js"; +import { RegionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Region operations. */ +export interface RegionOperations { + /** Lists all azure regions in which the service exists. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getRegion(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: RegionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getRegionOperations(context: ApiManagementContext): RegionOperations { + return { + ..._getRegion(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/reports/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/reports/index.ts new file mode 100644 index 000000000000..34a02b4d722b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/reports/index.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByRequest, + listByTime, + listBySubscription, + listByGeo, + listByProduct, + listByOperation, + listByUser, + listByApi, +} from "../../api/reports/operations.js"; +import { + ReportsListByRequestOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByUserOptionalParams, + ReportsListByApiOptionalParams, +} from "../../api/reports/options.js"; +import { ReportRecordContract, RequestReportRecordContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Reports operations. */ +export interface ReportsOperations { + /** Lists report records by Request. */ + listByRequest: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by Time. */ + listByTime: ( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by subscription. */ + listBySubscription: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by geography. */ + listByGeo: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by Product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by API Operations. */ + listByOperation: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by User. */ + listByUser: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams, + ) => PagedAsyncIterableIterator; + /** Lists report records by API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getReports(context: ApiManagementContext) { + return { + listByRequest: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByRequestOptionalParams, + ) => listByRequest(context, resourceGroupName, serviceName, filter, options), + listByTime: ( + resourceGroupName: string, + serviceName: string, + filter: string, + interval: string, + options?: ReportsListByTimeOptionalParams, + ) => listByTime(context, resourceGroupName, serviceName, filter, interval, options), + listBySubscription: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListBySubscriptionOptionalParams, + ) => listBySubscription(context, resourceGroupName, serviceName, filter, options), + listByGeo: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByGeoOptionalParams, + ) => listByGeo(context, resourceGroupName, serviceName, filter, options), + listByProduct: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, filter, options), + listByOperation: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByOperationOptionalParams, + ) => listByOperation(context, resourceGroupName, serviceName, filter, options), + listByUser: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByUserOptionalParams, + ) => listByUser(context, resourceGroupName, serviceName, filter, options), + listByApi: ( + resourceGroupName: string, + serviceName: string, + filter: string, + options?: ReportsListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, filter, options), + }; +} + +export function _getReportsOperations(context: ApiManagementContext): ReportsOperations { + return { + ..._getReports(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/signInSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/signInSettings/index.ts new file mode 100644 index 000000000000..2428520f163a --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/signInSettings/index.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { update, createOrUpdate, getEntityTag, get } from "../../api/signInSettings/operations.js"; +import { + SignInSettingsUpdateOptionalParams, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetOptionalParams, +} from "../../api/signInSettings/options.js"; +import { PortalSigninSettings } from "../../models/models.js"; + +/** Interface representing a SignInSettings operations. */ +export interface SignInSettingsOperations { + /** Update Sign-In settings. */ + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams, + ) => Promise; + /** Create or Update Sign-In settings. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the SignInSettings. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams, + ) => Promise; + /** Get Sign In Settings for the Portal */ + get: ( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams, + ) => Promise; +} + +function _getSignInSettings(context: ApiManagementContext) { + return { + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSigninSettings, + options?: SignInSettingsUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalSigninSettings, + options?: SignInSettingsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, options), + get: ( + resourceGroupName: string, + serviceName: string, + options?: SignInSettingsGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, options), + }; +} + +export function _getSignInSettingsOperations( + context: ApiManagementContext, +): SignInSettingsOperations { + return { + ..._getSignInSettings(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/signUpSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/signUpSettings/index.ts new file mode 100644 index 000000000000..34c3cac145d1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/signUpSettings/index.ts @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { update, createOrUpdate, getEntityTag, get } from "../../api/signUpSettings/operations.js"; +import { + SignUpSettingsUpdateOptionalParams, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetOptionalParams, +} from "../../api/signUpSettings/options.js"; +import { PortalSignupSettings } from "../../models/models.js"; + +/** Interface representing a SignUpSettings operations. */ +export interface SignUpSettingsOperations { + /** Update Sign-Up settings. */ + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams, + ) => Promise; + /** Create or Update Sign-Up settings. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the SignUpSettings. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams, + ) => Promise; + /** Get Sign Up Settings for the Portal */ + get: ( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams, + ) => Promise; +} + +function _getSignUpSettings(context: ApiManagementContext) { + return { + update: ( + resourceGroupName: string, + serviceName: string, + ifMatch: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + parameters: PortalSignupSettings, + options?: SignUpSettingsCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, options), + get: ( + resourceGroupName: string, + serviceName: string, + options?: SignUpSettingsGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, options), + }; +} + +export function _getSignUpSettingsOperations( + context: ApiManagementContext, +): SignUpSettingsOperations { + return { + ..._getSignUpSettings(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/subscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/subscription/index.ts new file mode 100644 index 000000000000..cff97d5b2ded --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/subscription/index.ts @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + list, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/subscription/operations.js"; +import { + SubscriptionListSecretsOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionListOptionalParams, + SubscriptionDeleteOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetOptionalParams, +} from "../../api/subscription/options.js"; +import { + SubscriptionContract, + SubscriptionCreateParameters, + SubscriptionUpdateParameters, + SubscriptionKeysContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Subscription operations. */ +export interface SubscriptionOperations { + /** Gets the specified Subscription keys. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams, + ) => Promise; + /** Regenerates secondary key of existing subscription of the API Management service instance. */ + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams, + ) => Promise; + /** Regenerates primary key of existing subscription of the API Management service instance. */ + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams, + ) => Promise; + /** Lists all subscriptions of the API Management service instance. */ + list: ( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified subscription. */ + delete: ( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams, + ) => Promise; + /** Updates the details of a subscription specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams, + ) => Promise; + /** Creates or updates the subscription of specified user to the specified product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams, + ) => Promise; + /** Gets the specified Subscription entity. */ + get: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams, + ) => Promise; +} + +function _getSubscription(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, sid, options), + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegenerateSecondaryKeyOptionalParams, + ) => regenerateSecondaryKey(context, resourceGroupName, serviceName, sid, options), + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionRegeneratePrimaryKeyOptionalParams, + ) => regeneratePrimaryKey(context, resourceGroupName, serviceName, sid, options), + list: ( + resourceGroupName: string, + serviceName: string, + options?: SubscriptionListOptionalParams, + ) => list(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + options?: SubscriptionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, sid, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: SubscriptionUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, sid, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: SubscriptionCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, sid, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, sid, options), + get: ( + resourceGroupName: string, + serviceName: string, + sid: string, + options?: SubscriptionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, sid, options), + }; +} + +export function _getSubscriptionOperations(context: ApiManagementContext): SubscriptionOperations { + return { + ..._getSubscription(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tag/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tag/index.ts new file mode 100644 index 000000000000..7305a875f68d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tag/index.ts @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityState, + get, + listByProduct, + detachFromProduct, + assignToProduct, + getEntityStateByProduct, + getByProduct, + listByOperation, + detachFromOperation, + assignToOperation, + getEntityStateByOperation, + getByOperation, + listByApi, + detachFromApi, + assignToApi, + getEntityStateByApi, + getByApi, +} from "../../api/tag/operations.js"; +import { + TagListByServiceOptionalParams, + TagDeleteOptionalParams, + TagUpdateOptionalParams, + TagCreateOrUpdateOptionalParams, + TagGetEntityStateOptionalParams, + TagGetOptionalParams, + TagListByProductOptionalParams, + TagDetachFromProductOptionalParams, + TagAssignToProductOptionalParams, + TagGetEntityStateByProductOptionalParams, + TagGetByProductOptionalParams, + TagListByOperationOptionalParams, + TagDetachFromOperationOptionalParams, + TagAssignToOperationOptionalParams, + TagGetEntityStateByOperationOptionalParams, + TagGetByOperationOptionalParams, + TagListByApiOptionalParams, + TagDetachFromApiOptionalParams, + TagAssignToApiOptionalParams, + TagGetEntityStateByApiOptionalParams, + TagGetByApiOptionalParams, +} from "../../api/tag/options.js"; +import { TagContract, TagCreateUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Tag operations. */ +export interface TagOperations { + /** Lists a collection of tags defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific tag of the API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams, + ) => Promise; + /** Updates the details of the tag specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams, + ) => Promise; + /** Creates a tag. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityState: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams, + ) => Promise; + /** Gets the details of the tag specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams, + ) => Promise; + /** Lists all Tags associated with the Product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Detach the tag from the Product. */ + detachFromProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams, + ) => Promise; + /** Assign tag to the Product. */ + assignToProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityStateByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams, + ) => Promise; + /** Get tag associated with the Product. */ + getByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams, + ) => Promise; + /** Lists all Tags associated with the Operation. */ + listByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Detach the tag from the Operation. */ + detachFromOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams, + ) => Promise; + /** Assign tag to the Operation. */ + assignToOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityStateByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams, + ) => Promise; + /** Get tag associated with the Operation. */ + getByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams, + ) => Promise; + /** Lists all Tags associated with the API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Detach the tag from the Api. */ + detachFromApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams, + ) => Promise; + /** Assign tag to the Api. */ + assignToApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityStateByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams, + ) => Promise; + /** Get tag associated with the API. */ + getByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams, + ) => Promise; +} + +function _getTag(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TagListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + options?: TagDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, tagId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: TagUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, tagId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: TagCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, tagId, parameters, options), + getEntityState: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetEntityStateOptionalParams, + ) => getEntityState(context, resourceGroupName, serviceName, tagId, options), + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, tagId, options), + listByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + options?: TagListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, productId, options), + detachFromProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagDetachFromProductOptionalParams, + ) => detachFromProduct(context, resourceGroupName, serviceName, productId, tagId, options), + assignToProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagAssignToProductOptionalParams, + ) => assignToProduct(context, resourceGroupName, serviceName, productId, tagId, options), + getEntityStateByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetEntityStateByProductOptionalParams, + ) => + getEntityStateByProduct(context, resourceGroupName, serviceName, productId, tagId, options), + getByProduct: ( + resourceGroupName: string, + serviceName: string, + productId: string, + tagId: string, + options?: TagGetByProductOptionalParams, + ) => getByProduct(context, resourceGroupName, serviceName, productId, tagId, options), + listByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + options?: TagListByOperationOptionalParams, + ) => listByOperation(context, resourceGroupName, serviceName, apiId, operationId, options), + detachFromOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagDetachFromOperationOptionalParams, + ) => + detachFromOperation( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ), + assignToOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagAssignToOperationOptionalParams, + ) => + assignToOperation( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ), + getEntityStateByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetEntityStateByOperationOptionalParams, + ) => + getEntityStateByOperation( + context, + resourceGroupName, + serviceName, + apiId, + operationId, + tagId, + options, + ), + getByOperation: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + operationId: string, + tagId: string, + options?: TagGetByOperationOptionalParams, + ) => + getByOperation(context, resourceGroupName, serviceName, apiId, operationId, tagId, options), + listByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + options?: TagListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, apiId, options), + detachFromApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagDetachFromApiOptionalParams, + ) => detachFromApi(context, resourceGroupName, serviceName, apiId, tagId, options), + assignToApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagAssignToApiOptionalParams, + ) => assignToApi(context, resourceGroupName, serviceName, apiId, tagId, options), + getEntityStateByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetEntityStateByApiOptionalParams, + ) => getEntityStateByApi(context, resourceGroupName, serviceName, apiId, tagId, options), + getByApi: ( + resourceGroupName: string, + serviceName: string, + apiId: string, + tagId: string, + options?: TagGetByApiOptionalParams, + ) => getByApi(context, resourceGroupName, serviceName, apiId, tagId, options), + }; +} + +export function _getTagOperations(context: ApiManagementContext): TagOperations { + return { + ..._getTag(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tagApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tagApiLink/index.ts new file mode 100644 index 000000000000..350595da0799 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tagApiLink/index.ts @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByProduct, $delete, createOrUpdate, get } from "../../api/tagApiLink/operations.js"; +import { + TagApiLinkListByProductOptionalParams, + TagApiLinkDeleteOptionalParams, + TagApiLinkCreateOrUpdateOptionalParams, + TagApiLinkGetOptionalParams, +} from "../../api/tagApiLink/options.js"; +import { TagApiLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TagApiLink operations. */ +export interface TagApiLinkOperations { + /** Lists a collection of the API links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagApiLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options?: TagApiLinkDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options?: TagApiLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the API link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options?: TagApiLinkGetOptionalParams, + ) => Promise; +} + +function _getTagApiLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagApiLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options?: TagApiLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, tagId, apiLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options?: TagApiLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + tagId, + apiLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + apiLinkId: string, + options?: TagApiLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, tagId, apiLinkId, options), + }; +} + +export function _getTagApiLinkOperations(context: ApiManagementContext): TagApiLinkOperations { + return { + ..._getTagApiLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tagOperationLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tagOperationLink/index.ts new file mode 100644 index 000000000000..217458debc02 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tagOperationLink/index.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/tagOperationLink/operations.js"; +import { + TagOperationLinkListByProductOptionalParams, + TagOperationLinkDeleteOptionalParams, + TagOperationLinkCreateOrUpdateOptionalParams, + TagOperationLinkGetOptionalParams, +} from "../../api/tagOperationLink/options.js"; +import { TagOperationLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TagOperationLink operations. */ +export interface TagOperationLinkOperations { + /** Lists a collection of the operation links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagOperationLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified operation from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options?: TagOperationLinkDeleteOptionalParams, + ) => Promise; + /** Adds an operation to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options?: TagOperationLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the operation link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options?: TagOperationLinkGetOptionalParams, + ) => Promise; +} + +function _getTagOperationLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagOperationLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options?: TagOperationLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, tagId, operationLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options?: TagOperationLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + tagId, + operationLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + operationLinkId: string, + options?: TagOperationLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, tagId, operationLinkId, options), + }; +} + +export function _getTagOperationLinkOperations( + context: ApiManagementContext, +): TagOperationLinkOperations { + return { + ..._getTagOperationLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tagProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tagProductLink/index.ts new file mode 100644 index 000000000000..a5955c9a6ddf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tagProductLink/index.ts @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/tagProductLink/operations.js"; +import { + TagProductLinkListByProductOptionalParams, + TagProductLinkDeleteOptionalParams, + TagProductLinkCreateOrUpdateOptionalParams, + TagProductLinkGetOptionalParams, +} from "../../api/tagProductLink/options.js"; +import { TagProductLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TagProductLink operations. */ +export interface TagProductLinkOperations { + /** Lists a collection of the product links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagProductLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified product from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options?: TagProductLinkDeleteOptionalParams, + ) => Promise; + /** Adds a product to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options?: TagProductLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the product link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options?: TagProductLinkGetOptionalParams, + ) => Promise; +} + +function _getTagProductLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + options?: TagProductLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options?: TagProductLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, tagId, productLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options?: TagProductLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + tagId, + productLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + tagId: string, + productLinkId: string, + options?: TagProductLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, tagId, productLinkId, options), + }; +} + +export function _getTagProductLinkOperations( + context: ApiManagementContext, +): TagProductLinkOperations { + return { + ..._getTagProductLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tagResource/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tagResource/index.ts new file mode 100644 index 000000000000..f46aca7f5695 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tagResource/index.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/tagResource/operations.js"; +import { TagResourceListByServiceOptionalParams } from "../../api/tagResource/options.js"; +import { TagResourceContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TagResource operations. */ +export interface TagResourceOperations { + /** Lists a collection of resources associated with tags. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getTagResource(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TagResourceListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + }; +} + +export function _getTagResourceOperations(context: ApiManagementContext): TagResourceOperations { + return { + ..._getTagResource(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccess/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccess/index.ts new file mode 100644 index 000000000000..bd121482716d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccess/index.ts @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + listByService, + update, + create, + getEntityTag, + get, +} from "../../api/tenantAccess/operations.js"; +import { + TenantAccessListSecretsOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessListByServiceOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessCreateOptionalParams, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetOptionalParams, +} from "../../api/tenantAccess/options.js"; +import { + AccessInformationContract, + AccessIdName, + AccessInformationCreateParameters, + AccessInformationUpdateParameters, + AccessInformationSecretsContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TenantAccess operations. */ +export interface TenantAccessOperations { + /** Get tenant access information details. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams, + ) => Promise; + /** Regenerate secondary access key */ + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams, + ) => Promise; + /** Regenerate primary access key */ + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams, + ) => Promise; + /** Returns list of access infos - for Git and Management endpoints. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Update tenant access information details. */ + update: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams, + ) => Promise; + /** Update tenant access information details. */ + create: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams, + ) => Promise; + /** Tenant access metadata */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams, + ) => Promise; + /** Get tenant access information details without secrets. */ + get: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams, + ) => Promise; +} + +function _getTenantAccess(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, accessName, options), + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegenerateSecondaryKeyOptionalParams, + ) => regenerateSecondaryKey(context, resourceGroupName, serviceName, accessName, options), + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessRegeneratePrimaryKeyOptionalParams, + ) => regeneratePrimaryKey(context, resourceGroupName, serviceName, accessName, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TenantAccessListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + update: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationUpdateParameters, + options?: TenantAccessUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, accessName, ifMatch, parameters, options), + create: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + ifMatch: string, + parameters: AccessInformationCreateParameters, + options?: TenantAccessCreateOptionalParams, + ) => create(context, resourceGroupName, serviceName, accessName, ifMatch, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, accessName, options), + get: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, accessName, options), + }; +} + +export function _getTenantAccessOperations(context: ApiManagementContext): TenantAccessOperations { + return { + ..._getTenantAccess(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccessGit/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccessGit/index.ts new file mode 100644 index 000000000000..631453f57a4e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tenantAccessGit/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + regenerateSecondaryKey, + regeneratePrimaryKey, +} from "../../api/tenantAccessGit/operations.js"; +import { + TenantAccessGitRegenerateSecondaryKeyOptionalParams, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, +} from "../../api/tenantAccessGit/options.js"; +import { AccessIdName } from "../../models/models.js"; + +/** Interface representing a TenantAccessGit operations. */ +export interface TenantAccessGitOperations { + /** Regenerate secondary access key for GIT. */ + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams, + ) => Promise; + /** Regenerate primary access key for GIT. */ + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams, + ) => Promise; +} + +function _getTenantAccessGit(context: ApiManagementContext) { + return { + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams, + ) => regenerateSecondaryKey(context, resourceGroupName, serviceName, accessName, options), + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + accessName: AccessIdName, + options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams, + ) => regeneratePrimaryKey(context, resourceGroupName, serviceName, accessName, options), + }; +} + +export function _getTenantAccessGitOperations( + context: ApiManagementContext, +): TenantAccessGitOperations { + return { + ..._getTenantAccessGit(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tenantConfiguration/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tenantConfiguration/index.ts new file mode 100644 index 000000000000..75eb5ad8a6c9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tenantConfiguration/index.ts @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { getSyncState, validate, save, deploy } from "../../api/tenantConfiguration/operations.js"; +import { + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationValidateOptionalParams, + TenantConfigurationSaveOptionalParams, + TenantConfigurationDeployOptionalParams, +} from "../../api/tenantConfiguration/options.js"; +import { + OperationResultContract, + DeployConfigurationParameters, + SaveConfigurationParameter, + TenantConfigurationSyncStateContract, + ConfigurationIdName, +} from "../../models/models.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a TenantConfiguration operations. */ +export interface TenantConfigurationOperations { + /** Gets the status of the most recent synchronization between the configuration database and the Git repository. */ + getSyncState: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams, + ) => Promise; + /** This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. */ + validate: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => PollerLike, OperationResultContract>; + /** @deprecated use validate instead */ + beginValidate: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => Promise, OperationResultContract>>; + /** @deprecated use validate instead */ + beginValidateAndWait: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => Promise; + /** This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. */ + save: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => PollerLike, OperationResultContract>; + /** @deprecated use save instead */ + beginSave: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => Promise, OperationResultContract>>; + /** @deprecated use save instead */ + beginSaveAndWait: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => Promise; + /** This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. */ + deploy: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => PollerLike, OperationResultContract>; + /** @deprecated use deploy instead */ + beginDeploy: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => Promise, OperationResultContract>>; + /** @deprecated use deploy instead */ + beginDeployAndWait: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => Promise; +} + +function _getTenantConfiguration(context: ApiManagementContext) { + return { + getSyncState: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + options?: TenantConfigurationGetSyncStateOptionalParams, + ) => getSyncState(context, resourceGroupName, serviceName, configurationName, options), + validate: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => validate(context, resourceGroupName, serviceName, configurationName, parameters, options), + beginValidate: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => { + const poller = validate( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginValidateAndWait: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationValidateOptionalParams, + ) => { + return await validate( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + }, + save: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => save(context, resourceGroupName, serviceName, configurationName, parameters, options), + beginSave: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => { + const poller = save( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginSaveAndWait: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: SaveConfigurationParameter, + options?: TenantConfigurationSaveOptionalParams, + ) => { + return await save( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + }, + deploy: ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => deploy(context, resourceGroupName, serviceName, configurationName, parameters, options), + beginDeploy: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => { + const poller = deploy( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeployAndWait: async ( + resourceGroupName: string, + serviceName: string, + configurationName: ConfigurationIdName, + parameters: DeployConfigurationParameters, + options?: TenantConfigurationDeployOptionalParams, + ) => { + return await deploy( + context, + resourceGroupName, + serviceName, + configurationName, + parameters, + options, + ); + }, + }; +} + +export function _getTenantConfigurationOperations( + context: ApiManagementContext, +): TenantConfigurationOperations { + return { + ..._getTenantConfiguration(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/tenantSettings/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/tenantSettings/index.ts new file mode 100644 index 000000000000..09933521cb03 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/tenantSettings/index.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService, get } from "../../api/tenantSettings/operations.js"; +import { + TenantSettingsListByServiceOptionalParams, + TenantSettingsGetOptionalParams, +} from "../../api/tenantSettings/options.js"; +import { TenantSettingsContract, SettingsTypeName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a TenantSettings operations. */ +export interface TenantSettingsOperations { + /** Public settings. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Get tenant settings. */ + get: ( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams, + ) => Promise; +} + +function _getTenantSettings(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: TenantSettingsListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + get: ( + resourceGroupName: string, + serviceName: string, + settingsType: SettingsTypeName, + options?: TenantSettingsGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, settingsType, options), + }; +} + +export function _getTenantSettingsOperations( + context: ApiManagementContext, +): TenantSettingsOperations { + return { + ..._getTenantSettings(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/user/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/user/index.ts new file mode 100644 index 000000000000..59c0dc1709fc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/user/index.ts @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + getSharedAccessToken, + generateSsoUrl, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/user/operations.js"; +import { + UserGetSharedAccessTokenOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserListByServiceOptionalParams, + UserDeleteOptionalParams, + UserUpdateOptionalParams, + UserCreateOrUpdateOptionalParams, + UserGetEntityTagOptionalParams, + UserGetOptionalParams, +} from "../../api/user/options.js"; +import { + UserContract, + UserCreateParameters, + UserUpdateParameters, + GenerateSsoUrlResult, + UserTokenParameters, + UserTokenResult, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a User operations. */ +export interface UserOperations { + /** Gets the Shared Access Authorization Token for the User. */ + getSharedAccessToken: ( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams, + ) => Promise; + /** Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. */ + generateSsoUrl: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams, + ) => Promise; + /** Lists a collection of registered users in the specified service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific user. */ + delete: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => PollerLike, void>; + /** @deprecated use delete instead */ + beginDelete: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => Promise, void>>; + /** @deprecated use delete instead */ + beginDeleteAndWait: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => Promise; + /** Updates the details of the user specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a user. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the user specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the user specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams, + ) => Promise; +} + +function _getUser(context: ApiManagementContext) { + return { + getSharedAccessToken: ( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserTokenParameters, + options?: UserGetSharedAccessTokenOptionalParams, + ) => getSharedAccessToken(context, resourceGroupName, serviceName, userId, parameters, options), + generateSsoUrl: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGenerateSsoUrlOptionalParams, + ) => generateSsoUrl(context, resourceGroupName, serviceName, userId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: UserListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, userId, ifMatch, options), + beginDelete: async ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => { + const poller = $delete(context, resourceGroupName, serviceName, userId, ifMatch, options); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginDeleteAndWait: async ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + options?: UserDeleteOptionalParams, + ) => { + return await $delete(context, resourceGroupName, serviceName, userId, ifMatch, options); + }, + update: ( + resourceGroupName: string, + serviceName: string, + userId: string, + ifMatch: string, + parameters: UserUpdateParameters, + options?: UserUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, userId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + userId: string, + parameters: UserCreateParameters, + options?: UserCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, userId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, userId, options), + get: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, userId, options), + }; +} + +export function _getUserOperations(context: ApiManagementContext): UserOperations { + return { + ..._getUser(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/userConfirmationPassword/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/userConfirmationPassword/index.ts new file mode 100644 index 000000000000..9bd7b8a09419 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/userConfirmationPassword/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { send } from "../../api/userConfirmationPassword/operations.js"; +import { UserConfirmationPasswordSendOptionalParams } from "../../api/userConfirmationPassword/options.js"; + +/** Interface representing a UserConfirmationPassword operations. */ +export interface UserConfirmationPasswordOperations { + /** Sends confirmation */ + send: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams, + ) => Promise; +} + +function _getUserConfirmationPassword(context: ApiManagementContext) { + return { + send: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserConfirmationPasswordSendOptionalParams, + ) => send(context, resourceGroupName, serviceName, userId, options), + }; +} + +export function _getUserConfirmationPasswordOperations( + context: ApiManagementContext, +): UserConfirmationPasswordOperations { + return { + ..._getUserConfirmationPassword(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/userGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/userGroup/index.ts new file mode 100644 index 000000000000..391f0379e579 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/userGroup/index.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/userGroup/operations.js"; +import { UserGroupListOptionalParams } from "../../api/userGroup/options.js"; +import { GroupContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a UserGroup operations. */ +export interface UserGroupOperations { + /** Lists all user groups. */ + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getUserGroup(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserGroupListOptionalParams, + ) => list(context, resourceGroupName, serviceName, userId, options), + }; +} + +export function _getUserGroupOperations(context: ApiManagementContext): UserGroupOperations { + return { + ..._getUserGroup(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/userIdentities/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/userIdentities/index.ts new file mode 100644 index 000000000000..be5b4e9a039b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/userIdentities/index.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list } from "../../api/userIdentities/operations.js"; +import { UserIdentitiesListOptionalParams } from "../../api/userIdentities/options.js"; +import { UserIdentityContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a UserIdentities operations. */ +export interface UserIdentitiesOperations { + /** List of all user identities. */ + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getUserIdentities(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserIdentitiesListOptionalParams, + ) => list(context, resourceGroupName, serviceName, userId, options), + }; +} + +export function _getUserIdentitiesOperations( + context: ApiManagementContext, +): UserIdentitiesOperations { + return { + ..._getUserIdentities(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/userSubscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/userSubscription/index.ts new file mode 100644 index 000000000000..939e993dd80f --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/userSubscription/index.ts @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { list, get } from "../../api/userSubscription/operations.js"; +import { + UserSubscriptionListOptionalParams, + UserSubscriptionGetOptionalParams, +} from "../../api/userSubscription/options.js"; +import { SubscriptionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a UserSubscription operations. */ +export interface UserSubscriptionOperations { + /** Lists the collection of subscriptions of the specified user. */ + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Gets the specified Subscription entity associated with a particular user. */ + get: ( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams, + ) => Promise; +} + +function _getUserSubscription(context: ApiManagementContext) { + return { + list: ( + resourceGroupName: string, + serviceName: string, + userId: string, + options?: UserSubscriptionListOptionalParams, + ) => list(context, resourceGroupName, serviceName, userId, options), + get: ( + resourceGroupName: string, + serviceName: string, + userId: string, + sid: string, + options?: UserSubscriptionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, userId, sid, options), + }; +} + +export function _getUserSubscriptionOperations( + context: ApiManagementContext, +): UserSubscriptionOperations { + return { + ..._getUserSubscription(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspace/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspace/index.ts new file mode 100644 index 000000000000..128e8c8f682e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspace/index.ts @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspace/operations.js"; +import { + WorkspaceListByServiceOptionalParams, + WorkspaceDeleteOptionalParams, + WorkspaceUpdateOptionalParams, + WorkspaceCreateOrUpdateOptionalParams, + WorkspaceGetEntityTagOptionalParams, + WorkspaceGetOptionalParams, +} from "../../api/workspace/options.js"; +import { WorkspaceContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a Workspace operations. */ +export interface WorkspaceOperations { + /** Lists all workspaces of the API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: WorkspaceListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified workspace. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + options?: WorkspaceDeleteOptionalParams, + ) => Promise; + /** Updates the details of the workspace specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + parameters: WorkspaceContract, + options?: WorkspaceUpdateOptionalParams, + ) => Promise; + /** Creates a new workspace or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + parameters: WorkspaceContract, + options?: WorkspaceCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the workspace specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the workspace specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGetOptionalParams, + ) => Promise; +} + +function _getWorkspace(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + options?: WorkspaceListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + options?: WorkspaceDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + ifMatch: string, + parameters: WorkspaceContract, + options?: WorkspaceUpdateOptionalParams, + ) => update(context, resourceGroupName, serviceName, workspaceId, ifMatch, parameters, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + parameters: WorkspaceContract, + options?: WorkspaceCreateOrUpdateOptionalParams, + ) => createOrUpdate(context, resourceGroupName, serviceName, workspaceId, parameters, options), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, options), + }; +} + +export function _getWorkspaceOperations(context: ApiManagementContext): WorkspaceOperations { + return { + ..._getWorkspace(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApi/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApi/index.ts new file mode 100644 index 000000000000..5bac3e5cf5e3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApi/index.ts @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApi/operations.js"; +import { + WorkspaceApiListByServiceOptionalParams, + WorkspaceApiDeleteOptionalParams, + WorkspaceApiUpdateOptionalParams, + WorkspaceApiCreateOrUpdateOptionalParams, + WorkspaceApiGetEntityTagOptionalParams, + WorkspaceApiGetOptionalParams, +} from "../../api/workspaceApi/options.js"; +import { ApiContract, ApiCreateOrUpdateParameter, ApiUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkspaceApi operations. */ +export interface WorkspaceApiOperations { + /** Lists all APIs of the workspace in an API Management service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceApiListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API of the workspace in an API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + options?: WorkspaceApiDeleteOptionalParams, + ) => Promise; + /** Updates the specified API of the workspace in an API Management service instance. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: WorkspaceApiUpdateOptionalParams, + ) => Promise; + /** Creates new or updates existing specified API of the workspace in an API Management service instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => PollerLike, ApiContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => Promise, ApiContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApi(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceApiListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + options?: WorkspaceApiDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, apiId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + ifMatch: string, + parameters: ApiUpdateContract, + options?: WorkspaceApiUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + parameters: ApiCreateOrUpdateParameter, + options?: WorkspaceApiCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, apiId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, options), + }; +} + +export function _getWorkspaceApiOperations(context: ApiManagementContext): WorkspaceApiOperations { + return { + ..._getWorkspaceApi(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiDiagnostic/index.ts new file mode 100644 index 000000000000..82a6be0dfcaf --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiDiagnostic/index.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiDiagnostic/operations.js"; +import { + WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + WorkspaceApiDiagnosticDeleteOptionalParams, + WorkspaceApiDiagnosticUpdateOptionalParams, + WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + WorkspaceApiDiagnosticGetEntityTagOptionalParams, + WorkspaceApiDiagnosticGetOptionalParams, +} from "../../api/workspaceApiDiagnostic/options.js"; +import { DiagnosticContract, DiagnosticUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiDiagnostic operations. */ +export interface WorkspaceApiDiagnosticOperations { + /** Lists all diagnostics of an API. */ + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Diagnostic from an API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: WorkspaceApiDiagnosticDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Diagnostic for an API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options?: WorkspaceApiDiagnosticUpdateOptionalParams, + ) => Promise; + /** Creates a new Diagnostic for an API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Diagnostic for an API specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options?: WorkspaceApiDiagnosticGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiDiagnostic(context: ApiManagementContext) { + return { + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + ) => listByWorkspace(context, resourceGroupName, serviceName, workspaceId, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + options?: WorkspaceApiDiagnosticDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + ifMatch, + options, + ), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options?: WorkspaceApiDiagnosticUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams, + ) => + getEntityTag( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + diagnosticId, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + diagnosticId: string, + options?: WorkspaceApiDiagnosticGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, options), + }; +} + +export function _getWorkspaceApiDiagnosticOperations( + context: ApiManagementContext, +): WorkspaceApiDiagnosticOperations { + return { + ..._getWorkspaceApiDiagnostic(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiExport/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiExport/index.ts new file mode 100644 index 000000000000..a74b7508e535 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiExport/index.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { get } from "../../api/workspaceApiExport/operations.js"; +import { WorkspaceApiExportGetOptionalParams } from "../../api/workspaceApiExport/options.js"; +import { ApiExportResult, ExportFormat, ExportApi } from "../../models/models.js"; + +/** Interface representing a WorkspaceApiExport operations. */ +export interface WorkspaceApiExportOperations { + /** Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: WorkspaceApiExportGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiExport(context: ApiManagementContext) { + return { + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + format: ExportFormat, + exportParam: ExportApi, + options?: WorkspaceApiExportGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + format, + exportParam, + options, + ), + }; +} + +export function _getWorkspaceApiExportOperations( + context: ApiManagementContext, +): WorkspaceApiExportOperations { + return { + ..._getWorkspaceApiExport(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperation/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperation/index.ts new file mode 100644 index 000000000000..40e8312e1670 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperation/index.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiOperation/operations.js"; +import { + WorkspaceApiOperationListByApiOptionalParams, + WorkspaceApiOperationDeleteOptionalParams, + WorkspaceApiOperationUpdateOptionalParams, + WorkspaceApiOperationCreateOrUpdateOptionalParams, + WorkspaceApiOperationGetEntityTagOptionalParams, + WorkspaceApiOperationGetOptionalParams, +} from "../../api/workspaceApiOperation/options.js"; +import { OperationContract, OperationUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiOperation operations. */ +export interface WorkspaceApiOperationOperations { + /** Lists a collection of the operations for the specified API. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiOperationListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified operation in the API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: WorkspaceApiOperationDeleteOptionalParams, + ) => Promise; + /** Updates the details of the operation in the API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: WorkspaceApiOperationUpdateOptionalParams, + ) => Promise; + /** Creates a new operation in the API or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: WorkspaceApiOperationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API operation specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the API Operation specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiOperation(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiOperationListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, workspaceId, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + options?: WorkspaceApiOperationDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + ifMatch, + options, + ), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + ifMatch: string, + parameters: OperationUpdateContract, + options?: WorkspaceApiOperationUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + parameters: OperationContract, + options?: WorkspaceApiOperationCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationGetEntityTagOptionalParams, + ) => + getEntityTag( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, operationId, options), + }; +} + +export function _getWorkspaceApiOperationOperations( + context: ApiManagementContext, +): WorkspaceApiOperationOperations { + return { + ..._getWorkspaceApiOperation(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperationPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperationPolicy/index.ts new file mode 100644 index 000000000000..fa94a44df129 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiOperationPolicy/index.ts @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByOperation, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiOperationPolicy/operations.js"; +import { + WorkspaceApiOperationPolicyListByOperationOptionalParams, + WorkspaceApiOperationPolicyDeleteOptionalParams, + WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + WorkspaceApiOperationPolicyGetOptionalParams, +} from "../../api/workspaceApiOperationPolicy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiOperationPolicy operations. */ +export interface WorkspaceApiOperationPolicyOperations { + /** Get the list of policy configuration at the API Operation level. */ + listByOperation: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy configuration at the Api Operation. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceApiOperationPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the API Operation level. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the API Operation level. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: WorkspaceApiOperationPolicyGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiOperationPolicy(context: ApiManagementContext) { + return { + listByOperation: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, + ) => + listByOperation( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + options, + ), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceApiOperationPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + ) => + getEntityTag( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + operationId: string, + policyId: PolicyIdName, + options?: WorkspaceApiOperationPolicyGetOptionalParams, + ) => + get( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + operationId, + policyId, + options, + ), + }; +} + +export function _getWorkspaceApiOperationPolicyOperations( + context: ApiManagementContext, +): WorkspaceApiOperationPolicyOperations { + return { + ..._getWorkspaceApiOperationPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiPolicy/index.ts new file mode 100644 index 000000000000..1d9b8d883f61 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiPolicy/index.ts @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiPolicy/operations.js"; +import { + WorkspaceApiPolicyListByApiOptionalParams, + WorkspaceApiPolicyDeleteOptionalParams, + WorkspaceApiPolicyCreateOrUpdateOptionalParams, + WorkspaceApiPolicyGetEntityTagOptionalParams, + WorkspaceApiPolicyGetOptionalParams, +} from "../../api/workspaceApiPolicy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiPolicy operations. */ +export interface WorkspaceApiPolicyOperations { + /** Get the policy configuration at the API level. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiPolicyListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy configuration at the Api. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceApiPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the API policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options?: WorkspaceApiPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the API level. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options?: WorkspaceApiPolicyGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiPolicy(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiPolicyListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, workspaceId, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceApiPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options?: WorkspaceApiPolicyGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, workspaceId, apiId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + policyId: PolicyIdName, + options?: WorkspaceApiPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, policyId, options), + }; +} + +export function _getWorkspaceApiPolicyOperations( + context: ApiManagementContext, +): WorkspaceApiPolicyOperations { + return { + ..._getWorkspaceApiPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRelease/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRelease/index.ts new file mode 100644 index 000000000000..275b1f3c1b3e --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRelease/index.ts @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiRelease/operations.js"; +import { + WorkspaceApiReleaseListByServiceOptionalParams, + WorkspaceApiReleaseDeleteOptionalParams, + WorkspaceApiReleaseUpdateOptionalParams, + WorkspaceApiReleaseCreateOrUpdateOptionalParams, + WorkspaceApiReleaseGetEntityTagOptionalParams, + WorkspaceApiReleaseGetOptionalParams, +} from "../../api/workspaceApiRelease/options.js"; +import { ApiReleaseContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiRelease operations. */ +export interface WorkspaceApiReleaseOperations { + /** Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiReleaseListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified release in the API. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: WorkspaceApiReleaseDeleteOptionalParams, + ) => Promise; + /** Updates the details of the release of the API specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: WorkspaceApiReleaseUpdateOptionalParams, + ) => Promise; + /** Creates a new Release for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams, + ) => Promise; + /** Returns the etag of an API release. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options?: WorkspaceApiReleaseGetEntityTagOptionalParams, + ) => Promise; + /** Returns the details of an API release. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options?: WorkspaceApiReleaseGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiRelease(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiReleaseListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + options?: WorkspaceApiReleaseDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + ifMatch, + options, + ), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + ifMatch: string, + parameters: ApiReleaseContract, + options?: WorkspaceApiReleaseUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + parameters: ApiReleaseContract, + options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + releaseId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options?: WorkspaceApiReleaseGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, workspaceId, apiId, releaseId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + releaseId: string, + options?: WorkspaceApiReleaseGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, releaseId, options), + }; +} + +export function _getWorkspaceApiReleaseOperations( + context: ApiManagementContext, +): WorkspaceApiReleaseOperations { + return { + ..._getWorkspaceApiRelease(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRevision/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRevision/index.ts new file mode 100644 index 000000000000..cc4999c5bd34 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiRevision/index.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService } from "../../api/workspaceApiRevision/operations.js"; +import { WorkspaceApiRevisionListByServiceOptionalParams } from "../../api/workspaceApiRevision/options.js"; +import { ApiRevisionContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiRevision operations. */ +export interface WorkspaceApiRevisionOperations { + /** Lists all revisions of an API. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiRevisionListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkspaceApiRevision(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiRevisionListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, apiId, options), + }; +} + +export function _getWorkspaceApiRevisionOperations( + context: ApiManagementContext, +): WorkspaceApiRevisionOperations { + return { + ..._getWorkspaceApiRevision(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiSchema/index.ts new file mode 100644 index 000000000000..59a6456de5cc --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiSchema/index.ts @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiSchema/operations.js"; +import { + WorkspaceApiSchemaListByApiOptionalParams, + WorkspaceApiSchemaDeleteOptionalParams, + WorkspaceApiSchemaCreateOrUpdateOptionalParams, + WorkspaceApiSchemaGetEntityTagOptionalParams, + WorkspaceApiSchemaGetOptionalParams, +} from "../../api/workspaceApiSchema/options.js"; +import { SchemaContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkspaceApiSchema operations. */ +export interface WorkspaceApiSchemaOperations { + /** Get the schema configuration at the API level. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiSchemaListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the schema configuration at the Api. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: WorkspaceApiSchemaDeleteOptionalParams, + ) => Promise; + /** Creates or updates schema configuration for the API. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => PollerLike, SchemaContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => Promise, SchemaContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the schema specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options?: WorkspaceApiSchemaGetEntityTagOptionalParams, + ) => Promise; + /** Get the schema configuration at the API level. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options?: WorkspaceApiSchemaGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiSchema(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + options?: WorkspaceApiSchemaListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, workspaceId, apiId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + ifMatch: string, + options?: WorkspaceApiSchemaDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + parameters: SchemaContract, + options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + apiId, + schemaId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options?: WorkspaceApiSchemaGetEntityTagOptionalParams, + ) => + getEntityTag(context, resourceGroupName, serviceName, workspaceId, apiId, schemaId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + apiId: string, + schemaId: string, + options?: WorkspaceApiSchemaGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, apiId, schemaId, options), + }; +} + +export function _getWorkspaceApiSchemaOperations( + context: ApiManagementContext, +): WorkspaceApiSchemaOperations { + return { + ..._getWorkspaceApiSchema(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiVersionSet/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiVersionSet/index.ts new file mode 100644 index 000000000000..5ab2bddf4abd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceApiVersionSet/index.ts @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceApiVersionSet/operations.js"; +import { + WorkspaceApiVersionSetListByServiceOptionalParams, + WorkspaceApiVersionSetDeleteOptionalParams, + WorkspaceApiVersionSetUpdateOptionalParams, + WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + WorkspaceApiVersionSetGetEntityTagOptionalParams, + WorkspaceApiVersionSetGetOptionalParams, +} from "../../api/workspaceApiVersionSet/options.js"; +import { ApiVersionSetContract, ApiVersionSetUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceApiVersionSet operations. */ +export interface WorkspaceApiVersionSetOperations { + /** Lists a collection of API Version Sets in the specified workspace with a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceApiVersionSetListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Api Version Set. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + options?: WorkspaceApiVersionSetDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Api VersionSet specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: WorkspaceApiVersionSetUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a Api Version Set. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options?: WorkspaceApiVersionSetGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Api Version Set specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options?: WorkspaceApiVersionSetGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceApiVersionSet(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceApiVersionSetListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + options?: WorkspaceApiVersionSetDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, workspaceId, versionSetId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + ifMatch: string, + parameters: ApiVersionSetUpdateParameters, + options?: WorkspaceApiVersionSetUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + parameters: ApiVersionSetContract, + options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + versionSetId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options?: WorkspaceApiVersionSetGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, versionSetId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + versionSetId: string, + options?: WorkspaceApiVersionSetGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, versionSetId, options), + }; +} + +export function _getWorkspaceApiVersionSetOperations( + context: ApiManagementContext, +): WorkspaceApiVersionSetOperations { + return { + ..._getWorkspaceApiVersionSet(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceBackend/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceBackend/index.ts new file mode 100644 index 000000000000..a491ece9f3d3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceBackend/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceBackend/operations.js"; +import { + WorkspaceBackendListByWorkspaceOptionalParams, + WorkspaceBackendDeleteOptionalParams, + WorkspaceBackendUpdateOptionalParams, + WorkspaceBackendCreateOrUpdateOptionalParams, + WorkspaceBackendGetEntityTagOptionalParams, + WorkspaceBackendGetOptionalParams, +} from "../../api/workspaceBackend/options.js"; +import { BackendContract, BackendUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceBackend operations. */ +export interface WorkspaceBackendOperations { + /** Lists a collection of backends in the specified workspace. */ + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceBackendListByWorkspaceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified backend. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + options?: WorkspaceBackendDeleteOptionalParams, + ) => Promise; + /** Updates an existing backend. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: WorkspaceBackendUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a backend. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + parameters: BackendContract, + options?: WorkspaceBackendCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the backend specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options?: WorkspaceBackendGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the backend specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options?: WorkspaceBackendGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceBackend(context: ApiManagementContext) { + return { + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceBackendListByWorkspaceOptionalParams, + ) => listByWorkspace(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + options?: WorkspaceBackendDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, backendId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + ifMatch: string, + parameters: BackendUpdateParameters, + options?: WorkspaceBackendUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + parameters: BackendContract, + options?: WorkspaceBackendCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + backendId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options?: WorkspaceBackendGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, backendId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + backendId: string, + options?: WorkspaceBackendGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, backendId, options), + }; +} + +export function _getWorkspaceBackendOperations( + context: ApiManagementContext, +): WorkspaceBackendOperations { + return { + ..._getWorkspaceBackend(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceCertificate/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceCertificate/index.ts new file mode 100644 index 000000000000..741a940e6fd2 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceCertificate/index.ts @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listByWorkspace, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceCertificate/operations.js"; +import { + WorkspaceCertificateRefreshSecretOptionalParams, + WorkspaceCertificateListByWorkspaceOptionalParams, + WorkspaceCertificateDeleteOptionalParams, + WorkspaceCertificateCreateOrUpdateOptionalParams, + WorkspaceCertificateGetEntityTagOptionalParams, + WorkspaceCertificateGetOptionalParams, +} from "../../api/workspaceCertificate/options.js"; +import { CertificateContract, CertificateCreateOrUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceCertificate operations. */ +export interface WorkspaceCertificateOperations { + /** From KeyVault, Refresh the certificate being used for authentication with the backend. */ + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateRefreshSecretOptionalParams, + ) => Promise; + /** Lists a collection of all certificates in the specified workspace. */ + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceCertificateListByWorkspaceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific certificate. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + ifMatch: string, + options?: WorkspaceCertificateDeleteOptionalParams, + ) => Promise; + /** Creates or updates the certificate being used for authentication with the backend. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: WorkspaceCertificateCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the certificate specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the certificate specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceCertificate(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateRefreshSecretOptionalParams, + ) => + refreshSecret(context, resourceGroupName, serviceName, workspaceId, certificateId, options), + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceCertificateListByWorkspaceOptionalParams, + ) => listByWorkspace(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + ifMatch: string, + options?: WorkspaceCertificateDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + parameters: CertificateCreateOrUpdateParameters, + options?: WorkspaceCertificateCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + certificateId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, certificateId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + certificateId: string, + options?: WorkspaceCertificateGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, certificateId, options), + }; +} + +export function _getWorkspaceCertificateOperations( + context: ApiManagementContext, +): WorkspaceCertificateOperations { + return { + ..._getWorkspaceCertificate(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceDiagnostic/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceDiagnostic/index.ts new file mode 100644 index 000000000000..9fbd97e42e46 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceDiagnostic/index.ts @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceDiagnostic/operations.js"; +import { + WorkspaceDiagnosticListByWorkspaceOptionalParams, + WorkspaceDiagnosticDeleteOptionalParams, + WorkspaceDiagnosticUpdateOptionalParams, + WorkspaceDiagnosticCreateOrUpdateOptionalParams, + WorkspaceDiagnosticGetEntityTagOptionalParams, + WorkspaceDiagnosticGetOptionalParams, +} from "../../api/workspaceDiagnostic/options.js"; +import { DiagnosticContract, DiagnosticUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceDiagnostic operations. */ +export interface WorkspaceDiagnosticOperations { + /** Lists all diagnostics in the specified workspace. */ + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified Diagnostic. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + options?: WorkspaceDiagnosticDeleteOptionalParams, + ) => Promise; + /** Updates the details of the Diagnostic specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options?: WorkspaceDiagnosticUpdateOptionalParams, + ) => Promise; + /** Creates a new Diagnostic or updates an existing one. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Diagnostic specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options?: WorkspaceDiagnosticGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Diagnostic specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options?: WorkspaceDiagnosticGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceDiagnostic(context: ApiManagementContext) { + return { + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, + ) => listByWorkspace(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + options?: WorkspaceDiagnosticDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, workspaceId, diagnosticId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + ifMatch: string, + parameters: DiagnosticUpdateContract, + options?: WorkspaceDiagnosticUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + parameters: DiagnosticContract, + options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + diagnosticId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options?: WorkspaceDiagnosticGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, diagnosticId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + diagnosticId: string, + options?: WorkspaceDiagnosticGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, diagnosticId, options), + }; +} + +export function _getWorkspaceDiagnosticOperations( + context: ApiManagementContext, +): WorkspaceDiagnosticOperations { + return { + ..._getWorkspaceDiagnostic(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGlobalSchema/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGlobalSchema/index.ts new file mode 100644 index 000000000000..16ed08ee1cc6 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGlobalSchema/index.ts @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceGlobalSchema/operations.js"; +import { + WorkspaceGlobalSchemaListByServiceOptionalParams, + WorkspaceGlobalSchemaDeleteOptionalParams, + WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + WorkspaceGlobalSchemaGetEntityTagOptionalParams, + WorkspaceGlobalSchemaGetOptionalParams, +} from "../../api/workspaceGlobalSchema/options.js"; +import { GlobalSchemaContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkspaceGlobalSchema operations. */ +export interface WorkspaceGlobalSchemaOperations { + /** Lists a collection of schemas registered with workspace in a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGlobalSchemaListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific Schema. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + ifMatch: string, + options?: WorkspaceGlobalSchemaDeleteOptionalParams, + ) => Promise; + /** Creates new or updates existing specified Schema of the workspace in an API Management service instance. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => PollerLike, GlobalSchemaContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => Promise, GlobalSchemaContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the Schema specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the Schema specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options?: WorkspaceGlobalSchemaGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceGlobalSchema(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGlobalSchemaListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + ifMatch: string, + options?: WorkspaceGlobalSchemaDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, schemaId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + parameters: GlobalSchemaContract, + options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + schemaId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, schemaId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + schemaId: string, + options?: WorkspaceGlobalSchemaGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, schemaId, options), + }; +} + +export function _getWorkspaceGlobalSchemaOperations( + context: ApiManagementContext, +): WorkspaceGlobalSchemaOperations { + return { + ..._getWorkspaceGlobalSchema(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroup/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroup/index.ts new file mode 100644 index 000000000000..296b83273e47 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroup/index.ts @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceGroup/operations.js"; +import { + WorkspaceGroupListByServiceOptionalParams, + WorkspaceGroupDeleteOptionalParams, + WorkspaceGroupUpdateOptionalParams, + WorkspaceGroupCreateOrUpdateOptionalParams, + WorkspaceGroupGetEntityTagOptionalParams, + WorkspaceGroupGetOptionalParams, +} from "../../api/workspaceGroup/options.js"; +import { + GroupContract, + GroupCreateParameters, + GroupUpdateParameters, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceGroup operations. */ +export interface WorkspaceGroupOperations { + /** Lists a collection of groups defined within a workspace in a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGroupListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific group of the workspace in an API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + options?: WorkspaceGroupDeleteOptionalParams, + ) => Promise; + /** Updates the details of the group specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: WorkspaceGroupUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a group. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + parameters: GroupCreateParameters, + options?: WorkspaceGroupCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the group specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the group specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceGroup(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceGroupListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + options?: WorkspaceGroupDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, groupId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + ifMatch: string, + parameters: GroupUpdateParameters, + options?: WorkspaceGroupUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + parameters: GroupCreateParameters, + options?: WorkspaceGroupCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, groupId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, groupId, options), + }; +} + +export function _getWorkspaceGroupOperations( + context: ApiManagementContext, +): WorkspaceGroupOperations { + return { + ..._getWorkspaceGroup(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroupUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroupUser/index.ts new file mode 100644 index 000000000000..8df61489e703 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceGroupUser/index.ts @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + create, + checkEntityExists, + list, +} from "../../api/workspaceGroupUser/operations.js"; +import { + WorkspaceGroupUserDeleteOptionalParams, + WorkspaceGroupUserCreateOptionalParams, + WorkspaceGroupUserCheckEntityExistsOptionalParams, + WorkspaceGroupUserListOptionalParams, +} from "../../api/workspaceGroupUser/options.js"; +import { UserContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceGroupUser operations. */ +export interface WorkspaceGroupUserOperations { + /** Remove existing user from existing group. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserDeleteOptionalParams, + ) => Promise; + /** Add existing user to existing group */ + create: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserCreateOptionalParams, + ) => Promise; + /** Checks that user entity specified by identifier is associated with the group entity. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserCheckEntityExistsOptionalParams, + ) => Promise; + /** Lists a collection of user entities associated with the group. */ + list: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupUserListOptionalParams, + ) => PagedAsyncIterableIterator; +} + +function _getWorkspaceGroupUser(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, groupId, userId, options), + create: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserCreateOptionalParams, + ) => create(context, resourceGroupName, serviceName, workspaceId, groupId, userId, options), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + userId: string, + options?: WorkspaceGroupUserCheckEntityExistsOptionalParams, + ) => + checkEntityExists( + context, + resourceGroupName, + serviceName, + workspaceId, + groupId, + userId, + options, + ), + list: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + groupId: string, + options?: WorkspaceGroupUserListOptionalParams, + ) => list(context, resourceGroupName, serviceName, workspaceId, groupId, options), + }; +} + +export function _getWorkspaceGroupUserOperations( + context: ApiManagementContext, +): WorkspaceGroupUserOperations { + return { + ..._getWorkspaceGroupUser(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceLogger/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceLogger/index.ts new file mode 100644 index 000000000000..2ebd5c26e448 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceLogger/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByWorkspace, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceLogger/operations.js"; +import { + WorkspaceLoggerListByWorkspaceOptionalParams, + WorkspaceLoggerDeleteOptionalParams, + WorkspaceLoggerUpdateOptionalParams, + WorkspaceLoggerCreateOrUpdateOptionalParams, + WorkspaceLoggerGetEntityTagOptionalParams, + WorkspaceLoggerGetOptionalParams, +} from "../../api/workspaceLogger/options.js"; +import { LoggerContract, LoggerUpdateContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceLogger operations. */ +export interface WorkspaceLoggerOperations { + /** Lists a collection of loggers in the specified workspace. */ + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceLoggerListByWorkspaceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified logger. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + options?: WorkspaceLoggerDeleteOptionalParams, + ) => Promise; + /** Updates an existing logger. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: WorkspaceLoggerUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a logger. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + parameters: LoggerContract, + options?: WorkspaceLoggerCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the logger specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options?: WorkspaceLoggerGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the logger specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options?: WorkspaceLoggerGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceLogger(context: ApiManagementContext) { + return { + listByWorkspace: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceLoggerListByWorkspaceOptionalParams, + ) => listByWorkspace(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + options?: WorkspaceLoggerDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, loggerId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + ifMatch: string, + parameters: LoggerUpdateContract, + options?: WorkspaceLoggerUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + parameters: LoggerContract, + options?: WorkspaceLoggerCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + loggerId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options?: WorkspaceLoggerGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, loggerId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + loggerId: string, + options?: WorkspaceLoggerGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, loggerId, options), + }; +} + +export function _getWorkspaceLoggerOperations( + context: ApiManagementContext, +): WorkspaceLoggerOperations { + return { + ..._getWorkspaceLogger(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNamedValue/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNamedValue/index.ts new file mode 100644 index 000000000000..19d48ed12d16 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNamedValue/index.ts @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + refreshSecret, + listValue, + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceNamedValue/operations.js"; +import { + WorkspaceNamedValueRefreshSecretOptionalParams, + WorkspaceNamedValueListValueOptionalParams, + WorkspaceNamedValueListByServiceOptionalParams, + WorkspaceNamedValueDeleteOptionalParams, + WorkspaceNamedValueUpdateOptionalParams, + WorkspaceNamedValueCreateOrUpdateOptionalParams, + WorkspaceNamedValueGetEntityTagOptionalParams, + WorkspaceNamedValueGetOptionalParams, +} from "../../api/workspaceNamedValue/options.js"; +import { + NamedValueContract, + NamedValueCreateContract, + NamedValueUpdateParameters, + NamedValueSecretContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkspaceNamedValue operations. */ +export interface WorkspaceNamedValueOperations { + /** Refresh the secret of the named value specified by its identifier. */ + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecret: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use refreshSecret instead */ + beginRefreshSecretAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => Promise; + /** Gets the secret of the named value specified by its identifier. */ + listValue: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueListValueOptionalParams, + ) => Promise; + /** Lists a collection of named values defined within a workspace in a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceNamedValueListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific named value from the workspace in an API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + options?: WorkspaceNamedValueDeleteOptionalParams, + ) => Promise; + /** Updates the specific named value. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use update instead */ + beginUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use update instead */ + beginUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => Promise; + /** Creates or updates named value. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => PollerLike, NamedValueContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => Promise, NamedValueContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the named value specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the named value specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceNamedValue(context: ApiManagementContext) { + return { + refreshSecret: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => refreshSecret(context, resourceGroupName, serviceName, workspaceId, namedValueId, options), + beginRefreshSecret: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => { + const poller = refreshSecret( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginRefreshSecretAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueRefreshSecretOptionalParams, + ) => { + return await refreshSecret( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + options, + ); + }, + listValue: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueListValueOptionalParams, + ) => listValue(context, resourceGroupName, serviceName, workspaceId, namedValueId, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceNamedValueListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + options?: WorkspaceNamedValueDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, workspaceId, namedValueId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + ifMatch, + parameters, + options, + ), + beginUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => { + const poller = update( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + ifMatch, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + ifMatch: string, + parameters: NamedValueUpdateParameters, + options?: WorkspaceNamedValueUpdateOptionalParams, + ) => { + return await update( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + ifMatch, + parameters, + options, + ); + }, + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + parameters, + options, + ), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + parameters: NamedValueCreateContract, + options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + namedValueId, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, namedValueId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + namedValueId: string, + options?: WorkspaceNamedValueGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, namedValueId, options), + }; +} + +export function _getWorkspaceNamedValueOperations( + context: ApiManagementContext, +): WorkspaceNamedValueOperations { + return { + ..._getWorkspaceNamedValue(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotification/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotification/index.ts new file mode 100644 index 000000000000..e362c93ef4fa --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotification/index.ts @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { listByService, createOrUpdate, get } from "../../api/workspaceNotification/operations.js"; +import { + WorkspaceNotificationListByServiceOptionalParams, + WorkspaceNotificationCreateOrUpdateOptionalParams, + WorkspaceNotificationGetOptionalParams, +} from "../../api/workspaceNotification/options.js"; +import { NotificationContract, NotificationName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceNotification operations. */ +export interface WorkspaceNotificationOperations { + /** Lists a collection of properties defined within a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceNotificationListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Create or Update API Management publisher notification for the workspace. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the details of the Notification specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceNotification(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceNotificationListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, notificationName, options), + }; +} + +export function _getWorkspaceNotificationOperations( + context: ApiManagementContext, +): WorkspaceNotificationOperations { + return { + ..._getWorkspaceNotification(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientEmail/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientEmail/index.ts new file mode 100644 index 000000000000..f6a39d12f4d9 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientEmail/index.ts @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByNotification, +} from "../../api/workspaceNotificationRecipientEmail/operations.js"; +import { + WorkspaceNotificationRecipientEmailDeleteOptionalParams, + WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, +} from "../../api/workspaceNotificationRecipientEmail/options.js"; +import { + NotificationName, + RecipientEmailCollection, + RecipientEmailContract, +} from "../../models/models.js"; + +/** Interface representing a WorkspaceNotificationRecipientEmail operations. */ +export interface WorkspaceNotificationRecipientEmailOperations { + /** Removes the email from the list of Notification. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams, + ) => Promise; + /** Adds the Email address to the list of Recipients for the Notification. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + ) => Promise; + /** Determine if Notification Recipient Email subscribed to the notification. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + ) => Promise; + /** Gets the list of the Notification Recipient Emails subscribed to a notification. */ + listByNotification: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, + ) => Promise; +} + +function _getWorkspaceNotificationRecipientEmail(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + email: string, + options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + ) => + checkEntityExists( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + email, + options, + ), + listByNotification: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, + ) => + listByNotification( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ), + }; +} + +export function _getWorkspaceNotificationRecipientEmailOperations( + context: ApiManagementContext, +): WorkspaceNotificationRecipientEmailOperations { + return { + ..._getWorkspaceNotificationRecipientEmail(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientUser/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientUser/index.ts new file mode 100644 index 000000000000..7386cb3559a8 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceNotificationRecipientUser/index.ts @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + $delete, + createOrUpdate, + checkEntityExists, + listByNotification, +} from "../../api/workspaceNotificationRecipientUser/operations.js"; +import { + WorkspaceNotificationRecipientUserDeleteOptionalParams, + WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientUserListByNotificationOptionalParams, +} from "../../api/workspaceNotificationRecipientUser/options.js"; +import { + NotificationName, + RecipientUserCollection, + RecipientUserContract, +} from "../../models/models.js"; + +/** Interface representing a WorkspaceNotificationRecipientUser operations. */ +export interface WorkspaceNotificationRecipientUserOperations { + /** Removes the API Management user from the list of Notification. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserDeleteOptionalParams, + ) => Promise; + /** Adds the API Management User to the list of Recipients for the Notification. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + ) => Promise; + /** Determine if the Notification Recipient User is subscribed to the notification. */ + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + ) => Promise; + /** Gets the list of the Notification Recipient User subscribed to the notification. */ + listByNotification: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams, + ) => Promise; +} + +function _getWorkspaceNotificationRecipientUser(context: ApiManagementContext) { + return { + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ), + checkEntityExists: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + userId: string, + options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + ) => + checkEntityExists( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + userId, + options, + ), + listByNotification: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + notificationName: NotificationName, + options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams, + ) => + listByNotification( + context, + resourceGroupName, + serviceName, + workspaceId, + notificationName, + options, + ), + }; +} + +export function _getWorkspaceNotificationRecipientUserOperations( + context: ApiManagementContext, +): WorkspaceNotificationRecipientUserOperations { + return { + ..._getWorkspaceNotificationRecipientUser(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicy/index.ts new file mode 100644 index 000000000000..56e8dea63381 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicy/index.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByApi, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspacePolicy/operations.js"; +import { + WorkspacePolicyListByApiOptionalParams, + WorkspacePolicyDeleteOptionalParams, + WorkspacePolicyCreateOrUpdateOptionalParams, + WorkspacePolicyGetEntityTagOptionalParams, + WorkspacePolicyGetOptionalParams, +} from "../../api/workspacePolicy/options.js"; +import { PolicyContract, PolicyIdName } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspacePolicy operations. */ +export interface WorkspacePolicyOperations { + /** Get the policy configuration at the workspace level. */ + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspacePolicyListByApiOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the policy configuration at the workspace. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspacePolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the workspace. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspacePolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the workspace policy specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options?: WorkspacePolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the API level. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options?: WorkspacePolicyGetOptionalParams, + ) => Promise; +} + +function _getWorkspacePolicy(context: ApiManagementContext) { + return { + listByApi: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspacePolicyListByApiOptionalParams, + ) => listByApi(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspacePolicyDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, policyId, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspacePolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options?: WorkspacePolicyGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, policyId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + policyId: PolicyIdName, + options?: WorkspacePolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, policyId, options), + }; +} + +export function _getWorkspacePolicyOperations( + context: ApiManagementContext, +): WorkspacePolicyOperations { + return { + ..._getWorkspacePolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicyFragment/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicyFragment/index.ts new file mode 100644 index 000000000000..f1d1d3dd1681 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspacePolicyFragment/index.ts @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listReferences, + listByService, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspacePolicyFragment/operations.js"; +import { + WorkspacePolicyFragmentListReferencesOptionalParams, + WorkspacePolicyFragmentListByServiceOptionalParams, + WorkspacePolicyFragmentDeleteOptionalParams, + WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + WorkspacePolicyFragmentGetEntityTagOptionalParams, + WorkspacePolicyFragmentGetOptionalParams, +} from "../../api/workspacePolicyFragment/options.js"; +import { PolicyFragmentContract, ResourceCollection } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { SimplePollerLike, getSimplePoller } from "../../static-helpers/simplePollerHelpers.js"; +import { PollerLike, OperationState } from "@azure/core-lro"; + +/** Interface representing a WorkspacePolicyFragment operations. */ +export interface WorkspacePolicyFragmentOperations { + /** Lists policy resources that reference the policy fragment. */ + listReferences: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentListReferencesOptionalParams, + ) => Promise; + /** Gets all policy fragments defined within a workspace. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspacePolicyFragmentListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes a policy fragment. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + ifMatch: string, + options?: WorkspacePolicyFragmentDeleteOptionalParams, + ) => Promise; + /** Creates or updates a policy fragment. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => PollerLike, PolicyFragmentContract>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => Promise, PolicyFragmentContract>>; + /** @deprecated use createOrUpdate instead */ + beginCreateOrUpdateAndWait: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of a policy fragment. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentGetEntityTagOptionalParams, + ) => Promise; + /** Gets a policy fragment. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentGetOptionalParams, + ) => Promise; +} + +function _getWorkspacePolicyFragment(context: ApiManagementContext) { + return { + listReferences: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentListReferencesOptionalParams, + ) => listReferences(context, resourceGroupName, serviceName, workspaceId, id, options), + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspacePolicyFragmentListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + ifMatch: string, + options?: WorkspacePolicyFragmentDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, id, ifMatch, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => + createOrUpdate(context, resourceGroupName, serviceName, workspaceId, id, parameters, options), + beginCreateOrUpdate: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => { + const poller = createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + parameters, + options, + ); + await poller.submitted(); + return getSimplePoller(poller); + }, + beginCreateOrUpdateAndWait: async ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + parameters: PolicyFragmentContract, + options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + ) => { + return await createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + id, + parameters, + options, + ); + }, + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, id, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + id: string, + options?: WorkspacePolicyFragmentGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, id, options), + }; +} + +export function _getWorkspacePolicyFragmentOperations( + context: ApiManagementContext, +): WorkspacePolicyFragmentOperations { + return { + ..._getWorkspacePolicyFragment(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProduct/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProduct/index.ts new file mode 100644 index 000000000000..ed29eccf1f7d --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProduct/index.ts @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceProduct/operations.js"; +import { + WorkspaceProductListByServiceOptionalParams, + WorkspaceProductDeleteOptionalParams, + WorkspaceProductUpdateOptionalParams, + WorkspaceProductCreateOrUpdateOptionalParams, + WorkspaceProductGetEntityTagOptionalParams, + WorkspaceProductGetOptionalParams, +} from "../../api/workspaceProduct/options.js"; +import { ProductContract, ProductUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceProduct operations. */ +export interface WorkspaceProductOperations { + /** Lists a collection of products in the specified workspace in a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceProductListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Delete product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + options?: WorkspaceProductDeleteOptionalParams, + ) => Promise; + /** Update existing product details. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: WorkspaceProductUpdateOptionalParams, + ) => Promise; + /** Creates or Updates a product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + parameters: ProductContract, + options?: WorkspaceProductCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the product specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGetEntityTagOptionalParams, + ) => Promise; + /** Gets the details of the product specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceProduct(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceProductListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + options?: WorkspaceProductDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, productId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + ifMatch: string, + parameters: ProductUpdateParameters, + options?: WorkspaceProductUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + parameters: ProductContract, + options?: WorkspaceProductCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, productId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, productId, options), + }; +} + +export function _getWorkspaceProductOperations( + context: ApiManagementContext, +): WorkspaceProductOperations { + return { + ..._getWorkspaceProduct(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductApiLink/index.ts new file mode 100644 index 000000000000..bc80807b8b82 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductApiLink/index.ts @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/workspaceProductApiLink/operations.js"; +import { + WorkspaceProductApiLinkListByProductOptionalParams, + WorkspaceProductApiLinkDeleteOptionalParams, + WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + WorkspaceProductApiLinkGetOptionalParams, +} from "../../api/workspaceProductApiLink/options.js"; +import { ProductApiLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceProductApiLink operations. */ +export interface WorkspaceProductApiLinkOperations { + /** Lists a collection of the API links associated with a product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductApiLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API from the specified product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options?: WorkspaceProductApiLinkDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified product via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the API link for the product. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options?: WorkspaceProductApiLinkGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceProductApiLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductApiLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options?: WorkspaceProductApiLinkDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, workspaceId, productId, apiLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + parameters: ProductApiLinkContract, + options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + apiLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + apiLinkId: string, + options?: WorkspaceProductApiLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, productId, apiLinkId, options), + }; +} + +export function _getWorkspaceProductApiLinkOperations( + context: ApiManagementContext, +): WorkspaceProductApiLinkOperations { + return { + ..._getWorkspaceProductApiLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductGroupLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductGroupLink/index.ts new file mode 100644 index 000000000000..e4624a9cac8b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductGroupLink/index.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/workspaceProductGroupLink/operations.js"; +import { + WorkspaceProductGroupLinkListByProductOptionalParams, + WorkspaceProductGroupLinkDeleteOptionalParams, + WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + WorkspaceProductGroupLinkGetOptionalParams, +} from "../../api/workspaceProductGroupLink/options.js"; +import { ProductGroupLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceProductGroupLink operations. */ +export interface WorkspaceProductGroupLinkOperations { + /** Lists a collection of the group links associated with a product. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGroupLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified group from the specified product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options?: WorkspaceProductGroupLinkDeleteOptionalParams, + ) => Promise; + /** Adds a group to the specified product via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the group link for the product. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options?: WorkspaceProductGroupLinkGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceProductGroupLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductGroupLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options?: WorkspaceProductGroupLinkDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + groupLinkId, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + parameters: ProductGroupLinkContract, + options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + groupLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + groupLinkId: string, + options?: WorkspaceProductGroupLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, productId, groupLinkId, options), + }; +} + +export function _getWorkspaceProductGroupLinkOperations( + context: ApiManagementContext, +): WorkspaceProductGroupLinkOperations { + return { + ..._getWorkspaceProductGroupLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductPolicy/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductPolicy/index.ts new file mode 100644 index 000000000000..cc8760b4133c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceProductPolicy/index.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceProductPolicy/operations.js"; +import { + WorkspaceProductPolicyListByProductOptionalParams, + WorkspaceProductPolicyDeleteOptionalParams, + WorkspaceProductPolicyCreateOrUpdateOptionalParams, + WorkspaceProductPolicyGetEntityTagOptionalParams, + WorkspaceProductPolicyGetOptionalParams, +} from "../../api/workspaceProductPolicy/options.js"; +import { PolicyContract, PolicyIdName, PolicyCollection } from "../../models/models.js"; + +/** Interface representing a WorkspaceProductPolicy operations. */ +export interface WorkspaceProductPolicyOperations { + /** Get the policy configuration at the Product level. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductPolicyListByProductOptionalParams, + ) => Promise; + /** Deletes the policy configuration at the Product. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceProductPolicyDeleteOptionalParams, + ) => Promise; + /** Creates or updates policy configuration for the Product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams, + ) => Promise; + /** Get the ETag of the policy configuration at the Product level. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options?: WorkspaceProductPolicyGetEntityTagOptionalParams, + ) => Promise; + /** Get the policy configuration at the Product level. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options?: WorkspaceProductPolicyGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceProductPolicy(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + options?: WorkspaceProductPolicyListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, productId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + ifMatch: string, + options?: WorkspaceProductPolicyDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + ifMatch, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + parameters: PolicyContract, + options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options?: WorkspaceProductPolicyGetEntityTagOptionalParams, + ) => + getEntityTag( + context, + resourceGroupName, + serviceName, + workspaceId, + productId, + policyId, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + productId: string, + policyId: PolicyIdName, + options?: WorkspaceProductPolicyGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, productId, policyId, options), + }; +} + +export function _getWorkspaceProductPolicyOperations( + context: ApiManagementContext, +): WorkspaceProductPolicyOperations { + return { + ..._getWorkspaceProductPolicy(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceSubscription/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceSubscription/index.ts new file mode 100644 index 000000000000..4751997fa0af --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceSubscription/index.ts @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listSecrets, + regenerateSecondaryKey, + regeneratePrimaryKey, + list, + $delete, + update, + createOrUpdate, + getEntityTag, + get, +} from "../../api/workspaceSubscription/operations.js"; +import { + WorkspaceSubscriptionListSecretsOptionalParams, + WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + WorkspaceSubscriptionListOptionalParams, + WorkspaceSubscriptionDeleteOptionalParams, + WorkspaceSubscriptionUpdateOptionalParams, + WorkspaceSubscriptionCreateOrUpdateOptionalParams, + WorkspaceSubscriptionGetEntityTagOptionalParams, + WorkspaceSubscriptionGetOptionalParams, +} from "../../api/workspaceSubscription/options.js"; +import { + SubscriptionContract, + SubscriptionCreateParameters, + SubscriptionUpdateParameters, + SubscriptionKeysContract, +} from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceSubscription operations. */ +export interface WorkspaceSubscriptionOperations { + /** Gets the specified Subscription keys. */ + listSecrets: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionListSecretsOptionalParams, + ) => Promise; + /** Regenerates secondary key of existing subscription of the workspace in an API Management service instance. */ + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + ) => Promise; + /** Regenerates primary key of existing subscription of the workspace in an API Management service instance. */ + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + ) => Promise; + /** Lists all subscriptions of the workspace in an API Management service instance. */ + list: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceSubscriptionListOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified subscription. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + options?: WorkspaceSubscriptionDeleteOptionalParams, + ) => Promise; + /** Updates the details of a subscription specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: WorkspaceSubscriptionUpdateOptionalParams, + ) => Promise; + /** Creates or updates the subscription of specified user to the specified product. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionGetEntityTagOptionalParams, + ) => Promise; + /** Gets the specified Subscription entity. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceSubscription(context: ApiManagementContext) { + return { + listSecrets: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionListSecretsOptionalParams, + ) => listSecrets(context, resourceGroupName, serviceName, workspaceId, sid, options), + regenerateSecondaryKey: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + ) => regenerateSecondaryKey(context, resourceGroupName, serviceName, workspaceId, sid, options), + regeneratePrimaryKey: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + ) => regeneratePrimaryKey(context, resourceGroupName, serviceName, workspaceId, sid, options), + list: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceSubscriptionListOptionalParams, + ) => list(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + options?: WorkspaceSubscriptionDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, sid, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + ifMatch: string, + parameters: SubscriptionUpdateParameters, + options?: WorkspaceSubscriptionUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + parameters: SubscriptionCreateParameters, + options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + sid, + parameters, + options, + ), + getEntityTag: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionGetEntityTagOptionalParams, + ) => getEntityTag(context, resourceGroupName, serviceName, workspaceId, sid, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + sid: string, + options?: WorkspaceSubscriptionGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, sid, options), + }; +} + +export function _getWorkspaceSubscriptionOperations( + context: ApiManagementContext, +): WorkspaceSubscriptionOperations { + return { + ..._getWorkspaceSubscription(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTag/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTag/index.ts new file mode 100644 index 000000000000..e27d412d9988 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTag/index.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByService, + $delete, + update, + createOrUpdate, + getEntityState, + get, +} from "../../api/workspaceTag/operations.js"; +import { + WorkspaceTagListByServiceOptionalParams, + WorkspaceTagDeleteOptionalParams, + WorkspaceTagUpdateOptionalParams, + WorkspaceTagCreateOrUpdateOptionalParams, + WorkspaceTagGetEntityStateOptionalParams, + WorkspaceTagGetOptionalParams, +} from "../../api/workspaceTag/options.js"; +import { TagContract, TagCreateUpdateParameters } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceTag operations. */ +export interface WorkspaceTagOperations { + /** Lists a collection of tags defined within a workspace in a service instance. */ + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceTagListByServiceOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes specific tag of the workspace in an API Management service instance. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + options?: WorkspaceTagDeleteOptionalParams, + ) => Promise; + /** Updates the details of the tag specified by its identifier. */ + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: WorkspaceTagUpdateOptionalParams, + ) => Promise; + /** Creates a tag. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: WorkspaceTagCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the entity state version of the tag specified by its identifier. */ + getEntityState: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagGetEntityStateOptionalParams, + ) => Promise; + /** Gets the details of the tag specified by its identifier. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceTag(context: ApiManagementContext) { + return { + listByService: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + options?: WorkspaceTagListByServiceOptionalParams, + ) => listByService(context, resourceGroupName, serviceName, workspaceId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + options?: WorkspaceTagDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, tagId, ifMatch, options), + update: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + ifMatch: string, + parameters: TagCreateUpdateParameters, + options?: WorkspaceTagUpdateOptionalParams, + ) => + update( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + ifMatch, + parameters, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + parameters: TagCreateUpdateParameters, + options?: WorkspaceTagCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + parameters, + options, + ), + getEntityState: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagGetEntityStateOptionalParams, + ) => getEntityState(context, resourceGroupName, serviceName, workspaceId, tagId, options), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, tagId, options), + }; +} + +export function _getWorkspaceTagOperations(context: ApiManagementContext): WorkspaceTagOperations { + return { + ..._getWorkspaceTag(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagApiLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagApiLink/index.ts new file mode 100644 index 000000000000..e46d4d6f2d6b --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagApiLink/index.ts @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/workspaceTagApiLink/operations.js"; +import { + WorkspaceTagApiLinkListByProductOptionalParams, + WorkspaceTagApiLinkDeleteOptionalParams, + WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + WorkspaceTagApiLinkGetOptionalParams, +} from "../../api/workspaceTagApiLink/options.js"; +import { TagApiLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceTagApiLink operations. */ +export interface WorkspaceTagApiLinkOperations { + /** Lists a collection of the API links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagApiLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified API from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options?: WorkspaceTagApiLinkDeleteOptionalParams, + ) => Promise; + /** Adds an API to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the API link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options?: WorkspaceTagApiLinkGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceTagApiLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagApiLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options?: WorkspaceTagApiLinkDeleteOptionalParams, + ) => $delete(context, resourceGroupName, serviceName, workspaceId, tagId, apiLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + parameters: TagApiLinkContract, + options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + apiLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + apiLinkId: string, + options?: WorkspaceTagApiLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, tagId, apiLinkId, options), + }; +} + +export function _getWorkspaceTagApiLinkOperations( + context: ApiManagementContext, +): WorkspaceTagApiLinkOperations { + return { + ..._getWorkspaceTagApiLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagOperationLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagOperationLink/index.ts new file mode 100644 index 000000000000..93ee332521dd --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagOperationLink/index.ts @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/workspaceTagOperationLink/operations.js"; +import { + WorkspaceTagOperationLinkListByProductOptionalParams, + WorkspaceTagOperationLinkDeleteOptionalParams, + WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + WorkspaceTagOperationLinkGetOptionalParams, +} from "../../api/workspaceTagOperationLink/options.js"; +import { TagOperationLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceTagOperationLink operations. */ +export interface WorkspaceTagOperationLinkOperations { + /** Lists a collection of the operation links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagOperationLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified operation from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options?: WorkspaceTagOperationLinkDeleteOptionalParams, + ) => Promise; + /** Adds an operation to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the operation link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options?: WorkspaceTagOperationLinkGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceTagOperationLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagOperationLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options?: WorkspaceTagOperationLinkDeleteOptionalParams, + ) => + $delete( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + operationLinkId, + options, + ), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + parameters: TagOperationLinkContract, + options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + operationLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + operationLinkId: string, + options?: WorkspaceTagOperationLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, tagId, operationLinkId, options), + }; +} + +export function _getWorkspaceTagOperationLinkOperations( + context: ApiManagementContext, +): WorkspaceTagOperationLinkOperations { + return { + ..._getWorkspaceTagOperationLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagProductLink/index.ts b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagProductLink/index.ts new file mode 100644 index 000000000000..beec5c62c1b3 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/classic/workspaceTagProductLink/index.ts @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementContext } from "../../api/apiManagementContext.js"; +import { + listByProduct, + $delete, + createOrUpdate, + get, +} from "../../api/workspaceTagProductLink/operations.js"; +import { + WorkspaceTagProductLinkListByProductOptionalParams, + WorkspaceTagProductLinkDeleteOptionalParams, + WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + WorkspaceTagProductLinkGetOptionalParams, +} from "../../api/workspaceTagProductLink/options.js"; +import { TagProductLinkContract } from "../../models/models.js"; +import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; + +/** Interface representing a WorkspaceTagProductLink operations. */ +export interface WorkspaceTagProductLinkOperations { + /** Lists a collection of the product links associated with a tag. */ + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagProductLinkListByProductOptionalParams, + ) => PagedAsyncIterableIterator; + /** Deletes the specified product from the specified tag. */ + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options?: WorkspaceTagProductLinkDeleteOptionalParams, + ) => Promise; + /** Adds a product to the specified tag via link. */ + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + ) => Promise; + /** Gets the product link for the tag. */ + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options?: WorkspaceTagProductLinkGetOptionalParams, + ) => Promise; +} + +function _getWorkspaceTagProductLink(context: ApiManagementContext) { + return { + listByProduct: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + options?: WorkspaceTagProductLinkListByProductOptionalParams, + ) => listByProduct(context, resourceGroupName, serviceName, workspaceId, tagId, options), + delete: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options?: WorkspaceTagProductLinkDeleteOptionalParams, + ) => + $delete(context, resourceGroupName, serviceName, workspaceId, tagId, productLinkId, options), + createOrUpdate: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + parameters: TagProductLinkContract, + options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + ) => + createOrUpdate( + context, + resourceGroupName, + serviceName, + workspaceId, + tagId, + productLinkId, + parameters, + options, + ), + get: ( + resourceGroupName: string, + serviceName: string, + workspaceId: string, + tagId: string, + productLinkId: string, + options?: WorkspaceTagProductLinkGetOptionalParams, + ) => get(context, resourceGroupName, serviceName, workspaceId, tagId, productLinkId, options), + }; +} + +export function _getWorkspaceTagProductLinkOperations( + context: ApiManagementContext, +): WorkspaceTagProductLinkOperations { + return { + ..._getWorkspaceTagProductLink(context), + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/index.ts b/sdk/apimanagement/arm-apimanagement/src/index.ts index 5ae6cad06d99..aea79eb1d9ff 100644 --- a/sdk/apimanagement/arm-apimanagement/src/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/index.ts @@ -1,13 +1,1625 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; +import { + PageSettings, + ContinuablePage, + PagedAsyncIterableIterator, +} from "./static-helpers/pagingHelpers.js"; -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; export { ApiManagementClient } from "./apiManagementClient.js"; -export * from "./operationsInterfaces/index.js"; +export type { SimplePollerLike } from "./static-helpers/simplePollerHelpers.js"; +export type { RestorePollerOptions } from "./restorePollerHelpers.js"; +export { restorePoller } from "./restorePollerHelpers.js"; +export type { + ApiContract, + ApiContractProperties, + Protocol, + ApiVersionSetContractDetails, + VersioningScheme, + ApiEntityBaseContract, + AuthenticationSettingsContract, + OAuth2AuthenticationSettingsContract, + OpenIdAuthenticationSettingsContract, + BearerTokenSendingMethods, + SubscriptionKeyParameterNamesContract, + ApiType, + ApiContactInformation, + ApiLicenseInformation, + McpProperties, + McpTransportType, + McpEndpoint, + ProxyResource, + Resource, + SystemData, + CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateProperties, + ContentFormat, + ApiCreateOrUpdatePropertiesWsdlSelector, + SoapApiType, + TranslateRequiredQueryParametersConduct, + ApiUpdateContract, + ApiContractUpdateProperties, + ConnectivityCheckRequest, + ConnectivityCheckRequestSource, + ConnectivityCheckRequestDestination, + PreferredIPVersion, + ConnectivityCheckProtocol, + ConnectivityCheckRequestProtocolConfiguration, + ConnectivityCheckRequestProtocolConfigurationHttpConfiguration, + Method, + HttpHeader, + ConnectivityCheckResponse, + ConnectivityHop, + ConnectivityIssue, + Origin, + Severity, + IssueType, + ConnectionStatus, + ApiReleaseContract, + ApiReleaseContractProperties, + OperationContract, + OperationContractProperties, + OperationEntityBaseContract, + ParameterContract, + ParameterExampleContract, + RequestContract, + RepresentationContract, + ResponseContract, + OperationUpdateContract, + OperationUpdateContractProperties, + PolicyContract, + PolicyContractProperties, + PolicyContentFormat, + PolicyIdName, + PolicyCollection, + TagContract, + TagContractProperties, + TagCreateUpdateParameters, + SchemaContract, + SchemaContractProperties, + SchemaDocumentProperties, + DiagnosticContract, + DiagnosticContractProperties, + AlwaysLog, + SamplingSettings, + SamplingType, + PipelineDiagnosticSettings, + HttpMessageDiagnostic, + BodyDiagnosticSettings, + DataMasking, + DataMaskingEntity, + DataMaskingMode, + LLMDiagnosticSettings, + LlmDiagnosticSettings, + LLMMessageDiagnosticSettings, + LlmMessageLogTypes, + HttpCorrelationProtocol, + Verbosity, + OperationNameFormat, + DiagnosticUpdateContract, + DiagnosticContractUpdateProperties, + IssueContract, + IssueContractProperties, + IssueContractBaseProperties, + State, + WikiContract, + WikiContractProperties, + WikiDocumentationContract, + WikiUpdateContract, + ApiVersionSetContract, + ApiVersionSetContractProperties, + ApiVersionSetEntityBase, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateParametersProperties, + BackendContract, + BackendContractProperties, + BackendProtocol, + BackendBaseParameters, + BackendProperties, + BackendServiceFabricClusterProperties, + X509CertificateName, + BackendCredentialsContract, + BackendAuthorizationHeaderCredentials, + BackendProxyContract, + BackendTlsProperties, + BackendCircuitBreaker, + CircuitBreakerRule, + CircuitBreakerFailureCondition, + FailureStatusCodeRange, + BackendFailureResponse, + BackendBaseParametersPool, + BackendType, + BackendPool, + BackendPoolItem, + CarbonEmissionCategory, + BackendSessionAffinity, + BackendSessionId, + BackendSessionIdSource, + BackendUpdateParameters, + BackendUpdateParameterProperties, + CertificateContract, + CertificateContractProperties, + KeyVaultContractProperties, + KeyVaultLastAccessStatusContractProperties, + KeyVaultContractCreateProperties, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateProperties, + GroupContract, + GroupContractProperties, + GroupType, + GroupCreateParameters, + GroupCreateParametersProperties, + GroupUpdateParameters, + GroupUpdateParametersProperties, + LoggerContract, + LoggerContractProperties, + LoggerType, + LoggerUpdateContract, + LoggerUpdateParameters, + NamedValueContract, + NamedValueContractProperties, + NamedValueEntityBaseParameters, + NamedValueCreateContract, + NamedValueCreateContractProperties, + NamedValueUpdateParameters, + NamedValueUpdateParameterProperties, + NamedValueSecretContract, + NotificationContract, + NotificationContractProperties, + RecipientsContractProperties, + NotificationName, + PolicyFragmentContract, + PolicyFragmentContractProperties, + PolicyFragmentContentFormat, + ResourceCollection, + ResourceCollectionValueItem, + PortalSigninSettings, + PortalSigninSettingProperties, + PortalSignupSettings, + PortalSignupSettingsProperties, + TermsOfServiceProperties, + PortalDelegationSettings, + PortalDelegationSettingsProperties, + SubscriptionsDelegationSettingsProperties, + RegistrationDelegationSettingsProperties, + PortalSettingValidationKeyContract, + ProductContract, + ProductContractProperties, + ProductEntityBaseParameters, + ProductAuthType, + ProductEntityBaseParametersApplication, + ProductState, + ProductApplicationContract, + ProductApplicationContractEntra, + ProductUpdateParameters, + ProductUpdateProperties, + ProductApiLinkContract, + ProductApiLinkContractProperties, + ProductGroupLinkContract, + ProductGroupLinkContractProperties, + GlobalSchemaContract, + GlobalSchemaContractProperties, + SchemaType, + SubscriptionContract, + SubscriptionContractProperties, + SubscriptionState, + SubscriptionCreateParameters, + SubscriptionCreateParameterProperties, + SubscriptionUpdateParameters, + SubscriptionUpdateParameterProperties, + SubscriptionKeysContract, + TagApiLinkContract, + TagApiLinkContractProperties, + TagOperationLinkContract, + TagOperationLinkContractProperties, + TagProductLinkContract, + TagProductLinkContractProperties, + Operation, + OperationDisplay, + ApiManagementGatewayResource, + ApiManagementGatewayProperties, + ApiManagementGatewaySkuProperties, + ApiGatewaySkuType, + ApiManagementGatewayBaseProperties, + FrontendConfiguration, + BackendConfiguration, + BackendSubnetConfiguration, + GatewayConfigurationApi, + VirtualNetworkType, + TrackedResource, + ApiManagementGatewayUpdateParameters, + ApiManagementGatewayUpdateProperties, + ApiManagementGatewaySkuPropertiesForPatch, + ApimResource, + GatewayResourceSkuResult, + GatewaySku, + GatewaySkuCapacity, + GatewaySkuCapacityScaleType, + TagResourceContract, + TagTagResourceContractProperties, + ApiTagResourceContractProperties, + OperationTagResourceContractProperties, + ProductTagResourceContractProperties, + ApiRevisionContract, + ApiManagementServiceResource, + ApiManagementServiceProperties, + ApiManagementServiceSkuProperties, + SkuType, + ApiManagementServiceIdentity, + ApimIdentityType, + UserIdentityProperties, + ApiManagementServiceBaseProperties, + HostnameConfiguration, + HostnameType, + CertificateInformation, + CertificateSource, + CertificateStatus, + PublicNetworkAccess, + ConfigurationApi, + LegacyApiState, + VirtualNetworkConfiguration, + AdditionalLocation, + NatGatewayState, + PlatformVersion, + CertificateConfiguration, + CertificateConfigurationStoreName, + ApiVersionConstraint, + RemotePrivateEndpointConnectionWrapper, + PrivateEndpointConnectionWrapperProperties, + ArmIdWrapper, + PrivateLinkServiceConnectionState, + PrivateEndpointServiceConnectionStatus, + LegacyPortalStatus, + DeveloperPortalStatus, + ReleaseChannel, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateProperties, + ApiManagementServiceBackupRestoreParameters, + AccessType, + MigrateToStv2Contract, + MigrateToStv2Mode, + ApiManagementServiceGetSsoTokenResult, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceNameAvailabilityResult, + NameAvailabilityReason, + ApiManagementServiceGetDomainOwnershipIdentifierResult, + AllPoliciesContract, + AllPoliciesContractProperties, + PolicyComplianceState, + ResourceSkuResult, + ResourceSku, + ResourceSkuCapacity, + ResourceSkuCapacityScaleType, + NetworkStatusContractByLocation, + NetworkStatusContract, + ConnectivityStatusContract, + ConnectivityStatusType, + OutboundEnvironmentEndpointList, + OutboundEnvironmentEndpoint, + EndpointDependency, + EndpointDetail, + PolicyDescriptionCollection, + PolicyDescriptionContract, + PolicyDescriptionContractProperties, + OperationResultContract, + OperationResultContractProperties, + AsyncOperationStatus, + ErrorResponseBody, + ErrorFieldContract, + OperationResultLogItemContract, + PortalSettingsCollection, + PortalSettingsContract, + PortalSettingsContractProperties, + QuotaCounterCollection, + QuotaCounterContract, + QuotaCounterValueContractProperties, + QuotaCounterValueUpdateContract, + RegionContract, + ReportRecordContract, + RequestReportRecordContract, + ResolverContract, + ResolverEntityBaseContract, + ResolverUpdateContract, + ResolverUpdateContractProperties, + IssueUpdateContract, + IssueUpdateContractProperties, + IssueCommentContract, + IssueCommentContractProperties, + IssueAttachmentContract, + IssueAttachmentContractProperties, + TagDescriptionContract, + TagDescriptionContractProperties, + TagDescriptionBaseProperties, + TagDescriptionCreateParameters, + ToolContract, + ToolContractProperties, + AuthorizationProviderContract, + AuthorizationProviderContractProperties, + AuthorizationProviderOAuth2Settings, + AuthorizationProviderOAuth2GrantTypes, + AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType, + AuthorizationProviderKeyVaultContract, + AuthorizationProviderFederatedIdentityCredentialsProperties, + AuthorizationProviderKeyVaultCreateProperties, + AuthorizationContract, + AuthorizationContractProperties, + AuthorizationType, + OAuth2GrantType, + AuthorizationError, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationLoginRequestContract, + AuthorizationLoginResponseContract, + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyContractProperties, + AuthorizationServerContract, + AuthorizationServerContractProperties, + GrantType, + AuthorizationServerContractBaseProperties, + AuthorizationMethod, + ClientAuthenticationMethod, + TokenBodyParameterContract, + BearerTokenSendingMethod, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateContractProperties, + AuthorizationServerSecretsContract, + BackendReconnectContract, + BackendReconnectProperties, + CacheContract, + CacheContractProperties, + CacheUpdateParameters, + CacheUpdateProperties, + ContentTypeContract, + ContentTypeContractProperties, + ContentItemContract, + DeletedServiceContract, + DeletedServiceContractProperties, + DocumentationContract, + DocumentationContractProperties, + DocumentationUpdateContract, + EmailTemplateContract, + EmailTemplateContractProperties, + EmailTemplateParametersContractProperties, + TemplateName, + EmailTemplateUpdateParameters, + EmailTemplateUpdateParameterProperties, + ApiManagementGatewayConfigConnectionResource, + GatewayConfigConnectionBaseProperties, + GatewayHostnameBindingResource, + GatewayHostnameBindingBaseProperties, + GatewayHostnameBindingKeyVault, + GatewayHostnameBindingKeyVaultLastStatus, + KeyVaultFetchCode, + GatewayHostnameBindingCertificate, + GatewayContract, + GatewayContractProperties, + ResourceLocationDataContract, + ManagedServiceIdentity, + ManagedServiceIdentityType, + UserAssignedIdentity, + GatewayKeysContract, + GatewayKeyRegenerationRequestContract, + KeyType, + GatewayTokenRequestContract, + GatewayTokenContract, + GatewayListDebugCredentialsContract, + GatewayListDebugCredentialsContractPurpose, + GatewayDebugCredentialsContract, + GatewayListTraceContract, + AssociationContract, + AssociationContractProperties, + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationContractProperties, + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityContractProperties, + UserContract, + UserContractProperties, + UserEntityBaseParameters, + UserState, + UserIdentityContract, + IdentityProviderContract, + IdentityProviderContractProperties, + IdentityProviderType, + IdentityProviderBaseParameters, + IdentityProviderCreateContract, + IdentityProviderCreateContractProperties, + IdentityProviderUpdateParameters, + IdentityProviderUpdateProperties, + ClientSecretContract, + RecipientUserCollection, + RecipientUserContract, + RecipientUsersContractProperties, + RecipientEmailCollection, + RecipientEmailContract, + RecipientEmailContractProperties, + OpenidConnectProviderContract, + OpenidConnectProviderContractProperties, + OpenidConnectProviderUpdateContract, + OpenidConnectProviderUpdateContractProperties, + PolicyRestrictionContract, + PolicyRestrictionContractProperties, + PolicyRestrictionRequireBase, + PolicyRestrictionUpdateContract, + PortalConfigContract, + PortalConfigProperties, + PortalConfigPropertiesSignin, + PortalConfigPropertiesSignup, + PortalConfigTermsOfServiceProperties, + PortalConfigDelegationProperties, + PortalConfigCorsProperties, + PortalConfigCspProperties, + PortalSettingsCspMode, + ClientApplicationContract, + ClientApplicationContractProperties, + ClientApplicationState, + ClientApplicationSecretsContract, + ClientApplicationSecretsContractEntra, + ClientApplicationProductLinkContract, + ClientApplicationProductLinkContractProperties, + PortalRevisionContract, + PortalRevisionContractProperties, + PortalRevisionStatus, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpoint, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointConnectionRequest, + PrivateEndpointConnectionRequestProperties, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkResourceListResult, + TenantSettingsContract, + TenantSettingsContractProperties, + SettingsTypeName, + AccessInformationContract, + AccessInformationContractProperties, + AccessIdName, + AccessInformationCreateParameters, + AccessInformationCreateParameterProperties, + AccessInformationUpdateParameters, + AccessInformationUpdateParameterProperties, + AccessInformationSecretsContract, + DeployConfigurationParameters, + DeployConfigurationParameterProperties, + SaveConfigurationParameter, + SaveConfigurationParameterProperties, + TenantConfigurationSyncStateContract, + TenantConfigurationSyncStateContractProperties, + UserCreateParameters, + UserCreateParameterProperties, + AppType, + Confirmation, + UserUpdateParameters, + UserUpdateParametersProperties, + GenerateSsoUrlResult, + UserTokenParameters, + UserTokenParameterProperties, + UserTokenResult, + ApiManagementWorkspaceLinksResource, + ApiManagementWorkspaceLinksProperties, + WorkspaceLinksBaseProperties, + WorkspaceLinksGateway, + WorkspaceContract, + WorkspaceContractProperties, + ApiExportResult, + ExportResultFormat, + ApiExportResultValue, + ApiManagementSku, + ApiManagementSkuCapacity, + ApiManagementSkuCapacityScaleType, + ApiManagementSkuLocationInfo, + ApiManagementSkuZoneDetails, + ApiManagementSkuCapabilities, + ApiManagementSkuCosts, + ApiManagementSkuRestrictions, + ApiManagementSkuRestrictionsType, + ApiManagementSkuRestrictionInfo, + ApiManagementSkuRestrictionsReasonCode, + OperationStatusResult, + PolicyExportFormat, + KeyVaultRefreshState, + PolicyScopeContract, + ConfigurationIdName, + ExportFormat, + ExportApi, +} from "./models/index.js"; +export { + KnownProtocol, + KnownVersioningScheme, + KnownBearerTokenSendingMethods, + KnownApiType, + KnownMcpTransportType, + KnownCreatedByType, + KnownContentFormat, + KnownSoapApiType, + KnownTranslateRequiredQueryParametersConduct, + KnownPreferredIPVersion, + KnownConnectivityCheckProtocol, + KnownMethod, + KnownOrigin, + KnownSeverity, + KnownIssueType, + KnownConnectionStatus, + KnownPolicyContentFormat, + KnownPolicyIdName, + KnownAlwaysLog, + KnownSamplingType, + KnownDataMaskingMode, + KnownLlmDiagnosticSettings, + KnownLlmMessageLogTypes, + KnownHttpCorrelationProtocol, + KnownVerbosity, + KnownOperationNameFormat, + KnownState, + KnownBackendProtocol, + KnownBackendType, + KnownCarbonEmissionCategory, + KnownBackendSessionIdSource, + KnownLoggerType, + KnownNotificationName, + KnownPolicyFragmentContentFormat, + KnownProductAuthType, + KnownSchemaType, + KnownApiGatewaySkuType, + KnownVirtualNetworkType, + KnownGatewaySkuCapacityScaleType, + KnownSkuType, + KnownApimIdentityType, + KnownHostnameType, + KnownCertificateSource, + KnownCertificateStatus, + KnownPublicNetworkAccess, + KnownLegacyApiState, + KnownNatGatewayState, + KnownPlatformVersion, + KnownCertificateConfigurationStoreName, + KnownPrivateEndpointServiceConnectionStatus, + KnownLegacyPortalStatus, + KnownDeveloperPortalStatus, + KnownReleaseChannel, + KnownAccessType, + KnownMigrateToStv2Mode, + KnownPolicyComplianceState, + KnownResourceSkuCapacityScaleType, + KnownConnectivityStatusType, + KnownAuthorizationType, + KnownOAuth2GrantType, + KnownGrantType, + KnownClientAuthenticationMethod, + KnownBearerTokenSendingMethod, + KnownTemplateName, + KnownManagedServiceIdentityType, + KnownGatewayListDebugCredentialsContractPurpose, + KnownUserState, + KnownIdentityProviderType, + KnownPolicyRestrictionRequireBase, + KnownPortalSettingsCspMode, + KnownClientApplicationState, + KnownPortalRevisionStatus, + KnownPrivateEndpointConnectionProvisioningState, + KnownSettingsTypeName, + KnownAccessIdName, + KnownAppType, + KnownConfirmation, + KnownExportResultFormat, + KnownPolicyExportFormat, + KnownKeyVaultRefreshState, + KnownConfigurationIdName, + KnownExportFormat, + KnownExportApi, + KnownVersions, +} from "./models/index.js"; +export type { ApiManagementClientOptionalParams } from "./api/index.js"; +export type { AllPoliciesListByServiceOptionalParams } from "./api/allPolicies/index.js"; +export type { + ApiListByTagsOptionalParams, + ApiListByServiceOptionalParams, + ApiDeleteOptionalParams, + ApiUpdateOptionalParams, + ApiCreateOrUpdateOptionalParams, + ApiGetEntityTagOptionalParams, + ApiGetOptionalParams, +} from "./api/api/index.js"; +export type { + ApiDiagnosticListByServiceOptionalParams, + ApiDiagnosticDeleteOptionalParams, + ApiDiagnosticUpdateOptionalParams, + ApiDiagnosticCreateOrUpdateOptionalParams, + ApiDiagnosticGetEntityTagOptionalParams, + ApiDiagnosticGetOptionalParams, +} from "./api/apiDiagnostic/index.js"; +export type { ApiExportGetOptionalParams } from "./api/apiExport/index.js"; +export type { + ApiGatewayListOptionalParams, + ApiGatewayListByResourceGroupOptionalParams, + ApiGatewayDeleteOptionalParams, + ApiGatewayUpdateOptionalParams, + ApiGatewayCreateOrUpdateOptionalParams, + ApiGatewayGetOptionalParams, +} from "./api/apiGateway/index.js"; +export type { + ApiGatewayConfigConnectionListByGatewayOptionalParams, + ApiGatewayConfigConnectionDeleteOptionalParams, + ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, + ApiGatewayConfigConnectionGetOptionalParams, +} from "./api/apiGatewayConfigConnection/index.js"; +export type { + ApiGatewayHostnameBindingRefreshSecretOptionalParams, + ApiGatewayHostnameBindingListByGatewayOptionalParams, + ApiGatewayHostnameBindingDeleteOptionalParams, + ApiGatewayHostnameBindingCreateOrUpdateOptionalParams, + ApiGatewayHostnameBindingGetOptionalParams, +} from "./api/apiGatewayHostnameBinding/index.js"; +export type { + ApiIssueListByServiceOptionalParams, + ApiIssueDeleteOptionalParams, + ApiIssueUpdateOptionalParams, + ApiIssueCreateOrUpdateOptionalParams, + ApiIssueGetEntityTagOptionalParams, + ApiIssueGetOptionalParams, +} from "./api/apiIssue/index.js"; +export type { + ApiIssueAttachmentListByServiceOptionalParams, + ApiIssueAttachmentDeleteOptionalParams, + ApiIssueAttachmentCreateOrUpdateOptionalParams, + ApiIssueAttachmentGetEntityTagOptionalParams, + ApiIssueAttachmentGetOptionalParams, +} from "./api/apiIssueAttachment/index.js"; +export type { + ApiIssueCommentListByServiceOptionalParams, + ApiIssueCommentDeleteOptionalParams, + ApiIssueCommentCreateOrUpdateOptionalParams, + ApiIssueCommentGetEntityTagOptionalParams, + ApiIssueCommentGetOptionalParams, +} from "./api/apiIssueComment/index.js"; +export type { ApiManagementGatewaySkusListAvailableSkusOptionalParams } from "./api/apiManagementGatewaySkus/index.js"; +export type { ApiManagementOperationsListOptionalParams } from "./api/apiManagementOperations/index.js"; +export type { + ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, + ApiManagementServiceCheckNameAvailabilityOptionalParams, + ApiManagementServiceRefreshHostnamesOptionalParams, + ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, + ApiManagementServiceGetSsoTokenOptionalParams, + ApiManagementServiceMigrateToStv2OptionalParams, + ApiManagementServiceBackupOptionalParams, + ApiManagementServiceRestoreOptionalParams, + ApiManagementServiceListOptionalParams, + ApiManagementServiceListByResourceGroupOptionalParams, + ApiManagementServiceDeleteOptionalParams, + ApiManagementServiceUpdateOptionalParams, + ApiManagementServiceCreateOrUpdateOptionalParams, + ApiManagementServiceGetOptionalParams, +} from "./api/apiManagementService/index.js"; +export type { ApiManagementServiceResourcesPerformConnectivityCheckAsyncOptionalParams } from "./api/apiManagementServiceResources/index.js"; +export type { ApiManagementServiceSkusListAvailableServiceSkusOptionalParams } from "./api/apiManagementServiceSkus/index.js"; +export type { ApiManagementSkusListOptionalParams } from "./api/apiManagementSkus/index.js"; +export type { ApiManagementWorkspaceLinkGetOptionalParams } from "./api/apiManagementWorkspaceLink/index.js"; +export type { ApiManagementWorkspaceLinksListByServiceOptionalParams } from "./api/apiManagementWorkspaceLinks/index.js"; +export type { + ApiOperationListByApiOptionalParams, + ApiOperationDeleteOptionalParams, + ApiOperationUpdateOptionalParams, + ApiOperationCreateOrUpdateOptionalParams, + ApiOperationGetEntityTagOptionalParams, + ApiOperationGetOptionalParams, +} from "./api/apiOperation/index.js"; +export type { + ApiOperationPolicyListByOperationOptionalParams, + ApiOperationPolicyDeleteOptionalParams, + ApiOperationPolicyCreateOrUpdateOptionalParams, + ApiOperationPolicyGetEntityTagOptionalParams, + ApiOperationPolicyGetOptionalParams, +} from "./api/apiOperationPolicy/index.js"; +export type { + ApiPolicyListByApiOptionalParams, + ApiPolicyDeleteOptionalParams, + ApiPolicyCreateOrUpdateOptionalParams, + ApiPolicyGetEntityTagOptionalParams, + ApiPolicyGetOptionalParams, +} from "./api/apiPolicy/index.js"; +export type { ApiProductListByApisOptionalParams } from "./api/apiProduct/index.js"; +export type { + ApiReleaseListByServiceOptionalParams, + ApiReleaseDeleteOptionalParams, + ApiReleaseUpdateOptionalParams, + ApiReleaseCreateOrUpdateOptionalParams, + ApiReleaseGetEntityTagOptionalParams, + ApiReleaseGetOptionalParams, +} from "./api/apiRelease/index.js"; +export type { ApiRevisionListByServiceOptionalParams } from "./api/apiRevision/index.js"; +export type { + ApiSchemaListByApiOptionalParams, + ApiSchemaDeleteOptionalParams, + ApiSchemaCreateOrUpdateOptionalParams, + ApiSchemaGetEntityTagOptionalParams, + ApiSchemaGetOptionalParams, +} from "./api/apiSchema/index.js"; +export type { + ApiTagDescriptionListByServiceOptionalParams, + ApiTagDescriptionDeleteOptionalParams, + ApiTagDescriptionCreateOrUpdateOptionalParams, + ApiTagDescriptionGetEntityTagOptionalParams, + ApiTagDescriptionGetOptionalParams, +} from "./api/apiTagDescription/index.js"; +export type { + ApiToolListByApiOptionalParams, + ApiToolDeleteOptionalParams, + ApiToolUpdateOptionalParams, + ApiToolCreateOrUpdateOptionalParams, + ApiToolGetEntityTagOptionalParams, + ApiToolGetOptionalParams, +} from "./api/apiTool/index.js"; +export type { + ApiVersionSetListByServiceOptionalParams, + ApiVersionSetDeleteOptionalParams, + ApiVersionSetUpdateOptionalParams, + ApiVersionSetCreateOrUpdateOptionalParams, + ApiVersionSetGetEntityTagOptionalParams, + ApiVersionSetGetOptionalParams, +} from "./api/apiVersionSet/index.js"; +export type { + ApiWikiDeleteOptionalParams, + ApiWikiUpdateOptionalParams, + ApiWikiCreateOrUpdateOptionalParams, + ApiWikiGetEntityTagOptionalParams, + ApiWikiGetOptionalParams, +} from "./api/apiWiki/index.js"; +export type { ApiWikisListOptionalParams } from "./api/apiWikis/index.js"; +export type { + AuthorizationConfirmConsentCodeOptionalParams, + AuthorizationListByAuthorizationProviderOptionalParams, + AuthorizationDeleteOptionalParams, + AuthorizationCreateOrUpdateOptionalParams, + AuthorizationGetOptionalParams, +} from "./api/authorization/index.js"; +export type { + AuthorizationAccessPolicyListByAuthorizationOptionalParams, + AuthorizationAccessPolicyDeleteOptionalParams, + AuthorizationAccessPolicyCreateOrUpdateOptionalParams, + AuthorizationAccessPolicyGetOptionalParams, +} from "./api/authorizationAccessPolicy/index.js"; +export type { AuthorizationLoginLinksPostOptionalParams } from "./api/authorizationLoginLinks/index.js"; +export type { + AuthorizationProviderRefreshSecretOptionalParams, + AuthorizationProviderListByServiceOptionalParams, + AuthorizationProviderDeleteOptionalParams, + AuthorizationProviderCreateOrUpdateOptionalParams, + AuthorizationProviderGetOptionalParams, +} from "./api/authorizationProvider/index.js"; +export type { + AuthorizationServerListSecretsOptionalParams, + AuthorizationServerListByServiceOptionalParams, + AuthorizationServerDeleteOptionalParams, + AuthorizationServerUpdateOptionalParams, + AuthorizationServerCreateOrUpdateOptionalParams, + AuthorizationServerGetEntityTagOptionalParams, + AuthorizationServerGetOptionalParams, +} from "./api/authorizationServer/index.js"; +export type { + BackendReconnectOptionalParams, + BackendListByServiceOptionalParams, + BackendDeleteOptionalParams, + BackendUpdateOptionalParams, + BackendCreateOrUpdateOptionalParams, + BackendGetEntityTagOptionalParams, + BackendGetOptionalParams, +} from "./api/backend/index.js"; +export type { + CacheListByServiceOptionalParams, + CacheDeleteOptionalParams, + CacheUpdateOptionalParams, + CacheCreateOrUpdateOptionalParams, + CacheGetEntityTagOptionalParams, + CacheGetOptionalParams, +} from "./api/cache/index.js"; +export type { + CertificateRefreshSecretOptionalParams, + CertificateListByServiceOptionalParams, + CertificateDeleteOptionalParams, + CertificateCreateOrUpdateOptionalParams, + CertificateGetEntityTagOptionalParams, + CertificateGetOptionalParams, +} from "./api/certificate/index.js"; +export type { + ClientApplicationListSecretsOptionalParams, + ClientApplicationListByServiceOptionalParams, + ClientApplicationDeleteOptionalParams, + ClientApplicationCreateOrUpdateOptionalParams, + ClientApplicationGetEntityTagOptionalParams, + ClientApplicationGetOptionalParams, +} from "./api/clientApplication/index.js"; +export type { + ClientApplicationProductLinkListByClientApplicationsOptionalParams, + ClientApplicationProductLinkDeleteOptionalParams, + ClientApplicationProductLinkCreateOptionalParams, + ClientApplicationProductLinkGetOptionalParams, +} from "./api/clientApplicationProductLink/index.js"; +export type { + ContentItemListByServiceOptionalParams, + ContentItemDeleteOptionalParams, + ContentItemCreateOrUpdateOptionalParams, + ContentItemGetEntityTagOptionalParams, + ContentItemGetOptionalParams, +} from "./api/contentItem/index.js"; +export type { + ContentTypeListByServiceOptionalParams, + ContentTypeDeleteOptionalParams, + ContentTypeCreateOrUpdateOptionalParams, + ContentTypeGetOptionalParams, +} from "./api/contentType/index.js"; +export type { + DelegationSettingsListSecretsOptionalParams, + DelegationSettingsUpdateOptionalParams, + DelegationSettingsCreateOrUpdateOptionalParams, + DelegationSettingsGetEntityTagOptionalParams, + DelegationSettingsGetOptionalParams, +} from "./api/delegationSettings/index.js"; +export type { + DeletedServicesListBySubscriptionOptionalParams, + DeletedServicesPurgeOptionalParams, + DeletedServicesGetByNameOptionalParams, +} from "./api/deletedServices/index.js"; +export type { + DiagnosticListByServiceOptionalParams, + DiagnosticDeleteOptionalParams, + DiagnosticUpdateOptionalParams, + DiagnosticCreateOrUpdateOptionalParams, + DiagnosticGetEntityTagOptionalParams, + DiagnosticGetOptionalParams, +} from "./api/diagnostic/index.js"; +export type { + DocumentationListByServiceOptionalParams, + DocumentationDeleteOptionalParams, + DocumentationUpdateOptionalParams, + DocumentationCreateOrUpdateOptionalParams, + DocumentationGetEntityTagOptionalParams, + DocumentationGetOptionalParams, +} from "./api/documentation/index.js"; +export type { + EmailTemplateListByServiceOptionalParams, + EmailTemplateDeleteOptionalParams, + EmailTemplateUpdateOptionalParams, + EmailTemplateCreateOrUpdateOptionalParams, + EmailTemplateGetEntityTagOptionalParams, + EmailTemplateGetOptionalParams, +} from "./api/emailTemplate/index.js"; +export type { + GatewayListTraceOptionalParams, + GatewayListDebugCredentialsOptionalParams, + GatewayInvalidateDebugCredentialsOptionalParams, + GatewayGenerateTokenOptionalParams, + GatewayRegenerateKeyOptionalParams, + GatewayListKeysOptionalParams, + GatewayListByServiceOptionalParams, + GatewayDeleteOptionalParams, + GatewayUpdateOptionalParams, + GatewayCreateOrUpdateOptionalParams, + GatewayGetEntityTagOptionalParams, + GatewayGetOptionalParams, +} from "./api/gateway/index.js"; +export type { + GatewayApiDeleteOptionalParams, + GatewayApiCreateOrUpdateOptionalParams, + GatewayApiGetEntityTagOptionalParams, + GatewayApiListByServiceOptionalParams, +} from "./api/gatewayApi/index.js"; +export type { + GatewayCertificateAuthorityListByServiceOptionalParams, + GatewayCertificateAuthorityDeleteOptionalParams, + GatewayCertificateAuthorityCreateOrUpdateOptionalParams, + GatewayCertificateAuthorityGetEntityTagOptionalParams, + GatewayCertificateAuthorityGetOptionalParams, +} from "./api/gatewayCertificateAuthority/index.js"; +export type { + GatewayHostnameConfigurationListByServiceOptionalParams, + GatewayHostnameConfigurationDeleteOptionalParams, + GatewayHostnameConfigurationCreateOrUpdateOptionalParams, + GatewayHostnameConfigurationGetEntityTagOptionalParams, + GatewayHostnameConfigurationGetOptionalParams, +} from "./api/gatewayHostnameConfiguration/index.js"; +export type { + GlobalSchemaListByServiceOptionalParams, + GlobalSchemaDeleteOptionalParams, + GlobalSchemaCreateOrUpdateOptionalParams, + GlobalSchemaGetEntityTagOptionalParams, + GlobalSchemaGetOptionalParams, +} from "./api/globalSchema/index.js"; +export type { + GraphQLApiResolverListByApiOptionalParams, + GraphQLApiResolverDeleteOptionalParams, + GraphQLApiResolverUpdateOptionalParams, + GraphQLApiResolverCreateOrUpdateOptionalParams, + GraphQLApiResolverGetEntityTagOptionalParams, + GraphQLApiResolverGetOptionalParams, +} from "./api/graphQLApiResolver/index.js"; +export type { + GraphQLApiResolverPolicyListByResolverOptionalParams, + GraphQLApiResolverPolicyDeleteOptionalParams, + GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, + GraphQLApiResolverPolicyGetEntityTagOptionalParams, + GraphQLApiResolverPolicyGetOptionalParams, +} from "./api/graphQLApiResolverPolicy/index.js"; +export type { + GroupListByServiceOptionalParams, + GroupDeleteOptionalParams, + GroupUpdateOptionalParams, + GroupCreateOrUpdateOptionalParams, + GroupGetEntityTagOptionalParams, + GroupGetOptionalParams, +} from "./api/group/index.js"; +export type { + GroupUserDeleteOptionalParams, + GroupUserCreateOptionalParams, + GroupUserCheckEntityExistsOptionalParams, + GroupUserListOptionalParams, +} from "./api/groupUser/index.js"; +export type { + IdentityProviderListSecretsOptionalParams, + IdentityProviderListByServiceOptionalParams, + IdentityProviderDeleteOptionalParams, + IdentityProviderUpdateOptionalParams, + IdentityProviderCreateOrUpdateOptionalParams, + IdentityProviderGetEntityTagOptionalParams, + IdentityProviderGetOptionalParams, +} from "./api/identityProvider/index.js"; +export type { + IssueListByServiceOptionalParams, + IssueGetOptionalParams, +} from "./api/issue/index.js"; +export type { + LoggerListByServiceOptionalParams, + LoggerDeleteOptionalParams, + LoggerUpdateOptionalParams, + LoggerCreateOrUpdateOptionalParams, + LoggerGetEntityTagOptionalParams, + LoggerGetOptionalParams, +} from "./api/logger/index.js"; +export type { + NamedValueRefreshSecretOptionalParams, + NamedValueListValueOptionalParams, + NamedValueListByServiceOptionalParams, + NamedValueDeleteOptionalParams, + NamedValueUpdateOptionalParams, + NamedValueCreateOrUpdateOptionalParams, + NamedValueGetEntityTagOptionalParams, + NamedValueGetOptionalParams, +} from "./api/namedValue/index.js"; +export type { + NetworkStatusListByLocationOptionalParams, + NetworkStatusListByServiceOptionalParams, +} from "./api/networkStatus/index.js"; +export type { + NotificationListByServiceOptionalParams, + NotificationCreateOrUpdateOptionalParams, + NotificationGetOptionalParams, +} from "./api/notification/index.js"; +export type { + NotificationRecipientEmailDeleteOptionalParams, + NotificationRecipientEmailCreateOrUpdateOptionalParams, + NotificationRecipientEmailCheckEntityExistsOptionalParams, + NotificationRecipientEmailListByNotificationOptionalParams, +} from "./api/notificationRecipientEmail/index.js"; +export type { + NotificationRecipientUserDeleteOptionalParams, + NotificationRecipientUserCreateOrUpdateOptionalParams, + NotificationRecipientUserCheckEntityExistsOptionalParams, + NotificationRecipientUserListByNotificationOptionalParams, +} from "./api/notificationRecipientUser/index.js"; +export type { + OpenIdConnectProviderListSecretsOptionalParams, + OpenIdConnectProviderListByServiceOptionalParams, + OpenIdConnectProviderDeleteOptionalParams, + OpenIdConnectProviderUpdateOptionalParams, + OpenIdConnectProviderCreateOrUpdateOptionalParams, + OpenIdConnectProviderGetEntityTagOptionalParams, + OpenIdConnectProviderGetOptionalParams, +} from "./api/openIdConnectProvider/index.js"; +export type { OperationListByTagsOptionalParams } from "./api/operation/index.js"; +export type { OperationsResultsGetOptionalParams } from "./api/operationsResults/index.js"; +export type { OperationStatusGetOptionalParams } from "./api/operationStatus/index.js"; +export type { OutboundNetworkDependenciesEndpointsListByServiceOptionalParams } from "./api/outboundNetworkDependenciesEndpoints/index.js"; +export type { + PolicyListByServiceOptionalParams, + PolicyDeleteOptionalParams, + PolicyCreateOrUpdateOptionalParams, + PolicyGetEntityTagOptionalParams, + PolicyGetOptionalParams, +} from "./api/policy/index.js"; +export type { PolicyDescriptionListByServiceOptionalParams } from "./api/policyDescription/index.js"; +export type { + PolicyFragmentListReferencesOptionalParams, + PolicyFragmentListByServiceOptionalParams, + PolicyFragmentDeleteOptionalParams, + PolicyFragmentCreateOrUpdateOptionalParams, + PolicyFragmentGetEntityTagOptionalParams, + PolicyFragmentGetOptionalParams, +} from "./api/policyFragment/index.js"; +export type { + PolicyRestrictionListByServiceOptionalParams, + PolicyRestrictionDeleteOptionalParams, + PolicyRestrictionUpdateOptionalParams, + PolicyRestrictionCreateOrUpdateOptionalParams, + PolicyRestrictionGetEntityTagOptionalParams, + PolicyRestrictionGetOptionalParams, +} from "./api/policyRestriction/index.js"; +export type { PolicyRestrictionValidationsByServiceOptionalParams } from "./api/policyRestrictionValidations/index.js"; +export type { + PortalConfigListByServiceOptionalParams, + PortalConfigUpdateOptionalParams, + PortalConfigCreateOrUpdateOptionalParams, + PortalConfigGetEntityTagOptionalParams, + PortalConfigGetOptionalParams, +} from "./api/portalConfig/index.js"; +export type { + PortalRevisionListByServiceOptionalParams, + PortalRevisionUpdateOptionalParams, + PortalRevisionCreateOrUpdateOptionalParams, + PortalRevisionGetEntityTagOptionalParams, + PortalRevisionGetOptionalParams, +} from "./api/portalRevision/index.js"; +export type { PortalSettingsListByServiceOptionalParams } from "./api/portalSettings/index.js"; +export type { + PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, + PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, + PrivateEndpointConnectionListByServiceOptionalParams, + PrivateEndpointConnectionDeleteOptionalParams, + PrivateEndpointConnectionCreateOrUpdateOptionalParams, + PrivateEndpointConnectionGetByNameOptionalParams, +} from "./api/privateEndpointConnection/index.js"; +export type { + ProductListByServiceOptionalParams, + ProductDeleteOptionalParams, + ProductUpdateOptionalParams, + ProductCreateOrUpdateOptionalParams, + ProductGetEntityTagOptionalParams, + ProductGetOptionalParams, + ProductListByTagsOptionalParams, +} from "./api/product/index.js"; +export type { + ProductApiDeleteOptionalParams, + ProductApiCreateOrUpdateOptionalParams, + ProductApiCheckEntityExistsOptionalParams, + ProductApiListByProductOptionalParams, +} from "./api/productApi/index.js"; +export type { + ProductApiLinkListByProductOptionalParams, + ProductApiLinkDeleteOptionalParams, + ProductApiLinkCreateOrUpdateOptionalParams, + ProductApiLinkGetOptionalParams, +} from "./api/productApiLink/index.js"; +export type { + ProductGroupDeleteOptionalParams, + ProductGroupCreateOrUpdateOptionalParams, + ProductGroupCheckEntityExistsOptionalParams, + ProductGroupListByProductOptionalParams, +} from "./api/productGroup/index.js"; +export type { + ProductGroupLinkListByProductOptionalParams, + ProductGroupLinkDeleteOptionalParams, + ProductGroupLinkCreateOrUpdateOptionalParams, + ProductGroupLinkGetOptionalParams, +} from "./api/productGroupLink/index.js"; +export type { + ProductPolicyListByProductOptionalParams, + ProductPolicyDeleteOptionalParams, + ProductPolicyCreateOrUpdateOptionalParams, + ProductPolicyGetEntityTagOptionalParams, + ProductPolicyGetOptionalParams, +} from "./api/productPolicy/index.js"; +export type { ProductSubscriptionsListOptionalParams } from "./api/productSubscriptions/index.js"; +export type { + ProductWikiDeleteOptionalParams, + ProductWikiUpdateOptionalParams, + ProductWikiCreateOrUpdateOptionalParams, + ProductWikiGetEntityTagOptionalParams, + ProductWikiGetOptionalParams, +} from "./api/productWiki/index.js"; +export type { ProductWikisListOptionalParams } from "./api/productWikis/index.js"; +export type { + QuotaByCounterKeysUpdateOptionalParams, + QuotaByCounterKeysListByServiceOptionalParams, +} from "./api/quotaByCounterKeys/index.js"; +export type { + QuotaByPeriodKeysUpdateOptionalParams, + QuotaByPeriodKeysGetOptionalParams, +} from "./api/quotaByPeriodKeys/index.js"; +export type { RegionListByServiceOptionalParams } from "./api/region/index.js"; +export type { + ReportsListByRequestOptionalParams, + ReportsListByTimeOptionalParams, + ReportsListBySubscriptionOptionalParams, + ReportsListByGeoOptionalParams, + ReportsListByProductOptionalParams, + ReportsListByOperationOptionalParams, + ReportsListByUserOptionalParams, + ReportsListByApiOptionalParams, +} from "./api/reports/index.js"; +export type { + SignInSettingsUpdateOptionalParams, + SignInSettingsCreateOrUpdateOptionalParams, + SignInSettingsGetEntityTagOptionalParams, + SignInSettingsGetOptionalParams, +} from "./api/signInSettings/index.js"; +export type { + SignUpSettingsUpdateOptionalParams, + SignUpSettingsCreateOrUpdateOptionalParams, + SignUpSettingsGetEntityTagOptionalParams, + SignUpSettingsGetOptionalParams, +} from "./api/signUpSettings/index.js"; +export type { + SubscriptionListSecretsOptionalParams, + SubscriptionRegenerateSecondaryKeyOptionalParams, + SubscriptionRegeneratePrimaryKeyOptionalParams, + SubscriptionListOptionalParams, + SubscriptionDeleteOptionalParams, + SubscriptionUpdateOptionalParams, + SubscriptionCreateOrUpdateOptionalParams, + SubscriptionGetEntityTagOptionalParams, + SubscriptionGetOptionalParams, +} from "./api/subscription/index.js"; +export type { + TagListByServiceOptionalParams, + TagDeleteOptionalParams, + TagUpdateOptionalParams, + TagCreateOrUpdateOptionalParams, + TagGetEntityStateOptionalParams, + TagGetOptionalParams, + TagListByProductOptionalParams, + TagDetachFromProductOptionalParams, + TagAssignToProductOptionalParams, + TagGetEntityStateByProductOptionalParams, + TagGetByProductOptionalParams, + TagListByOperationOptionalParams, + TagDetachFromOperationOptionalParams, + TagAssignToOperationOptionalParams, + TagGetEntityStateByOperationOptionalParams, + TagGetByOperationOptionalParams, + TagListByApiOptionalParams, + TagDetachFromApiOptionalParams, + TagAssignToApiOptionalParams, + TagGetEntityStateByApiOptionalParams, + TagGetByApiOptionalParams, +} from "./api/tag/index.js"; +export type { + TagApiLinkListByProductOptionalParams, + TagApiLinkDeleteOptionalParams, + TagApiLinkCreateOrUpdateOptionalParams, + TagApiLinkGetOptionalParams, +} from "./api/tagApiLink/index.js"; +export type { + TagOperationLinkListByProductOptionalParams, + TagOperationLinkDeleteOptionalParams, + TagOperationLinkCreateOrUpdateOptionalParams, + TagOperationLinkGetOptionalParams, +} from "./api/tagOperationLink/index.js"; +export type { + TagProductLinkListByProductOptionalParams, + TagProductLinkDeleteOptionalParams, + TagProductLinkCreateOrUpdateOptionalParams, + TagProductLinkGetOptionalParams, +} from "./api/tagProductLink/index.js"; +export type { TagResourceListByServiceOptionalParams } from "./api/tagResource/index.js"; +export type { + TenantAccessListSecretsOptionalParams, + TenantAccessRegenerateSecondaryKeyOptionalParams, + TenantAccessRegeneratePrimaryKeyOptionalParams, + TenantAccessListByServiceOptionalParams, + TenantAccessUpdateOptionalParams, + TenantAccessCreateOptionalParams, + TenantAccessGetEntityTagOptionalParams, + TenantAccessGetOptionalParams, +} from "./api/tenantAccess/index.js"; +export type { + TenantAccessGitRegenerateSecondaryKeyOptionalParams, + TenantAccessGitRegeneratePrimaryKeyOptionalParams, +} from "./api/tenantAccessGit/index.js"; +export type { + TenantConfigurationGetSyncStateOptionalParams, + TenantConfigurationValidateOptionalParams, + TenantConfigurationSaveOptionalParams, + TenantConfigurationDeployOptionalParams, +} from "./api/tenantConfiguration/index.js"; +export type { + TenantSettingsListByServiceOptionalParams, + TenantSettingsGetOptionalParams, +} from "./api/tenantSettings/index.js"; +export type { + UserGetSharedAccessTokenOptionalParams, + UserGenerateSsoUrlOptionalParams, + UserListByServiceOptionalParams, + UserDeleteOptionalParams, + UserUpdateOptionalParams, + UserCreateOrUpdateOptionalParams, + UserGetEntityTagOptionalParams, + UserGetOptionalParams, +} from "./api/user/index.js"; +export type { UserConfirmationPasswordSendOptionalParams } from "./api/userConfirmationPassword/index.js"; +export type { UserGroupListOptionalParams } from "./api/userGroup/index.js"; +export type { UserIdentitiesListOptionalParams } from "./api/userIdentities/index.js"; +export type { + UserSubscriptionListOptionalParams, + UserSubscriptionGetOptionalParams, +} from "./api/userSubscription/index.js"; +export type { + WorkspaceListByServiceOptionalParams, + WorkspaceDeleteOptionalParams, + WorkspaceUpdateOptionalParams, + WorkspaceCreateOrUpdateOptionalParams, + WorkspaceGetEntityTagOptionalParams, + WorkspaceGetOptionalParams, +} from "./api/workspace/index.js"; +export type { + WorkspaceApiListByServiceOptionalParams, + WorkspaceApiDeleteOptionalParams, + WorkspaceApiUpdateOptionalParams, + WorkspaceApiCreateOrUpdateOptionalParams, + WorkspaceApiGetEntityTagOptionalParams, + WorkspaceApiGetOptionalParams, +} from "./api/workspaceApi/index.js"; +export type { + WorkspaceApiDiagnosticListByWorkspaceOptionalParams, + WorkspaceApiDiagnosticDeleteOptionalParams, + WorkspaceApiDiagnosticUpdateOptionalParams, + WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, + WorkspaceApiDiagnosticGetEntityTagOptionalParams, + WorkspaceApiDiagnosticGetOptionalParams, +} from "./api/workspaceApiDiagnostic/index.js"; +export type { WorkspaceApiExportGetOptionalParams } from "./api/workspaceApiExport/index.js"; +export type { + WorkspaceApiOperationListByApiOptionalParams, + WorkspaceApiOperationDeleteOptionalParams, + WorkspaceApiOperationUpdateOptionalParams, + WorkspaceApiOperationCreateOrUpdateOptionalParams, + WorkspaceApiOperationGetEntityTagOptionalParams, + WorkspaceApiOperationGetOptionalParams, +} from "./api/workspaceApiOperation/index.js"; +export type { + WorkspaceApiOperationPolicyListByOperationOptionalParams, + WorkspaceApiOperationPolicyDeleteOptionalParams, + WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, + WorkspaceApiOperationPolicyGetEntityTagOptionalParams, + WorkspaceApiOperationPolicyGetOptionalParams, +} from "./api/workspaceApiOperationPolicy/index.js"; +export type { + WorkspaceApiPolicyListByApiOptionalParams, + WorkspaceApiPolicyDeleteOptionalParams, + WorkspaceApiPolicyCreateOrUpdateOptionalParams, + WorkspaceApiPolicyGetEntityTagOptionalParams, + WorkspaceApiPolicyGetOptionalParams, +} from "./api/workspaceApiPolicy/index.js"; +export type { + WorkspaceApiReleaseListByServiceOptionalParams, + WorkspaceApiReleaseDeleteOptionalParams, + WorkspaceApiReleaseUpdateOptionalParams, + WorkspaceApiReleaseCreateOrUpdateOptionalParams, + WorkspaceApiReleaseGetEntityTagOptionalParams, + WorkspaceApiReleaseGetOptionalParams, +} from "./api/workspaceApiRelease/index.js"; +export type { WorkspaceApiRevisionListByServiceOptionalParams } from "./api/workspaceApiRevision/index.js"; +export type { + WorkspaceApiSchemaListByApiOptionalParams, + WorkspaceApiSchemaDeleteOptionalParams, + WorkspaceApiSchemaCreateOrUpdateOptionalParams, + WorkspaceApiSchemaGetEntityTagOptionalParams, + WorkspaceApiSchemaGetOptionalParams, +} from "./api/workspaceApiSchema/index.js"; +export type { + WorkspaceApiVersionSetListByServiceOptionalParams, + WorkspaceApiVersionSetDeleteOptionalParams, + WorkspaceApiVersionSetUpdateOptionalParams, + WorkspaceApiVersionSetCreateOrUpdateOptionalParams, + WorkspaceApiVersionSetGetEntityTagOptionalParams, + WorkspaceApiVersionSetGetOptionalParams, +} from "./api/workspaceApiVersionSet/index.js"; +export type { + WorkspaceBackendListByWorkspaceOptionalParams, + WorkspaceBackendDeleteOptionalParams, + WorkspaceBackendUpdateOptionalParams, + WorkspaceBackendCreateOrUpdateOptionalParams, + WorkspaceBackendGetEntityTagOptionalParams, + WorkspaceBackendGetOptionalParams, +} from "./api/workspaceBackend/index.js"; +export type { + WorkspaceCertificateRefreshSecretOptionalParams, + WorkspaceCertificateListByWorkspaceOptionalParams, + WorkspaceCertificateDeleteOptionalParams, + WorkspaceCertificateCreateOrUpdateOptionalParams, + WorkspaceCertificateGetEntityTagOptionalParams, + WorkspaceCertificateGetOptionalParams, +} from "./api/workspaceCertificate/index.js"; +export type { + WorkspaceDiagnosticListByWorkspaceOptionalParams, + WorkspaceDiagnosticDeleteOptionalParams, + WorkspaceDiagnosticUpdateOptionalParams, + WorkspaceDiagnosticCreateOrUpdateOptionalParams, + WorkspaceDiagnosticGetEntityTagOptionalParams, + WorkspaceDiagnosticGetOptionalParams, +} from "./api/workspaceDiagnostic/index.js"; +export type { + WorkspaceGlobalSchemaListByServiceOptionalParams, + WorkspaceGlobalSchemaDeleteOptionalParams, + WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, + WorkspaceGlobalSchemaGetEntityTagOptionalParams, + WorkspaceGlobalSchemaGetOptionalParams, +} from "./api/workspaceGlobalSchema/index.js"; +export type { + WorkspaceGroupListByServiceOptionalParams, + WorkspaceGroupDeleteOptionalParams, + WorkspaceGroupUpdateOptionalParams, + WorkspaceGroupCreateOrUpdateOptionalParams, + WorkspaceGroupGetEntityTagOptionalParams, + WorkspaceGroupGetOptionalParams, +} from "./api/workspaceGroup/index.js"; +export type { + WorkspaceGroupUserDeleteOptionalParams, + WorkspaceGroupUserCreateOptionalParams, + WorkspaceGroupUserCheckEntityExistsOptionalParams, + WorkspaceGroupUserListOptionalParams, +} from "./api/workspaceGroupUser/index.js"; +export type { + WorkspaceLoggerListByWorkspaceOptionalParams, + WorkspaceLoggerDeleteOptionalParams, + WorkspaceLoggerUpdateOptionalParams, + WorkspaceLoggerCreateOrUpdateOptionalParams, + WorkspaceLoggerGetEntityTagOptionalParams, + WorkspaceLoggerGetOptionalParams, +} from "./api/workspaceLogger/index.js"; +export type { + WorkspaceNamedValueRefreshSecretOptionalParams, + WorkspaceNamedValueListValueOptionalParams, + WorkspaceNamedValueListByServiceOptionalParams, + WorkspaceNamedValueDeleteOptionalParams, + WorkspaceNamedValueUpdateOptionalParams, + WorkspaceNamedValueCreateOrUpdateOptionalParams, + WorkspaceNamedValueGetEntityTagOptionalParams, + WorkspaceNamedValueGetOptionalParams, +} from "./api/workspaceNamedValue/index.js"; +export type { + WorkspaceNotificationListByServiceOptionalParams, + WorkspaceNotificationCreateOrUpdateOptionalParams, + WorkspaceNotificationGetOptionalParams, +} from "./api/workspaceNotification/index.js"; +export type { + WorkspaceNotificationRecipientEmailDeleteOptionalParams, + WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, +} from "./api/workspaceNotificationRecipientEmail/index.js"; +export type { + WorkspaceNotificationRecipientUserDeleteOptionalParams, + WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, + WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, + WorkspaceNotificationRecipientUserListByNotificationOptionalParams, +} from "./api/workspaceNotificationRecipientUser/index.js"; +export type { + WorkspacePolicyListByApiOptionalParams, + WorkspacePolicyDeleteOptionalParams, + WorkspacePolicyCreateOrUpdateOptionalParams, + WorkspacePolicyGetEntityTagOptionalParams, + WorkspacePolicyGetOptionalParams, +} from "./api/workspacePolicy/index.js"; +export type { + WorkspacePolicyFragmentListReferencesOptionalParams, + WorkspacePolicyFragmentListByServiceOptionalParams, + WorkspacePolicyFragmentDeleteOptionalParams, + WorkspacePolicyFragmentCreateOrUpdateOptionalParams, + WorkspacePolicyFragmentGetEntityTagOptionalParams, + WorkspacePolicyFragmentGetOptionalParams, +} from "./api/workspacePolicyFragment/index.js"; +export type { + WorkspaceProductListByServiceOptionalParams, + WorkspaceProductDeleteOptionalParams, + WorkspaceProductUpdateOptionalParams, + WorkspaceProductCreateOrUpdateOptionalParams, + WorkspaceProductGetEntityTagOptionalParams, + WorkspaceProductGetOptionalParams, +} from "./api/workspaceProduct/index.js"; +export type { + WorkspaceProductApiLinkListByProductOptionalParams, + WorkspaceProductApiLinkDeleteOptionalParams, + WorkspaceProductApiLinkCreateOrUpdateOptionalParams, + WorkspaceProductApiLinkGetOptionalParams, +} from "./api/workspaceProductApiLink/index.js"; +export type { + WorkspaceProductGroupLinkListByProductOptionalParams, + WorkspaceProductGroupLinkDeleteOptionalParams, + WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, + WorkspaceProductGroupLinkGetOptionalParams, +} from "./api/workspaceProductGroupLink/index.js"; +export type { + WorkspaceProductPolicyListByProductOptionalParams, + WorkspaceProductPolicyDeleteOptionalParams, + WorkspaceProductPolicyCreateOrUpdateOptionalParams, + WorkspaceProductPolicyGetEntityTagOptionalParams, + WorkspaceProductPolicyGetOptionalParams, +} from "./api/workspaceProductPolicy/index.js"; +export type { + WorkspaceSubscriptionListSecretsOptionalParams, + WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, + WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, + WorkspaceSubscriptionListOptionalParams, + WorkspaceSubscriptionDeleteOptionalParams, + WorkspaceSubscriptionUpdateOptionalParams, + WorkspaceSubscriptionCreateOrUpdateOptionalParams, + WorkspaceSubscriptionGetEntityTagOptionalParams, + WorkspaceSubscriptionGetOptionalParams, +} from "./api/workspaceSubscription/index.js"; +export type { + WorkspaceTagListByServiceOptionalParams, + WorkspaceTagDeleteOptionalParams, + WorkspaceTagUpdateOptionalParams, + WorkspaceTagCreateOrUpdateOptionalParams, + WorkspaceTagGetEntityStateOptionalParams, + WorkspaceTagGetOptionalParams, +} from "./api/workspaceTag/index.js"; +export type { + WorkspaceTagApiLinkListByProductOptionalParams, + WorkspaceTagApiLinkDeleteOptionalParams, + WorkspaceTagApiLinkCreateOrUpdateOptionalParams, + WorkspaceTagApiLinkGetOptionalParams, +} from "./api/workspaceTagApiLink/index.js"; +export type { + WorkspaceTagOperationLinkListByProductOptionalParams, + WorkspaceTagOperationLinkDeleteOptionalParams, + WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, + WorkspaceTagOperationLinkGetOptionalParams, +} from "./api/workspaceTagOperationLink/index.js"; +export type { + WorkspaceTagProductLinkListByProductOptionalParams, + WorkspaceTagProductLinkDeleteOptionalParams, + WorkspaceTagProductLinkCreateOrUpdateOptionalParams, + WorkspaceTagProductLinkGetOptionalParams, +} from "./api/workspaceTagProductLink/index.js"; +export type { + AllPoliciesOperations, + ApiOperations, + ApiDiagnosticOperations, + ApiExportOperations, + ApiGatewayOperations, + ApiGatewayConfigConnectionOperations, + ApiGatewayHostnameBindingOperations, + ApiIssueOperations, + ApiIssueAttachmentOperations, + ApiIssueCommentOperations, + ApiManagementGatewaySkusOperations, + ApiManagementOperationsOperations, + ApiManagementServiceOperations, + ApiManagementServiceResourcesOperations, + ApiManagementServiceSkusOperations, + ApiManagementSkusOperations, + ApiManagementWorkspaceLinkOperations, + ApiManagementWorkspaceLinksOperations, + ApiOperationOperations, + ApiOperationPolicyOperations, + ApiPolicyOperations, + ApiProductOperations, + ApiReleaseOperations, + ApiRevisionOperations, + ApiSchemaOperations, + ApiTagDescriptionOperations, + ApiToolOperations, + ApiVersionSetOperations, + ApiWikiOperations, + ApiWikisOperations, + AuthorizationOperations, + AuthorizationAccessPolicyOperations, + AuthorizationLoginLinksOperations, + AuthorizationProviderOperations, + AuthorizationServerOperations, + BackendOperations, + CacheOperations, + CertificateOperations, + ClientApplicationOperations, + ClientApplicationProductLinkOperations, + ContentItemOperations, + ContentTypeOperations, + DelegationSettingsOperations, + DeletedServicesOperations, + DiagnosticOperations, + DocumentationOperations, + EmailTemplateOperations, + GatewayOperations, + GatewayApiOperations, + GatewayCertificateAuthorityOperations, + GatewayHostnameConfigurationOperations, + GlobalSchemaOperations, + GraphQLApiResolverOperations, + GraphQLApiResolverPolicyOperations, + GroupOperations, + GroupUserOperations, + IdentityProviderOperations, + IssueOperations, + LoggerOperations, + NamedValueOperations, + NetworkStatusOperations, + NotificationOperations, + NotificationRecipientEmailOperations, + NotificationRecipientUserOperations, + OpenIdConnectProviderOperations, + OperationOperations, + OperationsResultsOperations, + OperationStatusOperations, + OutboundNetworkDependenciesEndpointsOperations, + PolicyOperations, + PolicyDescriptionOperations, + PolicyFragmentOperations, + PolicyRestrictionOperations, + PolicyRestrictionValidationsOperations, + PortalConfigOperations, + PortalRevisionOperations, + PortalSettingsOperations, + PrivateEndpointConnectionOperations, + ProductOperations, + ProductApiOperations, + ProductApiLinkOperations, + ProductGroupOperations, + ProductGroupLinkOperations, + ProductPolicyOperations, + ProductSubscriptionsOperations, + ProductWikiOperations, + ProductWikisOperations, + QuotaByCounterKeysOperations, + QuotaByPeriodKeysOperations, + RegionOperations, + ReportsOperations, + SignInSettingsOperations, + SignUpSettingsOperations, + SubscriptionOperations, + TagOperations, + TagApiLinkOperations, + TagOperationLinkOperations, + TagProductLinkOperations, + TagResourceOperations, + TenantAccessOperations, + TenantAccessGitOperations, + TenantConfigurationOperations, + TenantSettingsOperations, + UserOperations, + UserConfirmationPasswordOperations, + UserGroupOperations, + UserIdentitiesOperations, + UserSubscriptionOperations, + WorkspaceOperations, + WorkspaceApiOperations, + WorkspaceApiDiagnosticOperations, + WorkspaceApiExportOperations, + WorkspaceApiOperationOperations, + WorkspaceApiOperationPolicyOperations, + WorkspaceApiPolicyOperations, + WorkspaceApiReleaseOperations, + WorkspaceApiRevisionOperations, + WorkspaceApiSchemaOperations, + WorkspaceApiVersionSetOperations, + WorkspaceBackendOperations, + WorkspaceCertificateOperations, + WorkspaceDiagnosticOperations, + WorkspaceGlobalSchemaOperations, + WorkspaceGroupOperations, + WorkspaceGroupUserOperations, + WorkspaceLoggerOperations, + WorkspaceNamedValueOperations, + WorkspaceNotificationOperations, + WorkspaceNotificationRecipientEmailOperations, + WorkspaceNotificationRecipientUserOperations, + WorkspacePolicyOperations, + WorkspacePolicyFragmentOperations, + WorkspaceProductOperations, + WorkspaceProductApiLinkOperations, + WorkspaceProductGroupLinkOperations, + WorkspaceProductPolicyOperations, + WorkspaceSubscriptionOperations, + WorkspaceTagOperations, + WorkspaceTagApiLinkOperations, + WorkspaceTagOperationLinkOperations, + WorkspaceTagProductLinkOperations, +} from "./classic/index.js"; +export type { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds }; +export type { AzureSupportedClouds }; +export { RestError, isRestError } from "@azure/core-rest-pipeline"; diff --git a/sdk/apimanagement/arm-apimanagement/src/logger.ts b/sdk/apimanagement/arm-apimanagement/src/logger.ts new file mode 100644 index 000000000000..278a79d020ab --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("arm-apimanagement"); diff --git a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts b/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts deleted file mode 100644 index 5f88efab981b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/lroImpl.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike }, - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal, - }); - }, - }; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/models/index.ts b/sdk/apimanagement/arm-apimanagement/src/models/index.ts index d6706ff8565a..8d3c361f89fe 100644 --- a/sdk/apimanagement/arm-apimanagement/src/models/index.ts +++ b/sdk/apimanagement/arm-apimanagement/src/models/index.ts @@ -1,15447 +1,606 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -/** Base Properties of an API Management gateway resource description. */ -export interface ApiManagementGatewayBaseProperties { - /** - * The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** Information regarding how the gateway should be exposed. */ - frontend?: FrontendConfiguration; - /** Information regarding how the gateway should integrate with backend systems. */ - backend?: BackendConfiguration; - /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ - configurationApi?: GatewayConfigurationApi; - /** The type of VPN in which API Management gateway needs to be configured in. */ - virtualNetworkType?: VirtualNetworkType; -} - -/** Information regarding how the gateway should be exposed. */ -export interface FrontendConfiguration { - /** - * The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultHostname?: string; -} - -/** Information regarding how the gateway should integrate with backend systems. */ -export interface BackendConfiguration { - /** The default hostname of the data-plane gateway to which requests can be sent. */ - subnet?: BackendSubnetConfiguration; -} - -/** Information regarding how the subnet to which the gateway should be injected. */ -export interface BackendSubnetConfiguration { - /** The ARM ID of the subnet in which the backend systems are hosted. */ - id?: string; -} - -/** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ -export interface GatewayConfigurationApi { - /** - * Hostname to which the agent connects to propagate configuration to the cloud. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostname?: string; -} - -/** API Management gateway resource SKU properties. */ -export interface ApiManagementGatewaySkuProperties { - /** Name of the Sku. */ - name: ApiGatewaySkuType; - /** Capacity of the SKU (number of deployed units of the SKU) */ - capacity?: number; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** The Resource definition. */ -export interface ApimResource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type for API Management resource is set to Microsoft.ApiManagement. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** API Management gateway resource SKU properties for PATCH operations given nothing should be required. */ -export interface ApiManagementGatewaySkuPropertiesForPatch { - /** Name of the Sku. */ - name?: ApiGatewaySkuType; - /** Capacity of the SKU (number of deployed units of the SKU) */ - capacity?: number; -} - -/** The response of the List API Management gateway operation. */ -export interface ApiManagementGatewayListResult { - /** Result of the List API Management gateway operation. */ - value: ApiManagementGatewayResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; -} - -/** The API Management gateway SKUs operation response. */ -export interface GatewayResourceSkuResults { - /** The list of skus available for the gateway. */ - value: GatewayResourceSkuResult[]; - /** The uri to fetch the next page of API Management gateway Skus. */ - nextLink?: string; -} - -/** Describes an available API Management gateway SKU. */ -export interface GatewayResourceSkuResult { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * Specifies API Management gateway SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: GatewaySku; - /** - * Specifies the number of API Management gateway units. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: GatewaySkuCapacity; -} - -/** Describes an available API Management SKU for gateways. */ -export interface GatewaySku { - /** Name of the Sku. */ - name?: ApiGatewaySkuType; -} - -/** Describes scaling information of a SKU. */ -export interface GatewaySkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: GatewaySkuCapacityScaleType; -} - -/** The response of All Policies. */ -export interface AllPoliciesCollection { - /** AllPolicies Contract value. */ - value?: AllPoliciesContract[]; - /** Next page link if any. */ - nextLink?: string; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - -/** Paged API list representation. */ -export interface ApiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** An API Version Set contains the common configuration for a set of API Versions relating */ -export interface ApiVersionSetContractDetails { - /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ - id?: string; - /** The display Name of the API Version Set. */ - name?: string; - /** Description of API Version Set. */ - description?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: ApiVersionSetContractDetailsVersioningScheme; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; -} - -/** API base contract details. */ -export interface ApiEntityBaseContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; -} - -/** API Authentication Settings. */ -export interface AuthenticationSettingsContract { - /** OAuth2 Authentication settings */ - oAuth2?: OAuth2AuthenticationSettingsContract; - /** OpenID Connect Authentication Settings */ - openid?: OpenIdAuthenticationSettingsContract; - /** Collection of OAuth2 authentication settings included into this API. */ - oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; - /** Collection of Open ID Connect authentication settings included into this API. */ - openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; -} - -/** API OAuth2 Authentication settings details. */ -export interface OAuth2AuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - authorizationServerId?: string; - /** operations scope. */ - scope?: string; -} - -/** API OAuth2 Authentication settings details. */ -export interface OpenIdAuthenticationSettingsContract { - /** OAuth authorization server identifier. */ - openidProviderId?: string; - /** How to send token to the server. */ - bearerTokenSendingMethods?: BearerTokenSendingMethods[]; -} - -/** Subscription key parameter names details. */ -export interface SubscriptionKeyParameterNamesContract { - /** Subscription key header name. */ - header?: string; - /** Subscription key query string parameter name. */ - query?: string; -} - -/** API contact information */ -export interface ApiContactInformation { - /** The identifying name of the contact person/organization */ - name?: string; - /** The URL pointing to the contact information. MUST be in the format of a URL */ - url?: string; - /** The email address of the contact person/organization. MUST be in the format of an email address */ - email?: string; -} - -/** API license information */ -export interface ApiLicenseInformation { - /** The license name used for the API */ - name?: string; - /** A URL to the license used for the API. MUST be in the format of a URL */ - url?: string; -} - -/** API Create or Update Parameters. */ -export interface ApiCreateOrUpdateParameter { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. New formats can be added in the future */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - * New types can be added in the future. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; -} - -/** Criteria to limit import of WSDL to a subset of the document. */ -export interface ApiCreateOrUpdatePropertiesWsdlSelector { - /** Name of service to import from WSDL */ - wsdlServiceName?: string; - /** Name of endpoint(port) to import from WSDL */ - wsdlEndpointName?: string; -} - -/** API update contract details. */ -export interface ApiUpdateContract { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; -} - -/** Paged API Revision list representation. */ -export interface ApiRevisionCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiRevisionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Summary of revision metadata. */ -export interface ApiRevisionContract { - /** - * Identifier of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiId?: string; - /** - * Revision number of API. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** - * Description of the API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Gateway URL for accessing the non-current API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateUrl?: string; - /** - * Indicates if API revision is the current api revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isCurrent?: boolean; -} - -/** Paged ApiRelease list representation. */ -export interface ApiReleaseCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ApiReleaseContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged Operation list representation. */ -export interface OperationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: OperationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** API Operation Entity Base Contract details. */ -export interface OperationEntityBaseContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; -} - -/** Operation parameters details. */ -export interface ParameterContract { - /** Parameter name. */ - name: string; - /** Parameter description. */ - description?: string; - /** Parameter type. */ - type: string; - /** Default parameter value. */ - defaultValue?: string; - /** Specifies whether parameter is required or not. */ - required?: boolean; - /** Parameter values. */ - values?: string[]; - /** Schema identifier. */ - schemaId?: string; - /** Type name defined by the schema. */ - typeName?: string; - /** Exampled defined for the parameter. */ - examples?: { [propertyName: string]: ParameterExampleContract }; -} - -/** Parameter example. */ -export interface ParameterExampleContract { - /** Short description for the example */ - summary?: string; - /** Long description for the example */ - description?: string; - /** Example value. May be a primitive value, or an object. */ - value?: any; - /** A URL that points to the literal example */ - externalValue?: string; -} - -/** Operation request details. */ -export interface RequestContract { - /** Operation request description. */ - description?: string; - /** Collection of operation request query parameters. */ - queryParameters?: ParameterContract[]; - /** Collection of operation request headers. */ - headers?: ParameterContract[]; - /** Collection of operation request representations. */ - representations?: RepresentationContract[]; -} - -/** Operation request/response representation details. */ -export interface RepresentationContract { - /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ - contentType: string; - /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - schemaId?: string; - /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ - typeName?: string; - /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ - formParameters?: ParameterContract[]; - /** Exampled defined for the representation. */ - examples?: { [propertyName: string]: ParameterExampleContract }; -} - -/** Operation response details. */ -export interface ResponseContract { - /** Operation response HTTP status code. */ - statusCode: number; - /** Operation response description. */ - description?: string; - /** Collection of operation response representations. */ - representations?: RepresentationContract[]; - /** Collection of operation response headers. */ - headers?: ParameterContract[]; -} - -/** API Operation Update Contract details. */ -export interface OperationUpdateContract { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; -} - -/** The response of the list policy operation. */ -export interface PolicyCollection { - /** Policy Contract value. */ - value?: PolicyContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Tag list representation. */ -export interface TagCollection { - /** Page values. */ - value?: TagContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Resolver list representation. */ -export interface ResolverCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ResolverContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** GraphQL API Resolver Update Contract details. */ -export interface ResolverUpdateContract { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; -} - -/** Paged Products list representation. */ -export interface ProductCollection { - /** Page values. */ - value?: ProductContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Product Entity Base Parameters */ -export interface ProductEntityBaseParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; -} - -/** The response of the list schema operation. */ -export interface SchemaCollection { - /** - * API Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: SchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged Diagnostic list representation. */ -export interface DiagnosticCollection { - /** Page values. */ - value?: DiagnosticContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Sampling settings for Diagnostic. */ -export interface SamplingSettings { - /** Sampling type. */ - samplingType?: SamplingType; - /** Rate of sampling for fixed-rate sampling. */ - percentage?: number; -} - -/** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ -export interface PipelineDiagnosticSettings { - /** Diagnostic settings for request. */ - request?: HttpMessageDiagnostic; - /** Diagnostic settings for response. */ - response?: HttpMessageDiagnostic; -} - -/** Http message diagnostic settings. */ -export interface HttpMessageDiagnostic { - /** Array of HTTP Headers to log. */ - headers?: string[]; - /** Body logging settings. */ - body?: BodyDiagnosticSettings; - /** Data masking settings. */ - dataMasking?: DataMasking; -} - -/** Body logging settings. */ -export interface BodyDiagnosticSettings { - /** Number of request body bytes to log. */ - bytes?: number; -} - -export interface DataMasking { - /** Masking settings for Url query parameters */ - queryParams?: DataMaskingEntity[]; - /** Masking settings for headers */ - headers?: DataMaskingEntity[]; -} - -export interface DataMaskingEntity { - /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ - value?: string; - /** Data masking mode. */ - mode?: DataMaskingMode; -} - -/** Paged Issue list representation. */ -export interface IssueCollection { - /** - * Issue values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Issue contract Base Properties. */ -export interface IssueContractBaseProperties { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; -} - -/** Issue update Parameters. */ -export interface IssueUpdateContract { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; -} - -/** Paged Issue Comment list representation. */ -export interface IssueCommentCollection { - /** - * Issue Comment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueCommentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged Issue Attachment list representation. */ -export interface IssueAttachmentCollection { - /** - * Issue Attachment values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: IssueAttachmentContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged TagDescription list representation. */ -export interface TagDescriptionCollection { - /** Page values. */ - value?: TagDescriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Parameters supplied to the Create TagDescription operation. */ -export interface TagDescriptionBaseProperties { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; -} - -/** Parameters supplied to the Create TagDescription operation. */ -export interface TagDescriptionCreateParameters { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; -} - -/** Paged Tag list representation. */ -export interface TagResourceCollection { - /** Page values. */ - value?: TagResourceContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** TagResource contract properties. */ -export interface TagResourceContract { - /** Tag associated with the resource. */ - tag: TagResourceContractProperties; - /** API associated with the tag. */ - api?: ApiTagResourceContractProperties; - /** Operation associated with the tag. */ - operation?: OperationTagResourceContractProperties; - /** Product associated with the tag. */ - product?: ProductTagResourceContractProperties; -} - -/** Contract defining the Tag property in the Tag Resource Contract */ -export interface TagResourceContractProperties { - /** Tag identifier */ - id?: string; - /** Tag Name */ - name?: string; -} - -/** Operation Entity contract Properties. */ -export interface OperationTagResourceContractProperties { - /** Identifier of the operation in form /operations/{operationId}. */ - id?: string; - /** - * Operation name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * API Name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiName?: string; - /** - * API Revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiRevision?: string; - /** - * API Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersion?: string; - /** - * Operation Description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly method?: string; - /** - * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly urlTemplate?: string; -} - -/** Wiki documentation details. */ -export interface WikiDocumentationContract { - /** Documentation Identifier */ - documentationId?: string; -} - -/** Wiki update contract details. */ -export interface WikiUpdateContract { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; -} - -/** Paged Wiki list representation. */ -export interface WikiCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: WikiContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** API Export result. */ -export interface ApiExportResult { - /** ResourceId of the API which was exported. */ - id?: string; - /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ - exportResultFormat?: ExportResultFormat; - /** The object defining the schema of the exported API Detail */ - value?: ApiExportResultValue; -} - -/** The object defining the schema of the exported API Detail */ -export interface ApiExportResultValue { - /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ - link?: string; -} - -/** Paged API Version Set list representation. */ -export interface ApiVersionSetCollection { - /** Page values. */ - value?: ApiVersionSetContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** API Version set base parameters */ -export interface ApiVersionSetEntityBase { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; -} - -/** Parameters to update or create an API Version Set Contract. */ -export interface ApiVersionSetUpdateParameters { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; -} - -/** Paged Authorization Provider list representation. */ -export interface AuthorizationProviderCollection { - /** Page values. */ - value?: AuthorizationProviderContract[]; - /** Next page link if any. */ - nextLink?: string; -} - -/** OAuth2 settings details */ -export interface AuthorizationProviderOAuth2Settings { - /** Redirect URL to be set in the OAuth application. */ - redirectUrl?: string; - /** OAuth2 settings */ - grantTypes?: AuthorizationProviderOAuth2GrantTypes; -} - -/** Authorization Provider oauth2 grant types settings */ -export interface AuthorizationProviderOAuth2GrantTypes { - /** OAuth2 authorization code grant parameters */ - authorizationCode?: { [propertyName: string]: string }; - /** OAuth2 client credential grant parameters */ - clientCredentials?: { [propertyName: string]: string }; -} - -/** Paged Authorization list representation. */ -export interface AuthorizationCollection { - /** Page values. */ - value?: AuthorizationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Authorization error details. */ -export interface AuthorizationError { - /** Error code */ - code?: string; - /** Error message */ - message?: string; -} - -/** Authorization login request contract. */ -export interface AuthorizationLoginRequestContract { - /** The redirect URL after login has completed. */ - postLoginRedirectUrl?: string; -} - -/** Authorization login response contract. */ -export interface AuthorizationLoginResponseContract { - /** The login link */ - loginLink?: string; -} - -/** Authorization confirm consent code request contract. */ -export interface AuthorizationConfirmConsentCodeRequestContract { - /** The consent code from the authorization server after authorizing and consenting. */ - consentCode?: string; -} - -/** Paged Authorization Access Policy list representation. */ -export interface AuthorizationAccessPolicyCollection { - /** Page values. */ - value?: AuthorizationAccessPolicyContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged OAuth2 Authorization Servers list representation. */ -export interface AuthorizationServerCollection { - /** Page values. */ - value?: AuthorizationServerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** External OAuth authorization server Update settings contract. */ -export interface AuthorizationServerContractBaseProperties { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; -} - -/** OAuth acquire token request body parameter (www-url-form-encoded). */ -export interface TokenBodyParameterContract { - /** body parameter name. */ - name: string; - /** body parameter value. */ - value: string; -} - -/** OAuth Server Secrets Contract. */ -export interface AuthorizationServerSecretsContract { - /** oAuth Authorization Server Secrets. */ - clientSecret?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; -} - -/** Paged Backend list representation. */ -export interface BackendCollection { - /** Backend values. */ - value?: BackendContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Backend entity base Parameter set. */ -export interface BackendBaseParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Backend Circuit Breaker Configuration */ - circuitBreaker?: BackendCircuitBreaker; - pool?: BackendBaseParametersPool; - /** Type of the backend. A backend can be either Single or Pool. */ - type?: BackendType; -} - -/** Properties specific to the Backend Type. */ -export interface BackendProperties { - /** Backend Service Fabric Cluster Properties */ - serviceFabricCluster?: BackendServiceFabricClusterProperties; -} - -/** Properties of the Service Fabric Type Backend. */ -export interface BackendServiceFabricClusterProperties { - /** The client certificate id for the management endpoint. */ - clientCertificateId?: string; - /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ - clientCertificatethumbprint?: string; - /** Maximum number of retries while attempting resolve the partition. */ - maxPartitionResolutionRetries?: number; - /** The cluster management endpoint. */ - managementEndpoints: string[]; - /** Thumbprints of certificates cluster management service uses for tls communication */ - serverCertificateThumbprints?: string[]; - /** Server X509 Certificate Names Collection */ - serverX509Names?: X509CertificateName[]; -} - -/** Properties of server X509Names. */ -export interface X509CertificateName { - /** Common Name of the Certificate. */ - name?: string; - /** Thumbprint for the Issuer of the Certificate. */ - issuerCertificateThumbprint?: string; -} - -/** Details of the Credentials used to connect to Backend. */ -export interface BackendCredentialsContract { - /** List of Client Certificate Ids. */ - certificateIds?: string[]; - /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ - certificate?: string[]; - /** Query Parameter description. */ - query?: { [propertyName: string]: string[] }; - /** Header Parameter description. */ - header?: { [propertyName: string]: string[] }; - /** Authorization header authentication */ - authorization?: BackendAuthorizationHeaderCredentials; -} - -/** Authorization header information. */ -export interface BackendAuthorizationHeaderCredentials { - /** Authentication Scheme name. */ - scheme: string; - /** Authentication Parameter value. */ - parameter: string; -} - -/** Details of the Backend WebProxy Server to use in the Request to Backend. */ -export interface BackendProxyContract { - /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ - url: string; - /** Username to connect to the WebProxy server */ - username?: string; - /** Password to connect to the WebProxy Server */ - password?: string; -} - -/** Properties controlling TLS Certificate Validation. */ -export interface BackendTlsProperties { - /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ - validateCertificateChain?: boolean; - /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ - validateCertificateName?: boolean; -} - -/** The configuration of the backend circuit breaker */ -export interface BackendCircuitBreaker { - /** The rules for tripping the backend. */ - rules?: CircuitBreakerRule[]; -} - -/** Rule configuration to trip the backend. */ -export interface CircuitBreakerRule { - /** The rule name. */ - name?: string; - /** The conditions for tripping the circuit breaker. */ - failureCondition?: CircuitBreakerFailureCondition; - /** The duration for which the circuit will be tripped. */ - tripDuration?: string; - /** flag to accept Retry-After header from the backend. */ - acceptRetryAfter?: boolean; -} - -/** The trip conditions of the circuit breaker */ -export interface CircuitBreakerFailureCondition { - /** The threshold for opening the circuit. */ - count?: number; - /** The threshold for opening the circuit. */ - percentage?: number; - /** The interval during which the failures are counted. */ - interval?: string; - /** The status code ranges which are considered as failure. */ - statusCodeRanges?: FailureStatusCodeRange[]; - /** The error reasons which are considered as failure. */ - errorReasons?: string[]; -} - -/** The failure http status code range */ -export interface FailureStatusCodeRange { - /** The minimum http status code. */ - min?: number; - /** The maximum http status code. */ - max?: number; -} - -/** Backend pool information */ -export interface BackendPool { - /** The list of backend entities belonging to a pool. */ - services?: BackendPoolItem[]; -} - -/** Backend pool service information */ -export interface BackendPoolItem { - /** The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity. */ - id: string; - /** The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. */ - weight?: number; - /** The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. */ - priority?: number; -} - -/** Backend update parameters. */ -export interface BackendUpdateParameters { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Backend Circuit Breaker Configuration */ - circuitBreaker?: BackendCircuitBreaker; - pool?: BackendBaseParametersPool; - /** Type of the backend. A backend can be either Single or Pool. */ - type?: BackendType; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; -} - -/** Paged Caches list representation. */ -export interface CacheCollection { - /** Page values. */ - value?: CacheContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Cache update details. */ -export interface CacheUpdateParameters { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; -} - -/** Paged Certificates list representation. */ -export interface CertificateCollection { - /** Page values. */ - value?: CertificateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Issue contract Update Properties. */ -export interface KeyVaultLastAccessStatusContractProperties { - /** Last status code for sync and refresh of secret from key vault. */ - code?: string; - /** Details of the error else empty. */ - message?: string; - /** - * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timeStampUtc?: Date; -} - -/** Create keyVault contract details. */ -export interface KeyVaultContractCreateProperties { - /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ - secretIdentifier?: string; - /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ - identityClientId?: string; -} - -/** Certificate create or update details. */ -export interface CertificateCreateOrUpdateParameters { - /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ - data?: string; - /** Password for the Certificate */ - password?: string; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractCreateProperties; -} - -/** A request to perform the connectivity check operation on a API Management service. */ -export interface ConnectivityCheckRequest { - /** Definitions about the connectivity check origin. */ - source: ConnectivityCheckRequestSource; - /** The connectivity check operation destination. */ - destination: ConnectivityCheckRequestDestination; - /** The IP version to be used. Only IPv4 is supported for now. */ - preferredIPVersion?: PreferredIPVersion; - /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ - protocol?: ConnectivityCheckProtocol; - /** Protocol-specific configuration. */ - protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; -} - -/** Definitions about the connectivity check origin. */ -export interface ConnectivityCheckRequestSource { - /** The API Management service region from where to start the connectivity check operation. */ - region: string; - /** The particular VMSS instance from which to fire the request. */ - instance?: number; -} - -/** The connectivity check operation destination. */ -export interface ConnectivityCheckRequestDestination { - /** Destination address. Can either be an IP address or a FQDN. */ - address: string; - /** Destination port. */ - port: number; -} - -/** Protocol-specific configuration. */ -export interface ConnectivityCheckRequestProtocolConfiguration { - /** Configuration for HTTP or HTTPS requests. */ - httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; -} - -/** Configuration for HTTP or HTTPS requests. */ -export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { - /** The HTTP method to be used. */ - method?: Method; - /** List of HTTP status codes considered valid for the request response. */ - validStatusCodes?: number[]; - /** List of headers to be included in the request. */ - headers?: HttpHeader[]; -} - -/** HTTP header and it's value. */ -export interface HttpHeader { - /** Header name. */ - name: string; - /** Header value. */ - value: string; -} - -/** Information on the connectivity status. */ -export interface ConnectivityCheckResponse { - /** - * List of hops between the source and the destination. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hops?: ConnectivityHop[]; - /** - * The connection status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly connectionStatus?: ConnectionStatus; - /** - * Average latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly avgLatencyInMs?: number; - /** - * Minimum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minLatencyInMs?: number; - /** - * Maximum latency in milliseconds. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxLatencyInMs?: number; - /** - * Total number of probes sent. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesSent?: number; - /** - * Number of failed probes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly probesFailed?: number; -} - -/** Information about a hop between the source and the destination. */ -export interface ConnectivityHop { - /** - * The type of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The ID of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The IP address of the hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly address?: string; - /** - * The ID of the resource corresponding to this hop. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** - * List of next hop identifiers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextHopIds?: string[]; - /** - * List of issues. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issues?: ConnectivityIssue[]; -} - -/** Information about an issue encountered in the process of checking for connectivity. */ -export interface ConnectivityIssue { - /** - * The origin of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * The severity of the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly severity?: Severity; - /** - * The type of issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: IssueType; - /** - * Provides additional context on the issue. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly context?: { [propertyName: string]: string }[]; -} - -/** Paged list of content types. */ -export interface ContentTypeCollection { - /** - * Collection of content types. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentTypeContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged list of content items. */ -export interface ContentItemCollection { - /** - * Collection of content items. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: ContentItemContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged deleted API Management Services List Representation. */ -export interface DeletedServicesCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DeletedServiceContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. */ -export interface OperationListResult { - /** List of operations supported by the resource provider. */ - value?: Operation[]; - /** URL to get the next set of operation list results if there are any. */ - nextLink?: string; -} - -/** REST API operation */ -export interface Operation { - /** Operation name: {provider}/{resource}/{operation} */ - name?: string; - /** The object that describes the operation. */ - display?: OperationDisplay; - /** The operation origin. */ - origin?: string; - /** The operation properties. */ - properties?: Record; -} - -/** The object that describes the operation. */ -export interface OperationDisplay { - /** Friendly name of the resource provider */ - provider?: string; - /** Operation type: read, write, delete, listKeys/action, etc. */ - operation?: string; - /** Resource type on which the operation is performed. */ - resource?: string; - /** Friendly name of the operation */ - description?: string; -} - -/** The API Management service SKUs operation response. */ -export interface ResourceSkuResults { - /** The list of skus available for the service. */ - value: ResourceSkuResult[]; - /** The uri to fetch the next page of API Management service Skus. */ - nextLink?: string; -} - -/** Describes an available API Management service SKU. */ -export interface ResourceSkuResult { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * Specifies API Management SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: ResourceSku; - /** - * Specifies the number of API Management units. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ResourceSkuCapacity; -} - -/** Describes an available API Management SKU. */ -export interface ResourceSku { - /** Name of the Sku. */ - name?: SkuType; -} - -/** Describes scaling information of a SKU. */ -export interface ResourceSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ResourceSkuCapacityScaleType; -} - -/** Parameters supplied to the Backup/Restore of an API Management service operation. */ -export interface ApiManagementServiceBackupRestoreParameters { - /** The name of the Azure storage account (used to place/retrieve the backup). */ - storageAccount: string; - /** The name of the blob container (used to place/retrieve the backup). */ - containerName: string; - /** The name of the backup file to create/retrieve. */ - backupName: string; - /** The type of access to be used for the storage account. */ - accessType?: AccessType; - /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ - accessKey?: string; - /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ - clientId?: string; -} - -/** Base Properties of an API Management service resource description. */ -export interface ApiManagementServiceBaseProperties { - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Configuration API configuration of the API Management service. */ - configurationApi?: ConfigurationApi; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Status of legacy portal in the API Management service. */ - legacyPortalStatus?: LegacyPortalStatus; - /** Status of developer portal in this API Management service. */ - developerPortalStatus?: DeveloperPortalStatus; -} - -/** Custom hostname configuration. */ -export interface HostnameConfiguration { - /** Hostname type. */ - type: HostnameType; - /** Hostname to configure on the Api Management service. */ - hostName: string; - /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ - keyVaultId?: string; - /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ - identityClientId?: string; - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ - defaultSslBinding?: boolean; - /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ - negotiateClientCertificate?: boolean; - /** Certificate information. */ - certificate?: CertificateInformation; - /** Certificate Source. */ - certificateSource?: CertificateSource; - /** Certificate Status. */ - certificateStatus?: CertificateStatus; -} - -/** SSL certificate information. */ -export interface CertificateInformation { - /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expiry: Date; - /** Thumbprint of the certificate. */ - thumbprint: string; - /** Subject of the certificate. */ - subject: string; -} - -/** Information regarding the Configuration API of the API Management service. */ -export interface ConfigurationApi { - /** Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' */ - legacyApi?: LegacyApiState; -} - -/** Configuration of a virtual network to which API Management service is deployed. */ -export interface VirtualNetworkConfiguration { - /** - * The virtual network ID. This is typically a GUID. Expect a null GUID by default. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vnetid?: string; - /** - * The name of the subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnetname?: string; - /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ - subnetResourceId?: string; -} - -/** Description of an additional API Management resource location. */ -export interface AdditionalLocation { - /** The location name of the additional region among Azure Data center regions. */ - location: string; - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Virtual network configuration for the location. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** - * Gateway URL of the API Management service in the Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ - disableGateway?: boolean; - /** - * Compute Platform Version running the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; -} - -/** API Management service resource SKU properties. */ -export interface ApiManagementServiceSkuProperties { - /** Name of the Sku. */ - name: SkuType; - /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ - capacity: number; -} - -/** Certificate configuration which consist of non-trusted intermediates and root certificates. */ -export interface CertificateConfiguration { - /** Base64 Encoded certificate. */ - encodedCertificate?: string; - /** Certificate Password. */ - certificatePassword?: string; - /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ - storeName: CertificateConfigurationStoreName; - /** Certificate information. */ - certificate?: CertificateInformation; -} - -/** Control Plane Apis version constraint for the API Management service. */ -export interface ApiVersionConstraint { - /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ - minApiVersion?: string; -} - -/** Remote Private Endpoint Connection resource. */ -export interface RemotePrivateEndpointConnectionWrapper { - /** Private Endpoint connection resource id */ - id?: string; - /** Private Endpoint Connection Name */ - name?: string; - /** Private Endpoint Connection Resource Type */ - type?: string; - /** The resource of private end point. */ - privateEndpoint?: ArmIdWrapper; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * All the Group ids. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupIds?: string[]; -} - -/** A wrapper for an ARM resource id */ -export interface ArmIdWrapper { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; -} - -/** A collection of information about the state of the connection between service consumer and provider. */ -export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: PrivateEndpointServiceConnectionStatus; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; -} - -/** Identity properties of the Api Management service resource. */ -export interface ApiManagementServiceIdentity { - /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type: ApimIdentityType; - /** - * The principal id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client tenant id of the identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; -} - -export interface UserIdentityProperties { - /** The principal id of user assigned identity. */ - principalId?: string; - /** The client id of user assigned identity. */ - clientId?: string; -} - -/** Describes an available API Management SKU. */ -export interface MigrateToStv2Contract { - /** Mode of Migration to stv2. Default is PreserveIp. */ - mode?: MigrateToStv2Mode; -} - -/** The response of the List API Management services operation. */ -export interface ApiManagementServiceListResult { - /** Result of the List API Management services operation. */ - value: ApiManagementServiceResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; -} - -/** The response of the GetSsoToken operation. */ -export interface ApiManagementServiceGetSsoTokenResult { - /** Redirect URL to the Publisher Portal containing the SSO token. */ - redirectUri?: string; -} - -/** Parameters supplied to the CheckNameAvailability operation. */ -export interface ApiManagementServiceCheckNameAvailabilityParameters { - /** The name to check for availability. */ - name: string; -} - -/** Response of the CheckNameAvailability operation. */ -export interface ApiManagementServiceNameAvailabilityResult { - /** - * True if the name is available and can be used to create a new API Management service; otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nameAvailable?: boolean; - /** - * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ - reason?: NameAvailabilityReason; -} - -/** Response of the GetDomainOwnershipIdentifier operation. */ -export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { - /** - * The domain ownership identifier value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly domainOwnershipIdentifier?: string; -} - -/** Parameter supplied to the Apply Network configuration operation. */ -export interface ApiManagementServiceApplyNetworkConfigurationParameters { - /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ - location?: string; -} - -/** Paged Documentation list representation. */ -export interface DocumentationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DocumentationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Documentation update contract details. */ -export interface DocumentationUpdateContract { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; -} - -/** Paged email template list representation. */ -export interface EmailTemplateCollection { - /** Page values. */ - value?: EmailTemplateContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Email Template Parameter contract. */ -export interface EmailTemplateParametersContractProperties { - /** Template parameter name. */ - name?: string; - /** Template parameter title. */ - title?: string; - /** Template parameter description. */ - description?: string; -} - -/** Email Template update Parameters. */ -export interface EmailTemplateUpdateParameters { - /** Subject of the Template. */ - subject?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; -} - -/** The response of the List API Management gateway operation. */ -export interface ApiManagementGatewayConfigConnectionListResult { - /** Result of the List API Management gateway config connection operation. */ - value: ApiManagementGatewayConfigConnectionResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; -} - -/** Paged Gateway list representation. */ -export interface GatewayCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Resource location data properties. */ -export interface ResourceLocationDataContract { - /** A canonical name for the geographic or physical location. */ - name: string; - /** The city or locality where the resource is located. */ - city?: string; - /** The district, state, or province where the resource is located. */ - district?: string; - /** The country or region where the resource is located. */ - countryOrRegion?: string; -} - -/** Gateway authentication keys. */ -export interface GatewayKeysContract { - /** Primary gateway key. */ - primary?: string; - /** Secondary gateway key. */ - secondary?: string; -} - -/** Gateway key regeneration request contract properties. */ -export interface GatewayKeyRegenerationRequestContract { - /** The Key being regenerated. */ - keyType: KeyType; -} - -/** Gateway token request contract properties. */ -export interface GatewayTokenRequestContract { - /** The Key to be used to generate gateway token. */ - keyType: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry: Date; -} - -/** Gateway access token. */ -export interface GatewayTokenContract { - /** Shared Access Authentication token value for the Gateway. */ - value?: string; -} - -/** Paged Gateway hostname configuration list representation. */ -export interface GatewayHostnameConfigurationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayHostnameConfigurationContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged Gateway certificate authority list representation. */ -export interface GatewayCertificateAuthorityCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GatewayCertificateAuthorityContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** List debug credentials properties. */ -export interface GatewayListDebugCredentialsContract { - /** Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When property is not specified, them value PT1H is used. */ - credentialsExpireAfter?: string; - /** Purposes of debug credential. */ - purposes: GatewayListDebugCredentialsContractPurpose[]; - /** Full resource Id of an API. */ - apiId: string; -} - -/** Gateway debug credentials. */ -export interface GatewayDebugCredentialsContract { - /** Gateway debug token. */ - token?: string; -} - -/** List trace properties. */ -export interface GatewayListTraceContract { - /** Trace id. */ - traceId?: string; -} - -/** Paged Group list representation. */ -export interface GroupCollection { - /** Page values. */ - value?: GroupContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Group contract Properties. */ -export interface GroupContractProperties { - /** Group name. */ - displayName: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - type?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; -} - -/** Parameters supplied to the Create Group operation. */ -export interface GroupCreateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; -} - -/** Parameters supplied to the Update Group operation. */ -export interface GroupUpdateParameters { - /** Group name. */ - displayName?: string; - /** Group description. */ - description?: string; - /** Group type. */ - type?: GroupType; - /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; -} - -/** Paged Users list representation. */ -export interface UserCollection { - /** Page values. */ - value?: UserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** User Entity Base Parameters set. */ -export interface UserEntityBaseParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; -} - -/** User identity details. */ -export interface UserIdentityContract { - /** Identity provider name. */ - provider?: string; - /** Identifier value within provider. */ - id?: string; -} - -/** List of all the Identity Providers configured on the service instance. */ -export interface IdentityProviderList { - /** Identity Provider configuration values. */ - value?: IdentityProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Identity Provider Base Parameter Properties. */ -export interface IdentityProviderBaseParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; -} - -/** Parameters supplied to update Identity Provider */ -export interface IdentityProviderUpdateParameters { - /** Identity Provider Type identifier. */ - type?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; -} - -/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ -export interface ClientSecretContract { - /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ - clientSecret?: string; -} - -/** Paged Logger list representation. */ -export interface LoggerCollection { - /** Logger values. */ - value?: LoggerContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Logger update contract. */ -export interface LoggerUpdateContract { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** Logger credentials. */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; -} - -/** Paged NamedValue list representation. */ -export interface NamedValueCollection { - /** Page values. */ - value?: NamedValueContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** NamedValue Entity Base Parameters set. */ -export interface NamedValueEntityBaseParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; -} - -/** NamedValue update Parameters. */ -export interface NamedValueUpdateParameters { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; -} - -/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ -export interface NamedValueSecretContract { - /** This is secret value of the NamedValue entity. */ - value?: string; -} - -/** Network Status in the Location */ -export interface NetworkStatusContractByLocation { - /** Location of service */ - location?: string; - /** Network status in Location */ - networkStatus?: NetworkStatusContract; -} - -/** Network Status details. */ -export interface NetworkStatusContract { - /** Gets the list of DNS servers IPV4 addresses. */ - dnsServers: string[]; - /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ - connectivityStatus: ConnectivityStatusContract[]; -} - -/** Details about connectivity to a resource. */ -export interface ConnectivityStatusContract { - /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ - name: string; - /** Resource Connectivity Status Type identifier. */ - status: ConnectivityStatusType; - /** Error details of the connectivity to the resource. */ - error?: string; - /** - * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastUpdated: Date; - /** - * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - lastStatusChange: Date; - /** Resource Type. */ - resourceType: string; - /** Whether this is optional. */ - isOptional: boolean; -} - -/** Paged Notification list representation. */ -export interface NotificationCollection { - /** Page values. */ - value?: NotificationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Notification Parameter contract. */ -export interface RecipientsContractProperties { - /** List of Emails subscribed for the notification. */ - emails?: string[]; - /** List of Users subscribed for the notification. */ - users?: string[]; -} - -/** Paged Recipient User list representation. */ -export interface RecipientUserCollection { - /** Page values. */ - value?: RecipientUserContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Recipient User list representation. */ -export interface RecipientEmailCollection { - /** Page values. */ - value?: RecipientEmailContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged OpenIdProviders list representation. */ -export interface OpenIdConnectProviderCollection { - /** Page values. */ - value?: OpenidConnectProviderContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Parameters supplied to the Update OpenID Connect Provider operation. */ -export interface OpenidConnectProviderUpdateContract { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; -} - -/** Collection of Outbound Environment Endpoints */ -export interface OutboundEnvironmentEndpointList { - /** Collection of resources. */ - value: OutboundEnvironmentEndpoint[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. */ -export interface OutboundEnvironmentEndpoint { - /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ - category?: string; - /** The endpoints that the Api Management Service reaches the service at. */ - endpoints?: EndpointDependency[]; -} - -/** A domain name that a service is reached at. */ -export interface EndpointDependency { - /** The domain name of the dependency. */ - domainName?: string; - /** The Ports used when connecting to DomainName. */ - endpointDetails?: EndpointDetail[]; -} - -/** Current TCP connectivity information from the Api Management Service to a single endpoint. */ -export interface EndpointDetail { - /** The port an endpoint is connected to. */ - port?: number; - /** The region of the dependency. */ - region?: string; -} - -/** Descriptions of API Management policies. */ -export interface PolicyDescriptionCollection { - /** Descriptions of API Management policies. */ - value?: PolicyDescriptionContract[]; - /** Total record count number. */ - count?: number; -} - -/** The response of the get policy fragments operation. */ -export interface PolicyFragmentCollection { - /** Policy fragment contract value. */ - value?: PolicyFragmentContract[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** A collection of resources. */ -export interface ResourceCollection { - /** A collection of resources. */ - value?: ResourceCollectionValueItem[]; - /** Total record count number. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** The response of the get policy restrictions operation. */ -export interface PolicyRestrictionCollection { - value?: PolicyRestrictionContract[]; - /** Next page link if any. */ - nextLink?: string; -} - -/** Policy restriction contract details. */ -export interface PolicyRestrictionUpdateContract { - /** Path to the policy document. */ - scope?: string; - /** Indicates if base policy should be enforced for the policy document. */ - requireBase?: PolicyRestrictionRequireBase; -} - -/** Error Body contract. */ -export interface ErrorResponseBody { - /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ - code?: string; - /** Human-readable representation of the error. */ - message?: string; - /** The list of invalid fields send in request, in case of validation error. */ - details?: ErrorFieldContract[]; -} - -/** Error Field contract. */ -export interface ErrorFieldContract { - /** Property level error code. */ - code?: string; - /** Human-readable representation of property-level error. */ - message?: string; - /** Property name. */ - target?: string; -} - -/** Log of the entity being created, updated or deleted. */ -export interface OperationResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; -} - -/** The collection of the developer portal configurations. */ -export interface PortalConfigCollection { - /** The developer portal configurations. */ - value?: PortalConfigContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -export interface PortalConfigPropertiesSignin { - /** Redirect anonymous users to the sign-in page. */ - require?: boolean; -} - -export interface PortalConfigPropertiesSignup { - /** Terms of service settings. */ - termsOfService?: PortalConfigTermsOfServiceProperties; -} - -/** Terms of service contract properties. */ -export interface PortalConfigTermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Ask user for consent to the terms of service. */ - requireConsent?: boolean; -} - -export interface PortalConfigDelegationProperties { - /** Enable or disable delegation for user registration. */ - delegateRegistration?: boolean; - /** Enable or disable delegation for product subscriptions. */ - delegateSubscription?: boolean; - /** A delegation endpoint URL. */ - delegationUrl?: string; - /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ - validationKey?: string; -} - -/** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ -export interface PortalConfigCorsProperties { - /** Allowed origins, e.g. `https://trusted.com`. */ - allowedOrigins?: string[]; -} - -/** The developer portal Content Security Policy (CSP) settings. */ -export interface PortalConfigCspProperties { - /** The mode of the developer portal Content Security Policy (CSP). */ - mode?: PortalSettingsCspMode; - /** The URLs used by the browser to report CSP violations. */ - reportUri?: string[]; - /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ - allowedSources?: string[]; -} - -/** Paged list of portal revisions. */ -export interface PortalRevisionCollection { - /** - * Collection of portal revisions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: PortalRevisionContract[]; - /** - * Next page link, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Descriptions of API Management policies. */ -export interface PortalSettingsCollection { - /** Descriptions of API Management policies. */ - value?: PortalSettingsContract[]; - /** Total record count number. */ - count?: number; -} - -/** Subscriptions delegation settings properties. */ -export interface SubscriptionsDelegationSettingsProperties { - /** Enable or disable delegation for subscriptions. */ - enabled?: boolean; -} - -/** User registration delegation settings properties. */ -export interface RegistrationDelegationSettingsProperties { - /** Enable or disable delegation for user registration. */ - enabled?: boolean; -} - -/** Terms of service contract properties. */ -export interface TermsOfServiceProperties { - /** A terms of service text. */ - text?: string; - /** Display terms of service during a sign-up process. */ - enabled?: boolean; - /** Ask user for consent to the terms of service. */ - consentRequired?: boolean; -} - -/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ -export interface PortalSettingValidationKeyContract { - /** This is secret value of the validation key in portal settings. */ - validationKey?: string; -} - -/** List of private endpoint connection associated with the specified storage account */ -export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; -} - -/** The Private Endpoint resource. */ -export interface PrivateEndpoint { - /** - * The ARM identifier for Private Endpoint - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; -} - -/** A request to approve or reject a private endpoint connection */ -export interface PrivateEndpointConnectionRequest { - /** Private Endpoint Connection Resource Id. */ - id?: string; - /** The connection state of the private endpoint connection. */ - properties?: PrivateEndpointConnectionRequestProperties; -} - -/** The connection state of the private endpoint connection. */ -export interface PrivateEndpointConnectionRequestProperties { - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; -} - -/** Product Update parameters. */ -export interface ProductUpdateParameters { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; -} - -/** Paged Subscriptions list representation. */ -export interface SubscriptionCollection { - /** Page values. */ - value?: SubscriptionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Product-API link list representation. */ -export interface ProductApiLinkCollection { - /** Page values. */ - value?: ProductApiLinkContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Product-group link list representation. */ -export interface ProductGroupLinkCollection { - /** Page values. */ - value?: ProductGroupLinkContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Quota Counter list representation. */ -export interface QuotaCounterCollection { - /** Quota counter values. */ - value?: QuotaCounterContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Quota counter details. */ -export interface QuotaCounterContract { - /** The Key value of the Counter. Must not be empty. */ - counterKey: string; - /** Identifier of the Period for which the counter was collected. Must not be empty. */ - periodKey: string; - /** - * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodStartTime: Date; - /** - * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - periodEndTime: Date; - /** Quota Value Properties */ - value?: QuotaCounterValueContractProperties; -} - -/** Quota counter value details. */ -export interface QuotaCounterValueContractProperties { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; -} - -/** Quota counter value details. */ -export interface QuotaCounterValueUpdateContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; -} - -/** Lists Regions operation response details. */ -export interface RegionListResult { - /** Lists of Regions. */ - value?: RegionContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Region profile. */ -export interface RegionContract { - /** - * Region name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** whether Region is the master region. */ - isMasterRegion?: boolean; - /** whether Region is deleted. */ - isDeleted?: boolean; -} - -/** Paged Report records list representation. */ -export interface ReportCollection { - /** Page values. */ - value?: ReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Report data. */ -export interface ReportRecordContract { - /** Name depending on report endpoint specifies product, API, operation or developer name. */ - name?: string; - /** - * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - timestamp?: Date; - /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ - interval?: string; - /** Country to which this record data is related. */ - country?: string; - /** Country region to which this record data is related. */ - region?: string; - /** Zip code to which this record data is related. */ - zip?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** API region identifier. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ - callCountSuccess?: number; - /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ - callCountBlocked?: number; - /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ - callCountFailed?: number; - /** Number of other calls. */ - callCountOther?: number; - /** Total number of calls. */ - callCountTotal?: number; - /** Bandwidth consumed. */ - bandwidth?: number; - /** Number of times when content was served from cache policy. */ - cacheHitCount?: number; - /** Number of times content was fetched from backend. */ - cacheMissCount?: number; - /** Average time it took to process request. */ - apiTimeAvg?: number; - /** Minimum time it took to process request. */ - apiTimeMin?: number; - /** Maximum time it took to process request. */ - apiTimeMax?: number; - /** Average time it took to process request on backend. */ - serviceTimeAvg?: number; - /** Minimum time it took to process request on backend. */ - serviceTimeMin?: number; - /** Maximum time it took to process request on backend. */ - serviceTimeMax?: number; -} - -/** Paged Report records list representation. */ -export interface RequestReportCollection { - /** Page values. */ - value?: RequestReportRecordContract[]; - /** Total record count number across all pages. */ - count?: number; -} - -/** Request Report data. */ -export interface RequestReportRecordContract { - /** API identifier path. /apis/{apiId} */ - apiId?: string; - /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ - operationId?: string; - /** - * Product identifier path. /products/{productId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly productId?: string; - /** - * User identifier path. /users/{userId} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly userId?: string; - /** The HTTP method associated with this request.. */ - method?: string; - /** The full URL associated with this request. */ - url?: string; - /** The client IP address associated with this request. */ - ipAddress?: string; - /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ - backendResponseCode?: string; - /** The HTTP status code returned by the gateway. */ - responseCode?: number; - /** The size of the response returned by the gateway. */ - responseSize?: number; - /** The date and time when this request was received by the gateway in ISO 8601 format. */ - timestamp?: Date; - /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ - cache?: string; - /** The total time it took to process this request. */ - apiTime?: number; - /** he time it took to forward this request to the backend and get the response back. */ - serviceTime?: number; - /** Azure region where the gateway that processed this request is located. */ - apiRegion?: string; - /** Subscription identifier path. /subscriptions/{subscriptionId} */ - subscriptionId?: string; - /** Request Identifier. */ - requestId?: string; - /** The size of this request.. */ - requestSize?: number; -} - -/** The response of the list schema operation. */ -export interface GlobalSchemaCollection { - /** - * Global Schema Contract value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: GlobalSchemaContract[]; - /** Total record count number. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Paged AccessInformation list representation. */ -export interface TenantSettingsCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: TenantSettingsContract[]; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The List Resource Skus operation response. */ -export interface ApiManagementSkusResult { - /** The list of skus available for the subscription. */ - value: ApiManagementSku[]; - /** - * The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Describes an available ApiManagement SKU. */ -export interface ApiManagementSku { - /** - * The type of resource the SKU applies to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * The name of SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tier?: string; - /** - * The Size of the SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly size?: string; - /** - * The Family of this particular SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly family?: string; - /** - * The Kind of resources that are supported in this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; - /** - * Specifies the number of virtual machines in the scale set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capacity?: ApiManagementSkuCapacity; - /** - * The set of locations that the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * A list of locations and availability zones in those locations where the SKU is available. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationInfo?: ApiManagementSkuLocationInfo[]; - /** - * The api versions that support this SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiVersions?: string[]; - /** - * Metadata for retrieving price info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costs?: ApiManagementSkuCosts[]; - /** - * A name value pair to describe the capability. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; - /** - * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictions?: ApiManagementSkuRestrictions[]; -} - -/** Describes scaling information of a SKU. */ -export interface ApiManagementSkuCapacity { - /** - * The minimum capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minimum?: number; - /** - * The maximum capacity that can be set. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; - /** - * The default capacity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly default?: number; - /** - * The scale type applicable to the sku. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scaleType?: ApiManagementSkuCapacityScaleType; -} - -export interface ApiManagementSkuLocationInfo { - /** - * Location of the SKU - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** - * List of availability zones where the SKU is supported. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; - /** - * Details of capabilities available to a SKU in specific zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zoneDetails?: ApiManagementSkuZoneDetails[]; -} - -/** Describes The zonal capabilities of a SKU. */ -export interface ApiManagementSkuZoneDetails { - /** - * The set of zones that the SKU is available in with the specified capabilities. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string[]; - /** - * A list of capabilities that are available for the SKU in the specified list of zones. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly capabilities?: ApiManagementSkuCapabilities[]; -} - -/** Describes The SKU capabilities object. */ -export interface ApiManagementSkuCapabilities { - /** - * An invariant to describe the feature. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * An invariant if the feature is measured by quantity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: string; -} - -/** Describes metadata for retrieving price info. */ -export interface ApiManagementSkuCosts { - /** - * Used for querying price from commerce. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly meterID?: string; - /** - * The multiplier is needed to extend the base metered cost. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly quantity?: number; - /** - * An invariant to show the extended unit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly extendedUnit?: string; -} - -/** Describes scaling information of a SKU. */ -export interface ApiManagementSkuRestrictions { - /** - * The type of restrictions. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: ApiManagementSkuRestrictionsType; - /** - * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly values?: string[]; - /** - * The information about the restriction where the SKU cannot be used. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; - /** - * The reason for restriction. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; -} - -export interface ApiManagementSkuRestrictionInfo { - /** - * Locations where the SKU is restricted - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locations?: string[]; - /** - * List of availability zones where the SKU is restricted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly zones?: string[]; -} - -/** Subscription create details. */ -export interface SubscriptionCreateParameters { - /** User (user id path) for whom subscription is being created in form /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. If not specified during request key will be generated automatically. */ - primaryKey?: string; - /** Secondary subscription key. If not specified during request key will be generated automatically. */ - secondaryKey?: string; - /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; -} - -/** Subscription update details. */ -export interface SubscriptionUpdateParameters { - /** User identifier path: /users/{userId} */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId} */ - scope?: string; - /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ - expirationDate?: Date; - /** Subscription name. */ - displayName?: string; - /** Primary subscription key. */ - primaryKey?: string; - /** Secondary subscription key. */ - secondaryKey?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing can be enabled */ - allowTracing?: boolean; -} - -/** Subscription keys. */ -export interface SubscriptionKeysContract { - /** Subscription primary key. */ - primaryKey?: string; - /** Subscription secondary key. */ - secondaryKey?: string; -} - -/** Parameters supplied to Create/Update Tag operations. */ -export interface TagCreateUpdateParameters { - /** Tag name. */ - displayName?: string; -} - -/** Paged Tag-API link list representation. */ -export interface TagApiLinkCollection { - /** Page values. */ - value?: TagApiLinkContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Tag-operation link list representation. */ -export interface TagOperationLinkCollection { - /** Page values. */ - value?: TagOperationLinkContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged Tag-product link list representation. */ -export interface TagProductLinkCollection { - /** Page values. */ - value?: TagProductLinkContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Paged AccessInformation list representation. */ -export interface AccessInformationCollection { - /** - * Page values. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: AccessInformationContract[]; - /** Total record count number across all pages. */ - count?: number; - /** - * Next page link if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Tenant access information update parameters. */ -export interface AccessInformationCreateParameters { - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; -} - -/** Tenant access information update parameters. */ -export interface AccessInformationUpdateParameters { - /** Determines whether direct access is enabled. */ - enabled?: boolean; -} - -/** Tenant access information contract of the API Management service. */ -export interface AccessInformationSecretsContract { - /** Access Information type ('access' or 'gitAccess') */ - id?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; -} - -/** Deploy Tenant Configuration Contract. */ -export interface DeployConfigurationParameters { - /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ - branch?: string; - /** The value enforcing deleting subscriptions to products that are deleted in this update. */ - force?: boolean; -} - -/** Save Tenant Configuration Contract details. */ -export interface SaveConfigurationParameter { - /** The name of the Git branch in which to commit the current configuration snapshot. */ - branch?: string; - /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ - force?: boolean; -} - -/** User create details. */ -export interface UserCreateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; -} - -/** User update parameters. */ -export interface UserUpdateParameters { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; -} - -/** Generate SSO Url operations response details. */ -export interface GenerateSsoUrlResult { - /** Redirect Url containing the SSO URL value. */ - value?: string; -} - -/** List of Users Identity list representation. */ -export interface UserIdentityCollection { - /** User Identity values. */ - value?: UserIdentityContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** Get User Token parameters. */ -export interface UserTokenParameters { - /** The Key to be used to generate token for user. */ - keyType?: KeyType; - /** - * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expiry?: Date; -} - -/** Get User Token response details. */ -export interface UserTokenResult { - /** Shared Access Authorization token for the User. */ - value?: string; -} - -/** The response of the List API Management WorkspaceLink operation. */ -export interface ApiManagementWorkspaceLinksListResult { - /** Result of the List API Management WorkspaceLinks operation. */ - value: ApiManagementWorkspaceLinksResource[]; - /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ - nextLink?: string; -} - -export interface WorkspaceLinksBaseProperties { - /** The link to the API Management service workspace. */ - workspaceId?: string; - /** The array of linked gateways. */ - gateways?: WorkspaceLinksGateway[]; -} - -export interface WorkspaceLinksGateway { - /** The link to the API Management gateway. */ - id?: string; -} - -/** Paged workspace list representation. */ -export interface WorkspaceCollection { - /** Page values. */ - value?: WorkspaceContract[]; - /** Total record count number across all pages. */ - count?: number; - /** Next page link if any. */ - nextLink?: string; -} - -/** The current status of an async operation. */ -export interface OperationStatusResult { - /** Fully qualified ID for the async operation. */ - id?: string; - /** - * Fully qualified ID of the resource against which the original async operation was started. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; - /** Name of the async operation. */ - name?: string; - /** Operation status. */ - status: string; - /** Percent of the operation that is complete. */ - percentComplete?: number; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** The operations list. */ - operations?: OperationStatusResult[]; - /** If present, details of the operation error. */ - error?: ErrorDetail; -} - -/** Object used to create an API Revision or Version based on an existing API Revision */ -export interface ApiRevisionInfoContract { - /** Resource identifier of API to be used to create the revision from. */ - sourceApiId?: string; - /** Version identifier for the new API Version. */ - apiVersionName?: string; - /** Description of new API Revision. */ - apiRevisionDescription?: string; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; -} - -/** The response of the list policy operation. */ -export interface PolicyWithComplianceCollection { - /** Policy Contract value. */ - value?: PolicyWithComplianceContract[]; - /** Next page link if any. */ - nextLink?: string; -} - -/** Quota counter value details. */ -export interface QuotaCounterValueContract { - /** Number of times Counter was called. */ - callsCount?: number; - /** Data Transferred in KiloBytes. */ - kbTransferred?: number; -} - -/** Log of the entity being created, updated or deleted. */ -export interface ResolverResultLogItemContract { - /** The type of entity contract. */ - objectType?: string; - /** Action like create/update/delete. */ - action?: string; - /** Identifier of the entity being created/updated/deleted. */ - objectKey?: string; -} - -/** Properties of an API Management gateway resource description. */ -export interface ApiManagementGatewayProperties - extends ApiManagementGatewayBaseProperties {} - -/** Properties of an API Management gateway resource description. */ -export interface ApiManagementGatewayUpdateProperties - extends ApiManagementGatewayBaseProperties {} - -/** A single API Management gateway resource in List or Get response. */ -export interface ApiManagementGatewayResource extends ApimResource { - /** SKU properties of the API Management gateway. */ - sku: ApiManagementGatewaySkuProperties; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Resource location. */ - location: string; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** Information regarding how the gateway should be exposed. */ - frontend?: FrontendConfiguration; - /** Information regarding how the gateway should integrate with backend systems. */ - backend?: BackendConfiguration; - /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ - configurationApi?: GatewayConfigurationApi; - /** The type of VPN in which API Management gateway needs to be configured in. */ - virtualNetworkType?: VirtualNetworkType; -} - -/** Parameter supplied to Update API Management gateway. */ -export interface ApiManagementGatewayUpdateParameters extends ApimResource { - /** SKU properties of the API Management gateway. */ - sku?: ApiManagementGatewaySkuPropertiesForPatch; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** Information regarding how the gateway should be exposed. */ - frontend?: FrontendConfiguration; - /** Information regarding how the gateway should integrate with backend systems. */ - backend?: BackendConfiguration; - /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ - configurationApi?: GatewayConfigurationApi; - /** The type of VPN in which API Management gateway needs to be configured in. */ - virtualNetworkType?: VirtualNetworkType; -} - -/** A single API Management service resource in List or Get response. */ -export interface ApiManagementServiceResource extends ApimResource { - /** SKU properties of the API Management service. */ - sku: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Resource location. */ - location: string; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Configuration API configuration of the API Management service. */ - configurationApi?: ConfigurationApi; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Status of legacy portal in the API Management service. */ - legacyPortalStatus?: LegacyPortalStatus; - /** Status of developer portal in this API Management service. */ - developerPortalStatus?: DeveloperPortalStatus; - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; -} - -/** Parameter supplied to Update Api Management Service. */ -export interface ApiManagementServiceUpdateParameters extends ApimResource { - /** SKU properties of the API Management service. */ - sku?: ApiManagementServiceSkuProperties; - /** Managed service identity of the Api Management service. */ - identity?: ApiManagementServiceIdentity; - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** A list of availability zones denoting where the resource needs to come from. */ - zones?: string[]; - /** Email address from which the notification will be sent. */ - notificationSenderEmail?: string; - /** - * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly targetProvisioningState?: string; - /** - * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdAtUtc?: Date; - /** - * Gateway URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayUrl?: string; - /** - * Gateway URL of the API Management service in the Default Region. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayRegionalUrl?: string; - /** - * Publisher portal endpoint Url of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly portalUrl?: string; - /** - * Management API endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managementApiUrl?: string; - /** - * SCM endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scmUrl?: string; - /** - * DEveloper Portal endpoint URL of the API Management service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly developerPortalUrl?: string; - /** Custom hostname configuration of the API Management service. */ - hostnameConfigurations?: HostnameConfiguration[]; - /** - * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly publicIPAddresses?: string[]; - /** - * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateIPAddresses?: string[]; - /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ - publicIpAddressId?: string; - /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ - publicNetworkAccess?: PublicNetworkAccess; - /** Configuration API configuration of the API Management service. */ - configurationApi?: ConfigurationApi; - /** Virtual network configuration of the API Management service. */ - virtualNetworkConfiguration?: VirtualNetworkConfiguration; - /** Additional datacenter locations of the API Management service. */ - additionalLocations?: AdditionalLocation[]; - /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ - customProperties?: { [propertyName: string]: string }; - /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ - certificates?: CertificateConfiguration[]; - /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ - enableClientCertificate?: boolean; - /** Property can be used to enable NAT Gateway for this API Management service. */ - natGatewayState?: NatGatewayState; - /** - * Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundPublicIPAddresses?: string[]; - /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ - disableGateway?: boolean; - /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ - virtualNetworkType?: VirtualNetworkType; - /** Control Plane Apis version constraint for the API Management service. */ - apiVersionConstraint?: ApiVersionConstraint; - /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ - restore?: boolean; - /** List of Private Endpoint Connections of this service. */ - privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - /** - * Compute Platform Version running the service in this location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly platformVersion?: PlatformVersion; - /** Status of legacy portal in the API Management service. */ - legacyPortalStatus?: LegacyPortalStatus; - /** Status of developer portal in this API Management service. */ - developerPortalStatus?: DeveloperPortalStatus; - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; -} - -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} - -/** The Private Endpoint Connection resource. */ -export interface PrivateEndpointConnection extends Resource { - /** The resource of private end point. */ - privateEndpoint?: PrivateEndpoint; - /** A collection of information about the state of the connection between service consumer and provider. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - /** - * The provisioning state of the private endpoint connection resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: PrivateEndpointConnectionProvisioningState; -} - -/** A private link resource */ -export interface PrivateLinkResource extends Resource { - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; - /** The private link resource Private link DNS zone name. */ - requiredZoneNames?: string[]; -} - -/** API Entity Properties */ -export interface ApiContractProperties extends ApiEntityBaseContract { - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** API update contract properties. */ -export interface ApiContractUpdateProperties extends ApiEntityBaseContract { - /** API name. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; -} - -/** API contract properties for the Tag Resources. */ -export interface ApiTagResourceContractProperties - extends ApiEntityBaseContract { - /** API identifier in the form /apis/{apiId}. */ - id?: string; - /** API name. */ - name?: string; - /** Absolute URL of the backend service implementing this API. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; -} - -/** Operation Contract Properties */ -export interface OperationContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate: string; -} - -/** Operation Update Contract Properties. */ -export interface OperationUpdateContractProperties - extends OperationEntityBaseContract { - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; -} - -/** Product profile. */ -export interface ProductContractProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName: string; -} - -/** Product profile. */ -export interface ProductTagResourceContractProperties - extends ProductEntityBaseParameters { - /** Identifier of the product in the form of /products/{productId} */ - id?: string; - /** Product name. */ - name: string; -} - -/** Parameters supplied to the Update Product operation. */ -export interface ProductUpdateProperties extends ProductEntityBaseParameters { - /** Product name. */ - displayName?: string; -} - -/** Issue contract Properties. */ -export interface IssueContractProperties extends IssueContractBaseProperties { - /** The issue title. */ - title: string; - /** Text describing the issue. */ - description: string; - /** A resource identifier for the user created the issue. */ - userId: string; -} - -/** Issue contract Update Properties. */ -export interface IssueUpdateContractProperties - extends IssueContractBaseProperties { - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; -} - -/** TagDescription contract Properties. */ -export interface TagDescriptionContractProperties - extends TagDescriptionBaseProperties { - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; -} - -/** Properties of an API Version Set. */ -export interface ApiVersionSetContractProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme: VersioningScheme; -} - -/** Properties used to create or update an API Version Set. */ -export interface ApiVersionSetUpdateParametersProperties - extends ApiVersionSetEntityBase { - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; -} - -/** External OAuth authorization server settings Properties. */ -export interface AuthorizationServerContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** External OAuth authorization server Update settings contract. */ -export interface AuthorizationServerUpdateContractProperties - extends AuthorizationServerContractBaseProperties { - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** Parameters supplied to the Create Backend operation. */ -export interface BackendContractProperties extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url: string; - /** Backend communication protocol. */ - protocol: BackendProtocol; -} - -/** Parameters supplied to the Update Backend operation. */ -export interface BackendUpdateParameterProperties - extends BackendBaseParameters { - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; -} - -export interface BackendBaseParametersPool extends BackendPool {} - -/** KeyVault contract details. */ -export interface KeyVaultContractProperties - extends KeyVaultContractCreateProperties { - /** Last time sync and refresh status of secret from key vault. */ - lastStatus?: KeyVaultLastAccessStatusContractProperties; -} - -/** Properties of an API Management service resource description. */ -export interface ApiManagementServiceProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail: string; - /** Publisher name. */ - publisherName: string; -} - -/** Properties of an API Management service resource description. */ -export interface ApiManagementServiceUpdateProperties - extends ApiManagementServiceBaseProperties { - /** Publisher email. */ - publisherEmail?: string; - /** Publisher name. */ - publisherName?: string; -} - -/** User profile. */ -export interface UserContractProperties extends UserEntityBaseParameters { - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; -} - -/** Parameters supplied to the Create User operation. */ -export interface UserCreateParameterProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email: string; - /** First name. */ - firstName: string; - /** Last name. */ - lastName: string; - /** User Password. If no value is provided, a default password is generated. */ - password?: string; - /** Determines the type of application which send the create user request. Default is legacy portal. */ - appType?: AppType; - /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ - confirmation?: Confirmation; -} - -/** Parameters supplied to the Update User operation. */ -export interface UserUpdateParametersProperties - extends UserEntityBaseParameters { - /** Email address. Must not be empty and must be unique within the service instance. */ - email?: string; - /** User Password. */ - password?: string; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; -} - -/** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ -export interface IdentityProviderContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ -export interface IdentityProviderCreateContractProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret: string; -} - -/** Parameters supplied to the Update Identity Provider operation. */ -export interface IdentityProviderUpdateProperties - extends IdentityProviderBaseParameters { - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ - clientSecret?: string; -} - -/** NamedValue Contract properties. */ -export interface NamedValueContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** NamedValue Contract properties. */ -export interface NamedValueCreateContractProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; -} - -/** NamedValue Contract properties. */ -export interface NamedValueUpdateParameterProperties - extends NamedValueEntityBaseParameters { - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; -} - -/** Properties of an API Management workspaceLinks resource. */ -export interface ApiManagementWorkspaceLinksProperties - extends WorkspaceLinksBaseProperties {} - -/** AllPolicies Contract details. */ -export interface AllPoliciesContract extends ProxyResource { - /** Policy Identifier */ - referencePolicyId?: string; - /** Policy Restriction Compliance State */ - complianceState?: PolicyComplianceState; -} - -/** API details. */ -export interface ApiContract extends ProxyResource { - /** Description of the API. May include HTML formatting tags. */ - description?: string; - /** Collection of authentication settings included into this API. */ - authenticationSettings?: AuthenticationSettingsContract; - /** Protocols over which API is made available. */ - subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - /** Type of API. */ - apiType?: ApiType; - /** Describes the revision of the API. If no value is provided, default revision 1 is created */ - apiRevision?: string; - /** Indicates the version identifier of the API if the API is versioned */ - apiVersion?: string; - /** Indicates if API revision is current api revision. */ - isCurrent?: boolean; - /** - * Indicates if API revision is accessible via the gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isOnline?: boolean; - /** Description of the API Revision. */ - apiRevisionDescription?: string; - /** Description of the API Version. */ - apiVersionDescription?: string; - /** A resource identifier for the related ApiVersionSet. */ - apiVersionSetId?: string; - /** Specifies whether an API or Product subscription is required for accessing the API. */ - subscriptionRequired?: boolean; - /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ - termsOfServiceUrl?: string; - /** Contact information for the API. */ - contact?: ApiContactInformation; - /** License information for the API. */ - license?: ApiLicenseInformation; - /** API identifier of the source API. */ - sourceApiId?: string; - /** API name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ - serviceUrl?: string; - /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ - path?: string; - /** Describes on which protocols the operations in this API can be invoked. */ - protocols?: Protocol[]; - /** Version set details */ - apiVersionSet?: ApiVersionSetContractDetails; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** ApiRelease details. */ -export interface ApiReleaseContract extends ProxyResource { - /** Identifier of the API the release belongs to. */ - apiId?: string; - /** - * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * The time the API release was updated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** Release Notes */ - notes?: string; -} - -/** API Operation details. */ -export interface OperationContract extends ProxyResource { - /** Collection of URL template parameters. */ - templateParameters?: ParameterContract[]; - /** Description of the operation. May include HTML formatting tags. */ - description?: string; - /** An entity containing request details. */ - request?: RequestContract; - /** Array of Operation responses. */ - responses?: ResponseContract[]; - /** Operation Policies */ - policies?: string; - /** Operation Name. */ - displayName?: string; - /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ - method?: string; - /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ - urlTemplate?: string; -} - -/** Policy Contract details. */ -export interface PolicyContract extends ProxyResource { - /** Contents of the Policy as defined by the format. */ - value?: string; - /** Format of the policyContent. */ - format?: PolicyContentFormat; -} - -/** Tag Contract details. */ -export interface TagContract extends ProxyResource { - /** Tag name. */ - displayName?: string; -} - -/** GraphQL API Resolver details. */ -export interface ResolverContract extends ProxyResource { - /** Resolver Name. */ - displayName?: string; - /** Path is type/field being resolved. */ - path?: string; - /** Description of the resolver. May include HTML formatting tags. */ - description?: string; -} - -/** Product details. */ -export interface ProductContract extends ProxyResource { - /** Product description. May include HTML formatting tags. */ - description?: string; - /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ - terms?: string; - /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - subscriptionRequired?: boolean; - /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - approvalRequired?: boolean; - /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ - subscriptionsLimit?: number; - /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ - state?: ProductState; - /** Product name. */ - displayName?: string; -} - -/** API Schema Contract details. */ -export interface SchemaContract extends ProxyResource { - /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`
- `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`
- `gRPC Schema` use `text/protobuf`. */ - contentType?: string; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ - value?: string; - /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ - definitions?: Record; - /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ - components?: Record; -} - -/** Diagnostic details. */ -export interface DiagnosticContract extends ProxyResource { - /** Specifies for what type of messages sampling settings should not apply. */ - alwaysLog?: AlwaysLog; - /** Resource Id of a target logger. */ - loggerId?: string; - /** Sampling settings for Diagnostic. */ - sampling?: SamplingSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ - frontend?: PipelineDiagnosticSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ - backend?: PipelineDiagnosticSettings; - /** Log the ClientIP. Default is false. */ - logClientIp?: boolean; - /** Sets correlation protocol to use for Application Insights diagnostics. */ - httpCorrelationProtocol?: HttpCorrelationProtocol; - /** The verbosity level applied to traces emitted by trace policies. */ - verbosity?: Verbosity; - /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ - operationNameFormat?: OperationNameFormat; - /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ - metrics?: boolean; -} - -/** Issue Contract details. */ -export interface IssueContract extends ProxyResource { - /** Date and time when the issue was created. */ - createdDate?: Date; - /** Status of the issue. */ - state?: State; - /** A resource identifier for the API the issue was created for. */ - apiId?: string; - /** The issue title. */ - title?: string; - /** Text describing the issue. */ - description?: string; - /** A resource identifier for the user created the issue. */ - userId?: string; -} - -/** Issue Comment Contract details. */ -export interface IssueCommentContract extends ProxyResource { - /** Comment text. */ - text?: string; - /** Date and time when the comment was created. */ - createdDate?: Date; - /** A resource identifier for the user who left the comment. */ - userId?: string; -} - -/** Issue Attachment Contract details. */ -export interface IssueAttachmentContract extends ProxyResource { - /** Filename by which the binary data will be saved. */ - title?: string; - /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ - contentFormat?: string; - /** An HTTP link or Base64-encoded binary data. */ - content?: string; -} - -/** Contract details. */ -export interface TagDescriptionContract extends ProxyResource { - /** Description of the Tag. */ - description?: string; - /** Absolute URL of external resources describing the tag. */ - externalDocsUrl?: string; - /** Description of the external resources describing the tag. */ - externalDocsDescription?: string; - /** Identifier of the tag in the form of /tags/{tagId} */ - tagId?: string; - /** Tag name. */ - displayName?: string; -} - -/** Wiki properties */ -export interface WikiContract extends ProxyResource { - /** Collection wiki documents included into this wiki. */ - documents?: WikiDocumentationContract[]; -} - -/** API Version Set Contract details. */ -export interface ApiVersionSetContract extends ProxyResource { - /** Description of API Version Set. */ - description?: string; - /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ - versionQueryName?: string; - /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ - versionHeaderName?: string; - /** Name of API Version Set */ - displayName?: string; - /** An value that determines where the API Version identifier will be located in a HTTP request. */ - versioningScheme?: VersioningScheme; -} - -/** Authorization Provider contract. */ -export interface AuthorizationProviderContract extends ProxyResource { - /** Authorization Provider name. Must be 1 to 300 characters long. */ - displayName?: string; - /** Identity provider name. Must be 1 to 300 characters long. */ - identityProvider?: string; - /** OAuth2 settings */ - oauth2?: AuthorizationProviderOAuth2Settings; -} - -/** Authorization contract. */ -export interface AuthorizationContract extends ProxyResource { - /** Authorization type options */ - authorizationType?: AuthorizationType; - /** OAuth2 grant type options */ - oAuth2GrantType?: OAuth2GrantType; - /** Authorization parameters */ - parameters?: { [propertyName: string]: string }; - /** Authorization error details. */ - error?: AuthorizationError; - /** Status of the Authorization */ - status?: string; -} - -/** Authorization access policy contract. */ -export interface AuthorizationAccessPolicyContract extends ProxyResource { - /** The allowed Azure Active Directory Application IDs */ - appIds?: string[]; - /** The Tenant Id */ - tenantId?: string; - /** The Object Id */ - objectId?: string; -} - -/** External OAuth authorization server settings. */ -export interface AuthorizationServerContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** External OAuth authorization server settings. */ -export interface AuthorizationServerUpdateContract extends ProxyResource { - /** Description of the authorization server. Can contain HTML formatting tags. */ - description?: string; - /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ - authorizationMethods?: AuthorizationMethod[]; - /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - clientAuthenticationMethod?: ClientAuthenticationMethod[]; - /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ - tokenBodyParameters?: TokenBodyParameterContract[]; - /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ - tokenEndpoint?: string; - /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - supportState?: boolean; - /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ - defaultScope?: string; - /** Specifies the mechanism by which access token is passed to the API. */ - bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ - resourceOwnerUsername?: string; - /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ - resourceOwnerPassword?: string; - /** User-friendly authorization server name. */ - displayName?: string; - /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; - /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ - clientRegistrationEndpoint?: string; - /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ - authorizationEndpoint?: string; - /** Form of an authorization grant, which the client uses to request the access token. */ - grantTypes?: GrantType[]; - /** Client or app id registered with this authorization server. */ - clientId?: string; - /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** Backend details. */ -export interface BackendContract extends ProxyResource { - /** Backend Title. */ - title?: string; - /** Backend Description. */ - description?: string; - /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ - resourceId?: string; - /** Backend Properties contract */ - properties?: BackendProperties; - /** Backend Credentials Contract Properties */ - credentials?: BackendCredentialsContract; - /** Backend gateway Contract Properties */ - proxy?: BackendProxyContract; - /** Backend TLS Properties */ - tls?: BackendTlsProperties; - /** Backend Circuit Breaker Configuration */ - circuitBreaker?: BackendCircuitBreaker; - pool?: BackendBaseParametersPool; - /** Type of the backend. A backend can be either Single or Pool. */ - typePropertiesType?: BackendType; - /** Runtime Url of the Backend. */ - url?: string; - /** Backend communication protocol. */ - protocol?: BackendProtocol; -} - -/** Reconnect request parameters. */ -export interface BackendReconnectContract extends ProxyResource { - /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ - after?: string; -} - -/** Cache details. */ -export interface CacheContract extends ProxyResource { - /** Cache description */ - description?: string; - /** Runtime connection string to cache */ - connectionString?: string; - /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ - useFromLocation?: string; - /** Original uri of entity in external system cache points to */ - resourceId?: string; -} - -/** Certificate details. */ -export interface CertificateContract extends ProxyResource { - /** Subject attribute of the certificate. */ - subject?: string; - /** Thumbprint of the certificate. */ - thumbprint?: string; - /** - * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** KeyVault location details of the certificate. */ - keyVault?: KeyVaultContractProperties; -} - -/** Content type contract details. */ -export interface ContentTypeContract extends ProxyResource { - /** Content type identifier */ - idPropertiesId?: string; - /** Content type name. Must be 1 to 250 characters long. */ - namePropertiesName?: string; - /** Content type description. */ - description?: string; - /** Content type schema. */ - schema?: Record; - /** Content type version. */ - version?: string; -} - -/** Content type contract details. */ -export interface ContentItemContract extends ProxyResource { - /** Properties of the content item. */ - properties?: { [propertyName: string]: any }; -} - -/** Deleted API Management Service information. */ -export interface DeletedServiceContract extends ProxyResource { - /** - * API Management Service Master Location. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly location?: string; - /** Fully-qualified API Management Service Resource ID */ - serviceId?: string; - /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - scheduledPurgeDate?: Date; - /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ - deletionDate?: Date; -} - -/** Markdown documentation details. */ -export interface DocumentationContract extends ProxyResource { - /** documentation title. */ - title?: string; - /** Markdown documentation content. */ - content?: string; -} - -/** Email Template details. */ -export interface EmailTemplateContract extends ProxyResource { - /** Subject of the Template. */ - subject?: string; - /** Email Template Body. This should be a valid XDocument */ - body?: string; - /** Title of the Template. */ - title?: string; - /** Description of the Email Template. */ - description?: string; - /** - * Whether the template is the default template provided by API Management or has been edited. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDefault?: boolean; - /** Email Template Parameter values. */ - parameters?: EmailTemplateParametersContractProperties[]; -} - -/** A single API Management gateway resource in List or Get response. */ -export interface ApiManagementGatewayConfigConnectionResource - extends ProxyResource { - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** - * The current provisioning state of the API Management gateway config connection - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** The link to the API Management service workspace. */ - sourceId?: string; - /** - * The default hostname of the data-plane gateway. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly defaultHostname?: string; - /** The hostnames of the data-plane gateway to which requests can be sent. */ - hostnames?: string[]; -} - -/** Gateway details. */ -export interface GatewayContract extends ProxyResource { - /** Gateway location. */ - locationData?: ResourceLocationDataContract; - /** Gateway description */ - description?: string; -} - -/** Gateway hostname configuration details. */ -export interface GatewayHostnameConfigurationContract extends ProxyResource { - /** Hostname value. Supports valid domain name, partial or full wildcard */ - hostname?: string; - /** Identifier of Certificate entity that will be used for TLS connection establishment */ - certificateId?: string; - /** Determines whether gateway requests client certificate */ - negotiateClientCertificate?: boolean; - /** Specifies if TLS 1.0 is supported */ - tls10Enabled?: boolean; - /** Specifies if TLS 1.1 is supported */ - tls11Enabled?: boolean; - /** Specifies if HTTP/2.0 is supported */ - http2Enabled?: boolean; -} - -/** Association entity details. */ -export interface AssociationContract extends ProxyResource { - /** Provisioning state. */ - provisioningState?: "created"; -} - -/** Gateway certificate authority details. */ -export interface GatewayCertificateAuthorityContract extends ProxyResource { - /** Determines whether certificate authority is trusted. */ - isTrusted?: boolean; -} - -/** Contract details. */ -export interface GroupContract extends ProxyResource { - /** Group name. */ - displayName?: string; - /** Group description. Can contain HTML formatting tags. */ - description?: string; - /** - * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly builtIn?: boolean; - /** Group type. */ - typePropertiesType?: GroupType; - /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ - externalId?: string; -} - -/** User details. */ -export interface UserContract extends ProxyResource { - /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ - state?: UserState; - /** Optional note about a user set by the administrator. */ - note?: string; - /** Collection of user identities. */ - identities?: UserIdentityContract[]; - /** First name. */ - firstName?: string; - /** Last name. */ - lastName?: string; - /** Email address. */ - email?: string; - /** - * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - registrationDate?: Date; - /** - * Collection of groups user is part of. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groups?: GroupContractProperties[]; -} - -/** Identity Provider details. */ -export interface IdentityProviderContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** Identity Provider details. */ -export interface IdentityProviderCreateContract extends ProxyResource { - /** Identity Provider Type identifier. */ - typePropertiesType?: IdentityProviderType; - /** The TenantId to use instead of Common when logging into Active Directory */ - signinTenant?: string; - /** List of Allowed Tenants when configuring Azure Active Directory login. */ - allowedTenants?: string[]; - /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ - authority?: string; - /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ - signupPolicyName?: string; - /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ - signinPolicyName?: string; - /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ - profileEditingPolicyName?: string; - /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ - passwordResetPolicyName?: string; - /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ - clientLibrary?: string; - /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ - clientId?: string; - /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - clientSecret?: string; -} - -/** Logger details. */ -export interface LoggerContract extends ProxyResource { - /** Logger type. */ - loggerType?: LoggerType; - /** Logger description. */ - description?: string; - /** - * The name and SendRule connection string of the event hub for azureEventHub logger. - * Instrumentation key for applicationInsights logger. - */ - credentials?: { [propertyName: string]: string }; - /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ - isBuffered?: boolean; - /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ - resourceId?: string; -} - -/** NamedValue details. */ -export interface NamedValueContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractProperties; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** NamedValue details. */ -export interface NamedValueCreateContract extends ProxyResource { - /** Optional tags that when provided can be used to filter the NamedValue list. */ - tags?: string[]; - /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - secret?: boolean; - /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ - displayName?: string; - /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - value?: string; - /** KeyVault location details of the namedValue. */ - keyVault?: KeyVaultContractCreateProperties; -} - -/** Notification details. */ -export interface NotificationContract extends ProxyResource { - /** Title of the Notification. */ - title?: string; - /** Description of the Notification. */ - description?: string; - /** Recipient Parameter values. */ - recipients?: RecipientsContractProperties; -} - -/** Recipient User details. */ -export interface RecipientUserContract extends ProxyResource { - /** API Management UserId subscribed to notification. */ - userId?: string; -} - -/** Recipient Email details. */ -export interface RecipientEmailContract extends ProxyResource { - /** User Email subscribed to notification. */ - email?: string; -} - -/** OpenId Connect Provider details. */ -export interface OpenidConnectProviderContract extends ProxyResource { - /** User-friendly OpenID Connect Provider name. */ - displayName?: string; - /** User-friendly description of OpenID Connect Provider. */ - description?: string; - /** Metadata endpoint URI. */ - metadataEndpoint?: string; - /** Client ID of developer console which is the client application. */ - clientId?: string; - /** Client Secret of developer console which is the client application. */ - clientSecret?: string; - /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ - useInTestConsole?: boolean; - /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ - useInApiDocumentation?: boolean; -} - -/** Policy description details. */ -export interface PolicyDescriptionContract extends ProxyResource { - /** - * Policy description. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; - /** - * Binary OR value of the Snippet scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scope?: number; -} - -/** Policy fragment contract details. */ -export interface PolicyFragmentContract extends ProxyResource { - /** Contents of the policy fragment. */ - value?: string; - /** Policy fragment description. */ - description?: string; - /** Format of the policy fragment content. */ - format?: PolicyFragmentContentFormat; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -export interface ResourceCollectionValueItem extends ProxyResource {} - -/** Policy restriction contract details. */ -export interface PolicyRestrictionContract extends ProxyResource { - /** Path to the policy document. */ - scope?: string; - /** Indicates if base policy should be enforced for the policy document. */ - requireBase?: PolicyRestrictionRequireBase; -} - -/** Long Running Git Operation Results. */ -export interface OperationResultContract extends ProxyResource { - /** Operation result identifier. */ - idPropertiesId?: string; - /** Status of an async operation. */ - status?: AsyncOperationStatus; - /** - * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: OperationResultLogItemContract[]; -} - -/** The developer portal configuration contract. */ -export interface PortalConfigContract extends ProxyResource { - /** Enable or disable Basic authentication method. */ - enableBasicAuth?: boolean; - signin?: PortalConfigPropertiesSignin; - signup?: PortalConfigPropertiesSignup; - /** The developer portal delegation settings. */ - delegation?: PortalConfigDelegationProperties; - /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ - cors?: PortalConfigCorsProperties; - /** The developer portal Content Security Policy (CSP) settings. */ - csp?: PortalConfigCspProperties; -} - -/** Portal Revision's contract details. */ -export interface PortalRevisionContract extends ProxyResource { - /** Portal revision description. */ - description?: string; - /** - * Portal revision publishing status details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusDetails?: string; - /** - * Status of the portal's revision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: PortalRevisionStatus; - /** Indicates if the portal's revision is public. */ - isCurrent?: boolean; - /** - * Portal's revision creation date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDateTime?: Date; - /** - * Last updated date and time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly updatedDateTime?: Date; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** Portal Settings for the Developer Portal. */ -export interface PortalSettingsContract extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; -} - -/** Sign-In settings for the Developer Portal. */ -export interface PortalSigninSettings extends ProxyResource { - /** Redirect Anonymous users to the Sign-In page. */ - enabled?: boolean; -} - -/** Sign-Up settings for a developer portal. */ -export interface PortalSignupSettings extends ProxyResource { - /** Allow users to sign up on a developer portal. */ - enabled?: boolean; - /** Terms of service contract properties. */ - termsOfService?: TermsOfServiceProperties; -} - -/** Delegation settings for a developer portal. */ -export interface PortalDelegationSettings extends ProxyResource { - /** A delegation Url. */ - url?: string; - /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ - validationKey?: string; - /** Subscriptions delegation settings. */ - subscriptions?: SubscriptionsDelegationSettingsProperties; - /** User registration delegation settings. */ - userRegistration?: RegistrationDelegationSettingsProperties; -} - -/** Subscription details. */ -export interface SubscriptionContract extends ProxyResource { - /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ - ownerId?: string; - /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ - scope?: string; - /** The name of the subscription, or null if the subscription has no name. */ - displayName?: string; - /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ - state?: SubscriptionState; - /** - * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly createdDate?: Date; - /** - * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - startDate?: Date; - /** - * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - expirationDate?: Date; - /** - * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - endDate?: Date; - /** - * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - notificationDate?: Date; - /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - primaryKey?: string; - /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ - secondaryKey?: string; - /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ - stateComment?: string; - /** Determines whether tracing is enabled */ - allowTracing?: boolean; -} - -/** Product-API link details. */ -export interface ProductApiLinkContract extends ProxyResource { - /** Full resource Id of an API. */ - apiId?: string; -} - -/** Product-group link details. */ -export interface ProductGroupLinkContract extends ProxyResource { - /** Full resource Id of a group. */ - groupId?: string; -} - -/** Global Schema Contract details. */ -export interface GlobalSchemaContract extends ProxyResource { - /** Schema Type. Immutable. */ - schemaType?: SchemaType; - /** Free-form schema entity description. */ - description?: string; - /** Json-encoded string for non json-based schema. */ - value?: any; - /** Global Schema document object for json-based schema formats(e.g. json schema). */ - document?: Record; - /** - * The provisioning state - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; -} - -/** Tenant Settings. */ -export interface TenantSettingsContract extends ProxyResource { - /** Tenant settings */ - settings?: { [propertyName: string]: string }; -} - -/** Tag-API link details. */ -export interface TagApiLinkContract extends ProxyResource { - /** Full resource Id of an API. */ - apiId?: string; -} - -/** Tag-operation link details. */ -export interface TagOperationLinkContract extends ProxyResource { - /** Full resource Id of an API operation. */ - operationId?: string; -} - -/** Tag-product link details. */ -export interface TagProductLinkContract extends ProxyResource { - /** Full resource Id of a product. */ - productId?: string; -} - -/** Tenant Settings. */ -export interface AccessInformationContract extends ProxyResource { - /** Access Information type ('access' or 'gitAccess') */ - idPropertiesId?: string; - /** Principal (User) Identifier. */ - principalId?: string; - /** Determines whether direct access is enabled. */ - enabled?: boolean; -} - -/** Result of Tenant Configuration Sync State. */ -export interface TenantConfigurationSyncStateContract extends ProxyResource { - /** The name of Git branch. */ - branch?: string; - /** The latest commit Id. */ - commitId?: string; - /** value indicating if last sync was save (true) or deploy (false) operation. */ - isExport?: boolean; - /** value indicating if last synchronization was later than the configuration change. */ - isSynced?: boolean; - /** value indicating whether Git configuration access is enabled. */ - isGitEnabled?: boolean; - /** - * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - syncDate?: Date; - /** - * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - configurationChangeDate?: Date; - /** Most recent tenant configuration operation identifier */ - lastOperationId?: string; -} - -/** Diagnostic details. */ -export interface DiagnosticUpdateContract extends ProxyResource { - /** Specifies for what type of messages sampling settings should not apply. */ - alwaysLog?: AlwaysLog; - /** Resource Id of a target logger. */ - loggerId?: string; - /** Sampling settings for Diagnostic. */ - sampling?: SamplingSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ - frontend?: PipelineDiagnosticSettings; - /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ - backend?: PipelineDiagnosticSettings; - /** Log the ClientIP. Default is false. */ - logClientIp?: boolean; - /** Sets correlation protocol to use for Application Insights diagnostics. */ - httpCorrelationProtocol?: HttpCorrelationProtocol; - /** The verbosity level applied to traces emitted by trace policies. */ - verbosity?: Verbosity; - /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ - operationNameFormat?: OperationNameFormat; - /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ - metrics?: boolean; -} - -/** A single API Management WorkspaceLinks in List or Get response. */ -export interface ApiManagementWorkspaceLinksResource extends ProxyResource { - /** - * ETag of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly etag?: string; - /** The link to the API Management service workspace. */ - workspaceId?: string; - /** The array of linked gateways. */ - gateways?: WorkspaceLinksGateway[]; -} - -/** Workspace details. */ -export interface WorkspaceContract extends ProxyResource { - /** Name of the workspace. */ - displayName?: string; - /** Description of the workspace. */ - description?: string; -} - -/** Policy Contract details. */ -export interface PolicyWithComplianceContract extends ProxyResource { - /** Policy Identifier */ - referencePolicyId?: string; - /** Policy Restriction Compliance State */ - complianceState?: PolicyComplianceState; -} - -/** Long Running Git Resolver Results. */ -export interface ResolverResultContract extends ProxyResource { - /** Resolver result identifier. */ - idPropertiesId?: string; - /** Status of an async resolver. */ - status?: AsyncResolverStatus; - /** - * Start time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - started?: Date; - /** - * Last update time of an async resolver. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - * - */ - updated?: Date; - /** Optional result info. */ - resultInfo?: string; - /** Error Body Contract */ - error?: ErrorResponseBody; - /** - * This property if only provided as part of the TenantConfiguration_Validate resolver. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy resolver. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionLog?: ResolverResultLogItemContract[]; -} - -/** API Create or Update Properties. */ -export interface ApiCreateOrUpdateProperties extends ApiContractProperties { - /** Content value when Importing an API. */ - value?: string; - /** Format of the Content in which the API is getting imported. New formats can be added in the future */ - format?: ContentFormat; - /** Criteria to limit import of WSDL to a subset of the document. */ - wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - /** - * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. - * New types can be added in the future. - */ - soapApiType?: SoapApiType; - /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ - translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; -} - -/** Defines headers for ApiGateway_update operation. */ -export interface ApiGatewayUpdateHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for ApiGateway_delete operation. */ -export interface ApiGatewayDeleteHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for Api_getEntityTag operation. */ -export interface ApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Api_get operation. */ -export interface ApiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Api_createOrUpdate operation. */ -export interface ApiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for Api_update operation. */ -export interface ApiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Api_delete operation. */ -export interface ApiDeleteHeaders { - /** Location header */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for ApiRelease_getEntityTag operation. */ -export interface ApiReleaseGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiRelease_get operation. */ -export interface ApiReleaseGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiRelease_createOrUpdate operation. */ -export interface ApiReleaseCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiRelease_update operation. */ -export interface ApiReleaseUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperation_getEntityTag operation. */ -export interface ApiOperationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperation_get operation. */ -export interface ApiOperationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperation_createOrUpdate operation. */ -export interface ApiOperationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperation_update operation. */ -export interface ApiOperationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperationPolicy_getEntityTag operation. */ -export interface ApiOperationPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperationPolicy_get operation. */ -export interface ApiOperationPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiOperationPolicy_createOrUpdate operation. */ -export interface ApiOperationPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getEntityStateByOperation operation. */ -export interface TagGetEntityStateByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getByOperation operation. */ -export interface TagGetByOperationHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getEntityStateByApi operation. */ -export interface TagGetEntityStateByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getByApi operation. */ -export interface TagGetByApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_assignToApi operation. */ -export interface TagAssignToApiHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getEntityStateByProduct operation. */ -export interface TagGetEntityStateByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getByProduct operation. */ -export interface TagGetByProductHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_getEntityState operation. */ -export interface TagGetEntityStateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_get operation. */ -export interface TagGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_createOrUpdate operation. */ -export interface TagCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Tag_update operation. */ -export interface TagUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolver_getEntityTag operation. */ -export interface GraphQLApiResolverGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolver_get operation. */ -export interface GraphQLApiResolverGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolver_createOrUpdate operation. */ -export interface GraphQLApiResolverCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolver_update operation. */ -export interface GraphQLApiResolverUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolverPolicy_getEntityTag operation. */ -export interface GraphQLApiResolverPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolverPolicy_get operation. */ -export interface GraphQLApiResolverPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GraphQLApiResolverPolicy_createOrUpdate operation. */ -export interface GraphQLApiResolverPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiPolicy_getEntityTag operation. */ -export interface ApiPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiPolicy_get operation. */ -export interface ApiPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiPolicy_createOrUpdate operation. */ -export interface ApiPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiSchema_getEntityTag operation. */ -export interface ApiSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiSchema_get operation. */ -export interface ApiSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiSchema_createOrUpdate operation. */ -export interface ApiSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for ApiDiagnostic_getEntityTag operation. */ -export interface ApiDiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiDiagnostic_get operation. */ -export interface ApiDiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiDiagnostic_createOrUpdate operation. */ -export interface ApiDiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiDiagnostic_update operation. */ -export interface ApiDiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssue_getEntityTag operation. */ -export interface ApiIssueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssue_get operation. */ -export interface ApiIssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssue_createOrUpdate operation. */ -export interface ApiIssueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssue_update operation. */ -export interface ApiIssueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueComment_getEntityTag operation. */ -export interface ApiIssueCommentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueComment_get operation. */ -export interface ApiIssueCommentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueComment_createOrUpdate operation. */ -export interface ApiIssueCommentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueAttachment_getEntityTag operation. */ -export interface ApiIssueAttachmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueAttachment_get operation. */ -export interface ApiIssueAttachmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiIssueAttachment_createOrUpdate operation. */ -export interface ApiIssueAttachmentCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiTagDescription_getEntityTag operation. */ -export interface ApiTagDescriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiTagDescription_get operation. */ -export interface ApiTagDescriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiTagDescription_createOrUpdate operation. */ -export interface ApiTagDescriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiWiki_getEntityTag operation. */ -export interface ApiWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiWiki_get operation. */ -export interface ApiWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiWiki_createOrUpdate operation. */ -export interface ApiWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiWiki_update operation. */ -export interface ApiWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiVersionSet_getEntityTag operation. */ -export interface ApiVersionSetGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiVersionSet_get operation. */ -export interface ApiVersionSetGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiVersionSet_createOrUpdate operation. */ -export interface ApiVersionSetCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiVersionSet_update operation. */ -export interface ApiVersionSetUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationProvider_get operation. */ -export interface AuthorizationProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationProvider_createOrUpdate operation. */ -export interface AuthorizationProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Authorization_get operation. */ -export interface AuthorizationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Authorization_createOrUpdate operation. */ -export interface AuthorizationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Authorization_confirmConsentCode operation. */ -export interface AuthorizationConfirmConsentCodeHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationLoginLinks_post operation. */ -export interface AuthorizationLoginLinksPostHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationAccessPolicy_get operation. */ -export interface AuthorizationAccessPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationAccessPolicy_createOrUpdate operation. */ -export interface AuthorizationAccessPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationServer_getEntityTag operation. */ -export interface AuthorizationServerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationServer_get operation. */ -export interface AuthorizationServerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationServer_createOrUpdate operation. */ -export interface AuthorizationServerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationServer_update operation. */ -export interface AuthorizationServerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for AuthorizationServer_listSecrets operation. */ -export interface AuthorizationServerListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Backend_getEntityTag operation. */ -export interface BackendGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Backend_get operation. */ -export interface BackendGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Backend_createOrUpdate operation. */ -export interface BackendCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Backend_update operation. */ -export interface BackendUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Cache_getEntityTag operation. */ -export interface CacheGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Cache_get operation. */ -export interface CacheGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Cache_createOrUpdate operation. */ -export interface CacheCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Cache_update operation. */ -export interface CacheUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Certificate_getEntityTag operation. */ -export interface CertificateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Certificate_get operation. */ -export interface CertificateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Certificate_createOrUpdate operation. */ -export interface CertificateCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Certificate_refreshSecret operation. */ -export interface CertificateRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiManagementClient_performConnectivityCheckAsync operation. */ -export interface ApiManagementClientPerformConnectivityCheckAsyncHeaders { - location?: string; -} - -/** Defines headers for ContentType_get operation. */ -export interface ContentTypeGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ContentType_createOrUpdate operation. */ -export interface ContentTypeCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ContentItem_getEntityTag operation. */ -export interface ContentItemGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ContentItem_get operation. */ -export interface ContentItemGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ContentItem_createOrUpdate operation. */ -export interface ContentItemCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for DeletedServices_purge operation. */ -export interface DeletedServicesPurgeHeaders { - location?: string; -} - -/** Defines headers for ApiManagementService_restore operation. */ -export interface ApiManagementServiceRestoreHeaders { - location?: string; -} - -/** Defines headers for ApiManagementService_backup operation. */ -export interface ApiManagementServiceBackupHeaders { - location?: string; -} - -/** Defines headers for ApiManagementService_update operation. */ -export interface ApiManagementServiceUpdateHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for ApiManagementService_delete operation. */ -export interface ApiManagementServiceDeleteHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for ApiManagementService_migrateToStv2 operation. */ -export interface ApiManagementServiceMigrateToStv2Headers { - location?: string; -} - -/** Defines headers for ApiManagementService_applyNetworkConfigurationUpdates operation. */ -export interface ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders { - location?: string; -} - -/** Defines headers for Diagnostic_getEntityTag operation. */ -export interface DiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Diagnostic_get operation. */ -export interface DiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Diagnostic_createOrUpdate operation. */ -export interface DiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Diagnostic_update operation. */ -export interface DiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Documentation_getEntityTag operation. */ -export interface DocumentationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Documentation_get operation. */ -export interface DocumentationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Documentation_createOrUpdate operation. */ -export interface DocumentationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Documentation_update operation. */ -export interface DocumentationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for EmailTemplate_getEntityTag operation. */ -export interface EmailTemplateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for EmailTemplate_get operation. */ -export interface EmailTemplateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for EmailTemplate_update operation. */ -export interface EmailTemplateUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ApiGatewayConfigConnection_delete operation. */ -export interface ApiGatewayConfigConnectionDeleteHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for Gateway_getEntityTag operation. */ -export interface GatewayGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Gateway_get operation. */ -export interface GatewayGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Gateway_createOrUpdate operation. */ -export interface GatewayCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Gateway_update operation. */ -export interface GatewayUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Gateway_listKeys operation. */ -export interface GatewayListKeysHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayHostnameConfiguration_getEntityTag operation. */ -export interface GatewayHostnameConfigurationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayHostnameConfiguration_get operation. */ -export interface GatewayHostnameConfigurationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayHostnameConfiguration_createOrUpdate operation. */ -export interface GatewayHostnameConfigurationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayApi_getEntityTag operation. */ -export interface GatewayApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayCertificateAuthority_getEntityTag operation. */ -export interface GatewayCertificateAuthorityGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayCertificateAuthority_get operation. */ -export interface GatewayCertificateAuthorityGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GatewayCertificateAuthority_createOrUpdate operation. */ -export interface GatewayCertificateAuthorityCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Group_getEntityTag operation. */ -export interface GroupGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Group_get operation. */ -export interface GroupGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Group_createOrUpdate operation. */ -export interface GroupCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Group_update operation. */ -export interface GroupUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for IdentityProvider_getEntityTag operation. */ -export interface IdentityProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for IdentityProvider_get operation. */ -export interface IdentityProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for IdentityProvider_createOrUpdate operation. */ -export interface IdentityProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for IdentityProvider_update operation. */ -export interface IdentityProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for IdentityProvider_listSecrets operation. */ -export interface IdentityProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Issue_get operation. */ -export interface IssueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Logger_getEntityTag operation. */ -export interface LoggerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Logger_get operation. */ -export interface LoggerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Logger_createOrUpdate operation. */ -export interface LoggerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Logger_update operation. */ -export interface LoggerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for NamedValue_getEntityTag operation. */ -export interface NamedValueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for NamedValue_get operation. */ -export interface NamedValueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for NamedValue_createOrUpdate operation. */ -export interface NamedValueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for NamedValue_update operation. */ -export interface NamedValueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for NamedValue_listValue operation. */ -export interface NamedValueListValueHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for NamedValue_refreshSecret operation. */ -export interface NamedValueRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OpenIdConnectProvider_getEntityTag operation. */ -export interface OpenIdConnectProviderGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OpenIdConnectProvider_get operation. */ -export interface OpenIdConnectProviderGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OpenIdConnectProvider_createOrUpdate operation. */ -export interface OpenIdConnectProviderCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OpenIdConnectProvider_update operation. */ -export interface OpenIdConnectProviderUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OpenIdConnectProvider_listSecrets operation. */ -export interface OpenIdConnectProviderListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Policy_getEntityTag operation. */ -export interface PolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Policy_get operation. */ -export interface PolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Policy_createOrUpdate operation. */ -export interface PolicyCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; -} - -/** Defines headers for PolicyFragment_getEntityTag operation. */ -export interface PolicyFragmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PolicyFragment_get operation. */ -export interface PolicyFragmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PolicyFragment_createOrUpdate operation. */ -export interface PolicyFragmentCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for PolicyRestriction_getEntityTag operation. */ -export interface PolicyRestrictionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PolicyRestriction_get operation. */ -export interface PolicyRestrictionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PolicyRestriction_createOrUpdate operation. */ -export interface PolicyRestrictionCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; -} - -/** Defines headers for PolicyRestriction_update operation. */ -export interface PolicyRestrictionUpdateHeaders { - /** Current entity state version */ - eTag?: string; -} - -/** Defines headers for PolicyRestrictionValidations_byService operation. */ -export interface PolicyRestrictionValidationsByServiceHeaders { - /** location of the header. */ - location?: string; -} - -/** Defines headers for PortalConfig_getEntityTag operation. */ -export interface PortalConfigGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PortalConfig_get operation. */ -export interface PortalConfigGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PortalRevision_getEntityTag operation. */ -export interface PortalRevisionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PortalRevision_get operation. */ -export interface PortalRevisionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PortalRevision_createOrUpdate operation. */ -export interface PortalRevisionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for PortalRevision_update operation. */ -export interface PortalRevisionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for SignInSettings_getEntityTag operation. */ -export interface SignInSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for SignInSettings_get operation. */ -export interface SignInSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for SignUpSettings_getEntityTag operation. */ -export interface SignUpSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for SignUpSettings_get operation. */ -export interface SignUpSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for DelegationSettings_getEntityTag operation. */ -export interface DelegationSettingsGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for DelegationSettings_get operation. */ -export interface DelegationSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for PrivateEndpointConnection_createOrUpdate operation. */ -export interface PrivateEndpointConnectionCreateOrUpdateHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for PrivateEndpointConnection_delete operation. */ -export interface PrivateEndpointConnectionDeleteHeaders { - /** Location header */ - location?: string; -} - -/** Defines headers for Product_getEntityTag operation. */ -export interface ProductGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Product_get operation. */ -export interface ProductGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Product_createOrUpdate operation. */ -export interface ProductCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Product_update operation. */ -export interface ProductUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductPolicy_getEntityTag operation. */ -export interface ProductPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductPolicy_get operation. */ -export interface ProductPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductPolicy_createOrUpdate operation. */ -export interface ProductPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWiki_getEntityTag operation. */ -export interface ProductWikiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWiki_get operation. */ -export interface ProductWikiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWiki_createOrUpdate operation. */ -export interface ProductWikiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWiki_update operation. */ -export interface ProductWikiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWikis_list operation. */ -export interface ProductWikisListHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductWikis_listNext operation. */ -export interface ProductWikisListNextHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductApiLink_get operation. */ -export interface ProductApiLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for ProductGroupLink_get operation. */ -export interface ProductGroupLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GlobalSchema_getEntityTag operation. */ -export interface GlobalSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GlobalSchema_get operation. */ -export interface GlobalSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for GlobalSchema_createOrUpdate operation. */ -export interface GlobalSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for TenantSettings_get operation. */ -export interface TenantSettingsGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Subscription_getEntityTag operation. */ -export interface SubscriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Subscription_get operation. */ -export interface SubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Subscription_createOrUpdate operation. */ -export interface SubscriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Subscription_update operation. */ -export interface SubscriptionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Subscription_listSecrets operation. */ -export interface SubscriptionListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TagApiLink_get operation. */ -export interface TagApiLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TagOperationLink_get operation. */ -export interface TagOperationLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TagProductLink_get operation. */ -export interface TagProductLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantAccess_getEntityTag operation. */ -export interface TenantAccessGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantAccess_get operation. */ -export interface TenantAccessGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantAccess_create operation. */ -export interface TenantAccessCreateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantAccess_update operation. */ -export interface TenantAccessUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantAccess_listSecrets operation. */ -export interface TenantAccessListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for TenantConfiguration_deploy operation. */ -export interface TenantConfigurationDeployHeaders { - location?: string; -} - -/** Defines headers for TenantConfiguration_save operation. */ -export interface TenantConfigurationSaveHeaders { - location?: string; -} - -/** Defines headers for TenantConfiguration_validate operation. */ -export interface TenantConfigurationValidateHeaders { - location?: string; -} - -/** Defines headers for User_getEntityTag operation. */ -export interface UserGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for User_get operation. */ -export interface UserGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for User_createOrUpdate operation. */ -export interface UserCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for User_update operation. */ -export interface UserUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for User_delete operation. */ -export interface UserDeleteHeaders { - /** Location header */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for UserSubscription_get operation. */ -export interface UserSubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceBackend_getEntityTag operation. */ -export interface WorkspaceBackendGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceBackend_get operation. */ -export interface WorkspaceBackendGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceBackend_createOrUpdate operation. */ -export interface WorkspaceBackendCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceBackend_update operation. */ -export interface WorkspaceBackendUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceCertificate_getEntityTag operation. */ -export interface WorkspaceCertificateGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceCertificate_get operation. */ -export interface WorkspaceCertificateGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceCertificate_createOrUpdate operation. */ -export interface WorkspaceCertificateCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceCertificate_refreshSecret operation. */ -export interface WorkspaceCertificateRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceDiagnostic_getEntityTag operation. */ -export interface WorkspaceDiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceDiagnostic_get operation. */ -export interface WorkspaceDiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceDiagnostic_createOrUpdate operation. */ -export interface WorkspaceDiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceDiagnostic_update operation. */ -export interface WorkspaceDiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiDiagnostic_getEntityTag operation. */ -export interface WorkspaceApiDiagnosticGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiDiagnostic_get operation. */ -export interface WorkspaceApiDiagnosticGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiDiagnostic_createOrUpdate operation. */ -export interface WorkspaceApiDiagnosticCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiDiagnostic_update operation. */ -export interface WorkspaceApiDiagnosticUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceLogger_getEntityTag operation. */ -export interface WorkspaceLoggerGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceLogger_get operation. */ -export interface WorkspaceLoggerGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceLogger_createOrUpdate operation. */ -export interface WorkspaceLoggerCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceLogger_update operation. */ -export interface WorkspaceLoggerUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Workspace_getEntityTag operation. */ -export interface WorkspaceGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Workspace_get operation. */ -export interface WorkspaceGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Workspace_createOrUpdate operation. */ -export interface WorkspaceCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for Workspace_update operation. */ -export interface WorkspaceUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspacePolicy_getEntityTag operation. */ -export interface WorkspacePolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspacePolicy_get operation. */ -export interface WorkspacePolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspacePolicy_createOrUpdate operation. */ -export interface WorkspacePolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceNamedValue_getEntityTag operation. */ -export interface WorkspaceNamedValueGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceNamedValue_get operation. */ -export interface WorkspaceNamedValueGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceNamedValue_createOrUpdate operation. */ -export interface WorkspaceNamedValueCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for WorkspaceNamedValue_update operation. */ -export interface WorkspaceNamedValueUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceNamedValue_listValue operation. */ -export interface WorkspaceNamedValueListValueHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceNamedValue_refreshSecret operation. */ -export interface WorkspaceNamedValueRefreshSecretHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGlobalSchema_getEntityTag operation. */ -export interface WorkspaceGlobalSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGlobalSchema_get operation. */ -export interface WorkspaceGlobalSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGlobalSchema_createOrUpdate operation. */ -export interface WorkspaceGlobalSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for WorkspacePolicyFragment_getEntityTag operation. */ -export interface WorkspacePolicyFragmentGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspacePolicyFragment_get operation. */ -export interface WorkspacePolicyFragmentGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspacePolicyFragment_createOrUpdate operation. */ -export interface WorkspacePolicyFragmentCreateOrUpdateHeaders { - /** Current entity state version */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for WorkspaceGroup_getEntityTag operation. */ -export interface WorkspaceGroupGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGroup_get operation. */ -export interface WorkspaceGroupGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGroup_createOrUpdate operation. */ -export interface WorkspaceGroupCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceGroup_update operation. */ -export interface WorkspaceGroupUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceSubscription_getEntityTag operation. */ -export interface WorkspaceSubscriptionGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceSubscription_get operation. */ -export interface WorkspaceSubscriptionGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceSubscription_createOrUpdate operation. */ -export interface WorkspaceSubscriptionCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceSubscription_update operation. */ -export interface WorkspaceSubscriptionUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceSubscription_listSecrets operation. */ -export interface WorkspaceSubscriptionListSecretsHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiVersionSet_getEntityTag operation. */ -export interface WorkspaceApiVersionSetGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiVersionSet_get operation. */ -export interface WorkspaceApiVersionSetGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiVersionSet_createOrUpdate operation. */ -export interface WorkspaceApiVersionSetCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiVersionSet_update operation. */ -export interface WorkspaceApiVersionSetUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApi_getEntityTag operation. */ -export interface WorkspaceApiGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApi_get operation. */ -export interface WorkspaceApiGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApi_createOrUpdate operation. */ -export interface WorkspaceApiCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for WorkspaceApi_update operation. */ -export interface WorkspaceApiUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiRelease_getEntityTag operation. */ -export interface WorkspaceApiReleaseGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiRelease_get operation. */ -export interface WorkspaceApiReleaseGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiRelease_createOrUpdate operation. */ -export interface WorkspaceApiReleaseCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiRelease_update operation. */ -export interface WorkspaceApiReleaseUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperation_getEntityTag operation. */ -export interface WorkspaceApiOperationGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperation_get operation. */ -export interface WorkspaceApiOperationGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperation_createOrUpdate operation. */ -export interface WorkspaceApiOperationCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperation_update operation. */ -export interface WorkspaceApiOperationUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperationPolicy_getEntityTag operation. */ -export interface WorkspaceApiOperationPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperationPolicy_get operation. */ -export interface WorkspaceApiOperationPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiOperationPolicy_createOrUpdate operation. */ -export interface WorkspaceApiOperationPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiPolicy_getEntityTag operation. */ -export interface WorkspaceApiPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiPolicy_get operation. */ -export interface WorkspaceApiPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiPolicy_createOrUpdate operation. */ -export interface WorkspaceApiPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiSchema_getEntityTag operation. */ -export interface WorkspaceApiSchemaGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiSchema_get operation. */ -export interface WorkspaceApiSchemaGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceApiSchema_createOrUpdate operation. */ -export interface WorkspaceApiSchemaCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; - /** Location header contains the URL where the status of the long running operation can be checked */ - location?: string; - /** Azure-AsyncOperation header contains the URL where the status of the long running operation can be checked */ - azureAsyncOperation?: string; -} - -/** Defines headers for WorkspaceProduct_getEntityTag operation. */ -export interface WorkspaceProductGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProduct_get operation. */ -export interface WorkspaceProductGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProduct_createOrUpdate operation. */ -export interface WorkspaceProductCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProduct_update operation. */ -export interface WorkspaceProductUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProductApiLink_get operation. */ -export interface WorkspaceProductApiLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProductGroupLink_get operation. */ -export interface WorkspaceProductGroupLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProductPolicy_getEntityTag operation. */ -export interface WorkspaceProductPolicyGetEntityTagHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProductPolicy_get operation. */ -export interface WorkspaceProductPolicyGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceProductPolicy_createOrUpdate operation. */ -export interface WorkspaceProductPolicyCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTag_getEntityState operation. */ -export interface WorkspaceTagGetEntityStateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTag_get operation. */ -export interface WorkspaceTagGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTag_createOrUpdate operation. */ -export interface WorkspaceTagCreateOrUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTag_update operation. */ -export interface WorkspaceTagUpdateHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTagApiLink_get operation. */ -export interface WorkspaceTagApiLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTagOperationLink_get operation. */ -export interface WorkspaceTagOperationLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for WorkspaceTagProductLink_get operation. */ -export interface WorkspaceTagProductLinkGetHeaders { - /** Current entity state version. Should be treated as opaque and used to make conditional HTTP requests. */ - eTag?: string; -} - -/** Defines headers for OperationsResults_get operation. */ -export interface OperationsResultsGetHeaders { - /** URL for determining when an operation has completed. */ - location?: string; -} - -/** Known values of {@link VirtualNetworkType} that the service accepts. */ -export enum KnownVirtualNetworkType { - /** The API Management gateway is not part of any Virtual Network. */ - None = "None", - /** The API Management gateway is part of Virtual Network and it is accessible from Internet. */ - External = "External", - /** The API Management gateway is part of Virtual Network and it is only accessible from within the virtual network. */ - Internal = "Internal", -} - -/** - * Defines values for VirtualNetworkType. \ - * {@link KnownVirtualNetworkType} can be used interchangeably with VirtualNetworkType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: The API Management gateway is not part of any Virtual Network. \ - * **External**: The API Management gateway is part of Virtual Network and it is accessible from Internet. \ - * **Internal**: The API Management gateway is part of Virtual Network and it is only accessible from within the virtual network. - */ -export type VirtualNetworkType = string; - -/** Known values of {@link ApiGatewaySkuType} that the service accepts. */ -export enum KnownApiGatewaySkuType { - /** Standard SKU of the API gateway. */ - Standard = "Standard", - /** Standard SKU of the API gateway to be used in Workspaces. */ - WorkspaceGatewayStandard = "WorkspaceGatewayStandard", - /** Premium SKU of the API gateway to be used in Workspaces. */ - WorkspaceGatewayPremium = "WorkspaceGatewayPremium", -} - -/** - * Defines values for ApiGatewaySkuType. \ - * {@link KnownApiGatewaySkuType} can be used interchangeably with ApiGatewaySkuType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard**: Standard SKU of the API gateway. \ - * **WorkspaceGatewayStandard**: Standard SKU of the API gateway to be used in Workspaces. \ - * **WorkspaceGatewayPremium**: Premium SKU of the API gateway to be used in Workspaces. - */ -export type ApiGatewaySkuType = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for 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** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link GatewaySkuCapacityScaleType} that the service accepts. */ -export enum KnownGatewaySkuCapacityScaleType { - /** Supported scale type automatic. */ - Automatic = "Automatic", - /** Supported scale type manual. */ - Manual = "Manual", - /** Scaling not supported. */ - None = "None", -} - -/** - * Defines values for GatewaySkuCapacityScaleType. \ - * {@link KnownGatewaySkuCapacityScaleType} can be used interchangeably with GatewaySkuCapacityScaleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Automatic**: Supported scale type automatic. \ - * **Manual**: Supported scale type manual. \ - * **None**: Scaling not supported. - */ -export type GatewaySkuCapacityScaleType = string; - -/** Known values of {@link PolicyComplianceState} that the service accepts. */ -export enum KnownPolicyComplianceState { - /** The policy restriction compliance state has not yet been determined. */ - Pending = "Pending", - /** The scope in restriction is out of compliance. */ - NonCompliant = "NonCompliant", - /** The scope in restriction is in compliance. */ - Compliant = "Compliant", -} - -/** - * Defines values for PolicyComplianceState. \ - * {@link KnownPolicyComplianceState} can be used interchangeably with PolicyComplianceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pending**: The policy restriction compliance state has not yet been determined. \ - * **NonCompliant**: The scope in restriction is out of compliance. \ - * **Compliant**: The scope in restriction is in compliance. - */ -export type PolicyComplianceState = string; - -/** Known values of {@link Protocol} that the service accepts. */ -export enum KnownProtocol { - /** Http */ - Http = "http", - /** Https */ - Https = "https", - /** Ws */ - Ws = "ws", - /** Wss */ - Wss = "wss", -} - -/** - * Defines values for Protocol. \ - * {@link KnownProtocol} can be used interchangeably with Protocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **http** \ - * **https** \ - * **ws** \ - * **wss** - */ -export type Protocol = string; - -/** Known values of {@link ApiVersionSetContractDetailsVersioningScheme} that the service accepts. */ -export enum KnownApiVersionSetContractDetailsVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header", -} - -/** - * Defines values for ApiVersionSetContractDetailsVersioningScheme. \ - * {@link KnownApiVersionSetContractDetailsVersioningScheme} can be used interchangeably with ApiVersionSetContractDetailsVersioningScheme, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Segment**: The API Version is passed in a path segment. \ - * **Query**: The API Version is passed in a query parameter. \ - * **Header**: The API Version is passed in a HTTP header. - */ -export type ApiVersionSetContractDetailsVersioningScheme = string; - -/** Known values of {@link BearerTokenSendingMethods} that the service accepts. */ -export enum KnownBearerTokenSendingMethods { - /** Access token will be transmitted in the Authorization header using Bearer schema */ - AuthorizationHeader = "authorizationHeader", - /** Access token will be transmitted as query parameters. */ - Query = "query", -} - -/** - * Defines values for BearerTokenSendingMethods. \ - * {@link KnownBearerTokenSendingMethods} can be used interchangeably with BearerTokenSendingMethods, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **authorizationHeader**: Access token will be transmitted in the Authorization header using Bearer schema \ - * **query**: Access token will be transmitted as query parameters. - */ -export type BearerTokenSendingMethods = string; - -/** Known values of {@link ApiType} that the service accepts. */ -export enum KnownApiType { - /** Http */ - Http = "http", - /** Soap */ - Soap = "soap", - /** Websocket */ - Websocket = "websocket", - /** Graphql */ - Graphql = "graphql", - /** Odata */ - Odata = "odata", - /** Grpc */ - Grpc = "grpc", -} - -/** - * Defines values for ApiType. \ - * {@link KnownApiType} can be used interchangeably with ApiType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **http** \ - * **soap** \ - * **websocket** \ - * **graphql** \ - * **odata** \ - * **grpc** - */ -export type ApiType = string; - -/** Known values of {@link ContentFormat} that the service accepts. */ -export enum KnownContentFormat { - /** The contents are inline and Content type is a WADL document. */ - WadlXml = "wadl-xml", - /** The WADL document is hosted on a publicly accessible internet address. */ - WadlLinkJson = "wadl-link-json", - /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ - SwaggerJson = "swagger-json", - /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ - SwaggerLinkJson = "swagger-link-json", - /** The contents are inline and the document is a WSDL\/Soap document. */ - Wsdl = "wsdl", - /** The WSDL document is hosted on a publicly accessible internet address. */ - WsdlLink = "wsdl-link", - /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ - Openapi = "openapi", - /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ - OpenapiJson = "openapi+json", - /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ - OpenapiLink = "openapi-link", - /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ - OpenapiJsonLink = "openapi+json-link", - /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ - GraphqlLink = "graphql-link", - /** The contents are inline and Content Type is a OData XML Document. */ - Odata = "odata", - /** The OData metadata document hosted on a publicly accessible internet address. */ - OdataLink = "odata-link", - /** The contents are inline and Content Type is a gRPC protobuf file. */ - Grpc = "grpc", - /** The gRPC protobuf file is hosted on a publicly accessible internet address. */ - GrpcLink = "grpc-link", -} - -/** - * Defines values for ContentFormat. \ - * {@link KnownContentFormat} can be used interchangeably with ContentFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **wadl-xml**: The contents are inline and Content type is a WADL document. \ - * **wadl-link-json**: The WADL document is hosted on a publicly accessible internet address. \ - * **swagger-json**: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. \ - * **swagger-link-json**: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. \ - * **wsdl**: The contents are inline and the document is a WSDL\/Soap document. \ - * **wsdl-link**: The WSDL document is hosted on a publicly accessible internet address. \ - * **openapi**: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. \ - * **openapi+json**: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. \ - * **openapi-link**: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. \ - * **openapi+json-link**: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. \ - * **graphql-link**: The GraphQL API endpoint hosted on a publicly accessible internet address. \ - * **odata**: The contents are inline and Content Type is a OData XML Document. \ - * **odata-link**: The OData metadata document hosted on a publicly accessible internet address. \ - * **grpc**: The contents are inline and Content Type is a gRPC protobuf file. \ - * **grpc-link**: The gRPC protobuf file is hosted on a publicly accessible internet address. - */ -export type ContentFormat = string; - -/** Known values of {@link SoapApiType} that the service accepts. */ -export enum KnownSoapApiType { - /** Imports a SOAP API having a RESTful front end. */ - SoapToRest = "http", - /** Imports the SOAP API having a SOAP front end. */ - SoapPassThrough = "soap", - /** Imports the API having a Websocket front end. */ - WebSocket = "websocket", - /** Imports the API having a GraphQL front end. */ - GraphQL = "graphql", - /** Imports the API having a OData front end. */ - OData = "odata", - /** Imports the API having a gRPC front end. */ - GRPC = "grpc", -} - -/** - * Defines values for SoapApiType. \ - * {@link KnownSoapApiType} can be used interchangeably with SoapApiType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **http**: Imports a SOAP API having a RESTful front end. \ - * **soap**: Imports the SOAP API having a SOAP front end. \ - * **websocket**: Imports the API having a Websocket front end. \ - * **graphql**: Imports the API having a GraphQL front end. \ - * **odata**: Imports the API having a OData front end. \ - * **grpc**: Imports the API having a gRPC front end. - */ -export type SoapApiType = string; - -/** Known values of {@link TranslateRequiredQueryParametersConduct} that the service accepts. */ -export enum KnownTranslateRequiredQueryParametersConduct { - /** Translates required query parameters to template ones. Is a default value */ - Template = "template", - /** Leaves required query parameters as they are (no translation done). */ - Query = "query", -} - -/** - * Defines values for TranslateRequiredQueryParametersConduct. \ - * {@link KnownTranslateRequiredQueryParametersConduct} can be used interchangeably with TranslateRequiredQueryParametersConduct, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **template**: Translates required query parameters to template ones. Is a default value \ - * **query**: Leaves required query parameters as they are (no translation done). - */ -export type TranslateRequiredQueryParametersConduct = string; - -/** Known values of {@link PolicyContentFormat} that the service accepts. */ -export enum KnownPolicyContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ - XmlLink = "xml-link", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml", - /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ - RawxmlLink = "rawxml-link", -} - -/** - * Defines values for PolicyContentFormat. \ - * {@link KnownPolicyContentFormat} can be used interchangeably with PolicyContentFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **xml**: The contents are inline and Content type is an XML document. \ - * **xml-link**: The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. \ - * **rawxml**: The contents are inline and Content type is a non XML encoded policy document. \ - * **rawxml-link**: The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. - */ -export type PolicyContentFormat = string; - -/** Known values of {@link PolicyIdName} that the service accepts. */ -export enum KnownPolicyIdName { - /** Policy */ - Policy = "policy", -} - -/** - * Defines values for PolicyIdName. \ - * {@link KnownPolicyIdName} can be used interchangeably with PolicyIdName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **policy** - */ -export type PolicyIdName = string; - -/** Known values of {@link PolicyExportFormat} that the service accepts. */ -export enum KnownPolicyExportFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml", -} - -/** - * Defines values for PolicyExportFormat. \ - * {@link KnownPolicyExportFormat} can be used interchangeably with PolicyExportFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **xml**: The contents are inline and Content type is an XML document. \ - * **rawxml**: The contents are inline and Content type is a non XML encoded policy document. - */ -export type PolicyExportFormat = string; - -/** Known values of {@link AlwaysLog} that the service accepts. */ -export enum KnownAlwaysLog { - /** Always log all erroneous request regardless of sampling settings. */ - AllErrors = "allErrors", -} - -/** - * Defines values for AlwaysLog. \ - * {@link KnownAlwaysLog} can be used interchangeably with AlwaysLog, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **allErrors**: Always log all erroneous request regardless of sampling settings. - */ -export type AlwaysLog = string; - -/** Known values of {@link SamplingType} that the service accepts. */ -export enum KnownSamplingType { - /** Fixed-rate sampling. */ - Fixed = "fixed", -} - -/** - * Defines values for SamplingType. \ - * {@link KnownSamplingType} can be used interchangeably with SamplingType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **fixed**: Fixed-rate sampling. - */ -export type SamplingType = string; - -/** Known values of {@link DataMaskingMode} that the service accepts. */ -export enum KnownDataMaskingMode { - /** Mask the value of an entity. */ - Mask = "Mask", - /** Hide the presence of an entity. */ - Hide = "Hide", -} - -/** - * Defines values for DataMaskingMode. \ - * {@link KnownDataMaskingMode} can be used interchangeably with DataMaskingMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Mask**: Mask the value of an entity. \ - * **Hide**: Hide the presence of an entity. - */ -export type DataMaskingMode = string; - -/** Known values of {@link HttpCorrelationProtocol} that the service accepts. */ -export enum KnownHttpCorrelationProtocol { - /** Do not read and inject correlation headers. */ - None = "None", - /** Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. */ - Legacy = "Legacy", - /** Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. */ - W3C = "W3C", -} - -/** - * Defines values for HttpCorrelationProtocol. \ - * {@link KnownHttpCorrelationProtocol} can be used interchangeably with HttpCorrelationProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None**: Do not read and inject correlation headers. \ - * **Legacy**: Inject Request-Id and Request-Context headers with request correlation data. See https:\/\/github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. \ - * **W3C**: Inject Trace Context headers. See https:\/\/w3c.github.io\/trace-context. - */ -export type HttpCorrelationProtocol = string; - -/** Known values of {@link Verbosity} that the service accepts. */ -export enum KnownVerbosity { - /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ - Verbose = "verbose", - /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ - Information = "information", - /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ - Error = "error", -} - -/** - * Defines values for Verbosity. \ - * {@link KnownVerbosity} can be used interchangeably with Verbosity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **verbose**: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. \ - * **information**: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. \ - * **error**: Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. - */ -export type Verbosity = string; - -/** Known values of {@link OperationNameFormat} that the service accepts. */ -export enum KnownOperationNameFormat { - /** API_NAME;rev=API_REVISION - OPERATION_NAME */ - Name = "Name", - /** HTTP_VERB URL */ - Url = "Url", -} - -/** - * Defines values for OperationNameFormat. \ - * {@link KnownOperationNameFormat} can be used interchangeably with OperationNameFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Name**: API_NAME;rev=API_REVISION - OPERATION_NAME \ - * **Url**: HTTP_VERB URL - */ -export type OperationNameFormat = string; - -/** Known values of {@link State} that the service accepts. */ -export enum KnownState { - /** The issue is proposed. */ - Proposed = "proposed", - /** The issue is opened. */ - Open = "open", - /** The issue was removed. */ - Removed = "removed", - /** The issue is now resolved. */ - Resolved = "resolved", - /** The issue was closed. */ - Closed = "closed", -} - -/** - * Defines values for State. \ - * {@link KnownState} can be used interchangeably with State, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **proposed**: The issue is proposed. \ - * **open**: The issue is opened. \ - * **removed**: The issue was removed. \ - * **resolved**: The issue is now resolved. \ - * **closed**: The issue was closed. - */ -export type State = string; - -/** Known values of {@link ExportFormat} that the service accepts. */ -export enum KnownExportFormat { - /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ - Swagger = "swagger-link", - /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link", - /** Export the Api Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ - Openapi = "openapi-link", - /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ - OpenapiJson = "openapi+json-link", -} - -/** - * Defines values for ExportFormat. \ - * {@link KnownExportFormat} can be used interchangeably with ExportFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **swagger-link**: Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. \ - * **wsdl-link**: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` \ - * **wadl-link**: Export the Api Definition in WADL Schema to Storage Blob. \ - * **openapi-link**: Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. \ - * **openapi+json-link**: Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. - */ -export type ExportFormat = string; - -/** Known values of {@link ExportApi} that the service accepts. */ -export enum KnownExportApi { - /** True */ - True = "true", -} - -/** - * Defines values for ExportApi. \ - * {@link KnownExportApi} can be used interchangeably with ExportApi, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true** - */ -export type ExportApi = string; - -/** Known values of {@link ExportResultFormat} that the service accepts. */ -export enum KnownExportResultFormat { - /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ - Swagger = "swagger-link-json", - /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ - Wsdl = "wsdl-link+xml", - /** Export the API Definition in WADL Schema to Storage Blob. */ - Wadl = "wadl-link-json", - /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ - OpenApi = "openapi-link", -} - -/** - * Defines values for ExportResultFormat. \ - * {@link KnownExportResultFormat} can be used interchangeably with ExportResultFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **swagger-link-json**: The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. \ - * **wsdl-link+xml**: The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` \ - * **wadl-link-json**: Export the API Definition in WADL Schema to Storage Blob. \ - * **openapi-link**: Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. - */ -export type ExportResultFormat = string; - -/** Known values of {@link VersioningScheme} that the service accepts. */ -export enum KnownVersioningScheme { - /** The API Version is passed in a path segment. */ - Segment = "Segment", - /** The API Version is passed in a query parameter. */ - Query = "Query", - /** The API Version is passed in a HTTP header. */ - Header = "Header", -} - -/** - * Defines values for VersioningScheme. \ - * {@link KnownVersioningScheme} can be used interchangeably with VersioningScheme, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Segment**: The API Version is passed in a path segment. \ - * **Query**: The API Version is passed in a query parameter. \ - * **Header**: The API Version is passed in a HTTP header. - */ -export type VersioningScheme = string; - -/** Known values of {@link AuthorizationType} that the service accepts. */ -export enum KnownAuthorizationType { - /** OAuth2 authorization type */ - OAuth2 = "OAuth2", -} - -/** - * Defines values for AuthorizationType. \ - * {@link KnownAuthorizationType} can be used interchangeably with AuthorizationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **OAuth2**: OAuth2 authorization type - */ -export type AuthorizationType = string; - -/** Known values of {@link OAuth2GrantType} that the service accepts. */ -export enum KnownOAuth2GrantType { - /** Authorization Code grant */ - AuthorizationCode = "AuthorizationCode", - /** Client Credential grant */ - ClientCredentials = "ClientCredentials", -} - -/** - * Defines values for OAuth2GrantType. \ - * {@link KnownOAuth2GrantType} can be used interchangeably with OAuth2GrantType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AuthorizationCode**: Authorization Code grant \ - * **ClientCredentials**: Client Credential grant - */ -export type OAuth2GrantType = string; - -/** Known values of {@link GrantType} that the service accepts. */ -export enum KnownGrantType { - /** Authorization Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.1. */ - AuthorizationCode = "authorizationCode", - /** Implicit Code Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.2. */ - Implicit = "implicit", - /** Resource Owner Password Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.3. */ - ResourceOwnerPassword = "resourceOwnerPassword", - /** Client Credentials Grant flow as described https:\//tools.ietf.org\/html\/rfc6749#section-4.4. */ - ClientCredentials = "clientCredentials", -} - -/** - * Defines values for GrantType. \ - * {@link KnownGrantType} can be used interchangeably with GrantType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **authorizationCode**: Authorization Code Grant flow as described https:\/\/tools.ietf.org\/html\/rfc6749#section-4.1. \ - * **implicit**: Implicit Code Grant flow as described https:\/\/tools.ietf.org\/html\/rfc6749#section-4.2. \ - * **resourceOwnerPassword**: Resource Owner Password Grant flow as described https:\/\/tools.ietf.org\/html\/rfc6749#section-4.3. \ - * **clientCredentials**: Client Credentials Grant flow as described https:\/\/tools.ietf.org\/html\/rfc6749#section-4.4. - */ -export type GrantType = string; - -/** Known values of {@link ClientAuthenticationMethod} that the service accepts. */ -export enum KnownClientAuthenticationMethod { - /** Basic Client Authentication method. */ - Basic = "Basic", - /** Body based Authentication method. */ - Body = "Body", -} - -/** - * Defines values for ClientAuthenticationMethod. \ - * {@link KnownClientAuthenticationMethod} can be used interchangeably with ClientAuthenticationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Basic**: Basic Client Authentication method. \ - * **Body**: Body based Authentication method. - */ -export type ClientAuthenticationMethod = string; - -/** Known values of {@link BearerTokenSendingMethod} that the service accepts. */ -export enum KnownBearerTokenSendingMethod { - /** AuthorizationHeader */ - AuthorizationHeader = "authorizationHeader", - /** Query */ - Query = "query", -} - -/** - * Defines values for BearerTokenSendingMethod. \ - * {@link KnownBearerTokenSendingMethod} can be used interchangeably with BearerTokenSendingMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **authorizationHeader** \ - * **query** - */ -export type BearerTokenSendingMethod = string; - -/** Known values of {@link BackendProtocol} that the service accepts. */ -export enum KnownBackendProtocol { - /** The Backend is a RESTful service. */ - Http = "http", - /** The Backend is a SOAP service. */ - Soap = "soap", -} - -/** - * Defines values for BackendProtocol. \ - * {@link KnownBackendProtocol} can be used interchangeably with BackendProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **http**: The Backend is a RESTful service. \ - * **soap**: The Backend is a SOAP service. - */ -export type BackendProtocol = string; - -/** Known values of {@link BackendType} that the service accepts. */ -export enum KnownBackendType { - /** supports single backend */ - Single = "Single", - /** supports pool backend */ - Pool = "Pool", -} - -/** - * Defines values for BackendType. \ - * {@link KnownBackendType} can be used interchangeably with BackendType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Single**: supports single backend \ - * **Pool**: supports pool backend - */ -export type BackendType = string; - -/** Known values of {@link PreferredIPVersion} that the service accepts. */ -export enum KnownPreferredIPVersion { - /** IPv4 */ - IPv4 = "IPv4", -} - -/** - * Defines values for PreferredIPVersion. \ - * {@link KnownPreferredIPVersion} can be used interchangeably with PreferredIPVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **IPv4** - */ -export type PreferredIPVersion = string; - -/** Known values of {@link ConnectivityCheckProtocol} that the service accepts. */ -export enum KnownConnectivityCheckProtocol { - /** TCP */ - TCP = "TCP", - /** Http */ - Http = "HTTP", - /** Https */ - Https = "HTTPS", -} - -/** - * Defines values for ConnectivityCheckProtocol. \ - * {@link KnownConnectivityCheckProtocol} can be used interchangeably with ConnectivityCheckProtocol, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **TCP** \ - * **HTTP** \ - * **HTTPS** - */ -export type ConnectivityCheckProtocol = string; - -/** Known values of {@link Method} that the service accepts. */ -export enum KnownMethod { - /** GET */ - GET = "GET", - /** Post */ - Post = "POST", -} - -/** - * Defines values for Method. \ - * {@link KnownMethod} can be used interchangeably with Method, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GET** \ - * **POST** - */ -export type Method = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** Local */ - Local = "Local", - /** Inbound */ - Inbound = "Inbound", - /** Outbound */ - Outbound = "Outbound", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Local** \ - * **Inbound** \ - * **Outbound** - */ -export type Origin = string; - -/** Known values of {@link Severity} that the service accepts. */ -export enum KnownSeverity { - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", -} - -/** - * Defines values for Severity. \ - * {@link KnownSeverity} can be used interchangeably with Severity, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Warning** - */ -export type Severity = string; - -/** Known values of {@link IssueType} that the service accepts. */ -export enum KnownIssueType { - /** Unknown */ - Unknown = "Unknown", - /** AgentStopped */ - AgentStopped = "AgentStopped", - /** GuestFirewall */ - GuestFirewall = "GuestFirewall", - /** DnsResolution */ - DnsResolution = "DnsResolution", - /** SocketBind */ - SocketBind = "SocketBind", - /** NetworkSecurityRule */ - NetworkSecurityRule = "NetworkSecurityRule", - /** UserDefinedRoute */ - UserDefinedRoute = "UserDefinedRoute", - /** PortThrottled */ - PortThrottled = "PortThrottled", - /** Platform */ - Platform = "Platform", -} - -/** - * Defines values for IssueType. \ - * {@link KnownIssueType} can be used interchangeably with IssueType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **AgentStopped** \ - * **GuestFirewall** \ - * **DnsResolution** \ - * **SocketBind** \ - * **NetworkSecurityRule** \ - * **UserDefinedRoute** \ - * **PortThrottled** \ - * **Platform** - */ -export type IssueType = string; - -/** Known values of {@link ConnectionStatus} that the service accepts. */ -export enum KnownConnectionStatus { - /** Unknown */ - Unknown = "Unknown", - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected", - /** Degraded */ - Degraded = "Degraded", -} - -/** - * Defines values for ConnectionStatus. \ - * {@link KnownConnectionStatus} can be used interchangeably with ConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Connected** \ - * **Disconnected** \ - * **Degraded** - */ -export type ConnectionStatus = string; - -/** Known values of {@link SkuType} that the service accepts. */ -export enum KnownSkuType { - /** Developer SKU of Api Management. */ - Developer = "Developer", - /** Standard SKU of Api Management. */ - Standard = "Standard", - /** Premium SKU of Api Management. */ - Premium = "Premium", - /** Basic SKU of Api Management. */ - Basic = "Basic", - /** Consumption SKU of Api Management. */ - Consumption = "Consumption", - /** Isolated SKU of Api Management. */ - Isolated = "Isolated", - /** BasicV2 SKU of Api Management. */ - BasicV2 = "BasicV2", - /** StandardV2 SKU of Api Management. */ - StandardV2 = "StandardV2", -} - -/** - * Defines values for SkuType. \ - * {@link KnownSkuType} can be used interchangeably with SkuType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Developer**: Developer SKU of Api Management. \ - * **Standard**: Standard SKU of Api Management. \ - * **Premium**: Premium SKU of Api Management. \ - * **Basic**: Basic SKU of Api Management. \ - * **Consumption**: Consumption SKU of Api Management. \ - * **Isolated**: Isolated SKU of Api Management. \ - * **BasicV2**: BasicV2 SKU of Api Management. \ - * **StandardV2**: StandardV2 SKU of Api Management. - */ -export type SkuType = string; - -/** Known values of {@link ResourceSkuCapacityScaleType} that the service accepts. */ -export enum KnownResourceSkuCapacityScaleType { - /** Supported scale type automatic. */ - Automatic = "automatic", - /** Supported scale type manual. */ - Manual = "manual", - /** Scaling not supported. */ - None = "none", -} - -/** - * Defines values for ResourceSkuCapacityScaleType. \ - * {@link KnownResourceSkuCapacityScaleType} can be used interchangeably with ResourceSkuCapacityScaleType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **automatic**: Supported scale type automatic. \ - * **manual**: Supported scale type manual. \ - * **none**: Scaling not supported. - */ -export type ResourceSkuCapacityScaleType = string; - -/** Known values of {@link AccessType} that the service accepts. */ -export enum KnownAccessType { - /** Use access key. */ - AccessKey = "AccessKey", - /** Use system assigned managed identity. */ - SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", - /** Use user assigned managed identity. */ - UserAssignedManagedIdentity = "UserAssignedManagedIdentity", -} - -/** - * Defines values for AccessType. \ - * {@link KnownAccessType} can be used interchangeably with AccessType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AccessKey**: Use access key. \ - * **SystemAssignedManagedIdentity**: Use system assigned managed identity. \ - * **UserAssignedManagedIdentity**: Use user assigned managed identity. - */ -export type AccessType = string; - -/** Known values of {@link HostnameType} that the service accepts. */ -export enum KnownHostnameType { - /** Proxy */ - Proxy = "Proxy", - /** Portal */ - Portal = "Portal", - /** Management */ - Management = "Management", - /** Scm */ - Scm = "Scm", - /** DeveloperPortal */ - DeveloperPortal = "DeveloperPortal", - /** ConfigurationApi */ - ConfigurationApi = "ConfigurationApi", -} - -/** - * Defines values for HostnameType. \ - * {@link KnownHostnameType} can be used interchangeably with HostnameType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Proxy** \ - * **Portal** \ - * **Management** \ - * **Scm** \ - * **DeveloperPortal** \ - * **ConfigurationApi** - */ -export type HostnameType = string; - -/** Known values of {@link CertificateSource} that the service accepts. */ -export enum KnownCertificateSource { - /** Managed */ - Managed = "Managed", - /** KeyVault */ - KeyVault = "KeyVault", - /** Custom */ - Custom = "Custom", - /** BuiltIn */ - BuiltIn = "BuiltIn", -} - -/** - * Defines values for CertificateSource. \ - * {@link KnownCertificateSource} can be used interchangeably with CertificateSource, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Managed** \ - * **KeyVault** \ - * **Custom** \ - * **BuiltIn** - */ -export type CertificateSource = string; - -/** Known values of {@link CertificateStatus} that the service accepts. */ -export enum KnownCertificateStatus { - /** Completed */ - Completed = "Completed", - /** Failed */ - Failed = "Failed", - /** InProgress */ - InProgress = "InProgress", -} - -/** - * Defines values for CertificateStatus. \ - * {@link KnownCertificateStatus} can be used interchangeably with CertificateStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Completed** \ - * **Failed** \ - * **InProgress** - */ -export type CertificateStatus = string; - -/** Known values of {@link PublicNetworkAccess} that the service accepts. */ -export enum KnownPublicNetworkAccess { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled", -} - -/** - * Defines values for PublicNetworkAccess. \ - * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type PublicNetworkAccess = string; - -/** Known values of {@link LegacyApiState} that the service accepts. */ -export enum KnownLegacyApiState { - /** Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to it. */ - Enabled = "Enabled", - /** Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect to it. */ - Disabled = "Disabled", -} - -/** - * Defines values for LegacyApiState. \ - * {@link KnownLegacyApiState} can be used interchangeably with LegacyApiState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to it. \ - * **Disabled**: Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect to it. - */ -export type LegacyApiState = string; - -/** Known values of {@link NatGatewayState} that the service accepts. */ -export enum KnownNatGatewayState { - /** Nat Gateway is enabled for the service. */ - Enabled = "Enabled", - /** Nat Gateway is disabled for the service. */ - Disabled = "Disabled", -} - -/** - * Defines values for NatGatewayState. \ - * {@link KnownNatGatewayState} can be used interchangeably with NatGatewayState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: Nat Gateway is enabled for the service. \ - * **Disabled**: Nat Gateway is disabled for the service. - */ -export type NatGatewayState = string; - -/** Known values of {@link PlatformVersion} that the service accepts. */ -export enum KnownPlatformVersion { - /** Platform version cannot be determined, as compute platform is not deployed. */ - Undetermined = "undetermined", - /** Platform running the service on Single Tenant V1 platform. */ - Stv1 = "stv1", - /** Platform running the service on Single Tenant V2 platform. */ - Stv2 = "stv2", - /** Platform running the service on Multi Tenant V1 platform. */ - Mtv1 = "mtv1", - /** Platform running the service on Single Tenant V2 platform on newer Hardware. */ - Stv21 = "stv2.1", -} - -/** - * Defines values for PlatformVersion. \ - * {@link KnownPlatformVersion} can be used interchangeably with PlatformVersion, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **undetermined**: Platform version cannot be determined, as compute platform is not deployed. \ - * **stv1**: Platform running the service on Single Tenant V1 platform. \ - * **stv2**: Platform running the service on Single Tenant V2 platform. \ - * **mtv1**: Platform running the service on Multi Tenant V1 platform. \ - * **stv2.1**: Platform running the service on Single Tenant V2 platform on newer Hardware. - */ -export type PlatformVersion = string; - -/** Known values of {@link CertificateConfigurationStoreName} that the service accepts. */ -export enum KnownCertificateConfigurationStoreName { - /** CertificateAuthority */ - CertificateAuthority = "CertificateAuthority", - /** Root */ - Root = "Root", -} - -/** - * Defines values for CertificateConfigurationStoreName. \ - * {@link KnownCertificateConfigurationStoreName} can be used interchangeably with CertificateConfigurationStoreName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **CertificateAuthority** \ - * **Root** - */ -export type CertificateConfigurationStoreName = string; - -/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ -export enum KnownPrivateEndpointServiceConnectionStatus { - /** Pending */ - Pending = "Pending", - /** Approved */ - Approved = "Approved", - /** Rejected */ - Rejected = "Rejected", -} - -/** - * Defines values for PrivateEndpointServiceConnectionStatus. \ - * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pending** \ - * **Approved** \ - * **Rejected** - */ -export type PrivateEndpointServiceConnectionStatus = string; - -/** Known values of {@link LegacyPortalStatus} that the service accepts. */ -export enum KnownLegacyPortalStatus { - /** Legacy Portal is enabled for the service. */ - Enabled = "Enabled", - /** Legacy Portal is disabled for the service. */ - Disabled = "Disabled", -} - -/** - * Defines values for LegacyPortalStatus. \ - * {@link KnownLegacyPortalStatus} can be used interchangeably with LegacyPortalStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: Legacy Portal is enabled for the service. \ - * **Disabled**: Legacy Portal is disabled for the service. - */ -export type LegacyPortalStatus = string; - -/** Known values of {@link DeveloperPortalStatus} that the service accepts. */ -export enum KnownDeveloperPortalStatus { - /** Developer Portal is enabled for the service. */ - Enabled = "Enabled", - /** Developer Portal is disabled for the service. */ - Disabled = "Disabled", -} - -/** - * Defines values for DeveloperPortalStatus. \ - * {@link KnownDeveloperPortalStatus} can be used interchangeably with DeveloperPortalStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled**: Developer Portal is enabled for the service. \ - * **Disabled**: Developer Portal is disabled for the service. - */ -export type DeveloperPortalStatus = string; - -/** Known values of {@link ApimIdentityType} that the service accepts. */ -export enum KnownApimIdentityType { - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", - /** None */ - None = "None", -} - -/** - * Defines values for ApimIdentityType. \ - * {@link KnownApimIdentityType} can be used interchangeably with ApimIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned, UserAssigned** \ - * **None** - */ -export type ApimIdentityType = string; - -/** Known values of {@link MigrateToStv2Mode} that the service accepts. */ -export enum KnownMigrateToStv2Mode { - /** Migrate API Management service to stv2 from stv1, by reserving the IP Address of the service. This will have a downtime of upto 15 minutes, while the IP address is getting migrate to new infrastructure. */ - PreserveIp = "PreserveIp", - /** Migrate API Management service to stv2 from stv1. This will have no downtime as the service configuration will be migrated to new infrastructure, but the IP address will changed. */ - NewIP = "NewIP", -} - -/** - * Defines values for MigrateToStv2Mode. \ - * {@link KnownMigrateToStv2Mode} can be used interchangeably with MigrateToStv2Mode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PreserveIp**: Migrate API Management service to stv2 from stv1, by reserving the IP Address of the service. This will have a downtime of upto 15 minutes, while the IP address is getting migrate to new infrastructure. \ - * **NewIP**: Migrate API Management service to stv2 from stv1. This will have no downtime as the service configuration will be migrated to new infrastructure, but the IP address will changed. - */ -export type MigrateToStv2Mode = string; - -/** Known values of {@link TemplateName} that the service accepts. */ -export enum KnownTemplateName { - /** ApplicationApprovedNotificationMessage */ - ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", - /** AccountClosedDeveloper */ - AccountClosedDeveloper = "accountClosedDeveloper", - /** QuotaLimitApproachingDeveloperNotificationMessage */ - QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", - /** NewDeveloperNotificationMessage */ - NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", - /** EmailChangeIdentityDefault */ - EmailChangeIdentityDefault = "emailChangeIdentityDefault", - /** InviteUserNotificationMessage */ - InviteUserNotificationMessage = "inviteUserNotificationMessage", - /** NewCommentNotificationMessage */ - NewCommentNotificationMessage = "newCommentNotificationMessage", - /** ConfirmSignUpIdentityDefault */ - ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", - /** NewIssueNotificationMessage */ - NewIssueNotificationMessage = "newIssueNotificationMessage", - /** PurchaseDeveloperNotificationMessage */ - PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", - /** PasswordResetIdentityDefault */ - PasswordResetIdentityDefault = "passwordResetIdentityDefault", - /** PasswordResetByAdminNotificationMessage */ - PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", - /** RejectDeveloperNotificationMessage */ - RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", - /** RequestDeveloperNotificationMessage */ - RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage", -} - -/** - * Defines values for TemplateName. \ - * {@link KnownTemplateName} can be used interchangeably with TemplateName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **applicationApprovedNotificationMessage** \ - * **accountClosedDeveloper** \ - * **quotaLimitApproachingDeveloperNotificationMessage** \ - * **newDeveloperNotificationMessage** \ - * **emailChangeIdentityDefault** \ - * **inviteUserNotificationMessage** \ - * **newCommentNotificationMessage** \ - * **confirmSignUpIdentityDefault** \ - * **newIssueNotificationMessage** \ - * **purchaseDeveloperNotificationMessage** \ - * **passwordResetIdentityDefault** \ - * **passwordResetByAdminNotificationMessage** \ - * **rejectDeveloperNotificationMessage** \ - * **requestDeveloperNotificationMessage** - */ -export type TemplateName = string; - -/** Known values of {@link GatewayListDebugCredentialsContractPurpose} that the service accepts. */ -export enum KnownGatewayListDebugCredentialsContractPurpose { - /** The tracing purpose. */ - Tracing = "tracing", -} - -/** - * Defines values for GatewayListDebugCredentialsContractPurpose. \ - * {@link KnownGatewayListDebugCredentialsContractPurpose} can be used interchangeably with GatewayListDebugCredentialsContractPurpose, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **tracing**: The tracing purpose. - */ -export type GatewayListDebugCredentialsContractPurpose = string; - -/** Known values of {@link UserState} that the service accepts. */ -export enum KnownUserState { - /** User state is active. */ - Active = "active", - /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ - Blocked = "blocked", - /** User account is pending. Requires identity confirmation before it can be made active. */ - Pending = "pending", - /** User account is closed. All identities and related entities are removed. */ - Deleted = "deleted", -} - -/** - * Defines values for UserState. \ - * {@link KnownUserState} can be used interchangeably with UserState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **active**: User state is active. \ - * **blocked**: User is blocked. Blocked users cannot authenticate at developer portal or call API. \ - * **pending**: User account is pending. Requires identity confirmation before it can be made active. \ - * **deleted**: User account is closed. All identities and related entities are removed. - */ -export type UserState = string; - -/** Known values of {@link IdentityProviderType} that the service accepts. */ -export enum KnownIdentityProviderType { - /** Facebook as Identity provider. */ - Facebook = "facebook", - /** Google as Identity provider. */ - Google = "google", - /** Microsoft Live as Identity provider. */ - Microsoft = "microsoft", - /** Twitter as Identity provider. */ - Twitter = "twitter", - /** Azure Active Directory as Identity provider. */ - Aad = "aad", - /** Azure Active Directory B2C as Identity provider. */ - AadB2C = "aadB2C", -} - -/** - * Defines values for IdentityProviderType. \ - * {@link KnownIdentityProviderType} can be used interchangeably with IdentityProviderType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **facebook**: Facebook as Identity provider. \ - * **google**: Google as Identity provider. \ - * **microsoft**: Microsoft Live as Identity provider. \ - * **twitter**: Twitter as Identity provider. \ - * **aad**: Azure Active Directory as Identity provider. \ - * **aadB2C**: Azure Active Directory B2C as Identity provider. - */ -export type IdentityProviderType = string; - -/** Known values of {@link LoggerType} that the service accepts. */ -export enum KnownLoggerType { - /** Azure Event Hub as log destination. */ - AzureEventHub = "azureEventHub", - /** Azure Application Insights as log destination. */ - ApplicationInsights = "applicationInsights", - /** Azure Monitor */ - AzureMonitor = "azureMonitor", -} - -/** - * Defines values for LoggerType. \ - * {@link KnownLoggerType} can be used interchangeably with LoggerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **azureEventHub**: Azure Event Hub as log destination. \ - * **applicationInsights**: Azure Application Insights as log destination. \ - * **azureMonitor**: Azure Monitor - */ -export type LoggerType = string; - -/** Known values of {@link ConnectivityStatusType} that the service accepts. */ -export enum KnownConnectivityStatusType { - /** Initializing */ - Initializing = "initializing", - /** Success */ - Success = "success", - /** Failure */ - Failure = "failure", -} - -/** - * Defines values for ConnectivityStatusType. \ - * {@link KnownConnectivityStatusType} can be used interchangeably with ConnectivityStatusType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **initializing** \ - * **success** \ - * **failure** - */ -export type ConnectivityStatusType = string; - -/** Known values of {@link NotificationName} that the service accepts. */ -export enum KnownNotificationName { - /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ - RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", - /** The following email recipients and users will receive email notifications about new API product subscriptions. */ - PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ - NewApplicationNotificationMessage = "NewApplicationNotificationMessage", - /** The following recipients will receive blind carbon copies of all emails sent to developers. */ - BCC = "BCC", - /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ - NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", - /** The following email recipients and users will receive email notifications when developer closes his account. */ - AccountClosedPublisher = "AccountClosedPublisher", - /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ - QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage", -} - -/** - * Defines values for NotificationName. \ - * {@link KnownNotificationName} can be used interchangeably with NotificationName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **RequestPublisherNotificationMessage**: The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. \ - * **PurchasePublisherNotificationMessage**: The following email recipients and users will receive email notifications about new API product subscriptions. \ - * **NewApplicationNotificationMessage**: The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. \ - * **BCC**: The following recipients will receive blind carbon copies of all emails sent to developers. \ - * **NewIssuePublisherNotificationMessage**: The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. \ - * **AccountClosedPublisher**: The following email recipients and users will receive email notifications when developer closes his account. \ - * **QuotaLimitApproachingPublisherNotificationMessage**: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. - */ -export type NotificationName = string; - -/** Known values of {@link PolicyFragmentContentFormat} that the service accepts. */ -export enum KnownPolicyFragmentContentFormat { - /** The contents are inline and Content type is an XML document. */ - Xml = "xml", - /** The contents are inline and Content type is a non XML encoded policy document. */ - Rawxml = "rawxml", -} - -/** - * Defines values for PolicyFragmentContentFormat. \ - * {@link KnownPolicyFragmentContentFormat} can be used interchangeably with PolicyFragmentContentFormat, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **xml**: The contents are inline and Content type is an XML document. \ - * **rawxml**: The contents are inline and Content type is a non XML encoded policy document. - */ -export type PolicyFragmentContentFormat = string; - -/** Known values of {@link PolicyRestrictionRequireBase} that the service accepts. */ -export enum KnownPolicyRestrictionRequireBase { - /** The policy is required to have base policy */ - True = "true", - /** The policy does not require to have base policy */ - False = "false", -} - -/** - * Defines values for PolicyRestrictionRequireBase. \ - * {@link KnownPolicyRestrictionRequireBase} can be used interchangeably with PolicyRestrictionRequireBase, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: The policy is required to have base policy \ - * **false**: The policy does not require to have base policy - */ -export type PolicyRestrictionRequireBase = string; - -/** Known values of {@link PortalSettingsCspMode} that the service accepts. */ -export enum KnownPortalSettingsCspMode { - /** The browser will block requests not matching allowed origins. */ - Enabled = "enabled", - /** The browser will not apply the origin restrictions. */ - Disabled = "disabled", - /** The browser will report requests not matching allowed origins without blocking them. */ - ReportOnly = "reportOnly", -} - -/** - * Defines values for PortalSettingsCspMode. \ - * {@link KnownPortalSettingsCspMode} can be used interchangeably with PortalSettingsCspMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **enabled**: The browser will block requests not matching allowed origins. \ - * **disabled**: The browser will not apply the origin restrictions. \ - * **reportOnly**: The browser will report requests not matching allowed origins without blocking them. - */ -export type PortalSettingsCspMode = string; - -/** Known values of {@link PortalRevisionStatus} that the service accepts. */ -export enum KnownPortalRevisionStatus { - /** Portal's revision has been queued. */ - Pending = "pending", - /** Portal's revision is being published. */ - Publishing = "publishing", - /** Portal's revision publishing completed. */ - Completed = "completed", - /** Portal's revision publishing failed. */ - Failed = "failed", -} - -/** - * Defines values for PortalRevisionStatus. \ - * {@link KnownPortalRevisionStatus} can be used interchangeably with PortalRevisionStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **pending**: Portal's revision has been queued. \ - * **publishing**: Portal's revision is being published. \ - * **completed**: Portal's revision publishing completed. \ - * **failed**: Portal's revision publishing failed. - */ -export type PortalRevisionStatus = string; - -/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ -export enum KnownPrivateEndpointConnectionProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed", -} - -/** - * Defines values for PrivateEndpointConnectionProvisioningState. \ - * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Creating** \ - * **Deleting** \ - * **Failed** - */ -export type PrivateEndpointConnectionProvisioningState = string; - -/** Known values of {@link SchemaType} that the service accepts. */ -export enum KnownSchemaType { - /** XML schema type. */ - Xml = "xml", - /** Json schema type. */ - Json = "json", -} - -/** - * Defines values for SchemaType. \ - * {@link KnownSchemaType} can be used interchangeably with SchemaType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **xml**: XML schema type. \ - * **json**: Json schema type. - */ -export type SchemaType = string; - -/** Known values of {@link SettingsTypeName} that the service accepts. */ -export enum KnownSettingsTypeName { - /** Public */ - Public = "public", -} - -/** - * Defines values for SettingsTypeName. \ - * {@link KnownSettingsTypeName} can be used interchangeably with SettingsTypeName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **public** - */ -export type SettingsTypeName = string; - -/** Known values of {@link AppType} that the service accepts. */ -export enum KnownAppType { - /** User create request was sent by legacy developer portal. */ - Portal = "portal", - /** User create request was sent by new developer portal. */ - DeveloperPortal = "developerPortal", -} - -/** - * Defines values for AppType. \ - * {@link KnownAppType} can be used interchangeably with AppType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **portal**: User create request was sent by legacy developer portal. \ - * **developerPortal**: User create request was sent by new developer portal. - */ -export type AppType = string; - -/** Known values of {@link AccessIdName} that the service accepts. */ -export enum KnownAccessIdName { - /** Access */ - Access = "access", - /** GitAccess */ - GitAccess = "gitAccess", -} - -/** - * Defines values for AccessIdName. \ - * {@link KnownAccessIdName} can be used interchangeably with AccessIdName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **access** \ - * **gitAccess** - */ -export type AccessIdName = string; - -/** Known values of {@link ConfigurationIdName} that the service accepts. */ -export enum KnownConfigurationIdName { - /** Configuration */ - Configuration = "configuration", -} - -/** - * Defines values for ConfigurationIdName. \ - * {@link KnownConfigurationIdName} can be used interchangeably with ConfigurationIdName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **configuration** - */ -export type ConfigurationIdName = string; - -/** Known values of {@link Confirmation} that the service accepts. */ -export enum KnownConfirmation { - /** Send an e-mail to the user confirming they have successfully signed up. */ - Signup = "signup", - /** Send an e-mail inviting the user to sign-up and complete registration. */ - Invite = "invite", -} - -/** - * Defines values for Confirmation. \ - * {@link KnownConfirmation} can be used interchangeably with Confirmation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **signup**: Send an e-mail to the user confirming they have successfully signed up. \ - * **invite**: Send an e-mail inviting the user to sign-up and complete registration. - */ -export type Confirmation = string; - -/** Known values of {@link KeyVaultRefreshState} that the service accepts. */ -export enum KnownKeyVaultRefreshState { - /** Entities for which KeyVault refresh failed. */ - True = "true", - /** Entities for which KeyVault refresh succeeded */ - False = "false", -} - -/** - * Defines values for KeyVaultRefreshState. \ - * {@link KnownKeyVaultRefreshState} can be used interchangeably with KeyVaultRefreshState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **true**: Entities for which KeyVault refresh failed. \ - * **false**: Entities for which KeyVault refresh succeeded - */ -export type KeyVaultRefreshState = string; -/** Defines values for ProductState. */ -export type ProductState = "notPublished" | "published"; -/** Defines values for AuthorizationMethod. */ -export type AuthorizationMethod = - | "HEAD" - | "OPTIONS" - | "TRACE" - | "GET" - | "POST" - | "PUT" - | "PATCH" - | "DELETE"; -/** Defines values for NameAvailabilityReason. */ -export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; -/** Defines values for KeyType. */ -export type KeyType = "primary" | "secondary"; -/** Defines values for GroupType. */ -export type GroupType = "custom" | "system" | "external"; -/** Defines values for PolicyScopeContract. */ -export type PolicyScopeContract = - | "Tenant" - | "Product" - | "Api" - | "Operation" - | "All"; -/** Defines values for AsyncOperationStatus. */ -export type AsyncOperationStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; -/** Defines values for SubscriptionState. */ -export type SubscriptionState = - | "suspended" - | "active" - | "expired" - | "submitted" - | "rejected" - | "cancelled"; -/** Defines values for ApiManagementSkuCapacityScaleType. */ -export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; -/** Defines values for ApiManagementSkuRestrictionsType. */ -export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; -/** Defines values for ApiManagementSkuRestrictionsReasonCode. */ -export type ApiManagementSkuRestrictionsReasonCode = - | "QuotaId" - | "NotAvailableForSubscription"; -/** Defines values for AsyncResolverStatus. */ -export type AsyncResolverStatus = - | "Started" - | "InProgress" - | "Succeeded" - | "Failed"; - -/** Optional parameters. */ -export interface ApiGatewayCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiGatewayCreateOrUpdateResponse = ApiManagementGatewayResource; - -/** Optional parameters. */ -export interface ApiGatewayUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ApiGatewayUpdateResponse = ApiManagementGatewayResource; - -/** Optional parameters. */ -export interface ApiGatewayGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiGatewayGetResponse = ApiManagementGatewayResource; - -/** Optional parameters. */ -export interface ApiGatewayDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ApiGatewayDeleteResponse = ApiGatewayDeleteHeaders & - ApiManagementGatewayResource; - -/** Optional parameters. */ -export interface ApiGatewayListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ApiGatewayListByResourceGroupResponse = - ApiManagementGatewayListResult; - -/** Optional parameters. */ -export interface ApiGatewayListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApiGatewayListResponse = ApiManagementGatewayListResult; - -/** Optional parameters. */ -export interface ApiGatewayListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ApiGatewayListByResourceGroupNextResponse = - ApiManagementGatewayListResult; - -/** Optional parameters. */ -export interface ApiGatewayListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApiGatewayListNextResponse = ApiManagementGatewayListResult; - -/** Optional parameters. */ -export interface ApiManagementGatewaySkusListAvailableSkusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableSkus operation. */ -export type ApiManagementGatewaySkusListAvailableSkusResponse = - GatewayResourceSkuResults; - -/** Optional parameters. */ -export interface ApiManagementGatewaySkusListAvailableSkusNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableSkusNext operation. */ -export type ApiManagementGatewaySkusListAvailableSkusNextResponse = - GatewayResourceSkuResults; - -/** Optional parameters. */ -export interface AllPoliciesListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type AllPoliciesListByServiceResponse = AllPoliciesCollection; - -/** Optional parameters. */ -export interface AllPoliciesListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type AllPoliciesListByServiceNextResponse = AllPoliciesCollection; - -/** Optional parameters. */ -export interface ApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; - /** Include full ApiVersionSet resource in response */ - expandApiVersionSet?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type ApiListByServiceResponse = ApiCollection; - -/** Optional parameters. */ -export interface ApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiGetEntityTagResponse = ApiGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiGetResponse = ApiGetHeaders & ApiContract; - -/** Optional parameters. */ -export interface ApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiCreateOrUpdateResponse = ApiCreateOrUpdateHeaders & ApiContract; - -/** Optional parameters. */ -export interface ApiUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiUpdateResponse = ApiUpdateHeaders & ApiContract; - -/** Optional parameters. */ -export interface ApiDeleteOptionalParams extends coreClient.OperationOptions { - /** Delete all revisions of the Api. */ - deleteRevisions?: boolean; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ApiDeleteResponse = ApiDeleteHeaders; - -/** Optional parameters. */ -export interface ApiListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged APIs. */ - includeNotTaggedApis?: boolean; -} - -/** Contains response data for the listByTags operation. */ -export type ApiListByTagsResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface ApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiListByServiceNextResponse = ApiCollection; - -/** Optional parameters. */ -export interface ApiListByTagsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByTagsNext operation. */ -export type ApiListByTagsNextResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface ApiRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiRevisionListByServiceResponse = ApiRevisionCollection; - -/** Optional parameters. */ -export interface ApiRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiRevisionListByServiceNextResponse = ApiRevisionCollection; - -/** Optional parameters. */ -export interface ApiReleaseListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiReleaseListByServiceResponse = ApiReleaseCollection; - -/** Optional parameters. */ -export interface ApiReleaseGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiReleaseGetEntityTagResponse = ApiReleaseGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiReleaseGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiReleaseGetResponse = ApiReleaseGetHeaders & ApiReleaseContract; - -/** Optional parameters. */ -export interface ApiReleaseCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiReleaseCreateOrUpdateResponse = ApiReleaseCreateOrUpdateHeaders & - ApiReleaseContract; - -/** Optional parameters. */ -export interface ApiReleaseUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiReleaseUpdateResponse = ApiReleaseUpdateHeaders & - ApiReleaseContract; - -/** Optional parameters. */ -export interface ApiReleaseDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiReleaseListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiReleaseListByServiceNextResponse = ApiReleaseCollection; - -/** Optional parameters. */ -export interface ApiOperationListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; -} - -/** Contains response data for the listByApi operation. */ -export type ApiOperationListByApiResponse = OperationCollection; - -/** Optional parameters. */ -export interface ApiOperationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiOperationGetEntityTagResponse = ApiOperationGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiOperationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiOperationGetResponse = ApiOperationGetHeaders & - OperationContract; - -/** Optional parameters. */ -export interface ApiOperationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiOperationCreateOrUpdateResponse = - ApiOperationCreateOrUpdateHeaders & OperationContract; - -/** Optional parameters. */ -export interface ApiOperationUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiOperationUpdateResponse = ApiOperationUpdateHeaders & - OperationContract; - -/** Optional parameters. */ -export interface ApiOperationDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiOperationListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type ApiOperationListByApiNextResponse = OperationCollection; - -/** Optional parameters. */ -export interface ApiOperationPolicyListByOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByOperation operation. */ -export type ApiOperationPolicyListByOperationResponse = PolicyCollection; - -/** Optional parameters. */ -export interface ApiOperationPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiOperationPolicyGetEntityTagResponse = - ApiOperationPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiOperationPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type ApiOperationPolicyGetResponse = ApiOperationPolicyGetHeaders & - PolicyContract; - -/** Optional parameters. */ -export interface ApiOperationPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiOperationPolicyCreateOrUpdateResponse = - ApiOperationPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface ApiOperationPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagListByOperationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByOperation operation. */ -export type TagListByOperationResponse = TagCollection; - -/** Optional parameters. */ -export interface TagGetEntityStateByOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityStateByOperation operation. */ -export type TagGetEntityStateByOperationResponse = - TagGetEntityStateByOperationHeaders; - -/** Optional parameters. */ -export interface TagGetByOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByOperation operation. */ -export type TagGetByOperationResponse = TagGetByOperationHeaders & TagContract; - -/** Optional parameters. */ -export interface TagAssignToOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the assignToOperation operation. */ -export type TagAssignToOperationResponse = TagContract; - -/** Optional parameters. */ -export interface TagDetachFromOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByApi operation. */ -export type TagListByApiResponse = TagCollection; - -/** Optional parameters. */ -export interface TagGetEntityStateByApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityStateByApi operation. */ -export type TagGetEntityStateByApiResponse = TagGetEntityStateByApiHeaders; - -/** Optional parameters. */ -export interface TagGetByApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByApi operation. */ -export type TagGetByApiResponse = TagGetByApiHeaders & TagContract; - -/** Optional parameters. */ -export interface TagAssignToApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the assignToApi operation. */ -export type TagAssignToApiResponse = TagAssignToApiHeaders & TagContract; - -/** Optional parameters. */ -export interface TagDetachFromApiOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type TagListByProductResponse = TagCollection; - -/** Optional parameters. */ -export interface TagGetEntityStateByProductOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityStateByProduct operation. */ -export type TagGetEntityStateByProductResponse = - TagGetEntityStateByProductHeaders; - -/** Optional parameters. */ -export interface TagGetByProductOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByProduct operation. */ -export type TagGetByProductResponse = TagGetByProductHeaders & TagContract; - -/** Optional parameters. */ -export interface TagAssignToProductOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the assignToProduct operation. */ -export type TagAssignToProductResponse = TagContract; - -/** Optional parameters. */ -export interface TagDetachFromProductOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Scope like 'apis', 'products' or 'apis/{apiId} */ - scope?: string; -} - -/** Contains response data for the listByService operation. */ -export type TagListByServiceResponse = TagCollection; - -/** Optional parameters. */ -export interface TagGetEntityStateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityState operation. */ -export type TagGetEntityStateResponse = TagGetEntityStateHeaders; - -/** Optional parameters. */ -export interface TagGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TagGetResponse = TagGetHeaders & TagContract; - -/** Optional parameters. */ -export interface TagCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type TagCreateOrUpdateResponse = TagCreateOrUpdateHeaders & TagContract; - -/** Optional parameters. */ -export interface TagUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type TagUpdateResponse = TagUpdateHeaders & TagContract; - -/** Optional parameters. */ -export interface TagDeleteOptionalParams extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagListByOperationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByOperationNext operation. */ -export type TagListByOperationNextResponse = TagCollection; - -/** Optional parameters. */ -export interface TagListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type TagListByApiNextResponse = TagCollection; - -/** Optional parameters. */ -export interface TagListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type TagListByProductNextResponse = TagCollection; - -/** Optional parameters. */ -export interface TagListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type TagListByServiceNextResponse = TagCollection; - -/** Optional parameters. */ -export interface GraphQLApiResolverListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByApi operation. */ -export type GraphQLApiResolverListByApiResponse = ResolverCollection; - -/** Optional parameters. */ -export interface GraphQLApiResolverGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GraphQLApiResolverGetEntityTagResponse = - GraphQLApiResolverGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GraphQLApiResolverGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GraphQLApiResolverGetResponse = GraphQLApiResolverGetHeaders & - ResolverContract; - -/** Optional parameters. */ -export interface GraphQLApiResolverCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GraphQLApiResolverCreateOrUpdateResponse = - GraphQLApiResolverCreateOrUpdateHeaders & ResolverContract; - -/** Optional parameters. */ -export interface GraphQLApiResolverUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type GraphQLApiResolverUpdateResponse = GraphQLApiResolverUpdateHeaders & - ResolverContract; - -/** Optional parameters. */ -export interface GraphQLApiResolverDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GraphQLApiResolverListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type GraphQLApiResolverListByApiNextResponse = ResolverCollection; - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyListByResolverOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResolver operation. */ -export type GraphQLApiResolverPolicyListByResolverResponse = PolicyCollection; - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GraphQLApiResolverPolicyGetEntityTagResponse = - GraphQLApiResolverPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type GraphQLApiResolverPolicyGetResponse = - GraphQLApiResolverPolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GraphQLApiResolverPolicyCreateOrUpdateResponse = - GraphQLApiResolverPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GraphQLApiResolverPolicyListByResolverNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResolverNext operation. */ -export type GraphQLApiResolverPolicyListByResolverNextResponse = - PolicyCollection; - -/** Optional parameters. */ -export interface ApiProductListByApisOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByApis operation. */ -export type ApiProductListByApisResponse = ProductCollection; - -/** Optional parameters. */ -export interface ApiProductListByApisNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApisNext operation. */ -export type ApiProductListByApisNextResponse = ProductCollection; - -/** Optional parameters. */ -export interface ApiPolicyListByApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApi operation. */ -export type ApiPolicyListByApiResponse = PolicyCollection; - -/** Optional parameters. */ -export interface ApiPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiPolicyGetEntityTagResponse = ApiPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type ApiPolicyGetResponse = ApiPolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface ApiPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiPolicyCreateOrUpdateResponse = ApiPolicyCreateOrUpdateHeaders & - PolicyContract; - -/** Optional parameters. */ -export interface ApiPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiSchemaListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByApi operation. */ -export type ApiSchemaListByApiResponse = SchemaCollection; - -/** Optional parameters. */ -export interface ApiSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiSchemaGetEntityTagResponse = ApiSchemaGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiSchemaGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiSchemaGetResponse = ApiSchemaGetHeaders & SchemaContract; - -/** Optional parameters. */ -export interface ApiSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiSchemaCreateOrUpdateResponse = ApiSchemaCreateOrUpdateHeaders & - SchemaContract; - -/** Optional parameters. */ -export interface ApiSchemaDeleteOptionalParams - extends coreClient.OperationOptions { - /** If true removes all references to the schema before deleting it. */ - force?: boolean; -} - -/** Optional parameters. */ -export interface ApiSchemaListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type ApiSchemaListByApiNextResponse = SchemaCollection; - -/** Optional parameters. */ -export interface ApiDiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiDiagnosticListByServiceResponse = DiagnosticCollection; - -/** Optional parameters. */ -export interface ApiDiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiDiagnosticGetEntityTagResponse = - ApiDiagnosticGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiDiagnosticGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiDiagnosticGetResponse = ApiDiagnosticGetHeaders & - DiagnosticContract; - -/** Optional parameters. */ -export interface ApiDiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiDiagnosticCreateOrUpdateResponse = - ApiDiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface ApiDiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiDiagnosticUpdateResponse = ApiDiagnosticUpdateHeaders & - DiagnosticContract; - -/** Optional parameters. */ -export interface ApiDiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiDiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiDiagnosticListByServiceNextResponse = DiagnosticCollection; - -/** Optional parameters. */ -export interface ApiIssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type ApiIssueListByServiceResponse = IssueCollection; - -/** Optional parameters. */ -export interface ApiIssueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiIssueGetEntityTagResponse = ApiIssueGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiIssueGetOptionalParams extends coreClient.OperationOptions { - /** Expand the comment attachments. */ - expandCommentsAttachments?: boolean; -} - -/** Contains response data for the get operation. */ -export type ApiIssueGetResponse = ApiIssueGetHeaders & IssueContract; - -/** Optional parameters. */ -export interface ApiIssueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiIssueCreateOrUpdateResponse = ApiIssueCreateOrUpdateHeaders & - IssueContract; - -/** Optional parameters. */ -export interface ApiIssueUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiIssueUpdateResponse = ApiIssueUpdateHeaders & IssueContract; - -/** Optional parameters. */ -export interface ApiIssueDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiIssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiIssueListByServiceNextResponse = IssueCollection; - -/** Optional parameters. */ -export interface ApiIssueCommentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiIssueCommentListByServiceResponse = IssueCommentCollection; - -/** Optional parameters. */ -export interface ApiIssueCommentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiIssueCommentGetEntityTagResponse = - ApiIssueCommentGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiIssueCommentGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiIssueCommentGetResponse = ApiIssueCommentGetHeaders & - IssueCommentContract; - -/** Optional parameters. */ -export interface ApiIssueCommentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiIssueCommentCreateOrUpdateResponse = - ApiIssueCommentCreateOrUpdateHeaders & IssueCommentContract; - -/** Optional parameters. */ -export interface ApiIssueCommentDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiIssueCommentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiIssueCommentListByServiceNextResponse = IssueCommentCollection; - -/** Optional parameters. */ -export interface ApiIssueAttachmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiIssueAttachmentListByServiceResponse = IssueAttachmentCollection; - -/** Optional parameters. */ -export interface ApiIssueAttachmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiIssueAttachmentGetEntityTagResponse = - ApiIssueAttachmentGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiIssueAttachmentGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiIssueAttachmentGetResponse = ApiIssueAttachmentGetHeaders & - IssueAttachmentContract; - -/** Optional parameters. */ -export interface ApiIssueAttachmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiIssueAttachmentCreateOrUpdateResponse = - ApiIssueAttachmentCreateOrUpdateHeaders & IssueAttachmentContract; - -/** Optional parameters. */ -export interface ApiIssueAttachmentDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiIssueAttachmentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiIssueAttachmentListByServiceNextResponse = - IssueAttachmentCollection; - -/** Optional parameters. */ -export interface ApiTagDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiTagDescriptionListByServiceResponse = TagDescriptionCollection; - -/** Optional parameters. */ -export interface ApiTagDescriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiTagDescriptionGetEntityTagResponse = - ApiTagDescriptionGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiTagDescriptionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiTagDescriptionGetResponse = ApiTagDescriptionGetHeaders & - TagDescriptionContract; - -/** Optional parameters. */ -export interface ApiTagDescriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiTagDescriptionCreateOrUpdateResponse = - ApiTagDescriptionCreateOrUpdateHeaders & TagDescriptionContract; - -/** Optional parameters. */ -export interface ApiTagDescriptionDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiTagDescriptionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiTagDescriptionListByServiceNextResponse = - TagDescriptionCollection; - -/** Optional parameters. */ -export interface OperationListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Operations. */ - includeNotTaggedOperations?: boolean; -} - -/** Contains response data for the listByTags operation. */ -export type OperationListByTagsResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface OperationListByTagsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByTagsNext operation. */ -export type OperationListByTagsNextResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface ApiWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiWikiGetEntityTagResponse = ApiWikiGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiWikiGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiWikiGetResponse = ApiWikiGetHeaders & WikiContract; - -/** Optional parameters. */ -export interface ApiWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiWikiCreateOrUpdateResponse = ApiWikiCreateOrUpdateHeaders & - WikiContract; - -/** Optional parameters. */ -export interface ApiWikiUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiWikiUpdateResponse = ApiWikiUpdateHeaders & WikiContract; - -/** Optional parameters. */ -export interface ApiWikiDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type ApiWikisListResponse = WikiCollection; - -/** Optional parameters. */ -export interface ApiWikisListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApiWikisListNextResponse = WikiCollection; - -/** Optional parameters. */ -export interface ApiExportGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiExportGetResponse = ApiExportResult; - -/** Optional parameters. */ -export interface ApiVersionSetListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type ApiVersionSetListByServiceResponse = ApiVersionSetCollection; - -/** Optional parameters. */ -export interface ApiVersionSetGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ApiVersionSetGetEntityTagResponse = - ApiVersionSetGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ApiVersionSetGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiVersionSetGetResponse = ApiVersionSetGetHeaders & - ApiVersionSetContract; - -/** Optional parameters. */ -export interface ApiVersionSetCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiVersionSetCreateOrUpdateResponse = - ApiVersionSetCreateOrUpdateHeaders & ApiVersionSetContract; - -/** Optional parameters. */ -export interface ApiVersionSetUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ApiVersionSetUpdateResponse = ApiVersionSetUpdateHeaders & - ApiVersionSetContract; - -/** Optional parameters. */ -export interface ApiVersionSetDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ApiVersionSetListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiVersionSetListByServiceNextResponse = ApiVersionSetCollection; - -/** Optional parameters. */ -export interface AuthorizationProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type AuthorizationProviderListByServiceResponse = - AuthorizationProviderCollection; - -/** Optional parameters. */ -export interface AuthorizationProviderGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AuthorizationProviderGetResponse = AuthorizationProviderGetHeaders & - AuthorizationProviderContract; - -/** Optional parameters. */ -export interface AuthorizationProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AuthorizationProviderCreateOrUpdateResponse = - AuthorizationProviderCreateOrUpdateHeaders & AuthorizationProviderContract; - -/** Optional parameters. */ -export interface AuthorizationProviderDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AuthorizationProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type AuthorizationProviderListByServiceNextResponse = - AuthorizationProviderCollection; - -/** Optional parameters. */ -export interface AuthorizationListByAuthorizationProviderOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByAuthorizationProvider operation. */ -export type AuthorizationListByAuthorizationProviderResponse = - AuthorizationCollection; - -/** Optional parameters. */ -export interface AuthorizationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AuthorizationGetResponse = AuthorizationGetHeaders & - AuthorizationContract; - -/** Optional parameters. */ -export interface AuthorizationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AuthorizationCreateOrUpdateResponse = - AuthorizationCreateOrUpdateHeaders & AuthorizationContract; - -/** Optional parameters. */ -export interface AuthorizationDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AuthorizationConfirmConsentCodeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the confirmConsentCode operation. */ -export type AuthorizationConfirmConsentCodeResponse = - AuthorizationConfirmConsentCodeHeaders; - -/** Optional parameters. */ -export interface AuthorizationListByAuthorizationProviderNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAuthorizationProviderNext operation. */ -export type AuthorizationListByAuthorizationProviderNextResponse = - AuthorizationCollection; - -/** Optional parameters. */ -export interface AuthorizationLoginLinksPostOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the post operation. */ -export type AuthorizationLoginLinksPostResponse = - AuthorizationLoginLinksPostHeaders & AuthorizationLoginResponseContract; - -/** Optional parameters. */ -export interface AuthorizationAccessPolicyListByAuthorizationOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByAuthorization operation. */ -export type AuthorizationAccessPolicyListByAuthorizationResponse = - AuthorizationAccessPolicyCollection; - -/** Optional parameters. */ -export interface AuthorizationAccessPolicyGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AuthorizationAccessPolicyGetResponse = - AuthorizationAccessPolicyGetHeaders & AuthorizationAccessPolicyContract; - -/** Optional parameters. */ -export interface AuthorizationAccessPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AuthorizationAccessPolicyCreateOrUpdateResponse = - AuthorizationAccessPolicyCreateOrUpdateHeaders & - AuthorizationAccessPolicyContract; - -/** Optional parameters. */ -export interface AuthorizationAccessPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AuthorizationAccessPolicyListByAuthorizationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAuthorizationNext operation. */ -export type AuthorizationAccessPolicyListByAuthorizationNextResponse = - AuthorizationAccessPolicyCollection; - -/** Optional parameters. */ -export interface AuthorizationServerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type AuthorizationServerListByServiceResponse = - AuthorizationServerCollection; - -/** Optional parameters. */ -export interface AuthorizationServerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type AuthorizationServerGetEntityTagResponse = - AuthorizationServerGetEntityTagHeaders; - -/** Optional parameters. */ -export interface AuthorizationServerGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AuthorizationServerGetResponse = AuthorizationServerGetHeaders & - AuthorizationServerContract; - -/** Optional parameters. */ -export interface AuthorizationServerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AuthorizationServerCreateOrUpdateResponse = - AuthorizationServerCreateOrUpdateHeaders & AuthorizationServerContract; - -/** Optional parameters. */ -export interface AuthorizationServerUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type AuthorizationServerUpdateResponse = - AuthorizationServerUpdateHeaders & AuthorizationServerContract; - -/** Optional parameters. */ -export interface AuthorizationServerDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AuthorizationServerListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type AuthorizationServerListSecretsResponse = - AuthorizationServerListSecretsHeaders & AuthorizationServerSecretsContract; - -/** Optional parameters. */ -export interface AuthorizationServerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type AuthorizationServerListByServiceNextResponse = - AuthorizationServerCollection; - -/** Optional parameters. */ -export interface BackendListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type BackendListByServiceResponse = BackendCollection; - -/** Optional parameters. */ -export interface BackendGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type BackendGetEntityTagResponse = BackendGetEntityTagHeaders; - -/** Optional parameters. */ -export interface BackendGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type BackendGetResponse = BackendGetHeaders & BackendContract; - -/** Optional parameters. */ -export interface BackendCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type BackendCreateOrUpdateResponse = BackendCreateOrUpdateHeaders & - BackendContract; - -/** Optional parameters. */ -export interface BackendUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type BackendUpdateResponse = BackendUpdateHeaders & BackendContract; - -/** Optional parameters. */ -export interface BackendDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface BackendReconnectOptionalParams - extends coreClient.OperationOptions { - /** Reconnect request parameters. */ - parameters?: BackendReconnectContract; -} - -/** Optional parameters. */ -export interface BackendListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type BackendListByServiceNextResponse = BackendCollection; - -/** Optional parameters. */ -export interface CacheListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type CacheListByServiceResponse = CacheCollection; - -/** Optional parameters. */ -export interface CacheGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type CacheGetEntityTagResponse = CacheGetEntityTagHeaders; - -/** Optional parameters. */ -export interface CacheGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CacheGetResponse = CacheGetHeaders & CacheContract; - -/** Optional parameters. */ -export interface CacheCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type CacheCreateOrUpdateResponse = CacheCreateOrUpdateHeaders & - CacheContract; - -/** Optional parameters. */ -export interface CacheUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type CacheUpdateResponse = CacheUpdateHeaders & CacheContract; - -/** Optional parameters. */ -export interface CacheDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface CacheListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type CacheListByServiceNextResponse = CacheCollection; - -/** Optional parameters. */ -export interface CertificateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only certificates entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type CertificateListByServiceResponse = CertificateCollection; - -/** Optional parameters. */ -export interface CertificateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type CertificateGetEntityTagResponse = CertificateGetEntityTagHeaders; - -/** Optional parameters. */ -export interface CertificateGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type CertificateGetResponse = CertificateGetHeaders & - CertificateContract; - -/** Optional parameters. */ -export interface CertificateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type CertificateCreateOrUpdateResponse = - CertificateCreateOrUpdateHeaders & CertificateContract; - -/** Optional parameters. */ -export interface CertificateDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface CertificateRefreshSecretOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the refreshSecret operation. */ -export type CertificateRefreshSecretResponse = CertificateRefreshSecretHeaders & - CertificateContract; - -/** Optional parameters. */ -export interface CertificateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type CertificateListByServiceNextResponse = CertificateCollection; - -/** Optional parameters. */ -export interface PerformConnectivityCheckAsyncOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the performConnectivityCheckAsync operation. */ -export type PerformConnectivityCheckAsyncResponse = ConnectivityCheckResponse; - -/** Optional parameters. */ -export interface ContentTypeListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type ContentTypeListByServiceResponse = ContentTypeCollection; - -/** Optional parameters. */ -export interface ContentTypeGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ContentTypeGetResponse = ContentTypeGetHeaders & - ContentTypeContract; - -/** Optional parameters. */ -export interface ContentTypeCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ContentTypeCreateOrUpdateResponse = - ContentTypeCreateOrUpdateHeaders & ContentTypeContract; - -/** Optional parameters. */ -export interface ContentTypeDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ContentTypeListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ContentTypeListByServiceNextResponse = ContentTypeCollection; - -/** Optional parameters. */ -export interface ContentItemListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type ContentItemListByServiceResponse = ContentItemCollection; - -/** Optional parameters. */ -export interface ContentItemGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ContentItemGetEntityTagResponse = ContentItemGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ContentItemGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ContentItemGetResponse = ContentItemGetHeaders & - ContentItemContract; - -/** Optional parameters. */ -export interface ContentItemCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ContentItemCreateOrUpdateResponse = - ContentItemCreateOrUpdateHeaders & ContentItemContract; - -/** Optional parameters. */ -export interface ContentItemDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ContentItemListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ContentItemListByServiceNextResponse = ContentItemCollection; - -/** Optional parameters. */ -export interface DeletedServicesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type DeletedServicesListBySubscriptionResponse = - DeletedServicesCollection; - -/** Optional parameters. */ -export interface DeletedServicesGetByNameOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByName operation. */ -export type DeletedServicesGetByNameResponse = DeletedServiceContract; - -/** Optional parameters. */ -export interface DeletedServicesPurgeOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface DeletedServicesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type DeletedServicesListBySubscriptionNextResponse = - DeletedServicesCollection; - -/** Optional parameters. */ -export interface ApiManagementOperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApiManagementOperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface ApiManagementOperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApiManagementOperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface ApiManagementServiceSkusListAvailableServiceSkusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableServiceSkus operation. */ -export type ApiManagementServiceSkusListAvailableServiceSkusResponse = - ResourceSkuResults; - -/** Optional parameters. */ -export interface ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listAvailableServiceSkusNext operation. */ -export type ApiManagementServiceSkusListAvailableServiceSkusNextResponse = - ResourceSkuResults; - -/** Optional parameters. */ -export interface ApiManagementServiceRestoreOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the restore operation. */ -export type ApiManagementServiceRestoreResponse = ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceBackupOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the backup operation. */ -export type ApiManagementServiceBackupResponse = ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiManagementServiceCreateOrUpdateResponse = - ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ApiManagementServiceUpdateResponse = ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiManagementServiceGetResponse = ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ApiManagementServiceMigrateToStv2OptionalParams - extends coreClient.OperationOptions { - /** Optional parameters supplied to migrate service. */ - parameters?: MigrateToStv2Contract; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the migrateToStv2 operation. */ -export type ApiManagementServiceMigrateToStv2Response = - ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ApiManagementServiceListByResourceGroupResponse = - ApiManagementServiceListResult; - -/** Optional parameters. */ -export interface ApiManagementServiceListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApiManagementServiceListResponse = ApiManagementServiceListResult; - -/** Optional parameters. */ -export interface ApiManagementServiceGetSsoTokenOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSsoToken operation. */ -export type ApiManagementServiceGetSsoTokenResponse = - ApiManagementServiceGetSsoTokenResult; - -/** Optional parameters. */ -export interface ApiManagementServiceCheckNameAvailabilityOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkNameAvailability operation. */ -export type ApiManagementServiceCheckNameAvailabilityResponse = - ApiManagementServiceNameAvailabilityResult; - -/** Optional parameters. */ -export interface ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getDomainOwnershipIdentifier operation. */ -export type ApiManagementServiceGetDomainOwnershipIdentifierResponse = - ApiManagementServiceGetDomainOwnershipIdentifierResult; - -/** Optional parameters. */ -export interface ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams - extends coreClient.OperationOptions { - /** Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. */ - parameters?: ApiManagementServiceApplyNetworkConfigurationParameters; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the applyNetworkConfigurationUpdates operation. */ -export type ApiManagementServiceApplyNetworkConfigurationUpdatesResponse = - ApiManagementServiceResource; - -/** Optional parameters. */ -export interface ApiManagementServiceListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ApiManagementServiceListByResourceGroupNextResponse = - ApiManagementServiceListResult; - -/** Optional parameters. */ -export interface ApiManagementServiceListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApiManagementServiceListNextResponse = - ApiManagementServiceListResult; - -/** Optional parameters. */ -export interface DiagnosticListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type DiagnosticListByServiceResponse = DiagnosticCollection; - -/** Optional parameters. */ -export interface DiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type DiagnosticGetEntityTagResponse = DiagnosticGetEntityTagHeaders; - -/** Optional parameters. */ -export interface DiagnosticGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DiagnosticGetResponse = DiagnosticGetHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface DiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type DiagnosticCreateOrUpdateResponse = DiagnosticCreateOrUpdateHeaders & - DiagnosticContract; - -/** Optional parameters. */ -export interface DiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type DiagnosticUpdateResponse = DiagnosticUpdateHeaders & - DiagnosticContract; - -/** Optional parameters. */ -export interface DiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DiagnosticListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type DiagnosticListByServiceNextResponse = DiagnosticCollection; - -/** Optional parameters. */ -export interface DocumentationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type DocumentationListByServiceResponse = DocumentationCollection; - -/** Optional parameters. */ -export interface DocumentationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type DocumentationGetEntityTagResponse = - DocumentationGetEntityTagHeaders; - -/** Optional parameters. */ -export interface DocumentationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DocumentationGetResponse = DocumentationGetHeaders & - DocumentationContract; - -/** Optional parameters. */ -export interface DocumentationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type DocumentationCreateOrUpdateResponse = - DocumentationCreateOrUpdateHeaders & DocumentationContract; - -/** Optional parameters. */ -export interface DocumentationUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type DocumentationUpdateResponse = DocumentationUpdateHeaders & - DocumentationContract; - -/** Optional parameters. */ -export interface DocumentationDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DocumentationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type DocumentationListByServiceNextResponse = DocumentationCollection; - -/** Optional parameters. */ -export interface EmailTemplateListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type EmailTemplateListByServiceResponse = EmailTemplateCollection; - -/** Optional parameters. */ -export interface EmailTemplateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type EmailTemplateGetEntityTagResponse = - EmailTemplateGetEntityTagHeaders; - -/** Optional parameters. */ -export interface EmailTemplateGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type EmailTemplateGetResponse = EmailTemplateGetHeaders & - EmailTemplateContract; - -/** Optional parameters. */ -export interface EmailTemplateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type EmailTemplateCreateOrUpdateResponse = EmailTemplateContract; - -/** Optional parameters. */ -export interface EmailTemplateUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type EmailTemplateUpdateResponse = EmailTemplateUpdateHeaders & - EmailTemplateContract; - -/** Optional parameters. */ -export interface EmailTemplateDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface EmailTemplateListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type EmailTemplateListByServiceNextResponse = EmailTemplateCollection; - -/** Optional parameters. */ -export interface ApiGatewayConfigConnectionListByGatewayOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByGateway operation. */ -export type ApiGatewayConfigConnectionListByGatewayResponse = - ApiManagementGatewayConfigConnectionListResult; - -/** Optional parameters. */ -export interface ApiGatewayConfigConnectionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiGatewayConfigConnectionGetResponse = - ApiManagementGatewayConfigConnectionResource; - -/** Optional parameters. */ -export interface ApiGatewayConfigConnectionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ApiGatewayConfigConnectionCreateOrUpdateResponse = - ApiManagementGatewayConfigConnectionResource; - -/** Optional parameters. */ -export interface ApiGatewayConfigConnectionDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type ApiGatewayConfigConnectionDeleteResponse = - ApiGatewayConfigConnectionDeleteHeaders; - -/** Optional parameters. */ -export interface ApiGatewayConfigConnectionListByGatewayNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByGatewayNext operation. */ -export type ApiGatewayConfigConnectionListByGatewayNextResponse = - ApiManagementGatewayConfigConnectionListResult; - -/** Optional parameters. */ -export interface GatewayListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GatewayListByServiceResponse = GatewayCollection; - -/** Optional parameters. */ -export interface GatewayGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GatewayGetEntityTagResponse = GatewayGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GatewayGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GatewayGetResponse = GatewayGetHeaders & GatewayContract; - -/** Optional parameters. */ -export interface GatewayCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GatewayCreateOrUpdateResponse = GatewayCreateOrUpdateHeaders & - GatewayContract; - -/** Optional parameters. */ -export interface GatewayUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type GatewayUpdateResponse = GatewayUpdateHeaders & GatewayContract; - -/** Optional parameters. */ -export interface GatewayDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayListKeysOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listKeys operation. */ -export type GatewayListKeysResponse = GatewayListKeysHeaders & - GatewayKeysContract; - -/** Optional parameters. */ -export interface GatewayRegenerateKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayGenerateTokenOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the generateToken operation. */ -export type GatewayGenerateTokenResponse = GatewayTokenContract; - -/** Optional parameters. */ -export interface GatewayInvalidateDebugCredentialsOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayListDebugCredentialsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listDebugCredentials operation. */ -export type GatewayListDebugCredentialsResponse = - GatewayDebugCredentialsContract; - -/** Optional parameters. */ -export interface GatewayListTraceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listTrace operation. */ -export type GatewayListTraceResponse = { [propertyName: string]: any }; - -/** Optional parameters. */ -export interface GatewayListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GatewayListByServiceNextResponse = GatewayCollection; - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GatewayHostnameConfigurationListByServiceResponse = - GatewayHostnameConfigurationCollection; - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GatewayHostnameConfigurationGetEntityTagResponse = - GatewayHostnameConfigurationGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GatewayHostnameConfigurationGetResponse = - GatewayHostnameConfigurationGetHeaders & GatewayHostnameConfigurationContract; - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GatewayHostnameConfigurationCreateOrUpdateResponse = - GatewayHostnameConfigurationCreateOrUpdateHeaders & - GatewayHostnameConfigurationContract; - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayHostnameConfigurationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GatewayHostnameConfigurationListByServiceNextResponse = - GatewayHostnameConfigurationCollection; - -/** Optional parameters. */ -export interface GatewayApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GatewayApiListByServiceResponse = ApiCollection; - -/** Optional parameters. */ -export interface GatewayApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GatewayApiGetEntityTagResponse = GatewayApiGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GatewayApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Association entity details. */ - parameters?: AssociationContract; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GatewayApiCreateOrUpdateResponse = ApiContract; - -/** Optional parameters. */ -export interface GatewayApiDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GatewayApiListByServiceNextResponse = ApiCollection; - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GatewayCertificateAuthorityListByServiceResponse = - GatewayCertificateAuthorityCollection; - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GatewayCertificateAuthorityGetEntityTagResponse = - GatewayCertificateAuthorityGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GatewayCertificateAuthorityGetResponse = - GatewayCertificateAuthorityGetHeaders & GatewayCertificateAuthorityContract; - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GatewayCertificateAuthorityCreateOrUpdateResponse = - GatewayCertificateAuthorityCreateOrUpdateHeaders & - GatewayCertificateAuthorityContract; - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GatewayCertificateAuthorityListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GatewayCertificateAuthorityListByServiceNextResponse = - GatewayCertificateAuthorityCollection; - -/** Optional parameters. */ -export interface GroupListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GroupListByServiceResponse = GroupCollection; - -/** Optional parameters. */ -export interface GroupGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GroupGetEntityTagResponse = GroupGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GroupGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GroupGetResponse = GroupGetHeaders & GroupContract; - -/** Optional parameters. */ -export interface GroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GroupCreateOrUpdateResponse = GroupCreateOrUpdateHeaders & - GroupContract; - -/** Optional parameters. */ -export interface GroupUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type GroupUpdateResponse = GroupUpdateHeaders & GroupContract; - -/** Optional parameters. */ -export interface GroupDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GroupListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GroupListByServiceNextResponse = GroupCollection; - -/** Optional parameters. */ -export interface GroupUserListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type GroupUserListResponse = UserCollection; - -/** Optional parameters. */ -export interface GroupUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type GroupUserCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface GroupUserCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type GroupUserCreateResponse = UserContract; - -/** Optional parameters. */ -export interface GroupUserDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GroupUserListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type GroupUserListNextResponse = UserCollection; - -/** Optional parameters. */ -export interface IdentityProviderListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type IdentityProviderListByServiceResponse = IdentityProviderList; - -/** Optional parameters. */ -export interface IdentityProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type IdentityProviderGetEntityTagResponse = - IdentityProviderGetEntityTagHeaders; - -/** Optional parameters. */ -export interface IdentityProviderGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type IdentityProviderGetResponse = IdentityProviderGetHeaders & - IdentityProviderContract; - -/** Optional parameters. */ -export interface IdentityProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type IdentityProviderCreateOrUpdateResponse = - IdentityProviderCreateOrUpdateHeaders & IdentityProviderContract; - -/** Optional parameters. */ -export interface IdentityProviderUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type IdentityProviderUpdateResponse = IdentityProviderUpdateHeaders & - IdentityProviderContract; - -/** Optional parameters. */ -export interface IdentityProviderDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface IdentityProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type IdentityProviderListSecretsResponse = - IdentityProviderListSecretsHeaders & ClientSecretContract; - -/** Optional parameters. */ -export interface IdentityProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type IdentityProviderListByServiceNextResponse = IdentityProviderList; - -/** Optional parameters. */ -export interface IssueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type IssueListByServiceResponse = IssueCollection; - -/** Optional parameters. */ -export interface IssueGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type IssueGetResponse = IssueGetHeaders & IssueContract; - -/** Optional parameters. */ -export interface IssueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type IssueListByServiceNextResponse = IssueCollection; - -/** Optional parameters. */ -export interface LoggerListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type LoggerListByServiceResponse = LoggerCollection; - -/** Optional parameters. */ -export interface LoggerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type LoggerGetEntityTagResponse = LoggerGetEntityTagHeaders; - -/** Optional parameters. */ -export interface LoggerGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LoggerGetResponse = LoggerGetHeaders & LoggerContract; - -/** Optional parameters. */ -export interface LoggerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type LoggerCreateOrUpdateResponse = LoggerCreateOrUpdateHeaders & - LoggerContract; - -/** Optional parameters. */ -export interface LoggerUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type LoggerUpdateResponse = LoggerUpdateHeaders & LoggerContract; - -/** Optional parameters. */ -export interface LoggerDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface LoggerListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type LoggerListByServiceNextResponse = LoggerCollection; - -/** Optional parameters. */ -export interface NamedValueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only named value entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type NamedValueListByServiceResponse = NamedValueCollection; - -/** Optional parameters. */ -export interface NamedValueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type NamedValueGetEntityTagResponse = NamedValueGetEntityTagHeaders; - -/** Optional parameters. */ -export interface NamedValueGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NamedValueGetResponse = NamedValueGetHeaders & NamedValueContract; - -/** Optional parameters. */ -export interface NamedValueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type NamedValueCreateOrUpdateResponse = NamedValueCreateOrUpdateHeaders & - NamedValueContract; - -/** Optional parameters. */ -export interface NamedValueUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type NamedValueUpdateResponse = NamedValueUpdateHeaders & - NamedValueContract; - -/** Optional parameters. */ -export interface NamedValueDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface NamedValueListValueOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listValue operation. */ -export type NamedValueListValueResponse = NamedValueListValueHeaders & - NamedValueSecretContract; - -/** Optional parameters. */ -export interface NamedValueRefreshSecretOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the refreshSecret operation. */ -export type NamedValueRefreshSecretResponse = NamedValueRefreshSecretHeaders & - NamedValueContract; - -/** Optional parameters. */ -export interface NamedValueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type NamedValueListByServiceNextResponse = NamedValueCollection; - -/** Optional parameters. */ -export interface NetworkStatusListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type NetworkStatusListByServiceResponse = - NetworkStatusContractByLocation[]; - -/** Optional parameters. */ -export interface NetworkStatusListByLocationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByLocation operation. */ -export type NetworkStatusListByLocationResponse = NetworkStatusContract; - -/** Optional parameters. */ -export interface NotificationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type NotificationListByServiceResponse = NotificationCollection; - -/** Optional parameters. */ -export interface NotificationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type NotificationGetResponse = NotificationContract; - -/** Optional parameters. */ -export interface NotificationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type NotificationCreateOrUpdateResponse = NotificationContract; - -/** Optional parameters. */ -export interface NotificationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type NotificationListByServiceNextResponse = NotificationCollection; - -/** Optional parameters. */ -export interface NotificationRecipientUserListByNotificationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByNotification operation. */ -export type NotificationRecipientUserListByNotificationResponse = - RecipientUserCollection; - -/** Optional parameters. */ -export interface NotificationRecipientUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type NotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface NotificationRecipientUserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NotificationRecipientUserCreateOrUpdateResponse = - RecipientUserContract; - -/** Optional parameters. */ -export interface NotificationRecipientUserDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface NotificationRecipientEmailListByNotificationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByNotification operation. */ -export type NotificationRecipientEmailListByNotificationResponse = - RecipientEmailCollection; - -/** Optional parameters. */ -export interface NotificationRecipientEmailCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type NotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface NotificationRecipientEmailCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type NotificationRecipientEmailCreateOrUpdateResponse = - RecipientEmailContract; - -/** Optional parameters. */ -export interface NotificationRecipientEmailDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface OpenIdConnectProviderListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type OpenIdConnectProviderListByServiceResponse = - OpenIdConnectProviderCollection; - -/** Optional parameters. */ -export interface OpenIdConnectProviderGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type OpenIdConnectProviderGetEntityTagResponse = - OpenIdConnectProviderGetEntityTagHeaders; - -/** Optional parameters. */ -export interface OpenIdConnectProviderGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OpenIdConnectProviderGetResponse = OpenIdConnectProviderGetHeaders & - OpenidConnectProviderContract; - -/** Optional parameters. */ -export interface OpenIdConnectProviderCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type OpenIdConnectProviderCreateOrUpdateResponse = - OpenIdConnectProviderCreateOrUpdateHeaders & OpenidConnectProviderContract; - -/** Optional parameters. */ -export interface OpenIdConnectProviderUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type OpenIdConnectProviderUpdateResponse = - OpenIdConnectProviderUpdateHeaders & OpenidConnectProviderContract; - -/** Optional parameters. */ -export interface OpenIdConnectProviderDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface OpenIdConnectProviderListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type OpenIdConnectProviderListSecretsResponse = - OpenIdConnectProviderListSecretsHeaders & ClientSecretContract; - -/** Optional parameters. */ -export interface OpenIdConnectProviderListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type OpenIdConnectProviderListByServiceNextResponse = - OpenIdConnectProviderCollection; - -/** Optional parameters. */ -export interface OutboundNetworkDependenciesEndpointsListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type OutboundNetworkDependenciesEndpointsListByServiceResponse = - OutboundEnvironmentEndpointList; - -/** Optional parameters. */ -export interface PolicyListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type PolicyListByServiceResponse = PolicyCollection; - -/** Optional parameters. */ -export interface PolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type PolicyGetEntityTagResponse = PolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface PolicyGetOptionalParams extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type PolicyGetResponse = PolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface PolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PolicyCreateOrUpdateResponse = PolicyCreateOrUpdateHeaders & - PolicyContract; - -/** Optional parameters. */ -export interface PolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface PolicyListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type PolicyListByServiceNextResponse = PolicyCollection; - -/** Optional parameters. */ -export interface PolicyDescriptionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Policy scope. */ - scope?: PolicyScopeContract; -} - -/** Contains response data for the listByService operation. */ -export type PolicyDescriptionListByServiceResponse = - PolicyDescriptionCollection; - -/** Optional parameters. */ -export interface PolicyFragmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByService operation. */ -export type PolicyFragmentListByServiceResponse = PolicyFragmentCollection; - -/** Optional parameters. */ -export interface PolicyFragmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type PolicyFragmentGetEntityTagResponse = - PolicyFragmentGetEntityTagHeaders; - -/** Optional parameters. */ -export interface PolicyFragmentGetOptionalParams - extends coreClient.OperationOptions { - /** Policy fragment content format. */ - format?: PolicyFragmentContentFormat; -} - -/** Contains response data for the get operation. */ -export type PolicyFragmentGetResponse = PolicyFragmentGetHeaders & - PolicyFragmentContract; - -/** Optional parameters. */ -export interface PolicyFragmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PolicyFragmentCreateOrUpdateResponse = - PolicyFragmentCreateOrUpdateHeaders & PolicyFragmentContract; - -/** Optional parameters. */ -export interface PolicyFragmentDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface PolicyFragmentListReferencesOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listReferences operation. */ -export type PolicyFragmentListReferencesResponse = ResourceCollection; - -/** Optional parameters. */ -export interface PolicyFragmentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type PolicyFragmentListByServiceNextResponse = PolicyFragmentCollection; - -/** Optional parameters. */ -export interface PolicyRestrictionListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type PolicyRestrictionListByServiceResponse = - PolicyRestrictionCollection; - -/** Optional parameters. */ -export interface PolicyRestrictionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type PolicyRestrictionGetEntityTagResponse = - PolicyRestrictionGetEntityTagHeaders; - -/** Optional parameters. */ -export interface PolicyRestrictionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PolicyRestrictionGetResponse = PolicyRestrictionGetHeaders & - PolicyRestrictionContract; - -/** Optional parameters. */ -export interface PolicyRestrictionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PolicyRestrictionCreateOrUpdateResponse = - PolicyRestrictionCreateOrUpdateHeaders & PolicyRestrictionContract; - -/** Optional parameters. */ -export interface PolicyRestrictionUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type PolicyRestrictionUpdateResponse = PolicyRestrictionUpdateHeaders & - PolicyRestrictionContract; - -/** Optional parameters. */ -export interface PolicyRestrictionDeleteOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Optional parameters. */ -export interface PolicyRestrictionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type PolicyRestrictionListByServiceNextResponse = - PolicyRestrictionCollection; - -/** Optional parameters. */ -export interface PolicyRestrictionValidationsByServiceOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the byService operation. */ -export type PolicyRestrictionValidationsByServiceResponse = - OperationResultContract; - -/** Optional parameters. */ -export interface PortalConfigListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type PortalConfigListByServiceResponse = PortalConfigCollection; - -/** Optional parameters. */ -export interface PortalConfigGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type PortalConfigGetEntityTagResponse = PortalConfigGetEntityTagHeaders; - -/** Optional parameters. */ -export interface PortalConfigGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PortalConfigGetResponse = PortalConfigGetHeaders & - PortalConfigContract; - -/** Optional parameters. */ -export interface PortalConfigUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type PortalConfigUpdateResponse = PortalConfigContract; - -/** Optional parameters. */ -export interface PortalConfigCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type PortalConfigCreateOrUpdateResponse = PortalConfigContract; - -/** Optional parameters. */ -export interface PortalConfigListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type PortalConfigListByServiceNextResponse = PortalConfigCollection; - -/** Optional parameters. */ -export interface PortalRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** - * | Field | Supported operators | Supported functions | - * |-------------|------------------------|-----------------------------------| - * - * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| - * |isCurrent | eq, ne | | - * - */ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type PortalRevisionListByServiceResponse = PortalRevisionCollection; - -/** Optional parameters. */ -export interface PortalRevisionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type PortalRevisionGetEntityTagResponse = - PortalRevisionGetEntityTagHeaders; - -/** Optional parameters. */ -export interface PortalRevisionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PortalRevisionGetResponse = PortalRevisionGetHeaders & - PortalRevisionContract; - -/** Optional parameters. */ -export interface PortalRevisionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PortalRevisionCreateOrUpdateResponse = - PortalRevisionCreateOrUpdateHeaders & PortalRevisionContract; - -/** Optional parameters. */ -export interface PortalRevisionUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type PortalRevisionUpdateResponse = PortalRevisionUpdateHeaders & - PortalRevisionContract; - -/** Optional parameters. */ -export interface PortalRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type PortalRevisionListByServiceNextResponse = PortalRevisionCollection; - -/** Optional parameters. */ -export interface PortalSettingsListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type PortalSettingsListByServiceResponse = PortalSettingsCollection; - -/** Optional parameters. */ -export interface SignInSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type SignInSettingsGetEntityTagResponse = - SignInSettingsGetEntityTagHeaders; - -/** Optional parameters. */ -export interface SignInSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SignInSettingsGetResponse = SignInSettingsGetHeaders & - PortalSigninSettings; - -/** Optional parameters. */ -export interface SignInSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SignInSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type SignInSettingsCreateOrUpdateResponse = PortalSigninSettings; - -/** Optional parameters. */ -export interface SignUpSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type SignUpSettingsGetEntityTagResponse = - SignUpSettingsGetEntityTagHeaders; - -/** Optional parameters. */ -export interface SignUpSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SignUpSettingsGetResponse = SignUpSettingsGetHeaders & - PortalSignupSettings; - -/** Optional parameters. */ -export interface SignUpSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SignUpSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type SignUpSettingsCreateOrUpdateResponse = PortalSignupSettings; - -/** Optional parameters. */ -export interface DelegationSettingsGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type DelegationSettingsGetEntityTagResponse = - DelegationSettingsGetEntityTagHeaders; - -/** Optional parameters. */ -export interface DelegationSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DelegationSettingsGetResponse = DelegationSettingsGetHeaders & - PortalDelegationSettings; - -/** Optional parameters. */ -export interface DelegationSettingsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DelegationSettingsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type DelegationSettingsCreateOrUpdateResponse = PortalDelegationSettings; - -/** Optional parameters. */ -export interface DelegationSettingsListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type DelegationSettingsListSecretsResponse = - PortalSettingValidationKeyContract; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type PrivateEndpointConnectionListByServiceResponse = - PrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionGetByNameOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByName operation. */ -export type PrivateEndpointConnectionGetByNameResponse = - PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionCreateOrUpdateResponse = - PrivateEndpointConnection; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listPrivateLinkResources operation. */ -export type PrivateEndpointConnectionListPrivateLinkResourcesResponse = - PrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPrivateLinkResource operation. */ -export type PrivateEndpointConnectionGetPrivateLinkResourceResponse = - PrivateLinkResource; - -/** Optional parameters. */ -export interface ProductListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Products which are part of a specific tag. */ - tags?: string; - /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ - expandGroups?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type ProductListByServiceResponse = ProductCollection; - -/** Optional parameters. */ -export interface ProductGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ProductGetEntityTagResponse = ProductGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ProductGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ProductGetResponse = ProductGetHeaders & ProductContract; - -/** Optional parameters. */ -export interface ProductCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductCreateOrUpdateResponse = ProductCreateOrUpdateHeaders & - ProductContract; - -/** Optional parameters. */ -export interface ProductUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ProductUpdateResponse = ProductUpdateHeaders & ProductContract; - -/** Optional parameters. */ -export interface ProductDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete existing subscriptions associated with the product or not. */ - deleteSubscriptions?: boolean; -} - -/** Optional parameters. */ -export interface ProductListByTagsOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include not tagged Products. */ - includeNotTaggedProducts?: boolean; -} - -/** Contains response data for the listByTags operation. */ -export type ProductListByTagsResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface ProductListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ProductListByServiceNextResponse = ProductCollection; - -/** Optional parameters. */ -export interface ProductListByTagsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByTagsNext operation. */ -export type ProductListByTagsNextResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface ProductApiListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type ProductApiListByProductResponse = ApiCollection; - -/** Optional parameters. */ -export interface ProductApiCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type ProductApiCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface ProductApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductApiCreateOrUpdateResponse = ApiContract; - -/** Optional parameters. */ -export interface ProductApiDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductApiListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ProductApiListByProductNextResponse = ApiCollection; - -/** Optional parameters. */ -export interface ProductGroupListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type ProductGroupListByProductResponse = GroupCollection; - -/** Optional parameters. */ -export interface ProductGroupCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type ProductGroupCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface ProductGroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductGroupCreateOrUpdateResponse = GroupContract; - -/** Optional parameters. */ -export interface ProductGroupDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductGroupListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ProductGroupListByProductNextResponse = GroupCollection; - -/** Optional parameters. */ -export interface ProductSubscriptionsListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type ProductSubscriptionsListResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface ProductSubscriptionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ProductSubscriptionsListNextResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface ProductPolicyListByProductOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProduct operation. */ -export type ProductPolicyListByProductResponse = PolicyCollection; - -/** Optional parameters. */ -export interface ProductPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ProductPolicyGetEntityTagResponse = - ProductPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ProductPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type ProductPolicyGetResponse = ProductPolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface ProductPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductPolicyCreateOrUpdateResponse = - ProductPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface ProductPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductPolicyListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ProductPolicyListByProductNextResponse = PolicyCollection; - -/** Optional parameters. */ -export interface ProductWikiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type ProductWikiGetEntityTagResponse = ProductWikiGetEntityTagHeaders; - -/** Optional parameters. */ -export interface ProductWikiGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ProductWikiGetResponse = ProductWikiGetHeaders & WikiContract; - -/** Optional parameters. */ -export interface ProductWikiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductWikiCreateOrUpdateResponse = - ProductWikiCreateOrUpdateHeaders & WikiContract; - -/** Optional parameters. */ -export interface ProductWikiUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type ProductWikiUpdateResponse = ProductWikiUpdateHeaders & WikiContract; - -/** Optional parameters. */ -export interface ProductWikiDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductWikisListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | eq | contains |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type ProductWikisListResponse = ProductWikisListHeaders & WikiCollection; - -/** Optional parameters. */ -export interface ProductWikisListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ProductWikisListNextResponse = ProductWikisListNextHeaders & - WikiCollection; - -/** Optional parameters. */ -export interface ProductApiLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type ProductApiLinkListByProductResponse = ProductApiLinkCollection; - -/** Optional parameters. */ -export interface ProductApiLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ProductApiLinkGetResponse = ProductApiLinkGetHeaders & - ProductApiLinkContract; - -/** Optional parameters. */ -export interface ProductApiLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductApiLinkCreateOrUpdateResponse = ProductApiLinkContract; - -/** Optional parameters. */ -export interface ProductApiLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductApiLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ProductApiLinkListByProductNextResponse = ProductApiLinkCollection; - -/** Optional parameters. */ -export interface ProductGroupLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type ProductGroupLinkListByProductResponse = ProductGroupLinkCollection; - -/** Optional parameters. */ -export interface ProductGroupLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ProductGroupLinkGetResponse = ProductGroupLinkGetHeaders & - ProductGroupLinkContract; - -/** Optional parameters. */ -export interface ProductGroupLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ProductGroupLinkCreateOrUpdateResponse = ProductGroupLinkContract; - -/** Optional parameters. */ -export interface ProductGroupLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ProductGroupLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ProductGroupLinkListByProductNextResponse = - ProductGroupLinkCollection; - -/** Optional parameters. */ -export interface QuotaByCounterKeysListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type QuotaByCounterKeysListByServiceResponse = QuotaCounterCollection; - -/** Optional parameters. */ -export interface QuotaByCounterKeysUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type QuotaByCounterKeysUpdateResponse = QuotaCounterCollection; - -/** Optional parameters. */ -export interface QuotaByPeriodKeysGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type QuotaByPeriodKeysGetResponse = QuotaCounterContract; - -/** Optional parameters. */ -export interface QuotaByPeriodKeysUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type QuotaByPeriodKeysUpdateResponse = QuotaCounterContract; - -/** Optional parameters. */ -export interface RegionListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type RegionListByServiceResponse = RegionListResult; - -/** Optional parameters. */ -export interface RegionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type RegionListByServiceNextResponse = RegionListResult; - -/** Optional parameters. */ -export interface ReportsListByApiOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByApi operation. */ -export type ReportsListByApiResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByUserOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByUser operation. */ -export type ReportsListByUserResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByOperationOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByOperation operation. */ -export type ReportsListByOperationResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByProductOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByProduct operation. */ -export type ReportsListByProductResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByGeoOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByGeo operation. */ -export type ReportsListByGeoResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListBySubscriptionOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listBySubscription operation. */ -export type ReportsListBySubscriptionResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByTimeOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByTime operation. */ -export type ReportsListByTimeResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByRequestOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByRequest operation. */ -export type ReportsListByRequestResponse = RequestReportCollection; - -/** Optional parameters. */ -export interface ReportsListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type ReportsListByApiNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByUserNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByUserNext operation. */ -export type ReportsListByUserNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByOperationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByOperationNext operation. */ -export type ReportsListByOperationNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type ReportsListByProductNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByGeoNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByGeoNext operation. */ -export type ReportsListByGeoNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ReportsListBySubscriptionNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface ReportsListByTimeNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByTimeNext operation. */ -export type ReportsListByTimeNextResponse = ReportCollection; - -/** Optional parameters. */ -export interface GlobalSchemaListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type GlobalSchemaListByServiceResponse = GlobalSchemaCollection; - -/** Optional parameters. */ -export interface GlobalSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type GlobalSchemaGetEntityTagResponse = GlobalSchemaGetEntityTagHeaders; - -/** Optional parameters. */ -export interface GlobalSchemaGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type GlobalSchemaGetResponse = GlobalSchemaGetHeaders & - GlobalSchemaContract; - -/** Optional parameters. */ -export interface GlobalSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type GlobalSchemaCreateOrUpdateResponse = - GlobalSchemaCreateOrUpdateHeaders & GlobalSchemaContract; - -/** Optional parameters. */ -export interface GlobalSchemaDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface GlobalSchemaListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type GlobalSchemaListByServiceNextResponse = GlobalSchemaCollection; - -/** Optional parameters. */ -export interface TenantSettingsListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; -} - -/** Contains response data for the listByService operation. */ -export type TenantSettingsListByServiceResponse = TenantSettingsCollection; - -/** Optional parameters. */ -export interface TenantSettingsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TenantSettingsGetResponse = TenantSettingsGetHeaders & - TenantSettingsContract; - -/** Optional parameters. */ -export interface TenantSettingsListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type TenantSettingsListByServiceNextResponse = TenantSettingsCollection; - -/** Optional parameters. */ -export interface ApiManagementSkusListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ApiManagementSkusListResponse = ApiManagementSkusResult; - -/** Optional parameters. */ -export interface ApiManagementSkusListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ApiManagementSkusListNextResponse = ApiManagementSkusResult; - -/** Optional parameters. */ -export interface SubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type SubscriptionListResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface SubscriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type SubscriptionGetEntityTagResponse = SubscriptionGetEntityTagHeaders; - -/** Optional parameters. */ -export interface SubscriptionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SubscriptionGetResponse = SubscriptionGetHeaders & - SubscriptionContract; - -/** Optional parameters. */ -export interface SubscriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; -} - -/** Contains response data for the createOrUpdate operation. */ -export type SubscriptionCreateOrUpdateResponse = - SubscriptionCreateOrUpdateHeaders & SubscriptionContract; - -/** Optional parameters. */ -export interface SubscriptionUpdateOptionalParams - extends coreClient.OperationOptions { - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; -} - -/** Contains response data for the update operation. */ -export type SubscriptionUpdateResponse = SubscriptionUpdateHeaders & - SubscriptionContract; - -/** Optional parameters. */ -export interface SubscriptionDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SubscriptionRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SubscriptionRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SubscriptionListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type SubscriptionListSecretsResponse = SubscriptionListSecretsHeaders & - SubscriptionKeysContract; - -/** Optional parameters. */ -export interface SubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SubscriptionListNextResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface TagResourceListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| isCurrent | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type TagResourceListByServiceResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface TagResourceListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type TagResourceListByServiceNextResponse = TagResourceCollection; - -/** Optional parameters. */ -export interface TagApiLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type TagApiLinkListByProductResponse = TagApiLinkCollection; - -/** Optional parameters. */ -export interface TagApiLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TagApiLinkGetResponse = TagApiLinkGetHeaders & TagApiLinkContract; - -/** Optional parameters. */ -export interface TagApiLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type TagApiLinkCreateOrUpdateResponse = TagApiLinkContract; - -/** Optional parameters. */ -export interface TagApiLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagApiLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type TagApiLinkListByProductNextResponse = TagApiLinkCollection; - -/** Optional parameters. */ -export interface TagOperationLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type TagOperationLinkListByProductResponse = TagOperationLinkCollection; - -/** Optional parameters. */ -export interface TagOperationLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TagOperationLinkGetResponse = TagOperationLinkGetHeaders & - TagOperationLinkContract; - -/** Optional parameters. */ -export interface TagOperationLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type TagOperationLinkCreateOrUpdateResponse = TagOperationLinkContract; - -/** Optional parameters. */ -export interface TagOperationLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagOperationLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type TagOperationLinkListByProductNextResponse = - TagOperationLinkCollection; - -/** Optional parameters. */ -export interface TagProductLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type TagProductLinkListByProductResponse = TagProductLinkCollection; - -/** Optional parameters. */ -export interface TagProductLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TagProductLinkGetResponse = TagProductLinkGetHeaders & - TagProductLinkContract; - -/** Optional parameters. */ -export interface TagProductLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type TagProductLinkCreateOrUpdateResponse = TagProductLinkContract; - -/** Optional parameters. */ -export interface TagProductLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TagProductLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type TagProductLinkListByProductNextResponse = TagProductLinkCollection; - -/** Optional parameters. */ -export interface TenantAccessListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Not used */ - filter?: string; -} - -/** Contains response data for the listByService operation. */ -export type TenantAccessListByServiceResponse = AccessInformationCollection; - -/** Optional parameters. */ -export interface TenantAccessGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type TenantAccessGetEntityTagResponse = TenantAccessGetEntityTagHeaders; - -/** Optional parameters. */ -export interface TenantAccessGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TenantAccessGetResponse = TenantAccessGetHeaders & - AccessInformationContract; - -/** Optional parameters. */ -export interface TenantAccessCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type TenantAccessCreateResponse = TenantAccessCreateHeaders & - AccessInformationContract; - -/** Optional parameters. */ -export interface TenantAccessUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type TenantAccessUpdateResponse = TenantAccessUpdateHeaders & - AccessInformationContract; - -/** Optional parameters. */ -export interface TenantAccessRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TenantAccessRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TenantAccessListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type TenantAccessListSecretsResponse = TenantAccessListSecretsHeaders & - AccessInformationSecretsContract; - -/** Optional parameters. */ -export interface TenantAccessListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type TenantAccessListByServiceNextResponse = AccessInformationCollection; - -/** Optional parameters. */ -export interface TenantAccessGitRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TenantAccessGitRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface TenantConfigurationDeployOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the deploy operation. */ -export type TenantConfigurationDeployResponse = OperationResultContract; - -/** Optional parameters. */ -export interface TenantConfigurationSaveOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the save operation. */ -export type TenantConfigurationSaveResponse = OperationResultContract; - -/** Optional parameters. */ -export interface TenantConfigurationValidateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the validate operation. */ -export type TenantConfigurationValidateResponse = OperationResultContract; - -/** Optional parameters. */ -export interface TenantConfigurationGetSyncStateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSyncState operation. */ -export type TenantConfigurationGetSyncStateResponse = - TenantConfigurationSyncStateContract; - -/** Optional parameters. */ -export interface UserListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Detailed Group in response. */ - expandGroups?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type UserListByServiceResponse = UserCollection; - -/** Optional parameters. */ -export interface UserGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type UserGetEntityTagResponse = UserGetEntityTagHeaders; - -/** Optional parameters. */ -export interface UserGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type UserGetResponse = UserGetHeaders & UserContract; - -/** Optional parameters. */ -export interface UserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Send an Email notification to the User. */ - notify?: boolean; -} - -/** Contains response data for the createOrUpdate operation. */ -export type UserCreateOrUpdateResponse = UserCreateOrUpdateHeaders & - UserContract; - -/** Optional parameters. */ -export interface UserUpdateOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type UserUpdateResponse = UserUpdateHeaders & UserContract; - -/** Optional parameters. */ -export interface UserDeleteOptionalParams extends coreClient.OperationOptions { - /** Whether to delete user's subscription or not. */ - deleteSubscriptions?: boolean; - /** Send an Account Closed Email notification to the User. */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type UserDeleteResponse = UserDeleteHeaders; - -/** Optional parameters. */ -export interface UserGenerateSsoUrlOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the generateSsoUrl operation. */ -export type UserGenerateSsoUrlResponse = GenerateSsoUrlResult; - -/** Optional parameters. */ -export interface UserGetSharedAccessTokenOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSharedAccessToken operation. */ -export type UserGetSharedAccessTokenResponse = UserTokenResult; - -/** Optional parameters. */ -export interface UserListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type UserListByServiceNextResponse = UserCollection; - -/** Optional parameters. */ -export interface UserGroupListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type UserGroupListResponse = GroupCollection; - -/** Optional parameters. */ -export interface UserGroupListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type UserGroupListNextResponse = GroupCollection; - -/** Optional parameters. */ -export interface UserSubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|------------------------|-----------------------------------|
|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type UserSubscriptionListResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface UserSubscriptionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type UserSubscriptionGetResponse = UserSubscriptionGetHeaders & - SubscriptionContract; - -/** Optional parameters. */ -export interface UserSubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type UserSubscriptionListNextResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface UserIdentitiesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type UserIdentitiesListResponse = UserIdentityCollection; - -/** Optional parameters. */ -export interface UserIdentitiesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type UserIdentitiesListNextResponse = UserIdentityCollection; - -/** Optional parameters. */ -export interface UserConfirmationPasswordSendOptionalParams - extends coreClient.OperationOptions { - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; -} - -/** Optional parameters. */ -export interface WorkspaceBackendListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByWorkspace operation. */ -export type WorkspaceBackendListByWorkspaceResponse = BackendCollection; - -/** Optional parameters. */ -export interface WorkspaceBackendGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceBackendGetEntityTagResponse = - WorkspaceBackendGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceBackendGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceBackendGetResponse = WorkspaceBackendGetHeaders & - BackendContract; - -/** Optional parameters. */ -export interface WorkspaceBackendCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceBackendCreateOrUpdateResponse = - WorkspaceBackendCreateOrUpdateHeaders & BackendContract; - -/** Optional parameters. */ -export interface WorkspaceBackendUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceBackendUpdateResponse = WorkspaceBackendUpdateHeaders & - BackendContract; - -/** Optional parameters. */ -export interface WorkspaceBackendDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceBackendListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type WorkspaceBackendListByWorkspaceNextResponse = BackendCollection; - -/** Optional parameters. */ -export interface WorkspaceCertificateListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** When set to true, the response contains only certificates entities which failed refresh. */ - isKeyVaultRefreshFailed?: boolean; -} - -/** Contains response data for the listByWorkspace operation. */ -export type WorkspaceCertificateListByWorkspaceResponse = CertificateCollection; - -/** Optional parameters. */ -export interface WorkspaceCertificateGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceCertificateGetEntityTagResponse = - WorkspaceCertificateGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceCertificateGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceCertificateGetResponse = WorkspaceCertificateGetHeaders & - CertificateContract; - -/** Optional parameters. */ -export interface WorkspaceCertificateCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceCertificateCreateOrUpdateResponse = - WorkspaceCertificateCreateOrUpdateHeaders & CertificateContract; - -/** Optional parameters. */ -export interface WorkspaceCertificateDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceCertificateRefreshSecretOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the refreshSecret operation. */ -export type WorkspaceCertificateRefreshSecretResponse = - WorkspaceCertificateRefreshSecretHeaders & CertificateContract; - -/** Optional parameters. */ -export interface WorkspaceCertificateListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type WorkspaceCertificateListByWorkspaceNextResponse = - CertificateCollection; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByWorkspace operation. */ -export type WorkspaceDiagnosticListByWorkspaceResponse = DiagnosticCollection; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceDiagnosticGetEntityTagResponse = - WorkspaceDiagnosticGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceDiagnosticGetResponse = WorkspaceDiagnosticGetHeaders & - DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceDiagnosticCreateOrUpdateResponse = - WorkspaceDiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceDiagnosticUpdateResponse = - WorkspaceDiagnosticUpdateHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceDiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceDiagnosticListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type WorkspaceDiagnosticListByWorkspaceNextResponse = - DiagnosticCollection; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByWorkspace operation. */ -export type WorkspaceApiDiagnosticListByWorkspaceResponse = - DiagnosticCollection; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiDiagnosticGetEntityTagResponse = - WorkspaceApiDiagnosticGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiDiagnosticGetResponse = - WorkspaceApiDiagnosticGetHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiDiagnosticCreateOrUpdateResponse = - WorkspaceApiDiagnosticCreateOrUpdateHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceApiDiagnosticUpdateResponse = - WorkspaceApiDiagnosticUpdateHeaders & DiagnosticContract; - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiDiagnosticListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type WorkspaceApiDiagnosticListByWorkspaceNextResponse = - DiagnosticCollection; - -/** Optional parameters. */ -export interface ApiManagementWorkspaceLinksListByServiceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByService operation. */ -export type ApiManagementWorkspaceLinksListByServiceResponse = - ApiManagementWorkspaceLinksListResult; - -/** Optional parameters. */ -export interface ApiManagementWorkspaceLinksListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type ApiManagementWorkspaceLinksListByServiceNextResponse = - ApiManagementWorkspaceLinksListResult; - -/** Optional parameters. */ -export interface ApiManagementWorkspaceLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ApiManagementWorkspaceLinkGetResponse = - ApiManagementWorkspaceLinksResource; - -/** Optional parameters. */ -export interface WorkspaceLoggerListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByWorkspace operation. */ -export type WorkspaceLoggerListByWorkspaceResponse = LoggerCollection; - -/** Optional parameters. */ -export interface WorkspaceLoggerGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceLoggerGetEntityTagResponse = - WorkspaceLoggerGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceLoggerGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceLoggerGetResponse = WorkspaceLoggerGetHeaders & - LoggerContract; - -/** Optional parameters. */ -export interface WorkspaceLoggerCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceLoggerCreateOrUpdateResponse = - WorkspaceLoggerCreateOrUpdateHeaders & LoggerContract; - -/** Optional parameters. */ -export interface WorkspaceLoggerUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceLoggerUpdateResponse = WorkspaceLoggerUpdateHeaders & - LoggerContract; - -/** Optional parameters. */ -export interface WorkspaceLoggerDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceLoggerListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type WorkspaceLoggerListByWorkspaceNextResponse = LoggerCollection; - -/** Optional parameters. */ -export interface WorkspaceListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |

| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceListByServiceResponse = WorkspaceCollection; - -/** Optional parameters. */ -export interface WorkspaceGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceGetEntityTagResponse = WorkspaceGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceGetResponse = WorkspaceGetHeaders & WorkspaceContract; - -/** Optional parameters. */ -export interface WorkspaceCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceCreateOrUpdateResponse = WorkspaceCreateOrUpdateHeaders & - WorkspaceContract; - -/** Optional parameters. */ -export interface WorkspaceUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceUpdateResponse = WorkspaceUpdateHeaders & - WorkspaceContract; - -/** Optional parameters. */ -export interface WorkspaceDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceListByServiceNextResponse = WorkspaceCollection; - -/** Optional parameters. */ -export interface WorkspacePolicyListByApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApi operation. */ -export type WorkspacePolicyListByApiResponse = PolicyCollection; - -/** Optional parameters. */ -export interface WorkspacePolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspacePolicyGetEntityTagResponse = - WorkspacePolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspacePolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type WorkspacePolicyGetResponse = WorkspacePolicyGetHeaders & - PolicyContract; - -/** Optional parameters. */ -export interface WorkspacePolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspacePolicyCreateOrUpdateResponse = - WorkspacePolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspacePolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspacePolicyListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type WorkspacePolicyListByApiNextResponse = PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceNamedValueListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Query parameter to fetch named value entities based on refresh status. */ - isKeyVaultRefreshFailed?: KeyVaultRefreshState; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceNamedValueListByServiceResponse = NamedValueCollection; - -/** Optional parameters. */ -export interface WorkspaceNamedValueGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceNamedValueGetEntityTagResponse = - WorkspaceNamedValueGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceNamedValueGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceNamedValueGetResponse = WorkspaceNamedValueGetHeaders & - NamedValueContract; - -/** Optional parameters. */ -export interface WorkspaceNamedValueCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceNamedValueCreateOrUpdateResponse = - WorkspaceNamedValueCreateOrUpdateHeaders & NamedValueContract; - -/** Optional parameters. */ -export interface WorkspaceNamedValueUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type WorkspaceNamedValueUpdateResponse = - WorkspaceNamedValueUpdateHeaders & NamedValueContract; - -/** Optional parameters. */ -export interface WorkspaceNamedValueDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceNamedValueListValueOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listValue operation. */ -export type WorkspaceNamedValueListValueResponse = - WorkspaceNamedValueListValueHeaders & NamedValueSecretContract; - -/** Optional parameters. */ -export interface WorkspaceNamedValueRefreshSecretOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the refreshSecret operation. */ -export type WorkspaceNamedValueRefreshSecretResponse = - WorkspaceNamedValueRefreshSecretHeaders & NamedValueContract; - -/** Optional parameters. */ -export interface WorkspaceNamedValueListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceNamedValueListByServiceNextResponse = NamedValueCollection; - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceGlobalSchemaListByServiceResponse = GlobalSchemaCollection; - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceGlobalSchemaGetEntityTagResponse = - WorkspaceGlobalSchemaGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceGlobalSchemaGetResponse = WorkspaceGlobalSchemaGetHeaders & - GlobalSchemaContract; - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceGlobalSchemaCreateOrUpdateResponse = - WorkspaceGlobalSchemaCreateOrUpdateHeaders & GlobalSchemaContract; - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceGlobalSchemaListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceGlobalSchemaListByServiceNextResponse = - GlobalSchemaCollection; - -/** Optional parameters. */ -export interface WorkspaceNotificationListByServiceOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceNotificationListByServiceResponse = NotificationCollection; - -/** Optional parameters. */ -export interface WorkspaceNotificationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceNotificationGetResponse = NotificationContract; - -/** Optional parameters. */ -export interface WorkspaceNotificationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceNotificationCreateOrUpdateResponse = NotificationContract; - -/** Optional parameters. */ -export interface WorkspaceNotificationListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceNotificationListByServiceNextResponse = - NotificationCollection; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientUserListByNotificationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByNotification operation. */ -export type WorkspaceNotificationRecipientUserListByNotificationResponse = - RecipientUserCollection; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type WorkspaceNotificationRecipientUserCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceNotificationRecipientUserCreateOrUpdateResponse = - RecipientUserContract; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientUserDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientEmailListByNotificationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByNotification operation. */ -export type WorkspaceNotificationRecipientEmailListByNotificationResponse = - RecipientEmailCollection; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type WorkspaceNotificationRecipientEmailCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceNotificationRecipientEmailCreateOrUpdateResponse = - RecipientEmailContract; - -/** Optional parameters. */ -export interface WorkspaceNotificationRecipientEmailDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** OData order by query option. */ - orderby?: string; -} - -/** Contains response data for the listByService operation. */ -export type WorkspacePolicyFragmentListByServiceResponse = - PolicyFragmentCollection; - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspacePolicyFragmentGetEntityTagResponse = - WorkspacePolicyFragmentGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentGetOptionalParams - extends coreClient.OperationOptions { - /** Policy fragment content format. */ - format?: PolicyFragmentContentFormat; -} - -/** Contains response data for the get operation. */ -export type WorkspacePolicyFragmentGetResponse = - WorkspacePolicyFragmentGetHeaders & PolicyFragmentContract; - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspacePolicyFragmentCreateOrUpdateResponse = - WorkspacePolicyFragmentCreateOrUpdateHeaders & PolicyFragmentContract; - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentListReferencesOptionalParams - extends coreClient.OperationOptions { - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listReferences operation. */ -export type WorkspacePolicyFragmentListReferencesResponse = ResourceCollection; - -/** Optional parameters. */ -export interface WorkspacePolicyFragmentListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspacePolicyFragmentListByServiceNextResponse = - PolicyFragmentCollection; - -/** Optional parameters. */ -export interface WorkspaceGroupListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| externalId | filter | eq | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceGroupListByServiceResponse = GroupCollection; - -/** Optional parameters. */ -export interface WorkspaceGroupGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceGroupGetEntityTagResponse = - WorkspaceGroupGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceGroupGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceGroupGetResponse = WorkspaceGroupGetHeaders & - GroupContract; - -/** Optional parameters. */ -export interface WorkspaceGroupCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceGroupCreateOrUpdateResponse = - WorkspaceGroupCreateOrUpdateHeaders & GroupContract; - -/** Optional parameters. */ -export interface WorkspaceGroupUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceGroupUpdateResponse = WorkspaceGroupUpdateHeaders & - GroupContract; - -/** Optional parameters. */ -export interface WorkspaceGroupDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceGroupListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceGroupListByServiceNextResponse = GroupCollection; - -/** Optional parameters. */ -export interface WorkspaceGroupUserListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type WorkspaceGroupUserListResponse = UserCollection; - -/** Optional parameters. */ -export interface WorkspaceGroupUserCheckEntityExistsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkEntityExists operation. */ -export type WorkspaceGroupUserCheckEntityExistsResponse = { - body: boolean; -}; - -/** Optional parameters. */ -export interface WorkspaceGroupUserCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type WorkspaceGroupUserCreateResponse = UserContract; - -/** Optional parameters. */ -export interface WorkspaceGroupUserDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceGroupUserListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type WorkspaceGroupUserListNextResponse = UserCollection; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionListOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| user | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the list operation. */ -export type WorkspaceSubscriptionListResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceSubscriptionGetEntityTagResponse = - WorkspaceSubscriptionGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceSubscriptionGetResponse = WorkspaceSubscriptionGetHeaders & - SubscriptionContract; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceSubscriptionCreateOrUpdateResponse = - WorkspaceSubscriptionCreateOrUpdateHeaders & SubscriptionContract; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionUpdateOptionalParams - extends coreClient.OperationOptions { - /** - * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription - */ - notify?: boolean; - /** Determines the type of application which send the create user request. Default is legacy publisher portal. */ - appType?: AppType; -} - -/** Contains response data for the update operation. */ -export type WorkspaceSubscriptionUpdateResponse = - WorkspaceSubscriptionUpdateHeaders & SubscriptionContract; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceSubscriptionListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type WorkspaceSubscriptionListSecretsResponse = - WorkspaceSubscriptionListSecretsHeaders & SubscriptionKeysContract; - -/** Optional parameters. */ -export interface WorkspaceSubscriptionListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type WorkspaceSubscriptionListNextResponse = SubscriptionCollection; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceApiVersionSetListByServiceResponse = - ApiVersionSetCollection; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiVersionSetGetEntityTagResponse = - WorkspaceApiVersionSetGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiVersionSetGetResponse = - WorkspaceApiVersionSetGetHeaders & ApiVersionSetContract; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiVersionSetCreateOrUpdateResponse = - WorkspaceApiVersionSetCreateOrUpdateHeaders & ApiVersionSetContract; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceApiVersionSetUpdateResponse = - WorkspaceApiVersionSetUpdateHeaders & ApiVersionSetContract; - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiVersionSetListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceApiVersionSetListByServiceNextResponse = - ApiVersionSetCollection; - -/** Optional parameters. */ -export interface WorkspaceApiListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| isCurrent | filter | eq, ne | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; - /** Include full ApiVersionSet resource in response */ - expandApiVersionSet?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceApiListByServiceResponse = ApiCollection; - -/** Optional parameters. */ -export interface WorkspaceApiGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiGetEntityTagResponse = WorkspaceApiGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiGetResponse = WorkspaceApiGetHeaders & ApiContract; - -/** Optional parameters. */ -export interface WorkspaceApiCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiCreateOrUpdateResponse = - WorkspaceApiCreateOrUpdateHeaders & ApiContract; - -/** Optional parameters. */ -export interface WorkspaceApiUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceApiUpdateResponse = WorkspaceApiUpdateHeaders & - ApiContract; - -/** Optional parameters. */ -export interface WorkspaceApiDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete all revisions of the Api. */ - deleteRevisions?: boolean; -} - -/** Optional parameters. */ -export interface WorkspaceApiListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceApiListByServiceNextResponse = ApiCollection; - -/** Optional parameters. */ -export interface WorkspaceApiRevisionListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceApiRevisionListByServiceResponse = ApiRevisionCollection; - -/** Optional parameters. */ -export interface WorkspaceApiRevisionListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceApiRevisionListByServiceNextResponse = - ApiRevisionCollection; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceApiReleaseListByServiceResponse = ApiReleaseCollection; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiReleaseGetEntityTagResponse = - WorkspaceApiReleaseGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiReleaseGetResponse = WorkspaceApiReleaseGetHeaders & - ApiReleaseContract; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiReleaseCreateOrUpdateResponse = - WorkspaceApiReleaseCreateOrUpdateHeaders & ApiReleaseContract; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceApiReleaseUpdateResponse = - WorkspaceApiReleaseUpdateHeaders & ApiReleaseContract; - -/** Optional parameters. */ -export interface WorkspaceApiReleaseDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiReleaseListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceApiReleaseListByServiceNextResponse = ApiReleaseCollection; - -/** Optional parameters. */ -export interface WorkspaceApiOperationListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Include tags in the response. */ - tags?: string; -} - -/** Contains response data for the listByApi operation. */ -export type WorkspaceApiOperationListByApiResponse = OperationCollection; - -/** Optional parameters. */ -export interface WorkspaceApiOperationGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiOperationGetEntityTagResponse = - WorkspaceApiOperationGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiOperationGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiOperationGetResponse = WorkspaceApiOperationGetHeaders & - OperationContract; - -/** Optional parameters. */ -export interface WorkspaceApiOperationCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiOperationCreateOrUpdateResponse = - WorkspaceApiOperationCreateOrUpdateHeaders & OperationContract; - -/** Optional parameters. */ -export interface WorkspaceApiOperationUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceApiOperationUpdateResponse = - WorkspaceApiOperationUpdateHeaders & OperationContract; - -/** Optional parameters. */ -export interface WorkspaceApiOperationDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiOperationListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type WorkspaceApiOperationListByApiNextResponse = OperationCollection; - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyListByOperationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByOperation operation. */ -export type WorkspaceApiOperationPolicyListByOperationResponse = - PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiOperationPolicyGetEntityTagResponse = - WorkspaceApiOperationPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type WorkspaceApiOperationPolicyGetResponse = - WorkspaceApiOperationPolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiOperationPolicyCreateOrUpdateResponse = - WorkspaceApiOperationPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiOperationPolicyListByOperationNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByOperationNext operation. */ -export type WorkspaceApiOperationPolicyListByOperationNextResponse = - PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceApiPolicyListByApiOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApi operation. */ -export type WorkspaceApiPolicyListByApiResponse = PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceApiPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiPolicyGetEntityTagResponse = - WorkspaceApiPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type WorkspaceApiPolicyGetResponse = WorkspaceApiPolicyGetHeaders & - PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceApiPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiPolicyCreateOrUpdateResponse = - WorkspaceApiPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceApiPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceApiPolicyListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type WorkspaceApiPolicyListByApiNextResponse = PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceApiSchemaListByApiOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByApi operation. */ -export type WorkspaceApiSchemaListByApiResponse = SchemaCollection; - -/** Optional parameters. */ -export interface WorkspaceApiSchemaGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceApiSchemaGetEntityTagResponse = - WorkspaceApiSchemaGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceApiSchemaGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiSchemaGetResponse = WorkspaceApiSchemaGetHeaders & - SchemaContract; - -/** Optional parameters. */ -export interface WorkspaceApiSchemaCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceApiSchemaCreateOrUpdateResponse = - WorkspaceApiSchemaCreateOrUpdateHeaders & SchemaContract; - -/** Optional parameters. */ -export interface WorkspaceApiSchemaDeleteOptionalParams - extends coreClient.OperationOptions { - /** If true removes all references to the schema before deleting it. */ - force?: boolean; -} - -/** Optional parameters. */ -export interface WorkspaceApiSchemaListByApiNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByApiNext operation. */ -export type WorkspaceApiSchemaListByApiNextResponse = SchemaCollection; - -/** Optional parameters. */ -export interface WorkspaceProductListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Products which are part of a specific tag. */ - tags?: string; - /** When set to true, the response contains an array of groups that have visibility to the product. The default is false. */ - expandGroups?: boolean; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceProductListByServiceResponse = ProductCollection; - -/** Optional parameters. */ -export interface WorkspaceProductGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceProductGetEntityTagResponse = - WorkspaceProductGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceProductGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceProductGetResponse = WorkspaceProductGetHeaders & - ProductContract; - -/** Optional parameters. */ -export interface WorkspaceProductCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceProductCreateOrUpdateResponse = - WorkspaceProductCreateOrUpdateHeaders & ProductContract; - -/** Optional parameters. */ -export interface WorkspaceProductUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceProductUpdateResponse = WorkspaceProductUpdateHeaders & - ProductContract; - -/** Optional parameters. */ -export interface WorkspaceProductDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete existing subscriptions associated with the product or not. */ - deleteSubscriptions?: boolean; -} - -/** Optional parameters. */ -export interface WorkspaceProductListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceProductListByServiceNextResponse = ProductCollection; - -/** Optional parameters. */ -export interface WorkspaceProductApiLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceProductApiLinkListByProductResponse = - ProductApiLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceProductApiLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceProductApiLinkGetResponse = - WorkspaceProductApiLinkGetHeaders & ProductApiLinkContract; - -/** Optional parameters. */ -export interface WorkspaceProductApiLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceProductApiLinkCreateOrUpdateResponse = - ProductApiLinkContract; - -/** Optional parameters. */ -export interface WorkspaceProductApiLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceProductApiLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type WorkspaceProductApiLinkListByProductNextResponse = - ProductApiLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceProductGroupLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceProductGroupLinkListByProductResponse = - ProductGroupLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceProductGroupLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceProductGroupLinkGetResponse = - WorkspaceProductGroupLinkGetHeaders & ProductGroupLinkContract; - -/** Optional parameters. */ -export interface WorkspaceProductGroupLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceProductGroupLinkCreateOrUpdateResponse = - ProductGroupLinkContract; - -/** Optional parameters. */ -export interface WorkspaceProductGroupLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceProductGroupLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type WorkspaceProductGroupLinkListByProductNextResponse = - ProductGroupLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceProductPolicyListByProductOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceProductPolicyListByProductResponse = PolicyCollection; - -/** Optional parameters. */ -export interface WorkspaceProductPolicyGetEntityTagOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityTag operation. */ -export type WorkspaceProductPolicyGetEntityTagResponse = - WorkspaceProductPolicyGetEntityTagHeaders; - -/** Optional parameters. */ -export interface WorkspaceProductPolicyGetOptionalParams - extends coreClient.OperationOptions { - /** Policy Export Format. */ - format?: PolicyExportFormat; -} - -/** Contains response data for the get operation. */ -export type WorkspaceProductPolicyGetResponse = - WorkspaceProductPolicyGetHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceProductPolicyCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceProductPolicyCreateOrUpdateResponse = - WorkspaceProductPolicyCreateOrUpdateHeaders & PolicyContract; - -/** Optional parameters. */ -export interface WorkspaceProductPolicyDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceTagListByServiceOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; - /** Scope like 'apis', 'products' or 'apis/{apiId} */ - scope?: string; -} - -/** Contains response data for the listByService operation. */ -export type WorkspaceTagListByServiceResponse = TagCollection; - -/** Optional parameters. */ -export interface WorkspaceTagGetEntityStateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getEntityState operation. */ -export type WorkspaceTagGetEntityStateResponse = - WorkspaceTagGetEntityStateHeaders; - -/** Optional parameters. */ -export interface WorkspaceTagGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceTagGetResponse = WorkspaceTagGetHeaders & TagContract; - -/** Optional parameters. */ -export interface WorkspaceTagCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** ETag of the Entity. Not required when creating an entity, but required when updating an entity. */ - ifMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceTagCreateOrUpdateResponse = - WorkspaceTagCreateOrUpdateHeaders & TagContract; - -/** Optional parameters. */ -export interface WorkspaceTagUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type WorkspaceTagUpdateResponse = WorkspaceTagUpdateHeaders & - TagContract; - -/** Optional parameters. */ -export interface WorkspaceTagDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceTagListByServiceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServiceNext operation. */ -export type WorkspaceTagListByServiceNextResponse = TagCollection; - -/** Optional parameters. */ -export interface WorkspaceTagApiLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceTagApiLinkListByProductResponse = TagApiLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceTagApiLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceTagApiLinkGetResponse = WorkspaceTagApiLinkGetHeaders & - TagApiLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagApiLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceTagApiLinkCreateOrUpdateResponse = TagApiLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagApiLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceTagApiLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type WorkspaceTagApiLinkListByProductNextResponse = TagApiLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceTagOperationLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceTagOperationLinkListByProductResponse = - TagOperationLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceTagOperationLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceTagOperationLinkGetResponse = - WorkspaceTagOperationLinkGetHeaders & TagOperationLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagOperationLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceTagOperationLinkCreateOrUpdateResponse = - TagOperationLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagOperationLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceTagOperationLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type WorkspaceTagOperationLinkListByProductNextResponse = - TagOperationLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceTagProductLinkListByProductOptionalParams - extends coreClient.OperationOptions { - /** | Field | Usage | Supported operators | Supported functions |
|-------------|-------------|-------------|-------------|
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
*/ - filter?: string; - /** Number of records to return. */ - top?: number; - /** Number of records to skip. */ - skip?: number; -} - -/** Contains response data for the listByProduct operation. */ -export type WorkspaceTagProductLinkListByProductResponse = - TagProductLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceTagProductLinkGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceTagProductLinkGetResponse = - WorkspaceTagProductLinkGetHeaders & TagProductLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagProductLinkCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type WorkspaceTagProductLinkCreateOrUpdateResponse = - TagProductLinkContract; - -/** Optional parameters. */ -export interface WorkspaceTagProductLinkDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface WorkspaceTagProductLinkListByProductNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByProductNext operation. */ -export type WorkspaceTagProductLinkListByProductNextResponse = - TagProductLinkCollection; - -/** Optional parameters. */ -export interface WorkspaceApiExportGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type WorkspaceApiExportGetResponse = ApiExportResult; - -/** Optional parameters. */ -export interface OperationStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationStatusGetResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface OperationsResultsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationsResultsGetResponse = OperationsResultsGetHeaders; - -/** Optional parameters. */ -export interface ApiManagementClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export type { + ApiContract, + ApiContractProperties, + Protocol, + ApiVersionSetContractDetails, + VersioningScheme, + ApiEntityBaseContract, + AuthenticationSettingsContract, + OAuth2AuthenticationSettingsContract, + OpenIdAuthenticationSettingsContract, + BearerTokenSendingMethods, + SubscriptionKeyParameterNamesContract, + ApiType, + ApiContactInformation, + ApiLicenseInformation, + McpProperties, + McpTransportType, + McpEndpoint, + ProxyResource, + Resource, + SystemData, + CreatedByType, + ErrorResponse, + ErrorDetail, + ErrorAdditionalInfo, + ApiCreateOrUpdateParameter, + ApiCreateOrUpdateProperties, + ContentFormat, + ApiCreateOrUpdatePropertiesWsdlSelector, + SoapApiType, + TranslateRequiredQueryParametersConduct, + ApiUpdateContract, + ApiContractUpdateProperties, + ConnectivityCheckRequest, + ConnectivityCheckRequestSource, + ConnectivityCheckRequestDestination, + PreferredIPVersion, + ConnectivityCheckProtocol, + ConnectivityCheckRequestProtocolConfiguration, + ConnectivityCheckRequestProtocolConfigurationHttpConfiguration, + Method, + HttpHeader, + ConnectivityCheckResponse, + ConnectivityHop, + ConnectivityIssue, + Origin, + Severity, + IssueType, + ConnectionStatus, + ApiReleaseContract, + ApiReleaseContractProperties, + OperationContract, + OperationContractProperties, + OperationEntityBaseContract, + ParameterContract, + ParameterExampleContract, + RequestContract, + RepresentationContract, + ResponseContract, + OperationUpdateContract, + OperationUpdateContractProperties, + PolicyContract, + PolicyContractProperties, + PolicyContentFormat, + PolicyIdName, + PolicyCollection, + TagContract, + TagContractProperties, + TagCreateUpdateParameters, + SchemaContract, + SchemaContractProperties, + SchemaDocumentProperties, + DiagnosticContract, + DiagnosticContractProperties, + AlwaysLog, + SamplingSettings, + SamplingType, + PipelineDiagnosticSettings, + HttpMessageDiagnostic, + BodyDiagnosticSettings, + DataMasking, + DataMaskingEntity, + DataMaskingMode, + LLMDiagnosticSettings, + LlmDiagnosticSettings, + LLMMessageDiagnosticSettings, + LlmMessageLogTypes, + HttpCorrelationProtocol, + Verbosity, + OperationNameFormat, + DiagnosticUpdateContract, + DiagnosticContractUpdateProperties, + IssueContract, + IssueContractProperties, + IssueContractBaseProperties, + State, + WikiContract, + WikiContractProperties, + WikiDocumentationContract, + WikiUpdateContract, + ApiVersionSetContract, + ApiVersionSetContractProperties, + ApiVersionSetEntityBase, + ApiVersionSetUpdateParameters, + ApiVersionSetUpdateParametersProperties, + BackendContract, + BackendContractProperties, + BackendProtocol, + BackendBaseParameters, + BackendProperties, + BackendServiceFabricClusterProperties, + X509CertificateName, + BackendCredentialsContract, + BackendAuthorizationHeaderCredentials, + BackendProxyContract, + BackendTlsProperties, + BackendCircuitBreaker, + CircuitBreakerRule, + CircuitBreakerFailureCondition, + FailureStatusCodeRange, + BackendFailureResponse, + BackendBaseParametersPool, + BackendType, + BackendPool, + BackendPoolItem, + CarbonEmissionCategory, + BackendSessionAffinity, + BackendSessionId, + BackendSessionIdSource, + BackendUpdateParameters, + BackendUpdateParameterProperties, + CertificateContract, + CertificateContractProperties, + KeyVaultContractProperties, + KeyVaultLastAccessStatusContractProperties, + KeyVaultContractCreateProperties, + CertificateCreateOrUpdateParameters, + CertificateCreateOrUpdateProperties, + GroupContract, + GroupContractProperties, + GroupType, + GroupCreateParameters, + GroupCreateParametersProperties, + GroupUpdateParameters, + GroupUpdateParametersProperties, + LoggerContract, + LoggerContractProperties, + LoggerType, + LoggerUpdateContract, + LoggerUpdateParameters, + NamedValueContract, + NamedValueContractProperties, + NamedValueEntityBaseParameters, + NamedValueCreateContract, + NamedValueCreateContractProperties, + NamedValueUpdateParameters, + NamedValueUpdateParameterProperties, + NamedValueSecretContract, + NotificationContract, + NotificationContractProperties, + RecipientsContractProperties, + NotificationName, + PolicyFragmentContract, + PolicyFragmentContractProperties, + PolicyFragmentContentFormat, + ResourceCollection, + ResourceCollectionValueItem, + PortalSigninSettings, + PortalSigninSettingProperties, + PortalSignupSettings, + PortalSignupSettingsProperties, + TermsOfServiceProperties, + PortalDelegationSettings, + PortalDelegationSettingsProperties, + SubscriptionsDelegationSettingsProperties, + RegistrationDelegationSettingsProperties, + PortalSettingValidationKeyContract, + ProductContract, + ProductContractProperties, + ProductEntityBaseParameters, + ProductAuthType, + ProductEntityBaseParametersApplication, + ProductState, + ProductApplicationContract, + ProductApplicationContractEntra, + ProductUpdateParameters, + ProductUpdateProperties, + ProductApiLinkContract, + ProductApiLinkContractProperties, + ProductGroupLinkContract, + ProductGroupLinkContractProperties, + GlobalSchemaContract, + GlobalSchemaContractProperties, + SchemaType, + SubscriptionContract, + SubscriptionContractProperties, + SubscriptionState, + SubscriptionCreateParameters, + SubscriptionCreateParameterProperties, + SubscriptionUpdateParameters, + SubscriptionUpdateParameterProperties, + SubscriptionKeysContract, + TagApiLinkContract, + TagApiLinkContractProperties, + TagOperationLinkContract, + TagOperationLinkContractProperties, + TagProductLinkContract, + TagProductLinkContractProperties, + Operation, + OperationDisplay, + ApiManagementGatewayResource, + ApiManagementGatewayProperties, + ApiManagementGatewaySkuProperties, + ApiGatewaySkuType, + ApiManagementGatewayBaseProperties, + FrontendConfiguration, + BackendConfiguration, + BackendSubnetConfiguration, + GatewayConfigurationApi, + VirtualNetworkType, + TrackedResource, + ApiManagementGatewayUpdateParameters, + ApiManagementGatewayUpdateProperties, + ApiManagementGatewaySkuPropertiesForPatch, + ApimResource, + GatewayResourceSkuResult, + GatewaySku, + GatewaySkuCapacity, + GatewaySkuCapacityScaleType, + TagResourceContract, + TagTagResourceContractProperties, + ApiTagResourceContractProperties, + OperationTagResourceContractProperties, + ProductTagResourceContractProperties, + ApiRevisionContract, + ApiManagementServiceResource, + ApiManagementServiceProperties, + ApiManagementServiceSkuProperties, + SkuType, + ApiManagementServiceIdentity, + ApimIdentityType, + UserIdentityProperties, + ApiManagementServiceBaseProperties, + HostnameConfiguration, + HostnameType, + CertificateInformation, + CertificateSource, + CertificateStatus, + PublicNetworkAccess, + ConfigurationApi, + LegacyApiState, + VirtualNetworkConfiguration, + AdditionalLocation, + NatGatewayState, + PlatformVersion, + CertificateConfiguration, + CertificateConfigurationStoreName, + ApiVersionConstraint, + RemotePrivateEndpointConnectionWrapper, + PrivateEndpointConnectionWrapperProperties, + ArmIdWrapper, + PrivateLinkServiceConnectionState, + PrivateEndpointServiceConnectionStatus, + LegacyPortalStatus, + DeveloperPortalStatus, + ReleaseChannel, + ApiManagementServiceUpdateParameters, + ApiManagementServiceUpdateProperties, + ApiManagementServiceBackupRestoreParameters, + AccessType, + MigrateToStv2Contract, + MigrateToStv2Mode, + ApiManagementServiceGetSsoTokenResult, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceNameAvailabilityResult, + NameAvailabilityReason, + ApiManagementServiceGetDomainOwnershipIdentifierResult, + AllPoliciesContract, + AllPoliciesContractProperties, + PolicyComplianceState, + ResourceSkuResult, + ResourceSku, + ResourceSkuCapacity, + ResourceSkuCapacityScaleType, + NetworkStatusContractByLocation, + NetworkStatusContract, + ConnectivityStatusContract, + ConnectivityStatusType, + OutboundEnvironmentEndpointList, + OutboundEnvironmentEndpoint, + EndpointDependency, + EndpointDetail, + PolicyDescriptionCollection, + PolicyDescriptionContract, + PolicyDescriptionContractProperties, + OperationResultContract, + OperationResultContractProperties, + AsyncOperationStatus, + ErrorResponseBody, + ErrorFieldContract, + OperationResultLogItemContract, + PortalSettingsCollection, + PortalSettingsContract, + PortalSettingsContractProperties, + QuotaCounterCollection, + QuotaCounterContract, + QuotaCounterValueContractProperties, + QuotaCounterValueUpdateContract, + RegionContract, + ReportRecordContract, + RequestReportRecordContract, + ResolverContract, + ResolverEntityBaseContract, + ResolverUpdateContract, + ResolverUpdateContractProperties, + IssueUpdateContract, + IssueUpdateContractProperties, + IssueCommentContract, + IssueCommentContractProperties, + IssueAttachmentContract, + IssueAttachmentContractProperties, + TagDescriptionContract, + TagDescriptionContractProperties, + TagDescriptionBaseProperties, + TagDescriptionCreateParameters, + ToolContract, + ToolContractProperties, + AuthorizationProviderContract, + AuthorizationProviderContractProperties, + AuthorizationProviderOAuth2Settings, + AuthorizationProviderOAuth2GrantTypes, + AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType, + AuthorizationProviderKeyVaultContract, + AuthorizationProviderFederatedIdentityCredentialsProperties, + AuthorizationProviderKeyVaultCreateProperties, + AuthorizationContract, + AuthorizationContractProperties, + AuthorizationType, + OAuth2GrantType, + AuthorizationError, + AuthorizationConfirmConsentCodeRequestContract, + AuthorizationLoginRequestContract, + AuthorizationLoginResponseContract, + AuthorizationAccessPolicyContract, + AuthorizationAccessPolicyContractProperties, + AuthorizationServerContract, + AuthorizationServerContractProperties, + GrantType, + AuthorizationServerContractBaseProperties, + AuthorizationMethod, + ClientAuthenticationMethod, + TokenBodyParameterContract, + BearerTokenSendingMethod, + AuthorizationServerUpdateContract, + AuthorizationServerUpdateContractProperties, + AuthorizationServerSecretsContract, + BackendReconnectContract, + BackendReconnectProperties, + CacheContract, + CacheContractProperties, + CacheUpdateParameters, + CacheUpdateProperties, + ContentTypeContract, + ContentTypeContractProperties, + ContentItemContract, + DeletedServiceContract, + DeletedServiceContractProperties, + DocumentationContract, + DocumentationContractProperties, + DocumentationUpdateContract, + EmailTemplateContract, + EmailTemplateContractProperties, + EmailTemplateParametersContractProperties, + TemplateName, + EmailTemplateUpdateParameters, + EmailTemplateUpdateParameterProperties, + ApiManagementGatewayConfigConnectionResource, + GatewayConfigConnectionBaseProperties, + GatewayHostnameBindingResource, + GatewayHostnameBindingBaseProperties, + GatewayHostnameBindingKeyVault, + GatewayHostnameBindingKeyVaultLastStatus, + KeyVaultFetchCode, + GatewayHostnameBindingCertificate, + GatewayContract, + GatewayContractProperties, + ResourceLocationDataContract, + ManagedServiceIdentity, + ManagedServiceIdentityType, + UserAssignedIdentity, + GatewayKeysContract, + GatewayKeyRegenerationRequestContract, + KeyType, + GatewayTokenRequestContract, + GatewayTokenContract, + GatewayListDebugCredentialsContract, + GatewayListDebugCredentialsContractPurpose, + GatewayDebugCredentialsContract, + GatewayListTraceContract, + AssociationContract, + AssociationContractProperties, + GatewayHostnameConfigurationContract, + GatewayHostnameConfigurationContractProperties, + GatewayCertificateAuthorityContract, + GatewayCertificateAuthorityContractProperties, + UserContract, + UserContractProperties, + UserEntityBaseParameters, + UserState, + UserIdentityContract, + IdentityProviderContract, + IdentityProviderContractProperties, + IdentityProviderType, + IdentityProviderBaseParameters, + IdentityProviderCreateContract, + IdentityProviderCreateContractProperties, + IdentityProviderUpdateParameters, + IdentityProviderUpdateProperties, + ClientSecretContract, + RecipientUserCollection, + RecipientUserContract, + RecipientUsersContractProperties, + RecipientEmailCollection, + RecipientEmailContract, + RecipientEmailContractProperties, + OpenidConnectProviderContract, + OpenidConnectProviderContractProperties, + OpenidConnectProviderUpdateContract, + OpenidConnectProviderUpdateContractProperties, + PolicyRestrictionContract, + PolicyRestrictionContractProperties, + PolicyRestrictionRequireBase, + PolicyRestrictionUpdateContract, + PortalConfigContract, + PortalConfigProperties, + PortalConfigPropertiesSignin, + PortalConfigPropertiesSignup, + PortalConfigTermsOfServiceProperties, + PortalConfigDelegationProperties, + PortalConfigCorsProperties, + PortalConfigCspProperties, + PortalSettingsCspMode, + ClientApplicationContract, + ClientApplicationContractProperties, + ClientApplicationState, + ClientApplicationSecretsContract, + ClientApplicationSecretsContractEntra, + ClientApplicationProductLinkContract, + ClientApplicationProductLinkContractProperties, + PortalRevisionContract, + PortalRevisionContractProperties, + PortalRevisionStatus, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateEndpoint, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointConnectionRequest, + PrivateEndpointConnectionRequestProperties, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkResourceListResult, + TenantSettingsContract, + TenantSettingsContractProperties, + SettingsTypeName, + AccessInformationContract, + AccessInformationContractProperties, + AccessIdName, + AccessInformationCreateParameters, + AccessInformationCreateParameterProperties, + AccessInformationUpdateParameters, + AccessInformationUpdateParameterProperties, + AccessInformationSecretsContract, + DeployConfigurationParameters, + DeployConfigurationParameterProperties, + SaveConfigurationParameter, + SaveConfigurationParameterProperties, + TenantConfigurationSyncStateContract, + TenantConfigurationSyncStateContractProperties, + UserCreateParameters, + UserCreateParameterProperties, + AppType, + Confirmation, + UserUpdateParameters, + UserUpdateParametersProperties, + GenerateSsoUrlResult, + UserTokenParameters, + UserTokenParameterProperties, + UserTokenResult, + ApiManagementWorkspaceLinksResource, + ApiManagementWorkspaceLinksProperties, + WorkspaceLinksBaseProperties, + WorkspaceLinksGateway, + WorkspaceContract, + WorkspaceContractProperties, + ApiExportResult, + ExportResultFormat, + ApiExportResultValue, + ApiManagementSku, + ApiManagementSkuCapacity, + ApiManagementSkuCapacityScaleType, + ApiManagementSkuLocationInfo, + ApiManagementSkuZoneDetails, + ApiManagementSkuCapabilities, + ApiManagementSkuCosts, + ApiManagementSkuRestrictions, + ApiManagementSkuRestrictionsType, + ApiManagementSkuRestrictionInfo, + ApiManagementSkuRestrictionsReasonCode, + OperationStatusResult, + PolicyExportFormat, + KeyVaultRefreshState, + PolicyScopeContract, + ConfigurationIdName, + ExportFormat, + ExportApi, +} from "./models.js"; +export { + KnownProtocol, + KnownVersioningScheme, + KnownBearerTokenSendingMethods, + KnownApiType, + KnownMcpTransportType, + KnownCreatedByType, + KnownContentFormat, + KnownSoapApiType, + KnownTranslateRequiredQueryParametersConduct, + KnownPreferredIPVersion, + KnownConnectivityCheckProtocol, + KnownMethod, + KnownOrigin, + KnownSeverity, + KnownIssueType, + KnownConnectionStatus, + KnownPolicyContentFormat, + KnownPolicyIdName, + KnownAlwaysLog, + KnownSamplingType, + KnownDataMaskingMode, + KnownLlmDiagnosticSettings, + KnownLlmMessageLogTypes, + KnownHttpCorrelationProtocol, + KnownVerbosity, + KnownOperationNameFormat, + KnownState, + KnownBackendProtocol, + KnownBackendType, + KnownCarbonEmissionCategory, + KnownBackendSessionIdSource, + KnownLoggerType, + KnownNotificationName, + KnownPolicyFragmentContentFormat, + KnownProductAuthType, + KnownSchemaType, + KnownApiGatewaySkuType, + KnownVirtualNetworkType, + KnownGatewaySkuCapacityScaleType, + KnownSkuType, + KnownApimIdentityType, + KnownHostnameType, + KnownCertificateSource, + KnownCertificateStatus, + KnownPublicNetworkAccess, + KnownLegacyApiState, + KnownNatGatewayState, + KnownPlatformVersion, + KnownCertificateConfigurationStoreName, + KnownPrivateEndpointServiceConnectionStatus, + KnownLegacyPortalStatus, + KnownDeveloperPortalStatus, + KnownReleaseChannel, + KnownAccessType, + KnownMigrateToStv2Mode, + KnownPolicyComplianceState, + KnownResourceSkuCapacityScaleType, + KnownConnectivityStatusType, + KnownAuthorizationType, + KnownOAuth2GrantType, + KnownGrantType, + KnownClientAuthenticationMethod, + KnownBearerTokenSendingMethod, + KnownTemplateName, + KnownManagedServiceIdentityType, + KnownGatewayListDebugCredentialsContractPurpose, + KnownUserState, + KnownIdentityProviderType, + KnownPolicyRestrictionRequireBase, + KnownPortalSettingsCspMode, + KnownClientApplicationState, + KnownPortalRevisionStatus, + KnownPrivateEndpointConnectionProvisioningState, + KnownSettingsTypeName, + KnownAccessIdName, + KnownAppType, + KnownConfirmation, + KnownExportResultFormat, + KnownPolicyExportFormat, + KnownKeyVaultRefreshState, + KnownConfigurationIdName, + KnownExportFormat, + KnownExportApi, + KnownVersions, +} from "./models.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts b/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts deleted file mode 100644 index 570cf01ce201..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/models/mappers.ts +++ /dev/null @@ -1,23230 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export const ApiManagementGatewayBaseProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementGatewayBaseProperties", - type: { - name: "Composite", - className: "ApiManagementGatewayBaseProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "targetProvisioningState", - readOnly: true, - xmlName: "targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "createdAtUtc", - readOnly: true, - xmlName: "createdAtUtc", - type: { - name: "DateTime", - }, - }, - frontend: { - serializedName: "frontend", - xmlName: "frontend", - type: { - name: "Composite", - className: "FrontendConfiguration", - }, - }, - backend: { - serializedName: "backend", - xmlName: "backend", - type: { - name: "Composite", - className: "BackendConfiguration", - }, - }, - configurationApi: { - serializedName: "configurationApi", - xmlName: "configurationApi", - type: { - name: "Composite", - className: "GatewayConfigurationApi", - }, - }, - virtualNetworkType: { - serializedName: "virtualNetworkType", - xmlName: "virtualNetworkType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FrontendConfiguration: coreClient.CompositeMapper = { - serializedName: "FrontendConfiguration", - type: { - name: "Composite", - className: "FrontendConfiguration", - modelProperties: { - defaultHostname: { - serializedName: "defaultHostname", - readOnly: true, - xmlName: "defaultHostname", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendConfiguration: coreClient.CompositeMapper = { - serializedName: "BackendConfiguration", - type: { - name: "Composite", - className: "BackendConfiguration", - modelProperties: { - subnet: { - serializedName: "subnet", - xmlName: "subnet", - type: { - name: "Composite", - className: "BackendSubnetConfiguration", - }, - }, - }, - }, -}; - -export const BackendSubnetConfiguration: coreClient.CompositeMapper = { - serializedName: "BackendSubnetConfiguration", - type: { - name: "Composite", - className: "BackendSubnetConfiguration", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayConfigurationApi: coreClient.CompositeMapper = { - serializedName: "GatewayConfigurationApi", - type: { - name: "Composite", - className: "GatewayConfigurationApi", - modelProperties: { - hostname: { - serializedName: "hostname", - readOnly: true, - xmlName: "hostname", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementGatewaySkuProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementGatewaySkuProperties", - type: { - name: "Composite", - className: "ApiManagementGatewaySkuProperties", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - serializedName: "SystemData", - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - xmlName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - xmlName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - xmlName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - xmlName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - xmlName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - xmlName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const ApimResource: coreClient.CompositeMapper = { - serializedName: "ApimResource", - type: { - name: "Composite", - className: "ApimResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String", - }, - }, - tags: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - xmlName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - serializedName: "ErrorDetail", - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - xmlName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - xmlName: "message", - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - xmlName: "target", - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - xmlName: "details", - xmlElementName: "ErrorDetail", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - xmlName: "additionalInfo", - xmlElementName: "ErrorAdditionalInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - serializedName: "ErrorAdditionalInfo", - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - xmlName: "info", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const ApiManagementGatewaySkuPropertiesForPatch: coreClient.CompositeMapper = - { - serializedName: "ApiManagementGatewaySkuPropertiesForPatch", - type: { - name: "Composite", - className: "ApiManagementGatewaySkuPropertiesForPatch", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Number", - }, - }, - }, - }, - }; - -export const ApiManagementGatewayListResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementGatewayListResult", - type: { - name: "Composite", - className: "ApiManagementGatewayListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementGatewayResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementGatewayResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayResourceSkuResults: coreClient.CompositeMapper = { - serializedName: "GatewayResourceSkuResults", - type: { - name: "Composite", - className: "GatewayResourceSkuResults", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "GatewayResourceSkuResult", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayResourceSkuResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayResourceSkuResult: coreClient.CompositeMapper = { - serializedName: "GatewayResourceSkuResult", - type: { - name: "Composite", - className: "GatewayResourceSkuResult", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "GatewaySku", - }, - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "GatewaySkuCapacity", - }, - }, - }, - }, -}; - -export const GatewaySku: coreClient.CompositeMapper = { - serializedName: "GatewaySku", - type: { - name: "Composite", - className: "GatewaySku", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewaySkuCapacity: coreClient.CompositeMapper = { - serializedName: "GatewaySkuCapacity", - type: { - name: "Composite", - className: "GatewaySkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number", - }, - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number", - }, - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number", - }, - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AllPoliciesCollection: coreClient.CompositeMapper = { - serializedName: "AllPoliciesCollection", - type: { - name: "Composite", - className: "AllPoliciesCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AllPoliciesContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AllPoliciesContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiCollection: coreClient.CompositeMapper = { - serializedName: "ApiCollection", - type: { - name: "Composite", - className: "ApiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetContractDetails: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractDetails", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String", - }, - }, - versionQueryName: { - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String", - }, - }, - versionHeaderName: { - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "ApiEntityBaseContract", - type: { - name: "Composite", - className: "ApiEntityBaseContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - authenticationSettings: { - serializedName: "authenticationSettings", - xmlName: "authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - }, - }, - subscriptionKeyParameterNames: { - serializedName: "subscriptionKeyParameterNames", - xmlName: "subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - }, - }, - apiType: { - serializedName: "type", - xmlName: "type", - type: { - name: "String", - }, - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "apiRevision", - xmlName: "apiRevision", - type: { - name: "String", - }, - }, - apiVersion: { - constraints: { - MaxLength: 100, - }, - serializedName: "apiVersion", - xmlName: "apiVersion", - type: { - name: "String", - }, - }, - isCurrent: { - serializedName: "isCurrent", - xmlName: "isCurrent", - type: { - name: "Boolean", - }, - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean", - }, - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String", - }, - }, - apiVersionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "apiVersionDescription", - xmlName: "apiVersionDescription", - type: { - name: "String", - }, - }, - apiVersionSetId: { - serializedName: "apiVersionSetId", - xmlName: "apiVersionSetId", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean", - }, - }, - termsOfServiceUrl: { - serializedName: "termsOfServiceUrl", - xmlName: "termsOfServiceUrl", - type: { - name: "String", - }, - }, - contact: { - serializedName: "contact", - xmlName: "contact", - type: { - name: "Composite", - className: "ApiContactInformation", - }, - }, - license: { - serializedName: "license", - xmlName: "license", - type: { - name: "Composite", - className: "ApiLicenseInformation", - }, - }, - }, - }, -}; - -export const AuthenticationSettingsContract: coreClient.CompositeMapper = { - serializedName: "AuthenticationSettingsContract", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - modelProperties: { - oAuth2: { - serializedName: "oAuth2", - xmlName: "oAuth2", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract", - }, - }, - openid: { - serializedName: "openid", - xmlName: "openid", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract", - }, - }, - oAuth2AuthenticationSettings: { - serializedName: "oAuth2AuthenticationSettings", - xmlName: "oAuth2AuthenticationSettings", - xmlElementName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract", - }, - }, - }, - }, - openidAuthenticationSettings: { - serializedName: "openidAuthenticationSettings", - xmlName: "openidAuthenticationSettings", - xmlElementName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract", - }, - }, - }, - }, - }, - }, -}; - -export const OAuth2AuthenticationSettingsContract: coreClient.CompositeMapper = - { - serializedName: "OAuth2AuthenticationSettingsContract", - type: { - name: "Composite", - className: "OAuth2AuthenticationSettingsContract", - modelProperties: { - authorizationServerId: { - serializedName: "authorizationServerId", - xmlName: "authorizationServerId", - type: { - name: "String", - }, - }, - scope: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const OpenIdAuthenticationSettingsContract: coreClient.CompositeMapper = - { - serializedName: "OpenIdAuthenticationSettingsContract", - type: { - name: "Composite", - className: "OpenIdAuthenticationSettingsContract", - modelProperties: { - openidProviderId: { - serializedName: "openidProviderId", - xmlName: "openidProviderId", - type: { - name: "String", - }, - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethods", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, - }; - -export const SubscriptionKeyParameterNamesContract: coreClient.CompositeMapper = - { - serializedName: "SubscriptionKeyParameterNamesContract", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - modelProperties: { - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "String", - }, - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiContactInformation: coreClient.CompositeMapper = { - serializedName: "ApiContactInformation", - type: { - name: "Composite", - className: "ApiContactInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String", - }, - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiLicenseInformation: coreClient.CompositeMapper = { - serializedName: "ApiLicenseInformation", - type: { - name: "Composite", - className: "ApiLicenseInformation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiCreateOrUpdateParameter: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateParameter", - type: { - name: "Composite", - className: "ApiCreateOrUpdateParameter", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - }, - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - }, - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String", - }, - }, - apiVersion: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String", - }, - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean", - }, - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean", - }, - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String", - }, - }, - apiVersionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String", - }, - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean", - }, - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String", - }, - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation", - }, - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation", - }, - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String", - }, - }, - wsdlSelector: { - serializedName: "properties.wsdlSelector", - xmlName: "properties.wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector", - }, - }, - soapApiType: { - serializedName: "properties.apiType", - xmlName: "properties.apiType", - type: { - name: "String", - }, - }, - translateRequiredQueryParametersConduct: { - serializedName: "properties.translateRequiredQueryParameters", - xmlName: "properties.translateRequiredQueryParameters", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiCreateOrUpdatePropertiesWsdlSelector: coreClient.CompositeMapper = - { - serializedName: "ApiCreateOrUpdatePropertiesWsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector", - modelProperties: { - wsdlServiceName: { - serializedName: "wsdlServiceName", - xmlName: "wsdlServiceName", - type: { - name: "String", - }, - }, - wsdlEndpointName: { - serializedName: "wsdlEndpointName", - xmlName: "wsdlEndpointName", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiUpdateContract: coreClient.CompositeMapper = { - serializedName: "ApiUpdateContract", - type: { - name: "Composite", - className: "ApiUpdateContract", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - }, - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - }, - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String", - }, - }, - apiVersion: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String", - }, - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean", - }, - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean", - }, - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String", - }, - }, - apiVersionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String", - }, - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean", - }, - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String", - }, - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation", - }, - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApiRevisionCollection: coreClient.CompositeMapper = { - serializedName: "ApiRevisionCollection", - type: { - name: "Composite", - className: "ApiRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiRevisionContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiRevisionContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionContract", - type: { - name: "Composite", - className: "ApiRevisionContract", - modelProperties: { - apiId: { - serializedName: "apiId", - readOnly: true, - xmlName: "apiId", - type: { - name: "String", - }, - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String", - }, - }, - createdDateTime: { - serializedName: "createdDateTime", - readOnly: true, - xmlName: "createdDateTime", - type: { - name: "DateTime", - }, - }, - updatedDateTime: { - serializedName: "updatedDateTime", - readOnly: true, - xmlName: "updatedDateTime", - type: { - name: "DateTime", - }, - }, - description: { - constraints: { - MaxLength: 256, - }, - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String", - }, - }, - privateUrl: { - serializedName: "privateUrl", - readOnly: true, - xmlName: "privateUrl", - type: { - name: "String", - }, - }, - isOnline: { - serializedName: "isOnline", - readOnly: true, - xmlName: "isOnline", - type: { - name: "Boolean", - }, - }, - isCurrent: { - serializedName: "isCurrent", - readOnly: true, - xmlName: "isCurrent", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApiReleaseCollection: coreClient.CompositeMapper = { - serializedName: "ApiReleaseCollection", - type: { - name: "Composite", - className: "ApiReleaseCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ApiReleaseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiReleaseContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationCollection: coreClient.CompositeMapper = { - serializedName: "OperationCollection", - type: { - name: "Composite", - className: "OperationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "OperationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationEntityBaseContract: coreClient.CompositeMapper = { - serializedName: "OperationEntityBaseContract", - type: { - name: "Composite", - className: "OperationEntityBaseContract", - modelProperties: { - templateParameters: { - serializedName: "templateParameters", - xmlName: "templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "RequestContract", - }, - }, - responses: { - serializedName: "responses", - xmlName: "responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract", - }, - }, - }, - }, - policies: { - serializedName: "policies", - xmlName: "policies", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ParameterContract: coreClient.CompositeMapper = { - serializedName: "ParameterContract", - type: { - name: "Composite", - className: "ParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String", - }, - }, - defaultValue: { - serializedName: "defaultValue", - xmlName: "defaultValue", - type: { - name: "String", - }, - }, - required: { - serializedName: "required", - xmlName: "required", - type: { - name: "Boolean", - }, - }, - values: { - serializedName: "values", - xmlName: "values", - xmlElementName: "ParameterContractValuesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String", - }, - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String", - }, - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" }, - }, - }, - }, - }, - }, -}; - -export const ParameterExampleContract: coreClient.CompositeMapper = { - serializedName: "ParameterExampleContract", - type: { - name: "Composite", - className: "ParameterExampleContract", - modelProperties: { - summary: { - serializedName: "summary", - xmlName: "summary", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "any", - }, - }, - externalValue: { - serializedName: "externalValue", - xmlName: "externalValue", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RequestContract: coreClient.CompositeMapper = { - serializedName: "RequestContract", - type: { - name: "Composite", - className: "RequestContract", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - queryParameters: { - serializedName: "queryParameters", - xmlName: "queryParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract", - }, - }, - }, - }, - }, - }, -}; - -export const RepresentationContract: coreClient.CompositeMapper = { - serializedName: "RepresentationContract", - type: { - name: "Composite", - className: "RepresentationContract", - modelProperties: { - contentType: { - serializedName: "contentType", - required: true, - xmlName: "contentType", - type: { - name: "String", - }, - }, - schemaId: { - serializedName: "schemaId", - xmlName: "schemaId", - type: { - name: "String", - }, - }, - typeName: { - serializedName: "typeName", - xmlName: "typeName", - type: { - name: "String", - }, - }, - formParameters: { - serializedName: "formParameters", - xmlName: "formParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - examples: { - serializedName: "examples", - xmlName: "examples", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "ParameterExampleContract" }, - }, - }, - }, - }, - }, -}; - -export const ResponseContract: coreClient.CompositeMapper = { - serializedName: "ResponseContract", - type: { - name: "Composite", - className: "ResponseContract", - modelProperties: { - statusCode: { - serializedName: "statusCode", - required: true, - xmlName: "statusCode", - type: { - name: "Number", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - representations: { - serializedName: "representations", - xmlName: "representations", - xmlElementName: "RepresentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RepresentationContract", - }, - }, - }, - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - }, - }, -}; - -export const OperationUpdateContract: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContract", - type: { - name: "Composite", - className: "OperationUpdateContract", - modelProperties: { - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract", - }, - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract", - }, - }, - }, - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String", - }, - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyCollection: coreClient.CompositeMapper = { - serializedName: "PolicyCollection", - type: { - name: "Composite", - className: "PolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagCollection: coreClient.CompositeMapper = { - serializedName: "TagCollection", - type: { - name: "Composite", - className: "TagCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResolverCollection: coreClient.CompositeMapper = { - serializedName: "ResolverCollection", - type: { - name: "Composite", - className: "ResolverCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ResolverContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResolverUpdateContract: coreClient.CompositeMapper = { - serializedName: "ResolverUpdateContract", - type: { - name: "Composite", - className: "ResolverUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductCollection: coreClient.CompositeMapper = { - serializedName: "ProductCollection", - type: { - name: "Composite", - className: "ProductCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ProductContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProductContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "ProductEntityBaseParameters", - type: { - name: "Composite", - className: "ProductEntityBaseParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - terms: { - serializedName: "terms", - xmlName: "terms", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "subscriptionRequired", - xmlName: "subscriptionRequired", - type: { - name: "Boolean", - }, - }, - approvalRequired: { - serializedName: "approvalRequired", - xmlName: "approvalRequired", - type: { - name: "Boolean", - }, - }, - subscriptionsLimit: { - serializedName: "subscriptionsLimit", - xmlName: "subscriptionsLimit", - type: { - name: "Number", - }, - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"], - }, - }, - }, - }, -}; - -export const SchemaCollection: coreClient.CompositeMapper = { - serializedName: "SchemaCollection", - type: { - name: "Composite", - className: "SchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "SchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SchemaContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiagnosticCollection: coreClient.CompositeMapper = { - serializedName: "DiagnosticCollection", - type: { - name: "Composite", - className: "DiagnosticCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "DiagnosticContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SamplingSettings: coreClient.CompositeMapper = { - serializedName: "SamplingSettings", - type: { - name: "Composite", - className: "SamplingSettings", - modelProperties: { - samplingType: { - serializedName: "samplingType", - xmlName: "samplingType", - type: { - name: "String", - }, - }, - percentage: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentage", - xmlName: "percentage", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PipelineDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "PipelineDiagnosticSettings", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - modelProperties: { - request: { - serializedName: "request", - xmlName: "request", - type: { - name: "Composite", - className: "HttpMessageDiagnostic", - }, - }, - response: { - serializedName: "response", - xmlName: "response", - type: { - name: "Composite", - className: "HttpMessageDiagnostic", - }, - }, - }, - }, -}; - -export const HttpMessageDiagnostic: coreClient.CompositeMapper = { - serializedName: "HttpMessageDiagnostic", - type: { - name: "Composite", - className: "HttpMessageDiagnostic", - modelProperties: { - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpMessageDiagnosticHeadersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - body: { - serializedName: "body", - xmlName: "body", - type: { - name: "Composite", - className: "BodyDiagnosticSettings", - }, - }, - dataMasking: { - serializedName: "dataMasking", - xmlName: "dataMasking", - type: { - name: "Composite", - className: "DataMasking", - }, - }, - }, - }, -}; - -export const BodyDiagnosticSettings: coreClient.CompositeMapper = { - serializedName: "BodyDiagnosticSettings", - type: { - name: "Composite", - className: "BodyDiagnosticSettings", - modelProperties: { - bytes: { - constraints: { - InclusiveMaximum: 8192, - }, - serializedName: "bytes", - xmlName: "bytes", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DataMasking: coreClient.CompositeMapper = { - serializedName: "DataMasking", - type: { - name: "Composite", - className: "DataMasking", - modelProperties: { - queryParams: { - serializedName: "queryParams", - xmlName: "queryParams", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity", - }, - }, - }, - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "DataMaskingEntity", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataMaskingEntity", - }, - }, - }, - }, - }, - }, -}; - -export const DataMaskingEntity: coreClient.CompositeMapper = { - serializedName: "DataMaskingEntity", - type: { - name: "Composite", - className: "DataMaskingEntity", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - mode: { - serializedName: "mode", - xmlName: "mode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueCollection: coreClient.CompositeMapper = { - serializedName: "IssueCollection", - type: { - name: "Composite", - className: "IssueCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueContractBaseProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractBaseProperties", - type: { - name: "Composite", - className: "IssueContractBaseProperties", - modelProperties: { - createdDate: { - serializedName: "createdDate", - xmlName: "createdDate", - type: { - name: "DateTime", - }, - }, - state: { - serializedName: "state", - xmlName: "state", - type: { - name: "String", - }, - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueUpdateContract: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContract", - type: { - name: "Composite", - className: "IssueUpdateContract", - modelProperties: { - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String", - }, - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String", - }, - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueCommentCollection: coreClient.CompositeMapper = { - serializedName: "IssueCommentCollection", - type: { - name: "Composite", - className: "IssueCommentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueCommentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueCommentContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueAttachmentCollection: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentCollection", - type: { - name: "Composite", - className: "IssueAttachmentCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "IssueAttachmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IssueAttachmentContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCollection", - type: { - name: "Composite", - className: "TagDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagDescriptionContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagDescriptionBaseProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionBaseProperties", - type: { - name: "Composite", - className: "TagDescriptionBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "externalDocsUrl", - xmlName: "externalDocsUrl", - type: { - name: "String", - }, - }, - externalDocsDescription: { - serializedName: "externalDocsDescription", - xmlName: "externalDocsDescription", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagDescriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "TagDescriptionCreateParameters", - type: { - name: "Composite", - className: "TagDescriptionCreateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String", - }, - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagResourceCollection: coreClient.CompositeMapper = { - serializedName: "TagResourceCollection", - type: { - name: "Composite", - className: "TagResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagResourceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagResourceContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagResourceContract: coreClient.CompositeMapper = { - serializedName: "TagResourceContract", - type: { - name: "Composite", - className: "TagResourceContract", - modelProperties: { - tag: { - serializedName: "tag", - xmlName: "tag", - type: { - name: "Composite", - className: "TagResourceContractProperties", - }, - }, - api: { - serializedName: "api", - xmlName: "api", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties", - }, - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties", - }, - }, - product: { - serializedName: "product", - xmlName: "product", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties", - }, - }, - }, - }, -}; - -export const TagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "TagResourceContractProperties", - type: { - name: "Composite", - className: "TagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - constraints: { - MaxLength: 160, - MinLength: 1, - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationTagResourceContractProperties: coreClient.CompositeMapper = - { - serializedName: "OperationTagResourceContractProperties", - type: { - name: "Composite", - className: "OperationTagResourceContractProperties", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - apiName: { - serializedName: "apiName", - readOnly: true, - xmlName: "apiName", - type: { - name: "String", - }, - }, - apiRevision: { - serializedName: "apiRevision", - readOnly: true, - xmlName: "apiRevision", - type: { - name: "String", - }, - }, - apiVersion: { - serializedName: "apiVersion", - readOnly: true, - xmlName: "apiVersion", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - xmlName: "description", - type: { - name: "String", - }, - }, - method: { - serializedName: "method", - readOnly: true, - xmlName: "method", - type: { - name: "String", - }, - }, - urlTemplate: { - serializedName: "urlTemplate", - readOnly: true, - xmlName: "urlTemplate", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WikiDocumentationContract: coreClient.CompositeMapper = { - serializedName: "WikiDocumentationContract", - type: { - name: "Composite", - className: "WikiDocumentationContract", - modelProperties: { - documentationId: { - serializedName: "documentationId", - xmlName: "documentationId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WikiUpdateContract: coreClient.CompositeMapper = { - serializedName: "WikiUpdateContract", - type: { - name: "Composite", - className: "WikiUpdateContract", - modelProperties: { - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract", - }, - }, - }, - }, - }, - }, -}; - -export const WikiCollection: coreClient.CompositeMapper = { - serializedName: "WikiCollection", - type: { - name: "Composite", - className: "WikiCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "WikiContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiExportResult: coreClient.CompositeMapper = { - serializedName: "ApiExportResult", - type: { - name: "Composite", - className: "ApiExportResult", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - exportResultFormat: { - serializedName: "format", - xmlName: "format", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "ApiExportResultValue", - }, - }, - }, - }, -}; - -export const ApiExportResultValue: coreClient.CompositeMapper = { - serializedName: "ApiExportResultValue", - type: { - name: "Composite", - className: "ApiExportResultValue", - modelProperties: { - link: { - serializedName: "link", - xmlName: "link", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetCollection: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetCollection", - type: { - name: "Composite", - className: "ApiVersionSetCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ApiVersionSetContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiVersionSetContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetEntityBase: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetEntityBase", - type: { - name: "Composite", - className: "ApiVersionSetEntityBase", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "versionQueryName", - xmlName: "versionQueryName", - type: { - name: "String", - }, - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "versionHeaderName", - xmlName: "versionHeaderName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetUpdateParameters", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParameters", - modelProperties: { - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String", - }, - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationProviderCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderCollection", - type: { - name: "Composite", - className: "AuthorizationProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationProviderContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationProviderOAuth2Settings: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderOAuth2Settings", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings", - modelProperties: { - redirectUrl: { - serializedName: "redirectUrl", - xmlName: "redirectUrl", - type: { - name: "String", - }, - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes", - }, - }, - }, - }, -}; - -export const AuthorizationProviderOAuth2GrantTypes: coreClient.CompositeMapper = - { - serializedName: "AuthorizationProviderOAuth2GrantTypes", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2GrantTypes", - modelProperties: { - authorizationCode: { - serializedName: "authorizationCode", - xmlName: "authorizationCode", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - clientCredentials: { - serializedName: "clientCredentials", - xmlName: "clientCredentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, - }; - -export const AuthorizationCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationCollection", - type: { - name: "Composite", - className: "AuthorizationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationError: coreClient.CompositeMapper = { - serializedName: "AuthorizationError", - type: { - name: "Composite", - className: "AuthorizationError", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationLoginRequestContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginRequestContract", - type: { - name: "Composite", - className: "AuthorizationLoginRequestContract", - modelProperties: { - postLoginRedirectUrl: { - serializedName: "postLoginRedirectUrl", - xmlName: "postLoginRedirectUrl", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationLoginResponseContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginResponseContract", - type: { - name: "Composite", - className: "AuthorizationLoginResponseContract", - modelProperties: { - loginLink: { - serializedName: "loginLink", - xmlName: "loginLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationConfirmConsentCodeRequestContract: coreClient.CompositeMapper = - { - serializedName: "AuthorizationConfirmConsentCodeRequestContract", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeRequestContract", - modelProperties: { - consentCode: { - serializedName: "consentCode", - xmlName: "consentCode", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationAccessPolicyCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyCollection", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationAccessPolicyContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerCollection: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerCollection", - type: { - name: "Composite", - className: "AuthorizationServerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "AuthorizationServerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthorizationServerContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerContractBaseProperties: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServerContractBaseProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractBaseProperties", - modelProperties: { - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - authorizationMethods: { - serializedName: "authorizationMethods", - xmlName: "authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - ], - }, - }, - }, - }, - clientAuthenticationMethod: { - serializedName: "clientAuthenticationMethod", - xmlName: "clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - tokenBodyParameters: { - serializedName: "tokenBodyParameters", - xmlName: "tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract", - }, - }, - }, - }, - tokenEndpoint: { - serializedName: "tokenEndpoint", - xmlName: "tokenEndpoint", - type: { - name: "String", - }, - }, - supportState: { - serializedName: "supportState", - xmlName: "supportState", - type: { - name: "Boolean", - }, - }, - defaultScope: { - serializedName: "defaultScope", - xmlName: "defaultScope", - type: { - name: "String", - }, - }, - bearerTokenSendingMethods: { - serializedName: "bearerTokenSendingMethods", - xmlName: "bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String", - }, - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const TokenBodyParameterContract: coreClient.CompositeMapper = { - serializedName: "TokenBodyParameterContract", - type: { - name: "Composite", - className: "TokenBodyParameterContract", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerSecretsContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerSecretsContract", - type: { - name: "Composite", - className: "AuthorizationServerSecretsContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - resourceOwnerUsername: { - serializedName: "resourceOwnerUsername", - xmlName: "resourceOwnerUsername", - type: { - name: "String", - }, - }, - resourceOwnerPassword: { - serializedName: "resourceOwnerPassword", - xmlName: "resourceOwnerPassword", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendCollection: coreClient.CompositeMapper = { - serializedName: "BackendCollection", - type: { - name: "Composite", - className: "BackendCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "BackendContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendBaseParameters: coreClient.CompositeMapper = { - serializedName: "BackendBaseParameters", - type: { - name: "Composite", - className: "BackendBaseParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "resourceId", - xmlName: "resourceId", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "BackendProperties", - }, - }, - credentials: { - serializedName: "credentials", - xmlName: "credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract", - }, - }, - proxy: { - serializedName: "proxy", - xmlName: "proxy", - type: { - name: "Composite", - className: "BackendProxyContract", - }, - }, - tls: { - serializedName: "tls", - xmlName: "tls", - type: { - name: "Composite", - className: "BackendTlsProperties", - }, - }, - circuitBreaker: { - serializedName: "circuitBreaker", - xmlName: "circuitBreaker", - type: { - name: "Composite", - className: "BackendCircuitBreaker", - }, - }, - pool: { - serializedName: "pool", - xmlName: "pool", - type: { - name: "Composite", - className: "BackendBaseParametersPool", - }, - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendProperties: coreClient.CompositeMapper = { - serializedName: "BackendProperties", - type: { - name: "Composite", - className: "BackendProperties", - modelProperties: { - serviceFabricCluster: { - serializedName: "serviceFabricCluster", - xmlName: "serviceFabricCluster", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties", - }, - }, - }, - }, -}; - -export const BackendServiceFabricClusterProperties: coreClient.CompositeMapper = - { - serializedName: "BackendServiceFabricClusterProperties", - type: { - name: "Composite", - className: "BackendServiceFabricClusterProperties", - modelProperties: { - clientCertificateId: { - serializedName: "clientCertificateId", - xmlName: "clientCertificateId", - type: { - name: "String", - }, - }, - clientCertificatethumbprint: { - serializedName: "clientCertificatethumbprint", - xmlName: "clientCertificatethumbprint", - type: { - name: "String", - }, - }, - maxPartitionResolutionRetries: { - serializedName: "maxPartitionResolutionRetries", - xmlName: "maxPartitionResolutionRetries", - type: { - name: "Number", - }, - }, - managementEndpoints: { - serializedName: "managementEndpoints", - required: true, - xmlName: "managementEndpoints", - xmlElementName: - "BackendServiceFabricClusterPropertiesManagementEndpointsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - serverCertificateThumbprints: { - serializedName: "serverCertificateThumbprints", - xmlName: "serverCertificateThumbprints", - xmlElementName: - "BackendServiceFabricClusterPropertiesServerCertificateThumbprintsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - serverX509Names: { - serializedName: "serverX509Names", - xmlName: "serverX509Names", - xmlElementName: "X509CertificateName", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "X509CertificateName", - }, - }, - }, - }, - }, - }, - }; - -export const X509CertificateName: coreClient.CompositeMapper = { - serializedName: "X509CertificateName", - type: { - name: "Composite", - className: "X509CertificateName", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - issuerCertificateThumbprint: { - serializedName: "issuerCertificateThumbprint", - xmlName: "issuerCertificateThumbprint", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendCredentialsContract: coreClient.CompositeMapper = { - serializedName: "BackendCredentialsContract", - type: { - name: "Composite", - className: "BackendCredentialsContract", - modelProperties: { - certificateIds: { - constraints: { - MaxItems: 32, - }, - serializedName: "certificateIds", - xmlName: "certificateIds", - xmlElementName: "BackendCredentialsContractCertificateIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - certificate: { - constraints: { - MaxItems: 32, - }, - serializedName: "certificate", - xmlName: "certificate", - xmlElementName: "BackendCredentialsContractCertificateItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - query: { - serializedName: "query", - xmlName: "query", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - }, - header: { - serializedName: "header", - xmlName: "header", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - }, - authorization: { - serializedName: "authorization", - xmlName: "authorization", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials", - }, - }, - }, - }, -}; - -export const BackendAuthorizationHeaderCredentials: coreClient.CompositeMapper = - { - serializedName: "BackendAuthorizationHeaderCredentials", - type: { - name: "Composite", - className: "BackendAuthorizationHeaderCredentials", - modelProperties: { - scheme: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "scheme", - required: true, - xmlName: "scheme", - type: { - name: "String", - }, - }, - parameter: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "parameter", - required: true, - xmlName: "parameter", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const BackendProxyContract: coreClient.CompositeMapper = { - serializedName: "BackendProxyContract", - type: { - name: "Composite", - className: "BackendProxyContract", - modelProperties: { - url: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String", - }, - }, - username: { - serializedName: "username", - xmlName: "username", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendTlsProperties: coreClient.CompositeMapper = { - serializedName: "BackendTlsProperties", - type: { - name: "Composite", - className: "BackendTlsProperties", - modelProperties: { - validateCertificateChain: { - defaultValue: true, - serializedName: "validateCertificateChain", - xmlName: "validateCertificateChain", - type: { - name: "Boolean", - }, - }, - validateCertificateName: { - defaultValue: true, - serializedName: "validateCertificateName", - xmlName: "validateCertificateName", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const BackendCircuitBreaker: coreClient.CompositeMapper = { - serializedName: "BackendCircuitBreaker", - type: { - name: "Composite", - className: "BackendCircuitBreaker", - modelProperties: { - rules: { - constraints: { - MaxItems: 15, - }, - serializedName: "rules", - xmlName: "rules", - xmlElementName: "CircuitBreakerRule", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CircuitBreakerRule", - }, - }, - }, - }, - }, - }, -}; - -export const CircuitBreakerRule: coreClient.CompositeMapper = { - serializedName: "CircuitBreakerRule", - type: { - name: "Composite", - className: "CircuitBreakerRule", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - failureCondition: { - serializedName: "failureCondition", - xmlName: "failureCondition", - type: { - name: "Composite", - className: "CircuitBreakerFailureCondition", - }, - }, - tripDuration: { - serializedName: "tripDuration", - xmlName: "tripDuration", - type: { - name: "TimeSpan", - }, - }, - acceptRetryAfter: { - serializedName: "acceptRetryAfter", - xmlName: "acceptRetryAfter", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const CircuitBreakerFailureCondition: coreClient.CompositeMapper = { - serializedName: "CircuitBreakerFailureCondition", - type: { - name: "Composite", - className: "CircuitBreakerFailureCondition", - modelProperties: { - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - percentage: { - serializedName: "percentage", - xmlName: "percentage", - type: { - name: "Number", - }, - }, - interval: { - serializedName: "interval", - xmlName: "interval", - type: { - name: "TimeSpan", - }, - }, - statusCodeRanges: { - constraints: { - MaxItems: 10, - }, - serializedName: "statusCodeRanges", - xmlName: "statusCodeRanges", - xmlElementName: "FailureStatusCodeRange", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FailureStatusCodeRange", - }, - }, - }, - }, - errorReasons: { - constraints: { - MaxItems: 10, - }, - serializedName: "errorReasons", - xmlName: "errorReasons", - xmlElementName: "CircuitBreakerFailureConditionErrorReasonsItem", - type: { - name: "Sequence", - element: { - constraints: { - MaxLength: 200, - }, - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const FailureStatusCodeRange: coreClient.CompositeMapper = { - serializedName: "FailureStatusCodeRange", - type: { - name: "Composite", - className: "FailureStatusCodeRange", - modelProperties: { - min: { - constraints: { - InclusiveMaximum: 599, - InclusiveMinimum: 200, - }, - serializedName: "min", - xmlName: "min", - type: { - name: "Number", - }, - }, - max: { - constraints: { - InclusiveMaximum: 599, - InclusiveMinimum: 200, - }, - serializedName: "max", - xmlName: "max", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const BackendPool: coreClient.CompositeMapper = { - serializedName: "BackendPool", - type: { - name: "Composite", - className: "BackendPool", - modelProperties: { - services: { - constraints: { - MinItems: 1, - }, - serializedName: "services", - xmlName: "services", - xmlElementName: "BackendPoolItem", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BackendPoolItem", - }, - }, - }, - }, - }, - }, -}; - -export const BackendPoolItem: coreClient.CompositeMapper = { - serializedName: "BackendPoolItem", - type: { - name: "Composite", - className: "BackendPoolItem", - modelProperties: { - id: { - serializedName: "id", - required: true, - xmlName: "id", - type: { - name: "String", - }, - }, - weight: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "weight", - xmlName: "weight", - type: { - name: "Number", - }, - }, - priority: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "priority", - xmlName: "priority", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const BackendUpdateParameters: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameters", - type: { - name: "Composite", - className: "BackendUpdateParameters", - modelProperties: { - title: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties", - }, - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract", - }, - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract", - }, - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties", - }, - }, - circuitBreaker: { - serializedName: "properties.circuitBreaker", - xmlName: "properties.circuitBreaker", - type: { - name: "Composite", - className: "BackendCircuitBreaker", - }, - }, - pool: { - serializedName: "properties.pool", - xmlName: "properties.pool", - type: { - name: "Composite", - className: "BackendBaseParametersPool", - }, - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheCollection: coreClient.CompositeMapper = { - serializedName: "CacheCollection", - type: { - name: "Composite", - className: "CacheCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CacheContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CacheContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CacheUpdateParameters", - type: { - name: "Composite", - className: "CacheUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - connectionString: { - constraints: { - MaxLength: 300, - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String", - }, - }, - useFromLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String", - }, - }, - resourceId: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateCollection: coreClient.CompositeMapper = { - serializedName: "CertificateCollection", - type: { - name: "Composite", - className: "CertificateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "CertificateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const KeyVaultLastAccessStatusContractProperties: coreClient.CompositeMapper = - { - serializedName: "KeyVaultLastAccessStatusContractProperties", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String", - }, - }, - timeStampUtc: { - serializedName: "timeStampUtc", - xmlName: "timeStampUtc", - type: { - name: "DateTime", - }, - }, - }, - }, - }; - -export const KeyVaultContractCreateProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractCreateProperties", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - modelProperties: { - secretIdentifier: { - serializedName: "secretIdentifier", - xmlName: "secretIdentifier", - type: { - name: "String", - }, - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateCreateOrUpdateParameters: coreClient.CompositeMapper = { - serializedName: "CertificateCreateOrUpdateParameters", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateParameters", - modelProperties: { - data: { - serializedName: "properties.data", - xmlName: "properties.data", - type: { - name: "String", - }, - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - }, - }, - }, - }, -}; - -export const ConnectivityCheckRequest: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequest", - type: { - name: "Composite", - className: "ConnectivityCheckRequest", - modelProperties: { - source: { - serializedName: "source", - xmlName: "source", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource", - }, - }, - destination: { - serializedName: "destination", - xmlName: "destination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination", - }, - }, - preferredIPVersion: { - serializedName: "preferredIPVersion", - xmlName: "preferredIPVersion", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String", - }, - }, - protocolConfiguration: { - serializedName: "protocolConfiguration", - xmlName: "protocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration", - }, - }, - }, - }, -}; - -export const ConnectivityCheckRequestSource: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestSource", - type: { - name: "Composite", - className: "ConnectivityCheckRequestSource", - modelProperties: { - region: { - serializedName: "region", - required: true, - xmlName: "region", - type: { - name: "String", - }, - }, - instance: { - serializedName: "instance", - xmlName: "instance", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityCheckRequestDestination: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckRequestDestination", - type: { - name: "Composite", - className: "ConnectivityCheckRequestDestination", - modelProperties: { - address: { - serializedName: "address", - required: true, - xmlName: "address", - type: { - name: "String", - }, - }, - port: { - serializedName: "port", - required: true, - xmlName: "port", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityCheckRequestProtocolConfiguration: coreClient.CompositeMapper = - { - serializedName: "ConnectivityCheckRequestProtocolConfiguration", - type: { - name: "Composite", - className: "ConnectivityCheckRequestProtocolConfiguration", - modelProperties: { - httpConfiguration: { - serializedName: "HTTPConfiguration", - xmlName: "HTTPConfiguration", - type: { - name: "Composite", - className: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - }, - }, - }, - }, - }; - -export const ConnectivityCheckRequestProtocolConfigurationHttpConfiguration: coreClient.CompositeMapper = - { - serializedName: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - type: { - name: "Composite", - className: - "ConnectivityCheckRequestProtocolConfigurationHttpConfiguration", - modelProperties: { - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String", - }, - }, - validStatusCodes: { - serializedName: "validStatusCodes", - xmlName: "validStatusCodes", - xmlElementName: "ArrayItemschema", - type: { - name: "Sequence", - element: { - type: { - name: "Number", - }, - }, - }, - }, - headers: { - serializedName: "headers", - xmlName: "headers", - xmlElementName: "HttpHeader", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HttpHeader", - }, - }, - }, - }, - }, - }, - }; - -export const HttpHeader: coreClient.CompositeMapper = { - serializedName: "HttpHeader", - type: { - name: "Composite", - className: "HttpHeader", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConnectivityCheckResponse: coreClient.CompositeMapper = { - serializedName: "ConnectivityCheckResponse", - type: { - name: "Composite", - className: "ConnectivityCheckResponse", - modelProperties: { - hops: { - serializedName: "hops", - readOnly: true, - xmlName: "hops", - xmlElementName: "ConnectivityHop", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityHop", - }, - }, - }, - }, - connectionStatus: { - serializedName: "connectionStatus", - readOnly: true, - xmlName: "connectionStatus", - type: { - name: "String", - }, - }, - avgLatencyInMs: { - serializedName: "avgLatencyInMs", - readOnly: true, - xmlName: "avgLatencyInMs", - type: { - name: "Number", - }, - }, - minLatencyInMs: { - serializedName: "minLatencyInMs", - readOnly: true, - xmlName: "minLatencyInMs", - type: { - name: "Number", - }, - }, - maxLatencyInMs: { - serializedName: "maxLatencyInMs", - readOnly: true, - xmlName: "maxLatencyInMs", - type: { - name: "Number", - }, - }, - probesSent: { - serializedName: "probesSent", - readOnly: true, - xmlName: "probesSent", - type: { - name: "Number", - }, - }, - probesFailed: { - serializedName: "probesFailed", - readOnly: true, - xmlName: "probesFailed", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ConnectivityHop: coreClient.CompositeMapper = { - serializedName: "ConnectivityHop", - type: { - name: "Composite", - className: "ConnectivityHop", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String", - }, - }, - address: { - serializedName: "address", - readOnly: true, - xmlName: "address", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - xmlName: "resourceId", - type: { - name: "String", - }, - }, - nextHopIds: { - serializedName: "nextHopIds", - readOnly: true, - xmlName: "nextHopIds", - xmlElementName: "ConnectivityHopNextHopIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - issues: { - serializedName: "issues", - readOnly: true, - xmlName: "issues", - xmlElementName: "ConnectivityIssue", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityIssue", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectivityIssue: coreClient.CompositeMapper = { - serializedName: "ConnectivityIssue", - type: { - name: "Composite", - className: "ConnectivityIssue", - modelProperties: { - origin: { - serializedName: "origin", - readOnly: true, - xmlName: "origin", - type: { - name: "String", - }, - }, - severity: { - serializedName: "severity", - readOnly: true, - xmlName: "severity", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "String", - }, - }, - context: { - serializedName: "context", - readOnly: true, - xmlName: "context", - xmlElementName: "IssueContext", - type: { - name: "Sequence", - element: { - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, - }, - }, -}; - -export const ContentTypeCollection: coreClient.CompositeMapper = { - serializedName: "ContentTypeCollection", - type: { - name: "Composite", - className: "ContentTypeCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentTypeContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentTypeContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentItemCollection: coreClient.CompositeMapper = { - serializedName: "ContentItemCollection", - type: { - name: "Composite", - className: "ContentItemCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "ContentItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentItemContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DeletedServicesCollection: coreClient.CompositeMapper = { - serializedName: "DeletedServicesCollection", - type: { - name: "Composite", - className: "DeletedServicesCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DeletedServiceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedServiceContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationListResult: coreClient.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "Operation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - display: { - serializedName: "display", - xmlName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - xmlName: "origin", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - serializedName: "OperationDisplay", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - xmlName: "operation", - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - xmlName: "resource", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceSkuResults: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResults", - type: { - name: "Composite", - className: "ResourceSkuResults", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ResourceSkuResult", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceSkuResult", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceSkuResult: coreClient.CompositeMapper = { - serializedName: "ResourceSkuResult", - type: { - name: "Composite", - className: "ResourceSkuResult", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ResourceSku", - }, - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity", - }, - }, - }, - }, -}; - -export const ResourceSku: coreClient.CompositeMapper = { - serializedName: "ResourceSku", - type: { - name: "Composite", - className: "ResourceSku", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ResourceSkuCapacity", - type: { - name: "Composite", - className: "ResourceSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number", - }, - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number", - }, - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number", - }, - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceBackupRestoreParameters: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceBackupRestoreParameters", - type: { - name: "Composite", - className: "ApiManagementServiceBackupRestoreParameters", - modelProperties: { - storageAccount: { - serializedName: "storageAccount", - required: true, - xmlName: "storageAccount", - type: { - name: "String", - }, - }, - containerName: { - serializedName: "containerName", - required: true, - xmlName: "containerName", - type: { - name: "String", - }, - }, - backupName: { - serializedName: "backupName", - required: true, - xmlName: "backupName", - type: { - name: "String", - }, - }, - accessType: { - defaultValue: "AccessKey", - serializedName: "accessType", - xmlName: "accessType", - type: { - name: "String", - }, - }, - accessKey: { - serializedName: "accessKey", - xmlName: "accessKey", - type: { - name: "String", - }, - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceBaseProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceBaseProperties", - type: { - name: "Composite", - className: "ApiManagementServiceBaseProperties", - modelProperties: { - notificationSenderEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "notificationSenderEmail", - xmlName: "notificationSenderEmail", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "targetProvisioningState", - readOnly: true, - xmlName: "targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "createdAtUtc", - readOnly: true, - xmlName: "createdAtUtc", - type: { - name: "DateTime", - }, - }, - gatewayUrl: { - serializedName: "gatewayUrl", - readOnly: true, - xmlName: "gatewayUrl", - type: { - name: "String", - }, - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String", - }, - }, - portalUrl: { - serializedName: "portalUrl", - readOnly: true, - xmlName: "portalUrl", - type: { - name: "String", - }, - }, - managementApiUrl: { - serializedName: "managementApiUrl", - readOnly: true, - xmlName: "managementApiUrl", - type: { - name: "String", - }, - }, - scmUrl: { - serializedName: "scmUrl", - readOnly: true, - xmlName: "scmUrl", - type: { - name: "String", - }, - }, - developerPortalUrl: { - serializedName: "developerPortalUrl", - readOnly: true, - xmlName: "developerPortalUrl", - type: { - name: "String", - }, - }, - hostnameConfigurations: { - serializedName: "hostnameConfigurations", - xmlName: "hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration", - }, - }, - }, - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String", - }, - }, - publicNetworkAccess: { - serializedName: "publicNetworkAccess", - xmlName: "publicNetworkAccess", - type: { - name: "String", - }, - }, - configurationApi: { - serializedName: "configurationApi", - xmlName: "configurationApi", - type: { - name: "Composite", - className: "ConfigurationApi", - }, - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - }, - }, - additionalLocations: { - serializedName: "additionalLocations", - xmlName: "additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation", - }, - }, - }, - }, - customProperties: { - serializedName: "customProperties", - xmlName: "customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - certificates: { - serializedName: "certificates", - xmlName: "certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration", - }, - }, - }, - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "enableClientCertificate", - xmlName: "enableClientCertificate", - type: { - name: "Boolean", - }, - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String", - }, - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean", - }, - }, - virtualNetworkType: { - serializedName: "virtualNetworkType", - xmlName: "virtualNetworkType", - type: { - name: "String", - }, - }, - apiVersionConstraint: { - serializedName: "apiVersionConstraint", - xmlName: "apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - }, - }, - restore: { - defaultValue: false, - serializedName: "restore", - xmlName: "restore", - type: { - name: "Boolean", - }, - }, - privateEndpointConnections: { - serializedName: "privateEndpointConnections", - xmlName: "privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - }, - }, - }, - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String", - }, - }, - legacyPortalStatus: { - defaultValue: "Enabled", - serializedName: "legacyPortalStatus", - xmlName: "legacyPortalStatus", - type: { - name: "String", - }, - }, - developerPortalStatus: { - defaultValue: "Enabled", - serializedName: "developerPortalStatus", - xmlName: "developerPortalStatus", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HostnameConfiguration: coreClient.CompositeMapper = { - serializedName: "HostnameConfiguration", - type: { - name: "Composite", - className: "HostnameConfiguration", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String", - }, - }, - hostName: { - serializedName: "hostName", - required: true, - xmlName: "hostName", - type: { - name: "String", - }, - }, - keyVaultId: { - serializedName: "keyVaultId", - xmlName: "keyVaultId", - type: { - name: "String", - }, - }, - identityClientId: { - serializedName: "identityClientId", - xmlName: "identityClientId", - type: { - name: "String", - }, - }, - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String", - }, - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String", - }, - }, - defaultSslBinding: { - defaultValue: false, - serializedName: "defaultSslBinding", - xmlName: "defaultSslBinding", - type: { - name: "Boolean", - }, - }, - negotiateClientCertificate: { - defaultValue: false, - serializedName: "negotiateClientCertificate", - xmlName: "negotiateClientCertificate", - type: { - name: "Boolean", - }, - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation", - }, - }, - certificateSource: { - serializedName: "certificateSource", - xmlName: "certificateSource", - type: { - name: "String", - }, - }, - certificateStatus: { - serializedName: "certificateStatus", - xmlName: "certificateStatus", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateInformation: coreClient.CompositeMapper = { - serializedName: "CertificateInformation", - type: { - name: "Composite", - className: "CertificateInformation", - modelProperties: { - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime", - }, - }, - thumbprint: { - serializedName: "thumbprint", - required: true, - xmlName: "thumbprint", - type: { - name: "String", - }, - }, - subject: { - serializedName: "subject", - required: true, - xmlName: "subject", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ConfigurationApi: coreClient.CompositeMapper = { - serializedName: "ConfigurationApi", - type: { - name: "Composite", - className: "ConfigurationApi", - modelProperties: { - legacyApi: { - defaultValue: "Enabled", - serializedName: "legacyApi", - xmlName: "legacyApi", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualNetworkConfiguration: coreClient.CompositeMapper = { - serializedName: "VirtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - modelProperties: { - vnetid: { - serializedName: "vnetid", - readOnly: true, - xmlName: "vnetid", - type: { - name: "String", - }, - }, - subnetname: { - serializedName: "subnetname", - readOnly: true, - xmlName: "subnetname", - type: { - name: "String", - }, - }, - subnetResourceId: { - constraints: { - Pattern: new RegExp( - "^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$", - ), - }, - serializedName: "subnetResourceId", - xmlName: "subnetResourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AdditionalLocation: coreClient.CompositeMapper = { - serializedName: "AdditionalLocation", - type: { - name: "Composite", - className: "AdditionalLocation", - modelProperties: { - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - }, - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "AdditionalLocationZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIPAddresses: { - serializedName: "publicIPAddresses", - readOnly: true, - xmlName: "publicIPAddresses", - xmlElementName: "AdditionalLocationPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - privateIPAddresses: { - serializedName: "privateIPAddresses", - readOnly: true, - xmlName: "privateIPAddresses", - xmlElementName: "AdditionalLocationPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIpAddressId: { - serializedName: "publicIpAddressId", - xmlName: "publicIpAddressId", - type: { - name: "String", - }, - }, - virtualNetworkConfiguration: { - serializedName: "virtualNetworkConfiguration", - xmlName: "virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - }, - }, - gatewayRegionalUrl: { - serializedName: "gatewayRegionalUrl", - readOnly: true, - xmlName: "gatewayRegionalUrl", - type: { - name: "String", - }, - }, - natGatewayState: { - serializedName: "natGatewayState", - xmlName: "natGatewayState", - type: { - name: "String", - }, - }, - outboundPublicIPAddresses: { - serializedName: "outboundPublicIPAddresses", - readOnly: true, - xmlName: "outboundPublicIPAddresses", - xmlElementName: "AdditionalLocationOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - disableGateway: { - defaultValue: false, - serializedName: "disableGateway", - xmlName: "disableGateway", - type: { - name: "Boolean", - }, - }, - platformVersion: { - serializedName: "platformVersion", - readOnly: true, - xmlName: "platformVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceSkuProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceSkuProperties", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - required: true, - xmlName: "capacity", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const CertificateConfiguration: coreClient.CompositeMapper = { - serializedName: "CertificateConfiguration", - type: { - name: "Composite", - className: "CertificateConfiguration", - modelProperties: { - encodedCertificate: { - serializedName: "encodedCertificate", - xmlName: "encodedCertificate", - type: { - name: "String", - }, - }, - certificatePassword: { - serializedName: "certificatePassword", - xmlName: "certificatePassword", - type: { - name: "String", - }, - }, - storeName: { - serializedName: "storeName", - required: true, - xmlName: "storeName", - type: { - name: "String", - }, - }, - certificate: { - serializedName: "certificate", - xmlName: "certificate", - type: { - name: "Composite", - className: "CertificateInformation", - }, - }, - }, - }, -}; - -export const ApiVersionConstraint: coreClient.CompositeMapper = { - serializedName: "ApiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - modelProperties: { - minApiVersion: { - serializedName: "minApiVersion", - xmlName: "minApiVersion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RemotePrivateEndpointConnectionWrapper: coreClient.CompositeMapper = - { - serializedName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String", - }, - }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "ArmIdWrapper", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - groupIds: { - serializedName: "properties.groupIds", - readOnly: true, - xmlName: "properties.groupIds", - xmlElementName: - "PrivateEndpointConnectionWrapperPropertiesGroupIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, - }; - -export const ArmIdWrapper: coreClient.CompositeMapper = { - serializedName: "ArmIdWrapper", - type: { - name: "Composite", - className: "ArmIdWrapper", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { - serializedName: "PrivateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - modelProperties: { - status: { - serializedName: "status", - xmlName: "status", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - actionsRequired: { - serializedName: "actionsRequired", - xmlName: "actionsRequired", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceIdentity: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceIdentity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity", - modelProperties: { - type: { - serializedName: "type", - required: true, - xmlName: "type", - type: { - name: "String", - }, - }, - principalId: { - serializedName: "principalId", - readOnly: true, - xmlName: "principalId", - type: { - name: "Uuid", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - xmlName: "tenantId", - type: { - name: "Uuid", - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - xmlName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" }, - }, - }, - }, - }, - }, -}; - -export const UserIdentityProperties: coreClient.CompositeMapper = { - serializedName: "UserIdentityProperties", - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String", - }, - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MigrateToStv2Contract: coreClient.CompositeMapper = { - serializedName: "MigrateToStv2Contract", - type: { - name: "Composite", - className: "MigrateToStv2Contract", - modelProperties: { - mode: { - serializedName: "mode", - xmlName: "mode", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceListResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceListResult", - type: { - name: "Composite", - className: "ApiManagementServiceListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementServiceResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementServiceResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceGetSsoTokenResult: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceGetSsoTokenResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetSsoTokenResult", - modelProperties: { - redirectUri: { - serializedName: "redirectUri", - xmlName: "redirectUri", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceCheckNameAvailabilityParameters: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceCheckNameAvailabilityParameters", - type: { - name: "Composite", - className: "ApiManagementServiceCheckNameAvailabilityParameters", - modelProperties: { - name: { - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceNameAvailabilityResult: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceNameAvailabilityResult", - type: { - name: "Composite", - className: "ApiManagementServiceNameAvailabilityResult", - modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", - readOnly: true, - xmlName: "nameAvailable", - type: { - name: "Boolean", - }, - }, - message: { - serializedName: "message", - readOnly: true, - xmlName: "message", - type: { - name: "String", - }, - }, - reason: { - serializedName: "reason", - xmlName: "reason", - type: { - name: "Enum", - allowedValues: ["Valid", "Invalid", "AlreadyExists"], - }, - }, - }, - }, - }; - -export const ApiManagementServiceGetDomainOwnershipIdentifierResult: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - type: { - name: "Composite", - className: "ApiManagementServiceGetDomainOwnershipIdentifierResult", - modelProperties: { - domainOwnershipIdentifier: { - serializedName: "domainOwnershipIdentifier", - readOnly: true, - xmlName: "domainOwnershipIdentifier", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceApplyNetworkConfigurationParameters: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceApplyNetworkConfigurationParameters", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationParameters", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const DocumentationCollection: coreClient.CompositeMapper = { - serializedName: "DocumentationCollection", - type: { - name: "Composite", - className: "DocumentationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "DocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DocumentationContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DocumentationUpdateContract: coreClient.CompositeMapper = { - serializedName: "DocumentationUpdateContract", - type: { - name: "Composite", - className: "DocumentationUpdateContract", - modelProperties: { - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateCollection: coreClient.CompositeMapper = { - serializedName: "EmailTemplateCollection", - type: { - name: "Composite", - className: "EmailTemplateCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "EmailTemplateContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateParametersContractProperties: coreClient.CompositeMapper = - { - serializedName: "EmailTemplateParametersContractProperties", - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties", - modelProperties: { - name: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - title: { - constraints: { - MaxLength: 4096, - MinLength: 1, - }, - serializedName: "title", - xmlName: "title", - type: { - name: "String", - }, - }, - description: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const EmailTemplateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "EmailTemplateUpdateParameters", - type: { - name: "Composite", - className: "EmailTemplateUpdateParameters", - modelProperties: { - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String", - }, - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - body: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String", - }, - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties", - }, - }, - }, - }, - }, - }, -}; - -export const ApiManagementGatewayConfigConnectionListResult: coreClient.CompositeMapper = - { - serializedName: "ApiManagementGatewayConfigConnectionListResult", - type: { - name: "Composite", - className: "ApiManagementGatewayConfigConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementGatewayConfigConnectionResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementGatewayConfigConnectionResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayCollection: coreClient.CompositeMapper = { - serializedName: "GatewayCollection", - type: { - name: "Composite", - className: "GatewayCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceLocationDataContract: coreClient.CompositeMapper = { - serializedName: "ResourceLocationDataContract", - type: { - name: "Composite", - className: "ResourceLocationDataContract", - modelProperties: { - name: { - constraints: { - MaxLength: 256, - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - city: { - constraints: { - MaxLength: 256, - }, - serializedName: "city", - xmlName: "city", - type: { - name: "String", - }, - }, - district: { - constraints: { - MaxLength: 256, - }, - serializedName: "district", - xmlName: "district", - type: { - name: "String", - }, - }, - countryOrRegion: { - constraints: { - MaxLength: 256, - }, - serializedName: "countryOrRegion", - xmlName: "countryOrRegion", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayKeysContract: coreClient.CompositeMapper = { - serializedName: "GatewayKeysContract", - type: { - name: "Composite", - className: "GatewayKeysContract", - modelProperties: { - primary: { - serializedName: "primary", - xmlName: "primary", - type: { - name: "String", - }, - }, - secondary: { - serializedName: "secondary", - xmlName: "secondary", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayKeyRegenerationRequestContract: coreClient.CompositeMapper = - { - serializedName: "GatewayKeyRegenerationRequestContract", - type: { - name: "Composite", - className: "GatewayKeyRegenerationRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"], - }, - }, - }, - }, - }; - -export const GatewayTokenRequestContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenRequestContract", - type: { - name: "Composite", - className: "GatewayTokenRequestContract", - modelProperties: { - keyType: { - serializedName: "keyType", - required: true, - xmlName: "keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"], - }, - }, - expiry: { - serializedName: "expiry", - required: true, - xmlName: "expiry", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const GatewayTokenContract: coreClient.CompositeMapper = { - serializedName: "GatewayTokenContract", - type: { - name: "Composite", - className: "GatewayTokenContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayHostnameConfigurationCollection: coreClient.CompositeMapper = - { - serializedName: "GatewayHostnameConfigurationCollection", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayHostnameConfigurationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayCertificateAuthorityCollection: coreClient.CompositeMapper = - { - serializedName: "GatewayCertificateAuthorityCollection", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GatewayCertificateAuthorityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayListDebugCredentialsContract: coreClient.CompositeMapper = { - serializedName: "GatewayListDebugCredentialsContract", - type: { - name: "Composite", - className: "GatewayListDebugCredentialsContract", - modelProperties: { - credentialsExpireAfter: { - serializedName: "credentialsExpireAfter", - xmlName: "credentialsExpireAfter", - type: { - name: "TimeSpan", - }, - }, - purposes: { - serializedName: "purposes", - required: true, - xmlName: "purposes", - xmlElementName: "GatewayListDebugCredentialsContractPurpose", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - apiId: { - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayDebugCredentialsContract: coreClient.CompositeMapper = { - serializedName: "GatewayDebugCredentialsContract", - type: { - name: "Composite", - className: "GatewayDebugCredentialsContract", - modelProperties: { - token: { - serializedName: "token", - xmlName: "token", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayListTraceContract: coreClient.CompositeMapper = { - serializedName: "GatewayListTraceContract", - type: { - name: "Composite", - className: "GatewayListTraceContract", - modelProperties: { - traceId: { - serializedName: "traceId", - xmlName: "traceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupCollection: coreClient.CompositeMapper = { - serializedName: "GroupCollection", - type: { - name: "Composite", - className: "GroupCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "GroupContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupContractProperties: coreClient.CompositeMapper = { - serializedName: "GroupContractProperties", - type: { - name: "Composite", - className: "GroupContractProperties", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - builtIn: { - serializedName: "builtIn", - readOnly: true, - xmlName: "builtIn", - type: { - name: "Boolean", - }, - }, - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"], - }, - }, - externalId: { - serializedName: "externalId", - xmlName: "externalId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupCreateParameters: coreClient.CompositeMapper = { - serializedName: "GroupCreateParameters", - type: { - name: "Composite", - className: "GroupCreateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"], - }, - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupUpdateParameters: coreClient.CompositeMapper = { - serializedName: "GroupUpdateParameters", - type: { - name: "Composite", - className: "GroupUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"], - }, - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserCollection: coreClient.CompositeMapper = { - serializedName: "UserCollection", - type: { - name: "Composite", - className: "UserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "UserEntityBaseParameters", - type: { - name: "Composite", - className: "UserEntityBaseParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "state", - xmlName: "state", - type: { - name: "String", - }, - }, - note: { - serializedName: "note", - xmlName: "note", - type: { - name: "String", - }, - }, - identities: { - serializedName: "identities", - xmlName: "identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract", - }, - }, - }, - }, - }, - }, -}; - -export const UserIdentityContract: coreClient.CompositeMapper = { - serializedName: "UserIdentityContract", - type: { - name: "Composite", - className: "UserIdentityContract", - modelProperties: { - provider: { - serializedName: "provider", - xmlName: "provider", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderList: coreClient.CompositeMapper = { - serializedName: "IdentityProviderList", - type: { - name: "Composite", - className: "IdentityProviderList", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "IdentityProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentityProviderContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderBaseParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderBaseParameters", - type: { - name: "Composite", - className: "IdentityProviderBaseParameters", - modelProperties: { - type: { - serializedName: "type", - xmlName: "type", - type: { - name: "String", - }, - }, - signinTenant: { - serializedName: "signinTenant", - xmlName: "signinTenant", - type: { - name: "String", - }, - }, - allowedTenants: { - constraints: { - MaxItems: 32, - }, - serializedName: "allowedTenants", - xmlName: "allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - authority: { - serializedName: "authority", - xmlName: "authority", - type: { - name: "String", - }, - }, - signupPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "signupPolicyName", - xmlName: "signupPolicyName", - type: { - name: "String", - }, - }, - signinPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "signinPolicyName", - xmlName: "signinPolicyName", - type: { - name: "String", - }, - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "profileEditingPolicyName", - xmlName: "profileEditingPolicyName", - type: { - name: "String", - }, - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "passwordResetPolicyName", - xmlName: "passwordResetPolicyName", - type: { - name: "String", - }, - }, - clientLibrary: { - constraints: { - MaxLength: 16, - }, - serializedName: "clientLibrary", - xmlName: "clientLibrary", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderUpdateParameters: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateParameters", - type: { - name: "Composite", - className: "IdentityProviderUpdateParameters", - modelProperties: { - type: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String", - }, - }, - allowedTenants: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String", - }, - }, - signupPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String", - }, - }, - signinPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String", - }, - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String", - }, - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String", - }, - }, - clientLibrary: { - constraints: { - MaxLength: 16, - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String", - }, - }, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ClientSecretContract: coreClient.CompositeMapper = { - serializedName: "ClientSecretContract", - type: { - name: "Composite", - className: "ClientSecretContract", - modelProperties: { - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerCollection: coreClient.CompositeMapper = { - serializedName: "LoggerCollection", - type: { - name: "Composite", - className: "LoggerCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "LoggerContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LoggerContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerUpdateContract: coreClient.CompositeMapper = { - serializedName: "LoggerUpdateContract", - type: { - name: "Composite", - className: "LoggerUpdateContract", - modelProperties: { - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NamedValueCollection: coreClient.CompositeMapper = { - serializedName: "NamedValueCollection", - type: { - name: "Composite", - className: "NamedValueCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NamedValueContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NamedValueContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueEntityBaseParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueEntityBaseParameters", - type: { - name: "Composite", - className: "NamedValueEntityBaseParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32, - }, - serializedName: "tags", - xmlName: "tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - secret: { - serializedName: "secret", - xmlName: "secret", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NamedValueUpdateParameters: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameters", - type: { - name: "Composite", - className: "NamedValueUpdateParameters", - modelProperties: { - tags: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean", - }, - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1, - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - }, - }, - }, - }, -}; - -export const NamedValueSecretContract: coreClient.CompositeMapper = { - serializedName: "NamedValueSecretContract", - type: { - name: "Composite", - className: "NamedValueSecretContract", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NetworkStatusContractByLocation: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContractByLocation", - type: { - name: "Composite", - className: "NetworkStatusContractByLocation", - modelProperties: { - location: { - constraints: { - MinLength: 1, - }, - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - networkStatus: { - serializedName: "networkStatus", - xmlName: "networkStatus", - type: { - name: "Composite", - className: "NetworkStatusContract", - }, - }, - }, - }, -}; - -export const NetworkStatusContract: coreClient.CompositeMapper = { - serializedName: "NetworkStatusContract", - type: { - name: "Composite", - className: "NetworkStatusContract", - modelProperties: { - dnsServers: { - serializedName: "dnsServers", - required: true, - xmlName: "dnsServers", - xmlElementName: "NetworkStatusContractDnsServersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - connectivityStatus: { - serializedName: "connectivityStatus", - required: true, - xmlName: "connectivityStatus", - xmlElementName: "ConnectivityStatusContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectivityStatusContract", - }, - }, - }, - }, - }, - }, -}; - -export const ConnectivityStatusContract: coreClient.CompositeMapper = { - serializedName: "ConnectivityStatusContract", - type: { - name: "Composite", - className: "ConnectivityStatusContract", - modelProperties: { - name: { - constraints: { - MinLength: 1, - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - required: true, - xmlName: "status", - type: { - name: "String", - }, - }, - error: { - serializedName: "error", - xmlName: "error", - type: { - name: "String", - }, - }, - lastUpdated: { - serializedName: "lastUpdated", - required: true, - xmlName: "lastUpdated", - type: { - name: "DateTime", - }, - }, - lastStatusChange: { - serializedName: "lastStatusChange", - required: true, - xmlName: "lastStatusChange", - type: { - name: "DateTime", - }, - }, - resourceType: { - serializedName: "resourceType", - required: true, - xmlName: "resourceType", - type: { - name: "String", - }, - }, - isOptional: { - serializedName: "isOptional", - required: true, - xmlName: "isOptional", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const NotificationCollection: coreClient.CompositeMapper = { - serializedName: "NotificationCollection", - type: { - name: "Composite", - className: "NotificationCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "NotificationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NotificationContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RecipientsContractProperties: coreClient.CompositeMapper = { - serializedName: "RecipientsContractProperties", - type: { - name: "Composite", - className: "RecipientsContractProperties", - modelProperties: { - emails: { - serializedName: "emails", - xmlName: "emails", - xmlElementName: "RecipientsContractPropertiesEmailsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - users: { - serializedName: "users", - xmlName: "users", - xmlElementName: "RecipientsContractPropertiesUsersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const RecipientUserCollection: coreClient.CompositeMapper = { - serializedName: "RecipientUserCollection", - type: { - name: "Composite", - className: "RecipientUserCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientUserContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientUserContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RecipientEmailCollection: coreClient.CompositeMapper = { - serializedName: "RecipientEmailCollection", - type: { - name: "Composite", - className: "RecipientEmailCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RecipientEmailContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecipientEmailContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenIdConnectProviderCollection: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProviderCollection", - type: { - name: "Composite", - className: "OpenIdConnectProviderCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "OpenidConnectProviderContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OpenidConnectProviderContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenidConnectProviderUpdateContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderUpdateContract", - type: { - name: "Composite", - className: "OpenidConnectProviderUpdateContract", - modelProperties: { - displayName: { - constraints: { - MaxLength: 50, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String", - }, - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const OutboundEnvironmentEndpointList: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpointList", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpointList", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "OutboundEnvironmentEndpoint", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { - serializedName: "OutboundEnvironmentEndpoint", - type: { - name: "Composite", - className: "OutboundEnvironmentEndpoint", - modelProperties: { - category: { - serializedName: "category", - xmlName: "category", - type: { - name: "String", - }, - }, - endpoints: { - serializedName: "endpoints", - xmlName: "endpoints", - xmlElementName: "EndpointDependency", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDependency", - }, - }, - }, - }, - }, - }, -}; - -export const EndpointDependency: coreClient.CompositeMapper = { - serializedName: "EndpointDependency", - type: { - name: "Composite", - className: "EndpointDependency", - modelProperties: { - domainName: { - serializedName: "domainName", - xmlName: "domainName", - type: { - name: "String", - }, - }, - endpointDetails: { - serializedName: "endpointDetails", - xmlName: "endpointDetails", - xmlElementName: "EndpointDetail", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EndpointDetail", - }, - }, - }, - }, - }, - }, -}; - -export const EndpointDetail: coreClient.CompositeMapper = { - serializedName: "EndpointDetail", - type: { - name: "Composite", - className: "EndpointDetail", - modelProperties: { - port: { - serializedName: "port", - xmlName: "port", - type: { - name: "Number", - }, - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyDescriptionCollection: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionCollection", - type: { - name: "Composite", - className: "PolicyDescriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyDescriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyDescriptionContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PolicyFragmentCollection: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentCollection", - type: { - name: "Composite", - className: "PolicyFragmentCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyFragmentContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyFragmentContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceCollection: coreClient.CompositeMapper = { - serializedName: "ResourceCollection", - type: { - name: "Composite", - className: "ResourceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ResourceCollectionValueItem", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceCollectionValueItem", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyRestrictionCollection: coreClient.CompositeMapper = { - serializedName: "PolicyRestrictionCollection", - type: { - name: "Composite", - className: "PolicyRestrictionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyRestrictionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyRestrictionContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyRestrictionUpdateContract: coreClient.CompositeMapper = { - serializedName: "PolicyRestrictionUpdateContract", - type: { - name: "Composite", - className: "PolicyRestrictionUpdateContract", - modelProperties: { - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String", - }, - }, - requireBase: { - defaultValue: "false", - serializedName: "properties.requireBase", - xmlName: "properties.requireBase", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorResponseBody: coreClient.CompositeMapper = { - serializedName: "ErrorResponseBody", - type: { - name: "Composite", - className: "ErrorResponseBody", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - xmlName: "details", - xmlElementName: "ErrorFieldContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorFieldContract", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorFieldContract: coreClient.CompositeMapper = { - serializedName: "ErrorFieldContract", - type: { - name: "Composite", - className: "ErrorFieldContract", - modelProperties: { - code: { - serializedName: "code", - xmlName: "code", - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - xmlName: "message", - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - xmlName: "target", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "OperationResultLogItemContract", - type: { - name: "Composite", - className: "OperationResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String", - }, - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String", - }, - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalConfigCollection: coreClient.CompositeMapper = { - serializedName: "PortalConfigCollection", - type: { - name: "Composite", - className: "PortalConfigCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalConfigContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalConfigContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalConfigPropertiesSignin: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin", - modelProperties: { - require: { - defaultValue: false, - serializedName: "require", - xmlName: "require", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const PortalConfigPropertiesSignup: coreClient.CompositeMapper = { - serializedName: "PortalConfigPropertiesSignup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup", - modelProperties: { - termsOfService: { - serializedName: "termsOfService", - xmlName: "termsOfService", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties", - }, - }, - }, - }, -}; - -export const PortalConfigTermsOfServiceProperties: coreClient.CompositeMapper = - { - serializedName: "PortalConfigTermsOfServiceProperties", - type: { - name: "Composite", - className: "PortalConfigTermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String", - }, - }, - requireConsent: { - defaultValue: false, - serializedName: "requireConsent", - xmlName: "requireConsent", - type: { - name: "Boolean", - }, - }, - }, - }, - }; - -export const PortalConfigDelegationProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigDelegationProperties", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties", - modelProperties: { - delegateRegistration: { - defaultValue: false, - serializedName: "delegateRegistration", - xmlName: "delegateRegistration", - type: { - name: "Boolean", - }, - }, - delegateSubscription: { - defaultValue: false, - serializedName: "delegateSubscription", - xmlName: "delegateSubscription", - type: { - name: "Boolean", - }, - }, - delegationUrl: { - serializedName: "delegationUrl", - xmlName: "delegationUrl", - type: { - name: "String", - }, - }, - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalConfigCorsProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCorsProperties", - type: { - name: "Composite", - className: "PortalConfigCorsProperties", - modelProperties: { - allowedOrigins: { - serializedName: "allowedOrigins", - xmlName: "allowedOrigins", - xmlElementName: "PortalConfigCorsPropertiesAllowedOriginsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PortalConfigCspProperties: coreClient.CompositeMapper = { - serializedName: "PortalConfigCspProperties", - type: { - name: "Composite", - className: "PortalConfigCspProperties", - modelProperties: { - mode: { - defaultValue: "disabled", - serializedName: "mode", - xmlName: "mode", - type: { - name: "String", - }, - }, - reportUri: { - serializedName: "reportUri", - xmlName: "reportUri", - xmlElementName: "PortalConfigCspPropertiesReportUriItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - allowedSources: { - serializedName: "allowedSources", - xmlName: "allowedSources", - xmlElementName: "PortalConfigCspPropertiesAllowedSourcesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const PortalRevisionCollection: coreClient.CompositeMapper = { - serializedName: "PortalRevisionCollection", - type: { - name: "Composite", - className: "PortalRevisionCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "PortalRevisionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalRevisionContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalSettingsCollection: coreClient.CompositeMapper = { - serializedName: "PortalSettingsCollection", - type: { - name: "Composite", - className: "PortalSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PortalSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PortalSettingsContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const SubscriptionsDelegationSettingsProperties: coreClient.CompositeMapper = - { - serializedName: "SubscriptionsDelegationSettingsProperties", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean", - }, - }, - }, - }, - }; - -export const RegistrationDelegationSettingsProperties: coreClient.CompositeMapper = - { - serializedName: "RegistrationDelegationSettingsProperties", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties", - modelProperties: { - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean", - }, - }, - }, - }, - }; - -export const TermsOfServiceProperties: coreClient.CompositeMapper = { - serializedName: "TermsOfServiceProperties", - type: { - name: "Composite", - className: "TermsOfServiceProperties", - modelProperties: { - text: { - serializedName: "text", - xmlName: "text", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean", - }, - }, - consentRequired: { - serializedName: "consentRequired", - xmlName: "consentRequired", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const PortalSettingValidationKeyContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingValidationKeyContract", - type: { - name: "Composite", - className: "PortalSettingValidationKeyContract", - modelProperties: { - validationKey: { - serializedName: "validationKey", - xmlName: "validationKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionListResult", - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateEndpointConnection", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - }, - }, - }, - }, - }, - }, -}; - -export const PrivateEndpoint: coreClient.CompositeMapper = { - serializedName: "PrivateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - xmlName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnectionRequest: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnectionRequest", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequest", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnectionRequestProperties: coreClient.CompositeMapper = - { - serializedName: "PrivateEndpointConnectionRequestProperties", - type: { - name: "Composite", - className: "PrivateEndpointConnectionRequestProperties", - modelProperties: { - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", - xmlName: "privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - }, - }, - }; - -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResourceListResult", - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PrivateLinkResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource", - }, - }, - }, - }, - }, - }, -}; - -export const ProductUpdateParameters: coreClient.CompositeMapper = { - serializedName: "ProductUpdateParameters", - type: { - name: "Composite", - className: "ProductUpdateParameters", - modelProperties: { - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean", - }, - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean", - }, - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"], - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionCollection: coreClient.CompositeMapper = { - serializedName: "SubscriptionCollection", - type: { - name: "Composite", - className: "SubscriptionCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "SubscriptionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubscriptionContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductApiLinkCollection: coreClient.CompositeMapper = { - serializedName: "ProductApiLinkCollection", - type: { - name: "Composite", - className: "ProductApiLinkCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ProductApiLinkContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProductApiLinkContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductGroupLinkCollection: coreClient.CompositeMapper = { - serializedName: "ProductGroupLinkCollection", - type: { - name: "Composite", - className: "ProductGroupLinkCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ProductGroupLinkContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ProductGroupLinkContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QuotaCounterCollection: coreClient.CompositeMapper = { - serializedName: "QuotaCounterCollection", - type: { - name: "Composite", - className: "QuotaCounterCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "QuotaCounterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QuotaCounterContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QuotaCounterContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterContract", - type: { - name: "Composite", - className: "QuotaCounterContract", - modelProperties: { - counterKey: { - constraints: { - MinLength: 1, - }, - serializedName: "counterKey", - required: true, - xmlName: "counterKey", - type: { - name: "String", - }, - }, - periodKey: { - constraints: { - MinLength: 1, - }, - serializedName: "periodKey", - required: true, - xmlName: "periodKey", - type: { - name: "String", - }, - }, - periodStartTime: { - serializedName: "periodStartTime", - required: true, - xmlName: "periodStartTime", - type: { - name: "DateTime", - }, - }, - periodEndTime: { - serializedName: "periodEndTime", - required: true, - xmlName: "periodEndTime", - type: { - name: "DateTime", - }, - }, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties", - }, - }, - }, - }, -}; - -export const QuotaCounterValueContractProperties: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContractProperties", - type: { - name: "Composite", - className: "QuotaCounterValueContractProperties", - modelProperties: { - callsCount: { - serializedName: "callsCount", - xmlName: "callsCount", - type: { - name: "Number", - }, - }, - kbTransferred: { - serializedName: "kbTransferred", - xmlName: "kbTransferred", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const QuotaCounterValueUpdateContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueUpdateContract", - type: { - name: "Composite", - className: "QuotaCounterValueUpdateContract", - modelProperties: { - callsCount: { - serializedName: "properties.callsCount", - xmlName: "properties.callsCount", - type: { - name: "Number", - }, - }, - kbTransferred: { - serializedName: "properties.kbTransferred", - xmlName: "properties.kbTransferred", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RegionListResult: coreClient.CompositeMapper = { - serializedName: "RegionListResult", - type: { - name: "Composite", - className: "RegionListResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RegionContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegionContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RegionContract: coreClient.CompositeMapper = { - serializedName: "RegionContract", - type: { - name: "Composite", - className: "RegionContract", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - isMasterRegion: { - serializedName: "isMasterRegion", - xmlName: "isMasterRegion", - type: { - name: "Boolean", - }, - }, - isDeleted: { - serializedName: "isDeleted", - xmlName: "isDeleted", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ReportCollection: coreClient.CompositeMapper = { - serializedName: "ReportCollection", - type: { - name: "Composite", - className: "ReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "ReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReportRecordContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ReportRecordContract: coreClient.CompositeMapper = { - serializedName: "ReportRecordContract", - type: { - name: "Composite", - className: "ReportRecordContract", - modelProperties: { - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime", - }, - }, - interval: { - serializedName: "interval", - xmlName: "interval", - type: { - name: "String", - }, - }, - country: { - serializedName: "country", - xmlName: "country", - type: { - name: "String", - }, - }, - region: { - serializedName: "region", - xmlName: "region", - type: { - name: "String", - }, - }, - zip: { - serializedName: "zip", - xmlName: "zip", - type: { - name: "String", - }, - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String", - }, - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String", - }, - }, - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String", - }, - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String", - }, - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String", - }, - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String", - }, - }, - callCountSuccess: { - serializedName: "callCountSuccess", - xmlName: "callCountSuccess", - type: { - name: "Number", - }, - }, - callCountBlocked: { - serializedName: "callCountBlocked", - xmlName: "callCountBlocked", - type: { - name: "Number", - }, - }, - callCountFailed: { - serializedName: "callCountFailed", - xmlName: "callCountFailed", - type: { - name: "Number", - }, - }, - callCountOther: { - serializedName: "callCountOther", - xmlName: "callCountOther", - type: { - name: "Number", - }, - }, - callCountTotal: { - serializedName: "callCountTotal", - xmlName: "callCountTotal", - type: { - name: "Number", - }, - }, - bandwidth: { - serializedName: "bandwidth", - xmlName: "bandwidth", - type: { - name: "Number", - }, - }, - cacheHitCount: { - serializedName: "cacheHitCount", - xmlName: "cacheHitCount", - type: { - name: "Number", - }, - }, - cacheMissCount: { - serializedName: "cacheMissCount", - xmlName: "cacheMissCount", - type: { - name: "Number", - }, - }, - apiTimeAvg: { - serializedName: "apiTimeAvg", - xmlName: "apiTimeAvg", - type: { - name: "Number", - }, - }, - apiTimeMin: { - serializedName: "apiTimeMin", - xmlName: "apiTimeMin", - type: { - name: "Number", - }, - }, - apiTimeMax: { - serializedName: "apiTimeMax", - xmlName: "apiTimeMax", - type: { - name: "Number", - }, - }, - serviceTimeAvg: { - serializedName: "serviceTimeAvg", - xmlName: "serviceTimeAvg", - type: { - name: "Number", - }, - }, - serviceTimeMin: { - serializedName: "serviceTimeMin", - xmlName: "serviceTimeMin", - type: { - name: "Number", - }, - }, - serviceTimeMax: { - serializedName: "serviceTimeMax", - xmlName: "serviceTimeMax", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RequestReportCollection: coreClient.CompositeMapper = { - serializedName: "RequestReportCollection", - type: { - name: "Composite", - className: "RequestReportCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "RequestReportRecordContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequestReportRecordContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const RequestReportRecordContract: coreClient.CompositeMapper = { - serializedName: "RequestReportRecordContract", - type: { - name: "Composite", - className: "RequestReportRecordContract", - modelProperties: { - apiId: { - serializedName: "apiId", - xmlName: "apiId", - type: { - name: "String", - }, - }, - operationId: { - serializedName: "operationId", - xmlName: "operationId", - type: { - name: "String", - }, - }, - productId: { - serializedName: "productId", - readOnly: true, - xmlName: "productId", - type: { - name: "String", - }, - }, - userId: { - serializedName: "userId", - readOnly: true, - xmlName: "userId", - type: { - name: "String", - }, - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String", - }, - }, - url: { - serializedName: "url", - xmlName: "url", - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - xmlName: "ipAddress", - type: { - name: "String", - }, - }, - backendResponseCode: { - serializedName: "backendResponseCode", - xmlName: "backendResponseCode", - type: { - name: "String", - }, - }, - responseCode: { - serializedName: "responseCode", - xmlName: "responseCode", - type: { - name: "Number", - }, - }, - responseSize: { - serializedName: "responseSize", - xmlName: "responseSize", - type: { - name: "Number", - }, - }, - timestamp: { - serializedName: "timestamp", - xmlName: "timestamp", - type: { - name: "DateTime", - }, - }, - cache: { - serializedName: "cache", - xmlName: "cache", - type: { - name: "String", - }, - }, - apiTime: { - serializedName: "apiTime", - xmlName: "apiTime", - type: { - name: "Number", - }, - }, - serviceTime: { - serializedName: "serviceTime", - xmlName: "serviceTime", - type: { - name: "Number", - }, - }, - apiRegion: { - serializedName: "apiRegion", - xmlName: "apiRegion", - type: { - name: "String", - }, - }, - subscriptionId: { - serializedName: "subscriptionId", - xmlName: "subscriptionId", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "requestId", - xmlName: "requestId", - type: { - name: "String", - }, - }, - requestSize: { - serializedName: "requestSize", - xmlName: "requestSize", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const GlobalSchemaCollection: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaCollection", - type: { - name: "Composite", - className: "GlobalSchemaCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "GlobalSchemaContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GlobalSchemaContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantSettingsCollection: coreClient.CompositeMapper = { - serializedName: "TenantSettingsCollection", - type: { - name: "Composite", - className: "TenantSettingsCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "TenantSettingsContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TenantSettingsContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementSkusResult: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkusResult", - type: { - name: "Composite", - className: "ApiManagementSkusResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementSku", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSku", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementSku: coreClient.CompositeMapper = { - serializedName: "ApiManagementSku", - type: { - name: "Composite", - className: "ApiManagementSku", - modelProperties: { - resourceType: { - serializedName: "resourceType", - readOnly: true, - xmlName: "resourceType", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - tier: { - serializedName: "tier", - readOnly: true, - xmlName: "tier", - type: { - name: "String", - }, - }, - size: { - serializedName: "size", - readOnly: true, - xmlName: "size", - type: { - name: "String", - }, - }, - family: { - serializedName: "family", - readOnly: true, - xmlName: "family", - type: { - name: "String", - }, - }, - kind: { - serializedName: "kind", - readOnly: true, - xmlName: "kind", - type: { - name: "String", - }, - }, - capacity: { - serializedName: "capacity", - xmlName: "capacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity", - }, - }, - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - locationInfo: { - serializedName: "locationInfo", - readOnly: true, - xmlName: "locationInfo", - xmlElementName: "ApiManagementSkuLocationInfo", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo", - }, - }, - }, - }, - apiVersions: { - serializedName: "apiVersions", - readOnly: true, - xmlName: "apiVersions", - xmlElementName: "ApiManagementSkuApiVersionsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - costs: { - serializedName: "costs", - readOnly: true, - xmlName: "costs", - xmlElementName: "ApiManagementSkuCosts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCosts", - }, - }, - }, - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities", - }, - }, - }, - }, - restrictions: { - serializedName: "restrictions", - readOnly: true, - xmlName: "restrictions", - xmlElementName: "ApiManagementSkuRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions", - }, - }, - }, - }, - }, - }, -}; - -export const ApiManagementSkuCapacity: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapacity", - type: { - name: "Composite", - className: "ApiManagementSkuCapacity", - modelProperties: { - minimum: { - serializedName: "minimum", - readOnly: true, - xmlName: "minimum", - type: { - name: "Number", - }, - }, - maximum: { - serializedName: "maximum", - readOnly: true, - xmlName: "maximum", - type: { - name: "Number", - }, - }, - default: { - serializedName: "default", - readOnly: true, - xmlName: "default", - type: { - name: "Number", - }, - }, - scaleType: { - serializedName: "scaleType", - readOnly: true, - xmlName: "scaleType", - type: { - name: "Enum", - allowedValues: ["Automatic", "Manual", "None"], - }, - }, - }, - }, -}; - -export const ApiManagementSkuLocationInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuLocationInfo", - type: { - name: "Composite", - className: "ApiManagementSkuLocationInfo", - modelProperties: { - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuLocationInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - zoneDetails: { - serializedName: "zoneDetails", - readOnly: true, - xmlName: "zoneDetails", - xmlElementName: "ApiManagementSkuZoneDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails", - }, - }, - }, - }, - }, - }, -}; - -export const ApiManagementSkuZoneDetails: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuZoneDetails", - type: { - name: "Composite", - className: "ApiManagementSkuZoneDetails", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - xmlElementName: "ApiManagementSkuZoneDetailsNameItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - capabilities: { - serializedName: "capabilities", - readOnly: true, - xmlName: "capabilities", - xmlElementName: "ApiManagementSkuCapabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities", - }, - }, - }, - }, - }, - }, -}; - -export const ApiManagementSkuCapabilities: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCapabilities", - type: { - name: "Composite", - className: "ApiManagementSkuCapabilities", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - xmlName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementSkuCosts: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuCosts", - type: { - name: "Composite", - className: "ApiManagementSkuCosts", - modelProperties: { - meterID: { - serializedName: "meterID", - readOnly: true, - xmlName: "meterID", - type: { - name: "String", - }, - }, - quantity: { - serializedName: "quantity", - readOnly: true, - xmlName: "quantity", - type: { - name: "Number", - }, - }, - extendedUnit: { - serializedName: "extendedUnit", - readOnly: true, - xmlName: "extendedUnit", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementSkuRestrictions: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictions", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictions", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - xmlName: "type", - type: { - name: "Enum", - allowedValues: ["Location", "Zone"], - }, - }, - values: { - serializedName: "values", - readOnly: true, - xmlName: "values", - xmlElementName: "ApiManagementSkuRestrictionsValuesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - restrictionInfo: { - serializedName: "restrictionInfo", - xmlName: "restrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo", - }, - }, - reasonCode: { - serializedName: "reasonCode", - readOnly: true, - xmlName: "reasonCode", - type: { - name: "Enum", - allowedValues: ["QuotaId", "NotAvailableForSubscription"], - }, - }, - }, - }, -}; - -export const ApiManagementSkuRestrictionInfo: coreClient.CompositeMapper = { - serializedName: "ApiManagementSkuRestrictionInfo", - type: { - name: "Composite", - className: "ApiManagementSkuRestrictionInfo", - modelProperties: { - locations: { - serializedName: "locations", - readOnly: true, - xmlName: "locations", - xmlElementName: "ApiManagementSkuRestrictionInfoLocationsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - zones: { - serializedName: "zones", - readOnly: true, - xmlName: "zones", - xmlElementName: "ApiManagementSkuRestrictionInfoZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const SubscriptionCreateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionCreateParameters", - type: { - name: "Composite", - className: "SubscriptionCreateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled", - ], - }, - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SubscriptionUpdateParameters: coreClient.CompositeMapper = { - serializedName: "SubscriptionUpdateParameters", - type: { - name: "Composite", - className: "SubscriptionUpdateParameters", - modelProperties: { - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String", - }, - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime", - }, - }, - displayName: { - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled", - ], - }, - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String", - }, - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SubscriptionKeysContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionKeysContract", - type: { - name: "Composite", - className: "SubscriptionKeysContract", - modelProperties: { - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagCreateUpdateParameters: coreClient.CompositeMapper = { - serializedName: "TagCreateUpdateParameters", - type: { - name: "Composite", - className: "TagCreateUpdateParameters", - modelProperties: { - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagApiLinkCollection: coreClient.CompositeMapper = { - serializedName: "TagApiLinkCollection", - type: { - name: "Composite", - className: "TagApiLinkCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagApiLinkContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagApiLinkContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagOperationLinkCollection: coreClient.CompositeMapper = { - serializedName: "TagOperationLinkCollection", - type: { - name: "Composite", - className: "TagOperationLinkCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagOperationLinkContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagOperationLinkContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagProductLinkCollection: coreClient.CompositeMapper = { - serializedName: "TagProductLinkCollection", - type: { - name: "Composite", - className: "TagProductLinkCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "TagProductLinkContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TagProductLinkContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AccessInformationCollection: coreClient.CompositeMapper = { - serializedName: "AccessInformationCollection", - type: { - name: "Composite", - className: "AccessInformationCollection", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - xmlName: "value", - xmlElementName: "AccessInformationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccessInformationContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AccessInformationCreateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationCreateParameters", - type: { - name: "Composite", - className: "AccessInformationCreateParameters", - modelProperties: { - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String", - }, - }, - primaryKey: { - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const AccessInformationUpdateParameters: coreClient.CompositeMapper = { - serializedName: "AccessInformationUpdateParameters", - type: { - name: "Composite", - className: "AccessInformationUpdateParameters", - modelProperties: { - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const AccessInformationSecretsContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationSecretsContract", - type: { - name: "Composite", - className: "AccessInformationSecretsContract", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - principalId: { - serializedName: "principalId", - xmlName: "principalId", - type: { - name: "String", - }, - }, - primaryKey: { - serializedName: "primaryKey", - xmlName: "primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - serializedName: "secondaryKey", - xmlName: "secondaryKey", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "enabled", - xmlName: "enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const DeployConfigurationParameters: coreClient.CompositeMapper = { - serializedName: "DeployConfigurationParameters", - type: { - name: "Composite", - className: "DeployConfigurationParameters", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String", - }, - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SaveConfigurationParameter: coreClient.CompositeMapper = { - serializedName: "SaveConfigurationParameter", - type: { - name: "Composite", - className: "SaveConfigurationParameter", - modelProperties: { - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String", - }, - }, - force: { - serializedName: "properties.force", - xmlName: "properties.force", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const UserCreateParameters: coreClient.CompositeMapper = { - serializedName: "UserCreateParameters", - type: { - name: "Composite", - className: "UserCreateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String", - }, - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String", - }, - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract", - }, - }, - }, - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1, - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String", - }, - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String", - }, - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String", - }, - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String", - }, - }, - appType: { - serializedName: "properties.appType", - xmlName: "properties.appType", - type: { - name: "String", - }, - }, - confirmation: { - serializedName: "properties.confirmation", - xmlName: "properties.confirmation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserUpdateParameters: coreClient.CompositeMapper = { - serializedName: "UserUpdateParameters", - type: { - name: "Composite", - className: "UserUpdateParameters", - modelProperties: { - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String", - }, - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String", - }, - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract", - }, - }, - }, - }, - email: { - constraints: { - MaxLength: 254, - MinLength: 1, - }, - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String", - }, - }, - password: { - serializedName: "properties.password", - xmlName: "properties.password", - type: { - name: "String", - }, - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String", - }, - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GenerateSsoUrlResult: coreClient.CompositeMapper = { - serializedName: "GenerateSsoUrlResult", - type: { - name: "Composite", - className: "GenerateSsoUrlResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserIdentityCollection: coreClient.CompositeMapper = { - serializedName: "UserIdentityCollection", - type: { - name: "Composite", - className: "UserIdentityCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserTokenParameters: coreClient.CompositeMapper = { - serializedName: "UserTokenParameters", - type: { - name: "Composite", - className: "UserTokenParameters", - modelProperties: { - keyType: { - serializedName: "properties.keyType", - xmlName: "properties.keyType", - type: { - name: "Enum", - allowedValues: ["primary", "secondary"], - }, - }, - expiry: { - serializedName: "properties.expiry", - xmlName: "properties.expiry", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const UserTokenResult: coreClient.CompositeMapper = { - serializedName: "UserTokenResult", - type: { - name: "Composite", - className: "UserTokenResult", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementWorkspaceLinksListResult: coreClient.CompositeMapper = - { - serializedName: "ApiManagementWorkspaceLinksListResult", - type: { - name: "Composite", - className: "ApiManagementWorkspaceLinksListResult", - modelProperties: { - value: { - serializedName: "value", - required: true, - xmlName: "value", - xmlElementName: "ApiManagementWorkspaceLinksResource", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApiManagementWorkspaceLinksResource", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceLinksBaseProperties: coreClient.CompositeMapper = { - serializedName: "WorkspaceLinksBaseProperties", - type: { - name: "Composite", - className: "WorkspaceLinksBaseProperties", - modelProperties: { - workspaceId: { - serializedName: "workspaceId", - xmlName: "workspaceId", - type: { - name: "String", - }, - }, - gateways: { - serializedName: "gateways", - xmlName: "gateways", - xmlElementName: "WorkspaceLinksGateway", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkspaceLinksGateway", - }, - }, - }, - }, - }, - }, -}; - -export const WorkspaceLinksGateway: coreClient.CompositeMapper = { - serializedName: "WorkspaceLinksGateway", - type: { - name: "Composite", - className: "WorkspaceLinksGateway", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceCollection: coreClient.CompositeMapper = { - serializedName: "WorkspaceCollection", - type: { - name: "Composite", - className: "WorkspaceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "WorkspaceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkspaceContract", - }, - }, - }, - }, - count: { - serializedName: "count", - xmlName: "count", - type: { - name: "Number", - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationStatusResult: coreClient.CompositeMapper = { - serializedName: "OperationStatusResult", - type: { - name: "Composite", - className: "OperationStatusResult", - modelProperties: { - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - xmlName: "resourceId", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - required: true, - xmlName: "status", - type: { - name: "String", - }, - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentComplete", - xmlName: "percentComplete", - type: { - name: "Number", - }, - }, - startTime: { - serializedName: "startTime", - xmlName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - xmlName: "endTime", - type: { - name: "DateTime", - }, - }, - operations: { - serializedName: "operations", - xmlName: "operations", - xmlElementName: "OperationStatusResult", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult", - }, - }, - }, - }, - error: { - serializedName: "error", - xmlName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ApiRevisionInfoContract: coreClient.CompositeMapper = { - serializedName: "ApiRevisionInfoContract", - type: { - name: "Composite", - className: "ApiRevisionInfoContract", - modelProperties: { - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String", - }, - }, - apiVersionName: { - constraints: { - MaxLength: 100, - }, - serializedName: "apiVersionName", - xmlName: "apiVersionName", - type: { - name: "String", - }, - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "apiRevisionDescription", - xmlName: "apiRevisionDescription", - type: { - name: "String", - }, - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - }, - }, - }, - }, -}; - -export const PolicyWithComplianceCollection: coreClient.CompositeMapper = { - serializedName: "PolicyWithComplianceCollection", - type: { - name: "Composite", - className: "PolicyWithComplianceCollection", - modelProperties: { - value: { - serializedName: "value", - xmlName: "value", - xmlElementName: "PolicyWithComplianceContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PolicyWithComplianceContract", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - xmlName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QuotaCounterValueContract: coreClient.CompositeMapper = { - serializedName: "QuotaCounterValueContract", - type: { - name: "Composite", - className: "QuotaCounterValueContract", - modelProperties: { - callsCount: { - serializedName: "value.callsCount", - xmlName: "value.callsCount", - type: { - name: "Number", - }, - }, - kbTransferred: { - serializedName: "value.kbTransferred", - xmlName: "value.kbTransferred", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const ResolverResultLogItemContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultLogItemContract", - type: { - name: "Composite", - className: "ResolverResultLogItemContract", - modelProperties: { - objectType: { - serializedName: "objectType", - xmlName: "objectType", - type: { - name: "String", - }, - }, - action: { - serializedName: "action", - xmlName: "action", - type: { - name: "String", - }, - }, - objectKey: { - serializedName: "objectKey", - xmlName: "objectKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementGatewayProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementGatewayProperties", - type: { - name: "Composite", - className: "ApiManagementGatewayProperties", - modelProperties: { - ...ApiManagementGatewayBaseProperties.type.modelProperties, - }, - }, -}; - -export const ApiManagementGatewayUpdateProperties: coreClient.CompositeMapper = - { - serializedName: "ApiManagementGatewayUpdateProperties", - type: { - name: "Composite", - className: "ApiManagementGatewayUpdateProperties", - modelProperties: { - ...ApiManagementGatewayBaseProperties.type.modelProperties, - }, - }, - }; - -export const ApiManagementGatewayResource: coreClient.CompositeMapper = { - serializedName: "ApiManagementGatewayResource", - type: { - name: "Composite", - className: "ApiManagementGatewayResource", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementGatewaySkuProperties", - }, - }, - systemData: { - serializedName: "systemData", - xmlName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime", - }, - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "FrontendConfiguration", - }, - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "BackendConfiguration", - }, - }, - configurationApi: { - serializedName: "properties.configurationApi", - xmlName: "properties.configurationApi", - type: { - name: "Composite", - className: "GatewayConfigurationApi", - }, - }, - virtualNetworkType: { - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementGatewayUpdateParameters: coreClient.CompositeMapper = - { - serializedName: "ApiManagementGatewayUpdateParameters", - type: { - name: "Composite", - className: "ApiManagementGatewayUpdateParameters", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementGatewaySkuPropertiesForPatch", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime", - }, - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "FrontendConfiguration", - }, - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "BackendConfiguration", - }, - }, - configurationApi: { - serializedName: "properties.configurationApi", - xmlName: "properties.configurationApi", - type: { - name: "Composite", - className: "GatewayConfigurationApi", - }, - }, - virtualNetworkType: { - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceResource: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceResource", - type: { - name: "Composite", - className: "ApiManagementServiceResource", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - }, - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity", - }, - }, - systemData: { - serializedName: "systemData", - xmlName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - location: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceResourceZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime", - }, - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String", - }, - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String", - }, - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String", - }, - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String", - }, - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String", - }, - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String", - }, - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration", - }, - }, - }, - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String", - }, - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String", - }, - }, - configurationApi: { - serializedName: "properties.configurationApi", - xmlName: "properties.configurationApi", - type: { - name: "Composite", - className: "ConfigurationApi", - }, - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - }, - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation", - }, - }, - }, - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration", - }, - }, - }, - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean", - }, - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String", - }, - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean", - }, - }, - virtualNetworkType: { - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String", - }, - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - }, - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean", - }, - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - }, - }, - }, - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String", - }, - }, - legacyPortalStatus: { - defaultValue: "Enabled", - serializedName: "properties.legacyPortalStatus", - xmlName: "properties.legacyPortalStatus", - type: { - name: "String", - }, - }, - developerPortalStatus: { - defaultValue: "Enabled", - serializedName: "properties.developerPortalStatus", - xmlName: "properties.developerPortalStatus", - type: { - name: "String", - }, - }, - publisherEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.publisherEmail", - required: true, - xmlName: "properties.publisherEmail", - type: { - name: "String", - }, - }, - publisherName: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.publisherName", - required: true, - xmlName: "properties.publisherName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceUpdateParameters: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceUpdateParameters", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateParameters", - modelProperties: { - ...ApimResource.type.modelProperties, - sku: { - serializedName: "sku", - xmlName: "sku", - type: { - name: "Composite", - className: "ApiManagementServiceSkuProperties", - }, - }, - identity: { - serializedName: "identity", - xmlName: "identity", - type: { - name: "Composite", - className: "ApiManagementServiceIdentity", - }, - }, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - zones: { - serializedName: "zones", - xmlName: "zones", - xmlElementName: "ApiManagementServiceUpdateParametersZonesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - notificationSenderEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.notificationSenderEmail", - xmlName: "properties.notificationSenderEmail", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - targetProvisioningState: { - serializedName: "properties.targetProvisioningState", - readOnly: true, - xmlName: "properties.targetProvisioningState", - type: { - name: "String", - }, - }, - createdAtUtc: { - serializedName: "properties.createdAtUtc", - readOnly: true, - xmlName: "properties.createdAtUtc", - type: { - name: "DateTime", - }, - }, - gatewayUrl: { - serializedName: "properties.gatewayUrl", - readOnly: true, - xmlName: "properties.gatewayUrl", - type: { - name: "String", - }, - }, - gatewayRegionalUrl: { - serializedName: "properties.gatewayRegionalUrl", - readOnly: true, - xmlName: "properties.gatewayRegionalUrl", - type: { - name: "String", - }, - }, - portalUrl: { - serializedName: "properties.portalUrl", - readOnly: true, - xmlName: "properties.portalUrl", - type: { - name: "String", - }, - }, - managementApiUrl: { - serializedName: "properties.managementApiUrl", - readOnly: true, - xmlName: "properties.managementApiUrl", - type: { - name: "String", - }, - }, - scmUrl: { - serializedName: "properties.scmUrl", - readOnly: true, - xmlName: "properties.scmUrl", - type: { - name: "String", - }, - }, - developerPortalUrl: { - serializedName: "properties.developerPortalUrl", - readOnly: true, - xmlName: "properties.developerPortalUrl", - type: { - name: "String", - }, - }, - hostnameConfigurations: { - serializedName: "properties.hostnameConfigurations", - xmlName: "properties.hostnameConfigurations", - xmlElementName: "HostnameConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "HostnameConfiguration", - }, - }, - }, - }, - publicIPAddresses: { - serializedName: "properties.publicIPAddresses", - readOnly: true, - xmlName: "properties.publicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - privateIPAddresses: { - serializedName: "properties.privateIPAddresses", - readOnly: true, - xmlName: "properties.privateIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesPrivateIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - publicIpAddressId: { - serializedName: "properties.publicIpAddressId", - xmlName: "properties.publicIpAddressId", - type: { - name: "String", - }, - }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - xmlName: "properties.publicNetworkAccess", - type: { - name: "String", - }, - }, - configurationApi: { - serializedName: "properties.configurationApi", - xmlName: "properties.configurationApi", - type: { - name: "Composite", - className: "ConfigurationApi", - }, - }, - virtualNetworkConfiguration: { - serializedName: "properties.virtualNetworkConfiguration", - xmlName: "properties.virtualNetworkConfiguration", - type: { - name: "Composite", - className: "VirtualNetworkConfiguration", - }, - }, - additionalLocations: { - serializedName: "properties.additionalLocations", - xmlName: "properties.additionalLocations", - xmlElementName: "AdditionalLocation", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalLocation", - }, - }, - }, - }, - customProperties: { - serializedName: "properties.customProperties", - xmlName: "properties.customProperties", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - certificates: { - serializedName: "properties.certificates", - xmlName: "properties.certificates", - xmlElementName: "CertificateConfiguration", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CertificateConfiguration", - }, - }, - }, - }, - enableClientCertificate: { - defaultValue: false, - serializedName: "properties.enableClientCertificate", - xmlName: "properties.enableClientCertificate", - type: { - name: "Boolean", - }, - }, - natGatewayState: { - serializedName: "properties.natGatewayState", - xmlName: "properties.natGatewayState", - type: { - name: "String", - }, - }, - outboundPublicIPAddresses: { - serializedName: "properties.outboundPublicIPAddresses", - readOnly: true, - xmlName: "properties.outboundPublicIPAddresses", - xmlElementName: - "ApiManagementServiceBasePropertiesOutboundPublicIPAddressesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - disableGateway: { - defaultValue: false, - serializedName: "properties.disableGateway", - xmlName: "properties.disableGateway", - type: { - name: "Boolean", - }, - }, - virtualNetworkType: { - serializedName: "properties.virtualNetworkType", - xmlName: "properties.virtualNetworkType", - type: { - name: "String", - }, - }, - apiVersionConstraint: { - serializedName: "properties.apiVersionConstraint", - xmlName: "properties.apiVersionConstraint", - type: { - name: "Composite", - className: "ApiVersionConstraint", - }, - }, - restore: { - defaultValue: false, - serializedName: "properties.restore", - xmlName: "properties.restore", - type: { - name: "Boolean", - }, - }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - xmlName: "properties.privateEndpointConnections", - xmlElementName: "RemotePrivateEndpointConnectionWrapper", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RemotePrivateEndpointConnectionWrapper", - }, - }, - }, - }, - platformVersion: { - serializedName: "properties.platformVersion", - readOnly: true, - xmlName: "properties.platformVersion", - type: { - name: "String", - }, - }, - legacyPortalStatus: { - defaultValue: "Enabled", - serializedName: "properties.legacyPortalStatus", - xmlName: "properties.legacyPortalStatus", - type: { - name: "String", - }, - }, - developerPortalStatus: { - defaultValue: "Enabled", - serializedName: "properties.developerPortalStatus", - xmlName: "properties.developerPortalStatus", - type: { - name: "String", - }, - }, - publisherEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.publisherEmail", - xmlName: "properties.publisherEmail", - type: { - name: "String", - }, - }, - publisherName: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.publisherName", - xmlName: "properties.publisherName", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ProxyResource: coreClient.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - serializedName: "PrivateEndpointConnection", - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...Resource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - xmlName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpoint", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - xmlName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionState", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateLinkResource: coreClient.CompositeMapper = { - serializedName: "PrivateLinkResource", - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...Resource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - xmlName: "properties.groupId", - type: { - name: "String", - }, - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - xmlName: "properties.requiredMembers", - xmlElementName: "PrivateLinkResourcePropertiesRequiredMembersItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - xmlName: "properties.requiredZoneNames", - xmlElementName: "PrivateLinkResourcePropertiesRequiredZoneNamesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApiContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractProperties", - type: { - name: "Composite", - className: "ApiContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - sourceApiId: { - serializedName: "sourceApiId", - xmlName: "sourceApiId", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "path", - required: true, - xmlName: "path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - apiVersionSet: { - serializedName: "apiVersionSet", - xmlName: "apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiContractUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiContractUpdateProperties", - type: { - name: "Composite", - className: "ApiContractUpdateProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApiTagResourceContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiTagResourceContractProperties", - type: { - name: "Composite", - className: "ApiTagResourceContractProperties", - modelProperties: { - ...ApiEntityBaseContract.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "name", - xmlName: "name", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "serviceUrl", - xmlName: "serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "path", - xmlName: "path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "protocols", - xmlName: "protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const OperationContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationContractProperties", - type: { - name: "Composite", - className: "OperationContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - method: { - serializedName: "method", - required: true, - xmlName: "method", - type: { - name: "String", - }, - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "urlTemplate", - required: true, - xmlName: "urlTemplate", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "OperationUpdateContractProperties", - type: { - name: "Composite", - className: "OperationUpdateContractProperties", - modelProperties: { - ...OperationEntityBaseContract.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - method: { - serializedName: "method", - xmlName: "method", - type: { - name: "String", - }, - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "urlTemplate", - xmlName: "urlTemplate", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductContractProperties: coreClient.CompositeMapper = { - serializedName: "ProductContractProperties", - type: { - name: "Composite", - className: "ProductContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductTagResourceContractProperties: coreClient.CompositeMapper = - { - serializedName: "ProductTagResourceContractProperties", - type: { - name: "Composite", - className: "ProductTagResourceContractProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - id: { - serializedName: "id", - xmlName: "id", - type: { - name: "String", - }, - }, - name: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "name", - required: true, - xmlName: "name", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ProductUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ProductUpdateProperties", - type: { - name: "Composite", - className: "ProductUpdateProperties", - modelProperties: { - ...ProductEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueContractProperties", - type: { - name: "Composite", - className: "IssueContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - required: true, - xmlName: "title", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - required: true, - xmlName: "description", - type: { - name: "String", - }, - }, - userId: { - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueUpdateContractProperties: coreClient.CompositeMapper = { - serializedName: "IssueUpdateContractProperties", - type: { - name: "Composite", - className: "IssueUpdateContractProperties", - modelProperties: { - ...IssueContractBaseProperties.type.modelProperties, - title: { - serializedName: "title", - xmlName: "title", - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - xmlName: "description", - type: { - name: "String", - }, - }, - userId: { - serializedName: "userId", - xmlName: "userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagDescriptionContractProperties: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContractProperties", - type: { - name: "Composite", - className: "TagDescriptionContractProperties", - modelProperties: { - ...TagDescriptionBaseProperties.type.modelProperties, - tagId: { - serializedName: "tagId", - xmlName: "tagId", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetContractProperties: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContractProperties", - type: { - name: "Composite", - className: "ApiVersionSetContractProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - versioningScheme: { - serializedName: "versioningScheme", - required: true, - xmlName: "versioningScheme", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetUpdateParametersProperties: coreClient.CompositeMapper = - { - serializedName: "ApiVersionSetUpdateParametersProperties", - type: { - name: "Composite", - className: "ApiVersionSetUpdateParametersProperties", - modelProperties: { - ...ApiVersionSetEntityBase.type.modelProperties, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - versioningScheme: { - serializedName: "versioningScheme", - xmlName: "versioningScheme", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationServerContractProperties: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServerContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - required: true, - xmlName: "clientRegistrationEndpoint", - type: { - name: "String", - }, - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - required: true, - xmlName: "authorizationEndpoint", - type: { - name: "String", - }, - }, - grantTypes: { - serializedName: "grantTypes", - required: true, - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clientId: { - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationServerUpdateContractProperties: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServerUpdateContractProperties", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContractProperties", - modelProperties: { - ...AuthorizationServerContractBaseProperties.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "useInTestConsole", - xmlName: "useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "useInApiDocumentation", - xmlName: "useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - clientRegistrationEndpoint: { - serializedName: "clientRegistrationEndpoint", - xmlName: "clientRegistrationEndpoint", - type: { - name: "String", - }, - }, - authorizationEndpoint: { - serializedName: "authorizationEndpoint", - xmlName: "authorizationEndpoint", - type: { - name: "String", - }, - }, - grantTypes: { - serializedName: "grantTypes", - xmlName: "grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clientId: { - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const BackendContractProperties: coreClient.CompositeMapper = { - serializedName: "BackendContractProperties", - type: { - name: "Composite", - className: "BackendContractProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - required: true, - xmlName: "protocol", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "BackendUpdateParameterProperties", - type: { - name: "Composite", - className: "BackendUpdateParameterProperties", - modelProperties: { - ...BackendBaseParameters.type.modelProperties, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "url", - xmlName: "url", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "protocol", - xmlName: "protocol", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendBaseParametersPool: coreClient.CompositeMapper = { - serializedName: "BackendBaseParametersPool", - type: { - name: "Composite", - className: "BackendBaseParametersPool", - modelProperties: { - ...BackendPool.type.modelProperties, - }, - }, -}; - -export const KeyVaultContractProperties: coreClient.CompositeMapper = { - serializedName: "KeyVaultContractProperties", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - modelProperties: { - ...KeyVaultContractCreateProperties.type.modelProperties, - lastStatus: { - serializedName: "lastStatus", - xmlName: "lastStatus", - type: { - name: "Composite", - className: "KeyVaultLastAccessStatusContractProperties", - }, - }, - }, - }, -}; - -export const ApiManagementServiceProperties: coreClient.CompositeMapper = { - serializedName: "ApiManagementServiceProperties", - type: { - name: "Composite", - className: "ApiManagementServiceProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "publisherEmail", - required: true, - xmlName: "publisherEmail", - type: { - name: "String", - }, - }, - publisherName: { - constraints: { - MaxLength: 100, - }, - serializedName: "publisherName", - required: true, - xmlName: "publisherName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceUpdateProperties: coreClient.CompositeMapper = - { - serializedName: "ApiManagementServiceUpdateProperties", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateProperties", - modelProperties: { - ...ApiManagementServiceBaseProperties.type.modelProperties, - publisherEmail: { - constraints: { - MaxLength: 100, - }, - serializedName: "publisherEmail", - xmlName: "publisherEmail", - type: { - name: "String", - }, - }, - publisherName: { - constraints: { - MaxLength: 100, - }, - serializedName: "publisherName", - xmlName: "publisherName", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const UserContractProperties: coreClient.CompositeMapper = { - serializedName: "UserContractProperties", - type: { - name: "Composite", - className: "UserContractProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - firstName: { - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String", - }, - }, - lastName: { - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String", - }, - }, - email: { - serializedName: "email", - xmlName: "email", - type: { - name: "String", - }, - }, - registrationDate: { - serializedName: "registrationDate", - xmlName: "registrationDate", - type: { - name: "DateTime", - }, - }, - groups: { - serializedName: "groups", - readOnly: true, - xmlName: "groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties", - }, - }, - }, - }, - }, - }, -}; - -export const UserCreateParameterProperties: coreClient.CompositeMapper = { - serializedName: "UserCreateParameterProperties", - type: { - name: "Composite", - className: "UserCreateParameterProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1, - }, - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String", - }, - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "firstName", - required: true, - xmlName: "firstName", - type: { - name: "String", - }, - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "lastName", - required: true, - xmlName: "lastName", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String", - }, - }, - appType: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String", - }, - }, - confirmation: { - serializedName: "confirmation", - xmlName: "confirmation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserUpdateParametersProperties: coreClient.CompositeMapper = { - serializedName: "UserUpdateParametersProperties", - type: { - name: "Composite", - className: "UserUpdateParametersProperties", - modelProperties: { - ...UserEntityBaseParameters.type.modelProperties, - email: { - constraints: { - MaxLength: 254, - MinLength: 1, - }, - serializedName: "email", - xmlName: "email", - type: { - name: "String", - }, - }, - password: { - serializedName: "password", - xmlName: "password", - type: { - name: "String", - }, - }, - firstName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "firstName", - xmlName: "firstName", - type: { - name: "String", - }, - }, - lastName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "lastName", - xmlName: "lastName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderContractProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContractProperties", - type: { - name: "Composite", - className: "IdentityProviderContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderCreateContractProperties: coreClient.CompositeMapper = - { - serializedName: "IdentityProviderCreateContractProperties", - type: { - name: "Composite", - className: "IdentityProviderCreateContractProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "clientId", - required: true, - xmlName: "clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "clientSecret", - required: true, - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const IdentityProviderUpdateProperties: coreClient.CompositeMapper = { - serializedName: "IdentityProviderUpdateProperties", - type: { - name: "Composite", - className: "IdentityProviderUpdateProperties", - modelProperties: { - ...IdentityProviderBaseParameters.type.modelProperties, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "clientId", - xmlName: "clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "clientSecret", - xmlName: "clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueContractProperties", - type: { - name: "Composite", - className: "NamedValueContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - xmlName: "provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueCreateContractProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContractProperties", - type: { - name: "Composite", - className: "NamedValueCreateContractProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "displayName", - required: true, - xmlName: "displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - }, - }, - }, - }, -}; - -export const NamedValueUpdateParameterProperties: coreClient.CompositeMapper = { - serializedName: "NamedValueUpdateParameterProperties", - type: { - name: "Composite", - className: "NamedValueUpdateParameterProperties", - modelProperties: { - ...NamedValueEntityBaseParameters.type.modelProperties, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "displayName", - xmlName: "displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - MinLength: 1, - }, - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "keyVault", - xmlName: "keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - }, - }, - }, - }, -}; - -export const ApiManagementWorkspaceLinksProperties: coreClient.CompositeMapper = - { - serializedName: "ApiManagementWorkspaceLinksProperties", - type: { - name: "Composite", - className: "ApiManagementWorkspaceLinksProperties", - modelProperties: { - ...WorkspaceLinksBaseProperties.type.modelProperties, - }, - }, - }; - -export const AllPoliciesContract: coreClient.CompositeMapper = { - serializedName: "AllPoliciesContract", - type: { - name: "Composite", - className: "AllPoliciesContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - referencePolicyId: { - serializedName: "properties.referencePolicyId", - xmlName: "properties.referencePolicyId", - type: { - name: "String", - }, - }, - complianceState: { - serializedName: "properties.complianceState", - xmlName: "properties.complianceState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiContract: coreClient.CompositeMapper = { - serializedName: "ApiContract", - type: { - name: "Composite", - className: "ApiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - authenticationSettings: { - serializedName: "properties.authenticationSettings", - xmlName: "properties.authenticationSettings", - type: { - name: "Composite", - className: "AuthenticationSettingsContract", - }, - }, - subscriptionKeyParameterNames: { - serializedName: "properties.subscriptionKeyParameterNames", - xmlName: "properties.subscriptionKeyParameterNames", - type: { - name: "Composite", - className: "SubscriptionKeyParameterNamesContract", - }, - }, - apiType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - apiRevision: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.apiRevision", - xmlName: "properties.apiRevision", - type: { - name: "String", - }, - }, - apiVersion: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.apiVersion", - xmlName: "properties.apiVersion", - type: { - name: "String", - }, - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean", - }, - }, - isOnline: { - serializedName: "properties.isOnline", - readOnly: true, - xmlName: "properties.isOnline", - type: { - name: "Boolean", - }, - }, - apiRevisionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiRevisionDescription", - xmlName: "properties.apiRevisionDescription", - type: { - name: "String", - }, - }, - apiVersionDescription: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.apiVersionDescription", - xmlName: "properties.apiVersionDescription", - type: { - name: "String", - }, - }, - apiVersionSetId: { - serializedName: "properties.apiVersionSetId", - xmlName: "properties.apiVersionSetId", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean", - }, - }, - termsOfServiceUrl: { - serializedName: "properties.termsOfServiceUrl", - xmlName: "properties.termsOfServiceUrl", - type: { - name: "String", - }, - }, - contact: { - serializedName: "properties.contact", - xmlName: "properties.contact", - type: { - name: "Composite", - className: "ApiContactInformation", - }, - }, - license: { - serializedName: "properties.license", - xmlName: "properties.license", - type: { - name: "Composite", - className: "ApiLicenseInformation", - }, - }, - sourceApiId: { - serializedName: "properties.sourceApiId", - xmlName: "properties.sourceApiId", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - serviceUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.serviceUrl", - xmlName: "properties.serviceUrl", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 400, - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String", - }, - }, - protocols: { - serializedName: "properties.protocols", - xmlName: "properties.protocols", - xmlElementName: "Protocol", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - apiVersionSet: { - serializedName: "properties.apiVersionSet", - xmlName: "properties.apiVersionSet", - type: { - name: "Composite", - className: "ApiVersionSetContractDetails", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiReleaseContract: coreClient.CompositeMapper = { - serializedName: "ApiReleaseContract", - type: { - name: "Composite", - className: "ApiReleaseContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String", - }, - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime", - }, - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime", - }, - }, - notes: { - serializedName: "properties.notes", - xmlName: "properties.notes", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationContract: coreClient.CompositeMapper = { - serializedName: "OperationContract", - type: { - name: "Composite", - className: "OperationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - templateParameters: { - serializedName: "properties.templateParameters", - xmlName: "properties.templateParameters", - xmlElementName: "ParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ParameterContract", - }, - }, - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - request: { - serializedName: "properties.request", - xmlName: "properties.request", - type: { - name: "Composite", - className: "RequestContract", - }, - }, - responses: { - serializedName: "properties.responses", - xmlName: "properties.responses", - xmlElementName: "ResponseContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResponseContract", - }, - }, - }, - }, - policies: { - serializedName: "properties.policies", - xmlName: "properties.policies", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - method: { - serializedName: "properties.method", - xmlName: "properties.method", - type: { - name: "String", - }, - }, - urlTemplate: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "properties.urlTemplate", - xmlName: "properties.urlTemplate", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyContract: coreClient.CompositeMapper = { - serializedName: "PolicyContract", - type: { - name: "Composite", - className: "PolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - format: { - defaultValue: "xml", - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagContract: coreClient.CompositeMapper = { - serializedName: "TagContract", - type: { - name: "Composite", - className: "TagContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResolverContract: coreClient.CompositeMapper = { - serializedName: "ResolverContract", - type: { - name: "Composite", - className: "ResolverContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - path: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.path", - xmlName: "properties.path", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductContract: coreClient.CompositeMapper = { - serializedName: "ProductContract", - type: { - name: "Composite", - className: "ProductContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - terms: { - serializedName: "properties.terms", - xmlName: "properties.terms", - type: { - name: "String", - }, - }, - subscriptionRequired: { - serializedName: "properties.subscriptionRequired", - xmlName: "properties.subscriptionRequired", - type: { - name: "Boolean", - }, - }, - approvalRequired: { - serializedName: "properties.approvalRequired", - xmlName: "properties.approvalRequired", - type: { - name: "Boolean", - }, - }, - subscriptionsLimit: { - serializedName: "properties.subscriptionsLimit", - xmlName: "properties.subscriptionsLimit", - type: { - name: "Number", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: ["notPublished", "published"], - }, - }, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SchemaContract: coreClient.CompositeMapper = { - serializedName: "SchemaContract", - type: { - name: "Composite", - className: "SchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - contentType: { - serializedName: "properties.contentType", - xmlName: "properties.contentType", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - value: { - serializedName: "properties.document.value", - xmlName: "properties.document.value", - type: { - name: "String", - }, - }, - definitions: { - serializedName: "properties.document.definitions", - xmlName: "properties.document.definitions", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - components: { - serializedName: "properties.document.components", - xmlName: "properties.document.components", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const DiagnosticContract: coreClient.CompositeMapper = { - serializedName: "DiagnosticContract", - type: { - name: "Composite", - className: "DiagnosticContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - alwaysLog: { - serializedName: "properties.alwaysLog", - xmlName: "properties.alwaysLog", - type: { - name: "String", - }, - }, - loggerId: { - serializedName: "properties.loggerId", - xmlName: "properties.loggerId", - type: { - name: "String", - }, - }, - sampling: { - serializedName: "properties.sampling", - xmlName: "properties.sampling", - type: { - name: "Composite", - className: "SamplingSettings", - }, - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - }, - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - }, - }, - logClientIp: { - serializedName: "properties.logClientIp", - xmlName: "properties.logClientIp", - type: { - name: "Boolean", - }, - }, - httpCorrelationProtocol: { - serializedName: "properties.httpCorrelationProtocol", - xmlName: "properties.httpCorrelationProtocol", - type: { - name: "String", - }, - }, - verbosity: { - serializedName: "properties.verbosity", - xmlName: "properties.verbosity", - type: { - name: "String", - }, - }, - operationNameFormat: { - serializedName: "properties.operationNameFormat", - xmlName: "properties.operationNameFormat", - type: { - name: "String", - }, - }, - metrics: { - serializedName: "properties.metrics", - xmlName: "properties.metrics", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const IssueContract: coreClient.CompositeMapper = { - serializedName: "IssueContract", - type: { - name: "Composite", - className: "IssueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String", - }, - }, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String", - }, - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueCommentContract: coreClient.CompositeMapper = { - serializedName: "IssueCommentContract", - type: { - name: "Composite", - className: "IssueCommentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - text: { - serializedName: "properties.text", - xmlName: "properties.text", - type: { - name: "String", - }, - }, - createdDate: { - serializedName: "properties.createdDate", - xmlName: "properties.createdDate", - type: { - name: "DateTime", - }, - }, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueAttachmentContract: coreClient.CompositeMapper = { - serializedName: "IssueAttachmentContract", - type: { - name: "Composite", - className: "IssueAttachmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - contentFormat: { - serializedName: "properties.contentFormat", - xmlName: "properties.contentFormat", - type: { - name: "String", - }, - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagDescriptionContract: coreClient.CompositeMapper = { - serializedName: "TagDescriptionContract", - type: { - name: "Composite", - className: "TagDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - externalDocsUrl: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.externalDocsUrl", - xmlName: "properties.externalDocsUrl", - type: { - name: "String", - }, - }, - externalDocsDescription: { - serializedName: "properties.externalDocsDescription", - xmlName: "properties.externalDocsDescription", - type: { - name: "String", - }, - }, - tagId: { - serializedName: "properties.tagId", - xmlName: "properties.tagId", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 160, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WikiContract: coreClient.CompositeMapper = { - serializedName: "WikiContract", - type: { - name: "Composite", - className: "WikiContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - documents: { - serializedName: "properties.documents", - xmlName: "properties.documents", - xmlElementName: "WikiDocumentationContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WikiDocumentationContract", - }, - }, - }, - }, - }, - }, -}; - -export const ApiVersionSetContract: coreClient.CompositeMapper = { - serializedName: "ApiVersionSetContract", - type: { - name: "Composite", - className: "ApiVersionSetContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - versionQueryName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.versionQueryName", - xmlName: "properties.versionQueryName", - type: { - name: "String", - }, - }, - versionHeaderName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.versionHeaderName", - xmlName: "properties.versionHeaderName", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 100, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - versioningScheme: { - serializedName: "properties.versioningScheme", - xmlName: "properties.versioningScheme", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationProviderContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationProviderContract", - type: { - name: "Composite", - className: "AuthorizationProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - identityProvider: { - serializedName: "properties.identityProvider", - xmlName: "properties.identityProvider", - type: { - name: "String", - }, - }, - oauth2: { - serializedName: "properties.oauth2", - xmlName: "properties.oauth2", - type: { - name: "Composite", - className: "AuthorizationProviderOAuth2Settings", - }, - }, - }, - }, -}; - -export const AuthorizationContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationContract", - type: { - name: "Composite", - className: "AuthorizationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - authorizationType: { - serializedName: "properties.authorizationType", - xmlName: "properties.authorizationType", - type: { - name: "String", - }, - }, - oAuth2GrantType: { - serializedName: "properties.oauth2grantType", - xmlName: "properties.oauth2grantType", - type: { - name: "String", - }, - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "AuthorizationError", - }, - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationAccessPolicyContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicyContract", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - appIds: { - serializedName: "properties.appIds", - xmlName: "properties.appIds", - xmlElementName: "AuthorizationAccessPolicyContractPropertiesAppIdsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - tenantId: { - serializedName: "properties.tenantId", - xmlName: "properties.tenantId", - type: { - name: "String", - }, - }, - objectId: { - serializedName: "properties.objectId", - xmlName: "properties.objectId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerContract", - type: { - name: "Composite", - className: "AuthorizationServerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - ], - }, - }, - }, - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract", - }, - }, - }, - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String", - }, - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean", - }, - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String", - }, - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String", - }, - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String", - }, - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String", - }, - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerUpdateContract: coreClient.CompositeMapper = { - serializedName: "AuthorizationServerUpdateContract", - type: { - name: "Composite", - className: "AuthorizationServerUpdateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - authorizationMethods: { - serializedName: "properties.authorizationMethods", - xmlName: "properties.authorizationMethods", - xmlElementName: "AuthorizationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "HEAD", - "OPTIONS", - "TRACE", - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - ], - }, - }, - }, - }, - clientAuthenticationMethod: { - serializedName: "properties.clientAuthenticationMethod", - xmlName: "properties.clientAuthenticationMethod", - xmlElementName: "ClientAuthenticationMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - tokenBodyParameters: { - serializedName: "properties.tokenBodyParameters", - xmlName: "properties.tokenBodyParameters", - xmlElementName: "TokenBodyParameterContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenBodyParameterContract", - }, - }, - }, - }, - tokenEndpoint: { - serializedName: "properties.tokenEndpoint", - xmlName: "properties.tokenEndpoint", - type: { - name: "String", - }, - }, - supportState: { - serializedName: "properties.supportState", - xmlName: "properties.supportState", - type: { - name: "Boolean", - }, - }, - defaultScope: { - serializedName: "properties.defaultScope", - xmlName: "properties.defaultScope", - type: { - name: "String", - }, - }, - bearerTokenSendingMethods: { - serializedName: "properties.bearerTokenSendingMethods", - xmlName: "properties.bearerTokenSendingMethods", - xmlElementName: "BearerTokenSendingMethod", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - resourceOwnerUsername: { - serializedName: "properties.resourceOwnerUsername", - xmlName: "properties.resourceOwnerUsername", - type: { - name: "String", - }, - }, - resourceOwnerPassword: { - serializedName: "properties.resourceOwnerPassword", - xmlName: "properties.resourceOwnerPassword", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 50, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - clientRegistrationEndpoint: { - serializedName: "properties.clientRegistrationEndpoint", - xmlName: "properties.clientRegistrationEndpoint", - type: { - name: "String", - }, - }, - authorizationEndpoint: { - serializedName: "properties.authorizationEndpoint", - xmlName: "properties.authorizationEndpoint", - type: { - name: "String", - }, - }, - grantTypes: { - serializedName: "properties.grantTypes", - xmlName: "properties.grantTypes", - xmlElementName: "GrantType", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendContract: coreClient.CompositeMapper = { - serializedName: "BackendContract", - type: { - name: "Composite", - className: "BackendContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - resourceId: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String", - }, - }, - properties: { - serializedName: "properties.properties", - xmlName: "properties.properties", - type: { - name: "Composite", - className: "BackendProperties", - }, - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Composite", - className: "BackendCredentialsContract", - }, - }, - proxy: { - serializedName: "properties.proxy", - xmlName: "properties.proxy", - type: { - name: "Composite", - className: "BackendProxyContract", - }, - }, - tls: { - serializedName: "properties.tls", - xmlName: "properties.tls", - type: { - name: "Composite", - className: "BackendTlsProperties", - }, - }, - circuitBreaker: { - serializedName: "properties.circuitBreaker", - xmlName: "properties.circuitBreaker", - type: { - name: "Composite", - className: "BackendCircuitBreaker", - }, - }, - pool: { - serializedName: "properties.pool", - xmlName: "properties.pool", - type: { - name: "Composite", - className: "BackendBaseParametersPool", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - url: { - constraints: { - MaxLength: 2000, - MinLength: 1, - }, - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String", - }, - }, - protocol: { - serializedName: "properties.protocol", - xmlName: "properties.protocol", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendReconnectContract: coreClient.CompositeMapper = { - serializedName: "BackendReconnectContract", - type: { - name: "Composite", - className: "BackendReconnectContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - after: { - serializedName: "properties.after", - xmlName: "properties.after", - type: { - name: "TimeSpan", - }, - }, - }, - }, -}; - -export const CacheContract: coreClient.CompositeMapper = { - serializedName: "CacheContract", - type: { - name: "Composite", - className: "CacheContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - connectionString: { - constraints: { - MaxLength: 300, - }, - serializedName: "properties.connectionString", - xmlName: "properties.connectionString", - type: { - name: "String", - }, - }, - useFromLocation: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.useFromLocation", - xmlName: "properties.useFromLocation", - type: { - name: "String", - }, - }, - resourceId: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateContract: coreClient.CompositeMapper = { - serializedName: "CertificateContract", - type: { - name: "Composite", - className: "CertificateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String", - }, - }, - thumbprint: { - serializedName: "properties.thumbprint", - xmlName: "properties.thumbprint", - type: { - name: "String", - }, - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime", - }, - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - }, - }, - }, - }, -}; - -export const ContentTypeContract: coreClient.CompositeMapper = { - serializedName: "ContentTypeContract", - type: { - name: "Composite", - className: "ContentTypeContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String", - }, - }, - namePropertiesName: { - serializedName: "properties.name", - xmlName: "properties.name", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - schema: { - serializedName: "properties.schema", - xmlName: "properties.schema", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - version: { - serializedName: "properties.version", - xmlName: "properties.version", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentItemContract: coreClient.CompositeMapper = { - serializedName: "ContentItemContract", - type: { - name: "Composite", - className: "ContentItemContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - xmlName: "properties", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const DeletedServiceContract: coreClient.CompositeMapper = { - serializedName: "DeletedServiceContract", - type: { - name: "Composite", - className: "DeletedServiceContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - readOnly: true, - xmlName: "location", - type: { - name: "String", - }, - }, - serviceId: { - serializedName: "properties.serviceId", - xmlName: "properties.serviceId", - type: { - name: "String", - }, - }, - scheduledPurgeDate: { - serializedName: "properties.scheduledPurgeDate", - xmlName: "properties.scheduledPurgeDate", - type: { - name: "DateTime", - }, - }, - deletionDate: { - serializedName: "properties.deletionDate", - xmlName: "properties.deletionDate", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const DocumentationContract: coreClient.CompositeMapper = { - serializedName: "DocumentationContract", - type: { - name: "Composite", - className: "DocumentationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - content: { - serializedName: "properties.content", - xmlName: "properties.content", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateContract: coreClient.CompositeMapper = { - serializedName: "EmailTemplateContract", - type: { - name: "Composite", - className: "EmailTemplateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - subject: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "properties.subject", - xmlName: "properties.subject", - type: { - name: "String", - }, - }, - body: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.body", - xmlName: "properties.body", - type: { - name: "String", - }, - }, - title: { - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - isDefault: { - serializedName: "properties.isDefault", - readOnly: true, - xmlName: "properties.isDefault", - type: { - name: "Boolean", - }, - }, - parameters: { - serializedName: "properties.parameters", - xmlName: "properties.parameters", - xmlElementName: "EmailTemplateParametersContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailTemplateParametersContractProperties", - }, - }, - }, - }, - }, - }, -}; - -export const ApiManagementGatewayConfigConnectionResource: coreClient.CompositeMapper = - { - serializedName: "ApiManagementGatewayConfigConnectionResource", - type: { - name: "Composite", - className: "ApiManagementGatewayConfigConnectionResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - sourceId: { - serializedName: "properties.sourceId", - xmlName: "properties.sourceId", - type: { - name: "String", - }, - }, - defaultHostname: { - serializedName: "properties.defaultHostname", - readOnly: true, - xmlName: "properties.defaultHostname", - type: { - name: "String", - }, - }, - hostnames: { - serializedName: "properties.hostnames", - xmlName: "properties.hostnames", - xmlElementName: "GatewayConfigConnectionBasePropertiesHostnamesItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, - }; - -export const GatewayContract: coreClient.CompositeMapper = { - serializedName: "GatewayContract", - type: { - name: "Composite", - className: "GatewayContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - locationData: { - serializedName: "properties.locationData", - xmlName: "properties.locationData", - type: { - name: "Composite", - className: "ResourceLocationDataContract", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayHostnameConfigurationContract: coreClient.CompositeMapper = - { - serializedName: "GatewayHostnameConfigurationContract", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostname: { - serializedName: "properties.hostname", - xmlName: "properties.hostname", - type: { - name: "String", - }, - }, - certificateId: { - serializedName: "properties.certificateId", - xmlName: "properties.certificateId", - type: { - name: "String", - }, - }, - negotiateClientCertificate: { - serializedName: "properties.negotiateClientCertificate", - xmlName: "properties.negotiateClientCertificate", - type: { - name: "Boolean", - }, - }, - tls10Enabled: { - serializedName: "properties.tls10Enabled", - xmlName: "properties.tls10Enabled", - type: { - name: "Boolean", - }, - }, - tls11Enabled: { - serializedName: "properties.tls11Enabled", - xmlName: "properties.tls11Enabled", - type: { - name: "Boolean", - }, - }, - http2Enabled: { - serializedName: "properties.http2Enabled", - xmlName: "properties.http2Enabled", - type: { - name: "Boolean", - }, - }, - }, - }, - }; - -export const AssociationContract: coreClient.CompositeMapper = { - serializedName: "AssociationContract", - type: { - name: "Composite", - className: "AssociationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - provisioningState: { - defaultValue: "created", - isConstant: true, - serializedName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayCertificateAuthorityContract: coreClient.CompositeMapper = { - serializedName: "GatewayCertificateAuthorityContract", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - isTrusted: { - serializedName: "properties.isTrusted", - xmlName: "properties.isTrusted", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const GroupContract: coreClient.CompositeMapper = { - serializedName: "GroupContract", - type: { - name: "Composite", - className: "GroupContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 300, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - builtIn: { - serializedName: "properties.builtIn", - readOnly: true, - xmlName: "properties.builtIn", - type: { - name: "Boolean", - }, - }, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "Enum", - allowedValues: ["custom", "system", "external"], - }, - }, - externalId: { - serializedName: "properties.externalId", - xmlName: "properties.externalId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserContract: coreClient.CompositeMapper = { - serializedName: "UserContract", - type: { - name: "Composite", - className: "UserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - defaultValue: "active", - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "String", - }, - }, - note: { - serializedName: "properties.note", - xmlName: "properties.note", - type: { - name: "String", - }, - }, - identities: { - serializedName: "properties.identities", - xmlName: "properties.identities", - xmlElementName: "UserIdentityContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UserIdentityContract", - }, - }, - }, - }, - firstName: { - serializedName: "properties.firstName", - xmlName: "properties.firstName", - type: { - name: "String", - }, - }, - lastName: { - serializedName: "properties.lastName", - xmlName: "properties.lastName", - type: { - name: "String", - }, - }, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String", - }, - }, - registrationDate: { - serializedName: "properties.registrationDate", - xmlName: "properties.registrationDate", - type: { - name: "DateTime", - }, - }, - groups: { - serializedName: "properties.groups", - readOnly: true, - xmlName: "properties.groups", - xmlElementName: "GroupContractProperties", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GroupContractProperties", - }, - }, - }, - }, - }, - }, -}; - -export const IdentityProviderContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderContract", - type: { - name: "Composite", - className: "IdentityProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String", - }, - }, - allowedTenants: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String", - }, - }, - signupPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String", - }, - }, - signinPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String", - }, - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String", - }, - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String", - }, - }, - clientLibrary: { - constraints: { - MaxLength: 16, - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String", - }, - }, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderCreateContract: coreClient.CompositeMapper = { - serializedName: "IdentityProviderCreateContract", - type: { - name: "Composite", - className: "IdentityProviderCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - typePropertiesType: { - serializedName: "properties.type", - xmlName: "properties.type", - type: { - name: "String", - }, - }, - signinTenant: { - serializedName: "properties.signinTenant", - xmlName: "properties.signinTenant", - type: { - name: "String", - }, - }, - allowedTenants: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.allowedTenants", - xmlName: "properties.allowedTenants", - xmlElementName: "IdentityProviderBaseParametersAllowedTenantsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - authority: { - serializedName: "properties.authority", - xmlName: "properties.authority", - type: { - name: "String", - }, - }, - signupPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signupPolicyName", - xmlName: "properties.signupPolicyName", - type: { - name: "String", - }, - }, - signinPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.signinPolicyName", - xmlName: "properties.signinPolicyName", - type: { - name: "String", - }, - }, - profileEditingPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.profileEditingPolicyName", - xmlName: "properties.profileEditingPolicyName", - type: { - name: "String", - }, - }, - passwordResetPolicyName: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.passwordResetPolicyName", - xmlName: "properties.passwordResetPolicyName", - type: { - name: "String", - }, - }, - clientLibrary: { - constraints: { - MaxLength: 16, - }, - serializedName: "properties.clientLibrary", - xmlName: "properties.clientLibrary", - type: { - name: "String", - }, - }, - clientId: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - constraints: { - MinLength: 1, - }, - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerContract: coreClient.CompositeMapper = { - serializedName: "LoggerContract", - type: { - name: "Composite", - className: "LoggerContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - loggerType: { - serializedName: "properties.loggerType", - xmlName: "properties.loggerType", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 256, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - credentials: { - serializedName: "properties.credentials", - xmlName: "properties.credentials", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - isBuffered: { - serializedName: "properties.isBuffered", - xmlName: "properties.isBuffered", - type: { - name: "Boolean", - }, - }, - resourceId: { - serializedName: "properties.resourceId", - xmlName: "properties.resourceId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueContract: coreClient.CompositeMapper = { - serializedName: "NamedValueContract", - type: { - name: "Composite", - className: "NamedValueContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean", - }, - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractProperties", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueCreateContract: coreClient.CompositeMapper = { - serializedName: "NamedValueCreateContract", - type: { - name: "Composite", - className: "NamedValueCreateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - constraints: { - MaxItems: 32, - }, - serializedName: "properties.tags", - xmlName: "properties.tags", - xmlElementName: "NamedValueEntityBaseParametersTagsItem", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - secret: { - serializedName: "properties.secret", - xmlName: "properties.secret", - type: { - name: "Boolean", - }, - }, - displayName: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9-._]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - value: { - constraints: { - MaxLength: 4096, - }, - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - keyVault: { - serializedName: "properties.keyVault", - xmlName: "properties.keyVault", - type: { - name: "Composite", - className: "KeyVaultContractCreateProperties", - }, - }, - }, - }, -}; - -export const NotificationContract: coreClient.CompositeMapper = { - serializedName: "NotificationContract", - type: { - name: "Composite", - className: "NotificationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - title: { - constraints: { - MaxLength: 1000, - MinLength: 1, - }, - serializedName: "properties.title", - xmlName: "properties.title", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - recipients: { - serializedName: "properties.recipients", - xmlName: "properties.recipients", - type: { - name: "Composite", - className: "RecipientsContractProperties", - }, - }, - }, - }, -}; - -export const RecipientUserContract: coreClient.CompositeMapper = { - serializedName: "RecipientUserContract", - type: { - name: "Composite", - className: "RecipientUserContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - userId: { - serializedName: "properties.userId", - xmlName: "properties.userId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const RecipientEmailContract: coreClient.CompositeMapper = { - serializedName: "RecipientEmailContract", - type: { - name: "Composite", - className: "RecipientEmailContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - email: { - serializedName: "properties.email", - xmlName: "properties.email", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenidConnectProviderContract: coreClient.CompositeMapper = { - serializedName: "OpenidConnectProviderContract", - type: { - name: "Composite", - className: "OpenidConnectProviderContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - constraints: { - MaxLength: 50, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - metadataEndpoint: { - serializedName: "properties.metadataEndpoint", - xmlName: "properties.metadataEndpoint", - type: { - name: "String", - }, - }, - clientId: { - serializedName: "properties.clientId", - xmlName: "properties.clientId", - type: { - name: "String", - }, - }, - clientSecret: { - serializedName: "properties.clientSecret", - xmlName: "properties.clientSecret", - type: { - name: "String", - }, - }, - useInTestConsole: { - serializedName: "properties.useInTestConsole", - xmlName: "properties.useInTestConsole", - type: { - name: "Boolean", - }, - }, - useInApiDocumentation: { - serializedName: "properties.useInApiDocumentation", - xmlName: "properties.useInApiDocumentation", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const PolicyDescriptionContract: coreClient.CompositeMapper = { - serializedName: "PolicyDescriptionContract", - type: { - name: "Composite", - className: "PolicyDescriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - serializedName: "properties.description", - readOnly: true, - xmlName: "properties.description", - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - readOnly: true, - xmlName: "properties.scope", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const PolicyFragmentContract: coreClient.CompositeMapper = { - serializedName: "PolicyFragmentContract", - type: { - name: "Composite", - className: "PolicyFragmentContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "String", - }, - }, - description: { - constraints: { - MaxLength: 1000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - format: { - serializedName: "properties.format", - xmlName: "properties.format", - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResourceCollectionValueItem: coreClient.CompositeMapper = { - serializedName: "ResourceCollectionValueItem", - type: { - name: "Composite", - className: "ResourceCollectionValueItem", - modelProperties: { - ...ProxyResource.type.modelProperties, - }, - }, -}; - -export const PolicyRestrictionContract: coreClient.CompositeMapper = { - serializedName: "PolicyRestrictionContract", - type: { - name: "Composite", - className: "PolicyRestrictionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String", - }, - }, - requireBase: { - defaultValue: "false", - serializedName: "properties.requireBase", - xmlName: "properties.requireBase", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationResultContract: coreClient.CompositeMapper = { - serializedName: "OperationResultContract", - type: { - name: "Composite", - className: "OperationResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"], - }, - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime", - }, - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime", - }, - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String", - }, - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody", - }, - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "OperationResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResultLogItemContract", - }, - }, - }, - }, - }, - }, -}; - -export const PortalConfigContract: coreClient.CompositeMapper = { - serializedName: "PortalConfigContract", - type: { - name: "Composite", - className: "PortalConfigContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - enableBasicAuth: { - defaultValue: true, - serializedName: "properties.enableBasicAuth", - xmlName: "properties.enableBasicAuth", - type: { - name: "Boolean", - }, - }, - signin: { - serializedName: "properties.signin", - xmlName: "properties.signin", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignin", - }, - }, - signup: { - serializedName: "properties.signup", - xmlName: "properties.signup", - type: { - name: "Composite", - className: "PortalConfigPropertiesSignup", - }, - }, - delegation: { - serializedName: "properties.delegation", - xmlName: "properties.delegation", - type: { - name: "Composite", - className: "PortalConfigDelegationProperties", - }, - }, - cors: { - serializedName: "properties.cors", - xmlName: "properties.cors", - type: { - name: "Composite", - className: "PortalConfigCorsProperties", - }, - }, - csp: { - serializedName: "properties.csp", - xmlName: "properties.csp", - type: { - name: "Composite", - className: "PortalConfigCspProperties", - }, - }, - }, - }, -}; - -export const PortalRevisionContract: coreClient.CompositeMapper = { - serializedName: "PortalRevisionContract", - type: { - name: "Composite", - className: "PortalRevisionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - statusDetails: { - constraints: { - MaxLength: 2000, - }, - serializedName: "properties.statusDetails", - readOnly: true, - xmlName: "properties.statusDetails", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - readOnly: true, - xmlName: "properties.status", - type: { - name: "String", - }, - }, - isCurrent: { - serializedName: "properties.isCurrent", - xmlName: "properties.isCurrent", - type: { - name: "Boolean", - }, - }, - createdDateTime: { - serializedName: "properties.createdDateTime", - readOnly: true, - xmlName: "properties.createdDateTime", - type: { - name: "DateTime", - }, - }, - updatedDateTime: { - serializedName: "properties.updatedDateTime", - readOnly: true, - xmlName: "properties.updatedDateTime", - type: { - name: "DateTime", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalSettingsContract: coreClient.CompositeMapper = { - serializedName: "PortalSettingsContract", - type: { - name: "Composite", - className: "PortalSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String", - }, - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String", - }, - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties", - }, - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties", - }, - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties", - }, - }, - }, - }, -}; - -export const PortalSigninSettings: coreClient.CompositeMapper = { - serializedName: "PortalSigninSettings", - type: { - name: "Composite", - className: "PortalSigninSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const PortalSignupSettings: coreClient.CompositeMapper = { - serializedName: "PortalSignupSettings", - type: { - name: "Composite", - className: "PortalSignupSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - termsOfService: { - serializedName: "properties.termsOfService", - xmlName: "properties.termsOfService", - type: { - name: "Composite", - className: "TermsOfServiceProperties", - }, - }, - }, - }, -}; - -export const PortalDelegationSettings: coreClient.CompositeMapper = { - serializedName: "PortalDelegationSettings", - type: { - name: "Composite", - className: "PortalDelegationSettings", - modelProperties: { - ...ProxyResource.type.modelProperties, - url: { - serializedName: "properties.url", - xmlName: "properties.url", - type: { - name: "String", - }, - }, - validationKey: { - serializedName: "properties.validationKey", - xmlName: "properties.validationKey", - type: { - name: "String", - }, - }, - subscriptions: { - serializedName: "properties.subscriptions", - xmlName: "properties.subscriptions", - type: { - name: "Composite", - className: "SubscriptionsDelegationSettingsProperties", - }, - }, - userRegistration: { - serializedName: "properties.userRegistration", - xmlName: "properties.userRegistration", - type: { - name: "Composite", - className: "RegistrationDelegationSettingsProperties", - }, - }, - }, - }, -}; - -export const SubscriptionContract: coreClient.CompositeMapper = { - serializedName: "SubscriptionContract", - type: { - name: "Composite", - className: "SubscriptionContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - ownerId: { - serializedName: "properties.ownerId", - xmlName: "properties.ownerId", - type: { - name: "String", - }, - }, - scope: { - serializedName: "properties.scope", - xmlName: "properties.scope", - type: { - name: "String", - }, - }, - displayName: { - constraints: { - MaxLength: 100, - }, - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - state: { - serializedName: "properties.state", - xmlName: "properties.state", - type: { - name: "Enum", - allowedValues: [ - "suspended", - "active", - "expired", - "submitted", - "rejected", - "cancelled", - ], - }, - }, - createdDate: { - serializedName: "properties.createdDate", - readOnly: true, - xmlName: "properties.createdDate", - type: { - name: "DateTime", - }, - }, - startDate: { - serializedName: "properties.startDate", - xmlName: "properties.startDate", - type: { - name: "DateTime", - }, - }, - expirationDate: { - serializedName: "properties.expirationDate", - xmlName: "properties.expirationDate", - type: { - name: "DateTime", - }, - }, - endDate: { - serializedName: "properties.endDate", - xmlName: "properties.endDate", - type: { - name: "DateTime", - }, - }, - notificationDate: { - serializedName: "properties.notificationDate", - xmlName: "properties.notificationDate", - type: { - name: "DateTime", - }, - }, - primaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.primaryKey", - xmlName: "properties.primaryKey", - type: { - name: "String", - }, - }, - secondaryKey: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "properties.secondaryKey", - xmlName: "properties.secondaryKey", - type: { - name: "String", - }, - }, - stateComment: { - serializedName: "properties.stateComment", - xmlName: "properties.stateComment", - type: { - name: "String", - }, - }, - allowTracing: { - serializedName: "properties.allowTracing", - xmlName: "properties.allowTracing", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ProductApiLinkContract: coreClient.CompositeMapper = { - serializedName: "ProductApiLinkContract", - type: { - name: "Composite", - className: "ProductApiLinkContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductGroupLinkContract: coreClient.CompositeMapper = { - serializedName: "ProductGroupLinkContract", - type: { - name: "Composite", - className: "ProductGroupLinkContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - xmlName: "properties.groupId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalSchemaContract: coreClient.CompositeMapper = { - serializedName: "GlobalSchemaContract", - type: { - name: "Composite", - className: "GlobalSchemaContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - schemaType: { - serializedName: "properties.schemaType", - xmlName: "properties.schemaType", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - value: { - serializedName: "properties.value", - xmlName: "properties.value", - type: { - name: "any", - }, - }, - document: { - serializedName: "properties.document", - xmlName: "properties.document", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - xmlName: "properties.provisioningState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantSettingsContract: coreClient.CompositeMapper = { - serializedName: "TenantSettingsContract", - type: { - name: "Composite", - className: "TenantSettingsContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - settings: { - serializedName: "properties.settings", - xmlName: "properties.settings", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const TagApiLinkContract: coreClient.CompositeMapper = { - serializedName: "TagApiLinkContract", - type: { - name: "Composite", - className: "TagApiLinkContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - apiId: { - serializedName: "properties.apiId", - xmlName: "properties.apiId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagOperationLinkContract: coreClient.CompositeMapper = { - serializedName: "TagOperationLinkContract", - type: { - name: "Composite", - className: "TagOperationLinkContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - operationId: { - serializedName: "properties.operationId", - xmlName: "properties.operationId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagProductLinkContract: coreClient.CompositeMapper = { - serializedName: "TagProductLinkContract", - type: { - name: "Composite", - className: "TagProductLinkContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - productId: { - serializedName: "properties.productId", - xmlName: "properties.productId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AccessInformationContract: coreClient.CompositeMapper = { - serializedName: "AccessInformationContract", - type: { - name: "Composite", - className: "AccessInformationContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String", - }, - }, - principalId: { - serializedName: "properties.principalId", - xmlName: "properties.principalId", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "properties.enabled", - xmlName: "properties.enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const TenantConfigurationSyncStateContract: coreClient.CompositeMapper = - { - serializedName: "TenantConfigurationSyncStateContract", - type: { - name: "Composite", - className: "TenantConfigurationSyncStateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - branch: { - serializedName: "properties.branch", - xmlName: "properties.branch", - type: { - name: "String", - }, - }, - commitId: { - serializedName: "properties.commitId", - xmlName: "properties.commitId", - type: { - name: "String", - }, - }, - isExport: { - serializedName: "properties.isExport", - xmlName: "properties.isExport", - type: { - name: "Boolean", - }, - }, - isSynced: { - serializedName: "properties.isSynced", - xmlName: "properties.isSynced", - type: { - name: "Boolean", - }, - }, - isGitEnabled: { - serializedName: "properties.isGitEnabled", - xmlName: "properties.isGitEnabled", - type: { - name: "Boolean", - }, - }, - syncDate: { - serializedName: "properties.syncDate", - xmlName: "properties.syncDate", - type: { - name: "DateTime", - }, - }, - configurationChangeDate: { - serializedName: "properties.configurationChangeDate", - xmlName: "properties.configurationChangeDate", - type: { - name: "DateTime", - }, - }, - lastOperationId: { - serializedName: "properties.lastOperationId", - xmlName: "properties.lastOperationId", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const DiagnosticUpdateContract: coreClient.CompositeMapper = { - serializedName: "DiagnosticUpdateContract", - type: { - name: "Composite", - className: "DiagnosticUpdateContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - alwaysLog: { - serializedName: "properties.alwaysLog", - xmlName: "properties.alwaysLog", - type: { - name: "String", - }, - }, - loggerId: { - serializedName: "properties.loggerId", - xmlName: "properties.loggerId", - type: { - name: "String", - }, - }, - sampling: { - serializedName: "properties.sampling", - xmlName: "properties.sampling", - type: { - name: "Composite", - className: "SamplingSettings", - }, - }, - frontend: { - serializedName: "properties.frontend", - xmlName: "properties.frontend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - }, - }, - backend: { - serializedName: "properties.backend", - xmlName: "properties.backend", - type: { - name: "Composite", - className: "PipelineDiagnosticSettings", - }, - }, - logClientIp: { - serializedName: "properties.logClientIp", - xmlName: "properties.logClientIp", - type: { - name: "Boolean", - }, - }, - httpCorrelationProtocol: { - serializedName: "properties.httpCorrelationProtocol", - xmlName: "properties.httpCorrelationProtocol", - type: { - name: "String", - }, - }, - verbosity: { - serializedName: "properties.verbosity", - xmlName: "properties.verbosity", - type: { - name: "String", - }, - }, - operationNameFormat: { - serializedName: "properties.operationNameFormat", - xmlName: "properties.operationNameFormat", - type: { - name: "String", - }, - }, - metrics: { - serializedName: "properties.metrics", - xmlName: "properties.metrics", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const ApiManagementWorkspaceLinksResource: coreClient.CompositeMapper = { - serializedName: "ApiManagementWorkspaceLinksResource", - type: { - name: "Composite", - className: "ApiManagementWorkspaceLinksResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - xmlName: "etag", - type: { - name: "String", - }, - }, - workspaceId: { - serializedName: "properties.workspaceId", - xmlName: "properties.workspaceId", - type: { - name: "String", - }, - }, - gateways: { - serializedName: "properties.gateways", - xmlName: "properties.gateways", - xmlElementName: "WorkspaceLinksGateway", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkspaceLinksGateway", - }, - }, - }, - }, - }, - }, -}; - -export const WorkspaceContract: coreClient.CompositeMapper = { - serializedName: "WorkspaceContract", - type: { - name: "Composite", - className: "WorkspaceContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - xmlName: "properties.displayName", - type: { - name: "String", - }, - }, - description: { - serializedName: "properties.description", - xmlName: "properties.description", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyWithComplianceContract: coreClient.CompositeMapper = { - serializedName: "PolicyWithComplianceContract", - type: { - name: "Composite", - className: "PolicyWithComplianceContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - referencePolicyId: { - serializedName: "properties.referencePolicyId", - xmlName: "properties.referencePolicyId", - type: { - name: "String", - }, - }, - complianceState: { - serializedName: "properties.complianceState", - xmlName: "properties.complianceState", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ResolverResultContract: coreClient.CompositeMapper = { - serializedName: "ResolverResultContract", - type: { - name: "Composite", - className: "ResolverResultContract", - modelProperties: { - ...ProxyResource.type.modelProperties, - idPropertiesId: { - serializedName: "properties.id", - xmlName: "properties.id", - type: { - name: "String", - }, - }, - status: { - serializedName: "properties.status", - xmlName: "properties.status", - type: { - name: "Enum", - allowedValues: ["Started", "InProgress", "Succeeded", "Failed"], - }, - }, - started: { - serializedName: "properties.started", - xmlName: "properties.started", - type: { - name: "DateTime", - }, - }, - updated: { - serializedName: "properties.updated", - xmlName: "properties.updated", - type: { - name: "DateTime", - }, - }, - resultInfo: { - serializedName: "properties.resultInfo", - xmlName: "properties.resultInfo", - type: { - name: "String", - }, - }, - error: { - serializedName: "properties.error", - xmlName: "properties.error", - type: { - name: "Composite", - className: "ErrorResponseBody", - }, - }, - actionLog: { - serializedName: "properties.actionLog", - readOnly: true, - xmlName: "properties.actionLog", - xmlElementName: "ResolverResultLogItemContract", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResolverResultLogItemContract", - }, - }, - }, - }, - }, - }, -}; - -export const ApiCreateOrUpdateProperties: coreClient.CompositeMapper = { - serializedName: "ApiCreateOrUpdateProperties", - type: { - name: "Composite", - className: "ApiCreateOrUpdateProperties", - modelProperties: { - ...ApiContractProperties.type.modelProperties, - value: { - serializedName: "value", - xmlName: "value", - type: { - name: "String", - }, - }, - format: { - serializedName: "format", - xmlName: "format", - type: { - name: "String", - }, - }, - wsdlSelector: { - serializedName: "wsdlSelector", - xmlName: "wsdlSelector", - type: { - name: "Composite", - className: "ApiCreateOrUpdatePropertiesWsdlSelector", - }, - }, - soapApiType: { - serializedName: "apiType", - xmlName: "apiType", - type: { - name: "String", - }, - }, - translateRequiredQueryParametersConduct: { - serializedName: "translateRequiredQueryParameters", - xmlName: "translateRequiredQueryParameters", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiGatewayUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiGateway_updateHeaders", - type: { - name: "Composite", - className: "ApiGatewayUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiGatewayDeleteHeaders: coreClient.CompositeMapper = { - serializedName: "ApiGateway_deleteHeaders", - type: { - name: "Composite", - className: "ApiGatewayDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiGetHeaders: coreClient.CompositeMapper = { - serializedName: "Api_getHeaders", - type: { - name: "Composite", - className: "ApiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Api_updateHeaders", - type: { - name: "Composite", - className: "ApiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiDeleteHeaders: coreClient.CompositeMapper = { - serializedName: "Api_deleteHeaders", - type: { - name: "Composite", - className: "ApiDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiReleaseGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiReleaseGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_getHeaders", - type: { - name: "Composite", - className: "ApiReleaseGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiReleaseCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiReleaseCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiReleaseUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiRelease_updateHeaders", - type: { - name: "Composite", - className: "ApiReleaseUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_getHeaders", - type: { - name: "Composite", - className: "ApiOperationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperation_updateHeaders", - type: { - name: "Composite", - className: "ApiOperationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationPolicyGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiOperationPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiOperationPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiOperationPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiOperationPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiOperationPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiOperationPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const TagGetEntityStateByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByOperationHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetByOperationHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByOperationHeaders", - type: { - name: "Composite", - className: "TagGetByOperationHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetEntityStateByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByApiHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetByApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByApiHeaders", - type: { - name: "Composite", - className: "TagGetByApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagAssignToApiHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_assignToApiHeaders", - type: { - name: "Composite", - className: "TagAssignToApiHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetEntityStateByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateByProductHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetByProductHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getByProductHeaders", - type: { - name: "Composite", - className: "TagGetByProductHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetEntityStateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getEntityStateHeaders", - type: { - name: "Composite", - className: "TagGetEntityStateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagGetHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_getHeaders", - type: { - name: "Composite", - className: "TagGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_createOrUpdateHeaders", - type: { - name: "Composite", - className: "TagCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Tag_updateHeaders", - type: { - name: "Composite", - className: "TagUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GraphQLApiResolverGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "GraphQLApiResolver_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GraphQLApiResolverGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GraphQLApiResolverCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "GraphQLApiResolver_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GraphQLApiResolverUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolver_updateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GraphQLApiResolverPolicyGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "GraphQLApiResolverPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GraphQLApiResolverPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "GraphQLApiResolverPolicy_getHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GraphQLApiResolverPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "GraphQLApiResolverPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GraphQLApiResolverPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_getHeaders", - type: { - name: "Composite", - className: "ApiPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_getHeaders", - type: { - name: "Composite", - className: "ApiSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiDiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiDiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_getHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiDiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiDiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiDiagnostic_updateHeaders", - type: { - name: "Composite", - className: "ApiDiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_getHeaders", - type: { - name: "Composite", - className: "ApiIssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssue_updateHeaders", - type: { - name: "Composite", - className: "ApiIssueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueCommentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueCommentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueComment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueCommentCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiIssueComment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueCommentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiIssueAttachmentGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiIssueAttachment_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiIssueAttachmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiIssueAttachment_getHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiIssueAttachmentCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiIssueAttachment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiIssueAttachmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiTagDescriptionGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiTagDescription_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiTagDescriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiTagDescription_getHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiTagDescriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiTagDescription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiTagDescriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_getHeaders", - type: { - name: "Composite", - className: "ApiWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiWiki_updateHeaders", - type: { - name: "Composite", - className: "ApiWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getEntityTagHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetGetHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_getHeaders", - type: { - name: "Composite", - className: "ApiVersionSetGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiVersionSetUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiVersionSet_updateHeaders", - type: { - name: "Composite", - className: "ApiVersionSetUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationProvider_getHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "AuthorizationProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_getHeaders", - type: { - name: "Composite", - className: "AuthorizationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Authorization_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationConfirmConsentCodeHeaders: coreClient.CompositeMapper = - { - serializedName: "Authorization_confirmConsentCodeHeaders", - type: { - name: "Composite", - className: "AuthorizationConfirmConsentCodeHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationLoginLinksPostHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationLoginLinks_postHeaders", - type: { - name: "Composite", - className: "AuthorizationLoginLinksPostHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationAccessPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationAccessPolicy_getHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationAccessPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "AuthorizationAccessPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationAccessPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationServerGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServer_getEntityTagHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationServerGetHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_getHeaders", - type: { - name: "Composite", - className: "AuthorizationServerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServer_createOrUpdateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AuthorizationServerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "AuthorizationServer_updateHeaders", - type: { - name: "Composite", - className: "AuthorizationServerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AuthorizationServerListSecretsHeaders: coreClient.CompositeMapper = - { - serializedName: "AuthorizationServer_listSecretsHeaders", - type: { - name: "Composite", - className: "AuthorizationServerListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const BackendGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getEntityTagHeaders", - type: { - name: "Composite", - className: "BackendGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendGetHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_getHeaders", - type: { - name: "Composite", - className: "BackendGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_createOrUpdateHeaders", - type: { - name: "Composite", - className: "BackendCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const BackendUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Backend_updateHeaders", - type: { - name: "Composite", - className: "BackendUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getEntityTagHeaders", - type: { - name: "Composite", - className: "CacheGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheGetHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_getHeaders", - type: { - name: "Composite", - className: "CacheGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CacheCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CacheUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Cache_updateHeaders", - type: { - name: "Composite", - className: "CacheUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getEntityTagHeaders", - type: { - name: "Composite", - className: "CertificateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateGetHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_getHeaders", - type: { - name: "Composite", - className: "CertificateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_createOrUpdateHeaders", - type: { - name: "Composite", - className: "CertificateCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CertificateRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "Certificate_refreshSecretHeaders", - type: { - name: "Composite", - className: "CertificateRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementClientPerformConnectivityCheckAsyncHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiManagementClient_performConnectivityCheckAsyncHeaders", - type: { - name: "Composite", - className: "ApiManagementClientPerformConnectivityCheckAsyncHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ContentTypeGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_getHeaders", - type: { - name: "Composite", - className: "ContentTypeGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentTypeCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentType_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentTypeCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentItemGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getEntityTagHeaders", - type: { - name: "Composite", - className: "ContentItemGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentItemGetHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_getHeaders", - type: { - name: "Composite", - className: "ContentItemGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ContentItemCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ContentItem_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ContentItemCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DeletedServicesPurgeHeaders: coreClient.CompositeMapper = { - serializedName: "DeletedServices_purgeHeaders", - type: { - name: "Composite", - className: "DeletedServicesPurgeHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceRestoreHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_restoreHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceRestoreHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceBackupHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_backupHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceBackupHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_updateHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceDeleteHeaders: coreClient.CompositeMapper = { - serializedName: "ApiManagementService_deleteHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiManagementServiceMigrateToStv2Headers: coreClient.CompositeMapper = - { - serializedName: "ApiManagementService_migrateToStv2Headers", - type: { - name: "Composite", - className: "ApiManagementServiceMigrateToStv2Headers", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders: coreClient.CompositeMapper = - { - serializedName: - "ApiManagementService_applyNetworkConfigurationUpdatesHeaders", - type: { - name: "Composite", - className: "ApiManagementServiceApplyNetworkConfigurationUpdatesHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const DiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "DiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_getHeaders", - type: { - name: "Composite", - className: "DiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Diagnostic_updateHeaders", - type: { - name: "Composite", - className: "DiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DocumentationGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getEntityTagHeaders", - type: { - name: "Composite", - className: "DocumentationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DocumentationGetHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_getHeaders", - type: { - name: "Composite", - className: "DocumentationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DocumentationCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "DocumentationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DocumentationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Documentation_updateHeaders", - type: { - name: "Composite", - className: "DocumentationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getEntityTagHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateGetHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_getHeaders", - type: { - name: "Composite", - className: "EmailTemplateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EmailTemplateUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "EmailTemplate_updateHeaders", - type: { - name: "Composite", - className: "EmailTemplateUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ApiGatewayConfigConnectionDeleteHeaders: coreClient.CompositeMapper = - { - serializedName: "ApiGatewayConfigConnection_deleteHeaders", - type: { - name: "Composite", - className: "ApiGatewayConfigConnectionDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayGetHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_getHeaders", - type: { - name: "Composite", - className: "GatewayGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_updateHeaders", - type: { - name: "Composite", - className: "GatewayUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayListKeysHeaders: coreClient.CompositeMapper = { - serializedName: "Gateway_listKeysHeaders", - type: { - name: "Composite", - className: "GatewayListKeysHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayHostnameConfigurationGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayHostnameConfiguration_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayHostnameConfigurationGetHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayHostnameConfiguration_getHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayHostnameConfigurationCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayHostnameConfiguration_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayHostnameConfigurationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GatewayApi_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayCertificateAuthorityGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayCertificateAuthority_getEntityTagHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayCertificateAuthorityGetHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayCertificateAuthority_getHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GatewayCertificateAuthorityCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "GatewayCertificateAuthority_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GatewayCertificateAuthorityCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const GroupGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getEntityTagHeaders", - type: { - name: "Composite", - className: "GroupGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupGetHeaders: coreClient.CompositeMapper = { - serializedName: "Group_getHeaders", - type: { - name: "Composite", - className: "GroupGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GroupCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GroupUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Group_updateHeaders", - type: { - name: "Composite", - className: "GroupUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_getHeaders", - type: { - name: "Composite", - className: "IdentityProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "IdentityProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "IdentityProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const IdentityProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_updateHeaders", - type: { - name: "Composite", - className: "IdentityProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IdentityProviderListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "IdentityProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "IdentityProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const IssueGetHeaders: coreClient.CompositeMapper = { - serializedName: "Issue_getHeaders", - type: { - name: "Composite", - className: "IssueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getEntityTagHeaders", - type: { - name: "Composite", - className: "LoggerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerGetHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_getHeaders", - type: { - name: "Composite", - className: "LoggerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_createOrUpdateHeaders", - type: { - name: "Composite", - className: "LoggerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoggerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Logger_updateHeaders", - type: { - name: "Composite", - className: "LoggerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getEntityTagHeaders", - type: { - name: "Composite", - className: "NamedValueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueGetHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_getHeaders", - type: { - name: "Composite", - className: "NamedValueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "NamedValueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_updateHeaders", - type: { - name: "Composite", - className: "NamedValueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueListValueHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_listValueHeaders", - type: { - name: "Composite", - className: "NamedValueListValueHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const NamedValueRefreshSecretHeaders: coreClient.CompositeMapper = { - serializedName: "NamedValue_refreshSecretHeaders", - type: { - name: "Composite", - className: "NamedValueRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenIdConnectProviderGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "OpenIdConnectProvider_getEntityTagHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const OpenIdConnectProviderGetHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_getHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenIdConnectProviderCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "OpenIdConnectProvider_createOrUpdateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const OpenIdConnectProviderUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "OpenIdConnectProvider_updateHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OpenIdConnectProviderListSecretsHeaders: coreClient.CompositeMapper = - { - serializedName: "OpenIdConnectProvider_listSecretsHeaders", - type: { - name: "Composite", - className: "OpenIdConnectProviderListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_getHeaders", - type: { - name: "Composite", - className: "PolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Policy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyFragmentGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyFragmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_getHeaders", - type: { - name: "Composite", - className: "PolicyFragmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyFragmentCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyFragment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyFragmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyRestrictionGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "PolicyRestriction_getEntityTagHeaders", - type: { - name: "Composite", - className: "PolicyRestrictionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PolicyRestrictionGetHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyRestriction_getHeaders", - type: { - name: "Composite", - className: "PolicyRestrictionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyRestrictionCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "PolicyRestriction_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PolicyRestrictionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PolicyRestrictionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PolicyRestriction_updateHeaders", - type: { - name: "Composite", - className: "PolicyRestrictionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PolicyRestrictionValidationsByServiceHeaders: coreClient.CompositeMapper = - { - serializedName: "PolicyRestrictionValidations_byServiceHeaders", - type: { - name: "Composite", - className: "PolicyRestrictionValidationsByServiceHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PortalConfigGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalConfigGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalConfigGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalConfig_getHeaders", - type: { - name: "Composite", - className: "PortalConfigGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalRevisionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getEntityTagHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalRevisionGetHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_getHeaders", - type: { - name: "Composite", - className: "PortalRevisionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalRevisionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PortalRevisionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PortalRevisionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "PortalRevision_updateHeaders", - type: { - name: "Composite", - className: "PortalRevisionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SignInSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SignInSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignInSettings_getHeaders", - type: { - name: "Composite", - className: "SignInSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SignUpSettingsGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SignUpSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "SignUpSettings_getHeaders", - type: { - name: "Composite", - className: "SignUpSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DelegationSettingsGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "DelegationSettings_getEntityTagHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const DelegationSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "DelegationSettings_getHeaders", - type: { - name: "Composite", - className: "DelegationSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const PrivateEndpointConnectionCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "PrivateEndpointConnection_createOrUpdateHeaders", - type: { - name: "Composite", - className: "PrivateEndpointConnectionCreateOrUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const PrivateEndpointConnectionDeleteHeaders: coreClient.CompositeMapper = - { - serializedName: "PrivateEndpointConnection_deleteHeaders", - type: { - name: "Composite", - className: "PrivateEndpointConnectionDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ProductGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductGetHeaders: coreClient.CompositeMapper = { - serializedName: "Product_getHeaders", - type: { - name: "Composite", - className: "ProductGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Product_updateHeaders", - type: { - name: "Composite", - className: "ProductUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductPolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_getHeaders", - type: { - name: "Composite", - className: "ProductPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getEntityTagHeaders", - type: { - name: "Composite", - className: "ProductWikiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikiGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_getHeaders", - type: { - name: "Composite", - className: "ProductWikiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_createOrUpdateHeaders", - type: { - name: "Composite", - className: "ProductWikiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWiki_updateHeaders", - type: { - name: "Composite", - className: "ProductWikiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikisListHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listHeaders", - type: { - name: "Composite", - className: "ProductWikisListHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductWikisListNextHeaders: coreClient.CompositeMapper = { - serializedName: "ProductWikis_listNextHeaders", - type: { - name: "Composite", - className: "ProductWikisListNextHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductApiLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductApiLink_getHeaders", - type: { - name: "Composite", - className: "ProductApiLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ProductGroupLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "ProductGroupLink_getHeaders", - type: { - name: "Composite", - className: "ProductGroupLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalSchemaGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_getHeaders", - type: { - name: "Composite", - className: "GlobalSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GlobalSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "GlobalSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "GlobalSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantSettingsGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantSettings_getHeaders", - type: { - name: "Composite", - className: "TenantSettingsGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getEntityTagHeaders", - type: { - name: "Composite", - className: "SubscriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_getHeaders", - type: { - name: "Composite", - className: "SubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "SubscriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_updateHeaders", - type: { - name: "Composite", - className: "SubscriptionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SubscriptionListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "Subscription_listSecretsHeaders", - type: { - name: "Composite", - className: "SubscriptionListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagApiLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "TagApiLink_getHeaders", - type: { - name: "Composite", - className: "TagApiLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagOperationLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "TagOperationLink_getHeaders", - type: { - name: "Composite", - className: "TagOperationLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TagProductLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "TagProductLink_getHeaders", - type: { - name: "Composite", - className: "TagProductLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantAccessGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getEntityTagHeaders", - type: { - name: "Composite", - className: "TenantAccessGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantAccessGetHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_getHeaders", - type: { - name: "Composite", - className: "TenantAccessGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantAccessCreateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_createHeaders", - type: { - name: "Composite", - className: "TenantAccessCreateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantAccessUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_updateHeaders", - type: { - name: "Composite", - className: "TenantAccessUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantAccessListSecretsHeaders: coreClient.CompositeMapper = { - serializedName: "TenantAccess_listSecretsHeaders", - type: { - name: "Composite", - className: "TenantAccessListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantConfigurationDeployHeaders: coreClient.CompositeMapper = { - serializedName: "TenantConfiguration_deployHeaders", - type: { - name: "Composite", - className: "TenantConfigurationDeployHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantConfigurationSaveHeaders: coreClient.CompositeMapper = { - serializedName: "TenantConfiguration_saveHeaders", - type: { - name: "Composite", - className: "TenantConfigurationSaveHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TenantConfigurationValidateHeaders: coreClient.CompositeMapper = { - serializedName: "TenantConfiguration_validateHeaders", - type: { - name: "Composite", - className: "TenantConfigurationValidateHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "User_getEntityTagHeaders", - type: { - name: "Composite", - className: "UserGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserGetHeaders: coreClient.CompositeMapper = { - serializedName: "User_getHeaders", - type: { - name: "Composite", - className: "UserGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_createOrUpdateHeaders", - type: { - name: "Composite", - className: "UserCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "User_updateHeaders", - type: { - name: "Composite", - className: "UserUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserDeleteHeaders: coreClient.CompositeMapper = { - serializedName: "User_deleteHeaders", - type: { - name: "Composite", - className: "UserDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UserSubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "UserSubscription_getHeaders", - type: { - name: "Composite", - className: "UserSubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceBackendGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceBackend_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceBackendGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceBackendGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceBackend_getHeaders", - type: { - name: "Composite", - className: "WorkspaceBackendGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceBackendCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceBackend_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceBackendCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceBackendUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceBackend_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceBackendUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceCertificateGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceCertificate_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceCertificateGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceCertificateGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceCertificate_getHeaders", - type: { - name: "Composite", - className: "WorkspaceCertificateGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceCertificateCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceCertificate_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceCertificateCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceCertificateRefreshSecretHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceCertificate_refreshSecretHeaders", - type: { - name: "Composite", - className: "WorkspaceCertificateRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceDiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceDiagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceDiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceDiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceDiagnostic_getHeaders", - type: { - name: "Composite", - className: "WorkspaceDiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceDiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceDiagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceDiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceDiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceDiagnostic_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceDiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiDiagnosticGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiDiagnostic_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiDiagnosticGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiDiagnosticGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiDiagnostic_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiDiagnosticGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiDiagnosticCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiDiagnostic_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiDiagnosticCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiDiagnosticUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiDiagnostic_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiDiagnosticUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceLoggerGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceLogger_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceLoggerGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceLoggerGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceLogger_getHeaders", - type: { - name: "Composite", - className: "WorkspaceLoggerGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceLoggerCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceLogger_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceLoggerCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceLoggerUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceLogger_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceLoggerUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "Workspace_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGetHeaders: coreClient.CompositeMapper = { - serializedName: "Workspace_getHeaders", - type: { - name: "Composite", - className: "WorkspaceGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Workspace_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "Workspace_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspacePolicyGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspacePolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspacePolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspacePolicy_getHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspacePolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspacePolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceNamedValueGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceNamedValue_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceNamedValueGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceNamedValue_getHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceNamedValueCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceNamedValue_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceNamedValueUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceNamedValue_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceNamedValueListValueHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceNamedValue_listValueHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueListValueHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceNamedValueRefreshSecretHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceNamedValue_refreshSecretHeaders", - type: { - name: "Composite", - className: "WorkspaceNamedValueRefreshSecretHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceGlobalSchemaGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceGlobalSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceGlobalSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceGlobalSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceGlobalSchema_getHeaders", - type: { - name: "Composite", - className: "WorkspaceGlobalSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGlobalSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceGlobalSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceGlobalSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspacePolicyFragmentGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspacePolicyFragment_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyFragmentGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspacePolicyFragmentGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspacePolicyFragment_getHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyFragmentGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspacePolicyFragmentCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspacePolicyFragment_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspacePolicyFragmentCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceGroupGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceGroup_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceGroupGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGroupGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceGroup_getHeaders", - type: { - name: "Composite", - className: "WorkspaceGroupGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGroupCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceGroup_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceGroupCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceGroupUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceGroup_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceGroupUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceSubscriptionGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceSubscription_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceSubscriptionGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceSubscriptionGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceSubscription_getHeaders", - type: { - name: "Composite", - className: "WorkspaceSubscriptionGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceSubscriptionCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceSubscription_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceSubscriptionCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceSubscriptionUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceSubscription_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceSubscriptionUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceSubscriptionListSecretsHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceSubscription_listSecretsHeaders", - type: { - name: "Composite", - className: "WorkspaceSubscriptionListSecretsHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiVersionSetGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiVersionSet_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiVersionSetGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiVersionSetGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiVersionSet_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiVersionSetGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiVersionSetCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiVersionSet_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiVersionSetCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiVersionSetUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiVersionSet_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiVersionSetUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApi_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApi_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApi_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApi_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiReleaseGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiRelease_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiReleaseGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiReleaseGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiRelease_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiReleaseGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiReleaseCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiRelease_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiReleaseCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiReleaseUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiRelease_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiReleaseUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiOperationGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiOperation_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiOperationGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiOperation_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiOperationCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiOperation_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiOperationUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiOperation_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiOperationPolicyGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiOperationPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiOperationPolicyGetHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiOperationPolicy_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiOperationPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiOperationPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiOperationPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiPolicyGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiPolicy_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiSchemaGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiSchema_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceApiSchemaGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceApiSchemaGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceApiSchema_getHeaders", - type: { - name: "Composite", - className: "WorkspaceApiSchemaGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceApiSchemaCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceApiSchema_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceApiSchemaCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - xmlName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceProductGetEntityTagHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProduct_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceProductGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProduct_getHeaders", - type: { - name: "Composite", - className: "WorkspaceProductGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceProduct_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceProductCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceProductUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProduct_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceProductUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductApiLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProductApiLink_getHeaders", - type: { - name: "Composite", - className: "WorkspaceProductApiLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductGroupLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProductGroupLink_getHeaders", - type: { - name: "Composite", - className: "WorkspaceProductGroupLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductPolicyGetEntityTagHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceProductPolicy_getEntityTagHeaders", - type: { - name: "Composite", - className: "WorkspaceProductPolicyGetEntityTagHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceProductPolicyGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceProductPolicy_getHeaders", - type: { - name: "Composite", - className: "WorkspaceProductPolicyGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceProductPolicyCreateOrUpdateHeaders: coreClient.CompositeMapper = - { - serializedName: "WorkspaceProductPolicy_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceProductPolicyCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const WorkspaceTagGetEntityStateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTag_getEntityStateHeaders", - type: { - name: "Composite", - className: "WorkspaceTagGetEntityStateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTag_getHeaders", - type: { - name: "Composite", - className: "WorkspaceTagGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagCreateOrUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTag_createOrUpdateHeaders", - type: { - name: "Composite", - className: "WorkspaceTagCreateOrUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagUpdateHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTag_updateHeaders", - type: { - name: "Composite", - className: "WorkspaceTagUpdateHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagApiLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTagApiLink_getHeaders", - type: { - name: "Composite", - className: "WorkspaceTagApiLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagOperationLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTagOperationLink_getHeaders", - type: { - name: "Composite", - className: "WorkspaceTagOperationLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WorkspaceTagProductLinkGetHeaders: coreClient.CompositeMapper = { - serializedName: "WorkspaceTagProductLink_getHeaders", - type: { - name: "Composite", - className: "WorkspaceTagProductLinkGetHeaders", - modelProperties: { - eTag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationsResultsGetHeaders: coreClient.CompositeMapper = { - serializedName: "OperationsResults_getHeaders", - type: { - name: "Composite", - className: "OperationsResultsGetHeaders", - modelProperties: { - location: { - serializedName: "location", - xmlName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/models/models.ts b/sdk/apimanagement/arm-apimanagement/src/models/models.ts new file mode 100644 index 000000000000..a15966465451 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/models/models.ts @@ -0,0 +1,19035 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { areAllPropsUndefined } from "../static-helpers/serialization/check-prop-undefined.js"; + +/** + * This file contains only generated model types and their (de)serializers. + * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input. + */ +/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/** API details. */ +export interface ApiContract extends ProxyResource { + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** Indicates if API revision is accessible via the gateway. */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** Properties specific to MCP API type. */ + mcpProperties?: McpProperties; + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function apiContractDeserializer(item: any): ApiContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _apiContractPropertiesDeserializer(item["properties"])), + }; +} + +/** API Entity Properties */ +export interface ApiContractProperties extends ApiEntityBaseContract { + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function apiContractPropertiesSerializer(item: ApiContractProperties): any { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsSerializer(item["apiVersionSet"]), + }; +} + +export function apiContractPropertiesDeserializer(item: any): ApiContractProperties { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractDeserializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractDeserializer(item["subscriptionKeyParameterNames"]), + apiType: item["type"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + isOnline: item["isOnline"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] + ? item["contact"] + : apiContactInformationDeserializer(item["contact"]), + license: !item["license"] + ? item["license"] + : apiLicenseInformationDeserializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesDeserializer(item["mcpProperties"]), + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsDeserializer(item["apiVersionSet"]), + provisioningState: item["provisioningState"], + }; +} + +/** Known values of {@link Protocol} that the service accepts. */ +export enum KnownProtocol { + /** http */ + Http = "http", + /** https */ + Https = "https", + /** ws */ + Ws = "ws", + /** wss */ + Wss = "wss", +} + +/** Type of Protocol */ +export type Protocol = string; + +/** An API Version Set contains the common configuration for a set of API Versions relating */ +export interface ApiVersionSetContractDetails { + /** Identifier for existing API Version Set. Omit this value to create a new Version Set. */ + id?: string; + /** The display Name of the API Version Set. */ + name?: string; + /** Description of API Version Set. */ + description?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; +} + +export function apiVersionSetContractDetailsSerializer(item: ApiVersionSetContractDetails): any { + return { + id: item["id"], + name: item["name"], + description: item["description"], + versioningScheme: item["versioningScheme"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + }; +} + +export function apiVersionSetContractDetailsDeserializer(item: any): ApiVersionSetContractDetails { + return { + id: item["id"], + name: item["name"], + description: item["description"], + versioningScheme: item["versioningScheme"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + }; +} + +/** An value that determines where the API Version identifier will be located in a HTTP request. */ +export enum KnownVersioningScheme { + /** The API Version is passed in a path segment. */ + Segment = "Segment", + /** The API Version is passed in a query parameter. */ + Query = "Query", + /** The API Version is passed in a HTTP header. */ + Header = "Header", +} + +/** + * An value that determines where the API Version identifier will be located in a HTTP request. \ + * {@link KnownVersioningScheme} can be used interchangeably with VersioningScheme, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Segment**: The API Version is passed in a path segment. \ + * **Query**: The API Version is passed in a query parameter. \ + * **Header**: The API Version is passed in a HTTP header. + */ +export type VersioningScheme = string; + +/** API base contract details. */ +export interface ApiEntityBaseContract { + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** Indicates if API revision is accessible via the gateway. */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** Properties specific to MCP API type. */ + mcpProperties?: McpProperties; +} + +export function apiEntityBaseContractSerializer(item: ApiEntityBaseContract): any { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + }; +} + +export function apiEntityBaseContractDeserializer(item: any): ApiEntityBaseContract { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractDeserializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractDeserializer(item["subscriptionKeyParameterNames"]), + apiType: item["type"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + isOnline: item["isOnline"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] + ? item["contact"] + : apiContactInformationDeserializer(item["contact"]), + license: !item["license"] + ? item["license"] + : apiLicenseInformationDeserializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesDeserializer(item["mcpProperties"]), + }; +} + +/** API Authentication Settings. */ +export interface AuthenticationSettingsContract { + /** OAuth2 Authentication settings */ + oAuth2?: OAuth2AuthenticationSettingsContract; + /** OpenID Connect Authentication Settings */ + openid?: OpenIdAuthenticationSettingsContract; + /** Collection of OAuth2 authentication settings included into this API. */ + oAuth2AuthenticationSettings?: OAuth2AuthenticationSettingsContract[]; + /** Collection of Open ID Connect authentication settings included into this API. */ + openidAuthenticationSettings?: OpenIdAuthenticationSettingsContract[]; +} + +export function authenticationSettingsContractSerializer( + item: AuthenticationSettingsContract, +): any { + return { + oAuth2: !item["oAuth2"] + ? item["oAuth2"] + : oAuth2AuthenticationSettingsContractSerializer(item["oAuth2"]), + openid: !item["openid"] + ? item["openid"] + : openIdAuthenticationSettingsContractSerializer(item["openid"]), + oAuth2AuthenticationSettings: !item["oAuth2AuthenticationSettings"] + ? item["oAuth2AuthenticationSettings"] + : oAuth2AuthenticationSettingsContractArraySerializer(item["oAuth2AuthenticationSettings"]), + openidAuthenticationSettings: !item["openidAuthenticationSettings"] + ? item["openidAuthenticationSettings"] + : openIdAuthenticationSettingsContractArraySerializer(item["openidAuthenticationSettings"]), + }; +} + +export function authenticationSettingsContractDeserializer( + item: any, +): AuthenticationSettingsContract { + return { + oAuth2: !item["oAuth2"] + ? item["oAuth2"] + : oAuth2AuthenticationSettingsContractDeserializer(item["oAuth2"]), + openid: !item["openid"] + ? item["openid"] + : openIdAuthenticationSettingsContractDeserializer(item["openid"]), + oAuth2AuthenticationSettings: !item["oAuth2AuthenticationSettings"] + ? item["oAuth2AuthenticationSettings"] + : oAuth2AuthenticationSettingsContractArrayDeserializer(item["oAuth2AuthenticationSettings"]), + openidAuthenticationSettings: !item["openidAuthenticationSettings"] + ? item["openidAuthenticationSettings"] + : openIdAuthenticationSettingsContractArrayDeserializer(item["openidAuthenticationSettings"]), + }; +} + +/** API OAuth2 Authentication settings details. */ +export interface OAuth2AuthenticationSettingsContract { + /** OAuth authorization server identifier. */ + authorizationServerId?: string; + /** operations scope. */ + scope?: string; +} + +export function oAuth2AuthenticationSettingsContractSerializer( + item: OAuth2AuthenticationSettingsContract, +): any { + return { authorizationServerId: item["authorizationServerId"], scope: item["scope"] }; +} + +export function oAuth2AuthenticationSettingsContractDeserializer( + item: any, +): OAuth2AuthenticationSettingsContract { + return { + authorizationServerId: item["authorizationServerId"], + scope: item["scope"], + }; +} + +/** API OAuth2 Authentication settings details. */ +export interface OpenIdAuthenticationSettingsContract { + /** OAuth authorization server identifier. */ + openidProviderId?: string; + /** How to send token to the server. */ + bearerTokenSendingMethods?: BearerTokenSendingMethods[]; +} + +export function openIdAuthenticationSettingsContractSerializer( + item: OpenIdAuthenticationSettingsContract, +): any { + return { + openidProviderId: item["openidProviderId"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + }; +} + +export function openIdAuthenticationSettingsContractDeserializer( + item: any, +): OpenIdAuthenticationSettingsContract { + return { + openidProviderId: item["openidProviderId"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + }; +} + +/** Form of an authorization grant, which the client uses to request the access token. */ +export enum KnownBearerTokenSendingMethods { + /** Access token will be transmitted in the Authorization header using Bearer schema */ + AuthorizationHeader = "authorizationHeader", + /** Access token will be transmitted as query parameters. */ + Query = "query", +} + +/** + * Form of an authorization grant, which the client uses to request the access token. \ + * {@link KnownBearerTokenSendingMethods} can be used interchangeably with BearerTokenSendingMethods, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **authorizationHeader**: Access token will be transmitted in the Authorization header using Bearer schema \ + * **query**: Access token will be transmitted as query parameters. + */ +export type BearerTokenSendingMethods = string; + +export function oAuth2AuthenticationSettingsContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return oAuth2AuthenticationSettingsContractSerializer(item); + }); +} + +export function oAuth2AuthenticationSettingsContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return oAuth2AuthenticationSettingsContractDeserializer(item); + }); +} + +export function openIdAuthenticationSettingsContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return openIdAuthenticationSettingsContractSerializer(item); + }); +} + +export function openIdAuthenticationSettingsContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return openIdAuthenticationSettingsContractDeserializer(item); + }); +} + +/** Subscription key parameter names details. */ +export interface SubscriptionKeyParameterNamesContract { + /** Subscription key header name. */ + header?: string; + /** Subscription key query string parameter name. */ + query?: string; +} + +export function subscriptionKeyParameterNamesContractSerializer( + item: SubscriptionKeyParameterNamesContract, +): any { + return { header: item["header"], query: item["query"] }; +} + +export function subscriptionKeyParameterNamesContractDeserializer( + item: any, +): SubscriptionKeyParameterNamesContract { + return { + header: item["header"], + query: item["query"], + }; +} + +/** Type of API. */ +export enum KnownApiType { + /** http */ + Http = "http", + /** soap */ + Soap = "soap", + /** websocket */ + Websocket = "websocket", + /** graphql */ + Graphql = "graphql", + /** odata */ + Odata = "odata", + /** grpc */ + Grpc = "grpc", + /** Model Context Protocol API. */ + Mcp = "mcp", +} + +/** + * Type of API. \ + * {@link KnownApiType} can be used interchangeably with ApiType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **http** \ + * **soap** \ + * **websocket** \ + * **graphql** \ + * **odata** \ + * **grpc** \ + * **mcp**: Model Context Protocol API. + */ +export type ApiType = string; + +/** API contact information */ +export interface ApiContactInformation { + /** The identifying name of the contact person/organization */ + name?: string; + /** The URL pointing to the contact information. MUST be in the format of a URL */ + url?: string; + /** The email address of the contact person/organization. MUST be in the format of an email address */ + email?: string; +} + +export function apiContactInformationSerializer(item: ApiContactInformation): any { + return { name: item["name"], url: item["url"], email: item["email"] }; +} + +export function apiContactInformationDeserializer(item: any): ApiContactInformation { + return { + name: item["name"], + url: item["url"], + email: item["email"], + }; +} + +/** API license information */ +export interface ApiLicenseInformation { + /** The license name used for the API */ + name?: string; + /** A URL to the license used for the API. MUST be in the format of a URL */ + url?: string; +} + +export function apiLicenseInformationSerializer(item: ApiLicenseInformation): any { + return { name: item["name"], url: item["url"] }; +} + +export function apiLicenseInformationDeserializer(item: any): ApiLicenseInformation { + return { + name: item["name"], + url: item["url"], + }; +} + +/** Properties specific to MCP API type. */ +export interface McpProperties { + /** Transport type for Model Context Protocol API. */ + transportType?: McpTransportType; + /** Collection of MCP endpoint definitions with relative URLs. */ + endpoints?: McpEndpoint[]; +} + +export function mcpPropertiesSerializer(item: McpProperties): any { + return { + transportType: item["transportType"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : mcpEndpointArraySerializer(item["endpoints"]), + }; +} + +export function mcpPropertiesDeserializer(item: any): McpProperties { + return { + transportType: item["transportType"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : mcpEndpointArrayDeserializer(item["endpoints"]), + }; +} + +/** Transport type for Model Context Protocol API. */ +export enum KnownMcpTransportType { + /** This API uses HTTP+SSE transport type. */ + Sse = "sse", + /** This API uses the Streamable HTTP transport type. */ + Streamable = "streamable", +} + +/** + * Transport type for Model Context Protocol API. \ + * {@link KnownMcpTransportType} can be used interchangeably with McpTransportType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **sse**: This API uses HTTP+SSE transport type. \ + * **streamable**: This API uses the Streamable HTTP transport type. + */ +export type McpTransportType = string; + +export function mcpEndpointArraySerializer(result: Array): any[] { + return result.map((item) => { + return mcpEndpointSerializer(item); + }); +} + +export function mcpEndpointArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return mcpEndpointDeserializer(item); + }); +} + +/** Endpoint definition for MCP API type. */ +export interface McpEndpoint { + /** MCP endpoint name, e.g. 'sse' or 'messages'. */ + name: string; + /** Relative URL path that must start with '/'. */ + uriTemplate?: string; +} + +export function mcpEndpointSerializer(item: McpEndpoint): any { + return { name: item["name"], uriTemplate: item["uriTemplate"] }; +} + +export function mcpEndpointDeserializer(item: any): McpEndpoint { + return { + name: item["name"], + uriTemplate: item["uriTemplate"], + }; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +export function proxyResourceSerializer(_item: ProxyResource): any { + return {}; +} + +export function proxyResourceDeserializer(item: any): ProxyResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */ + readonly id?: string; + /** The name of the resource */ + readonly name?: string; + /** The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" */ + readonly type?: string; + /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ + readonly systemData?: SystemData; +} + +export function resourceSerializer(_item: Resource): any { + return {}; +} + +export function resourceDeserializer(item: any): Resource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +export function systemDataDeserializer(item: any): SystemData { + return { + createdBy: item["createdBy"], + createdByType: item["createdByType"], + createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]), + lastModifiedBy: item["lastModifiedBy"], + lastModifiedByType: item["lastModifiedByType"], + lastModifiedAt: !item["lastModifiedAt"] + ? item["lastModifiedAt"] + : new Date(item["lastModifiedAt"]), + }; +} + +/** The kind of entity that created the resource. */ +export enum KnownCreatedByType { + /** The entity was created by a user. */ + User = "User", + /** The entity was created by an application. */ + Application = "Application", + /** The entity was created by a managed identity. */ + ManagedIdentity = "ManagedIdentity", + /** The entity was created by a key. */ + Key = "Key", +} + +/** + * The kind of entity that created the resource. \ + * {@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. \ + * **Application**: The entity was created by an application. \ + * **ManagedIdentity**: The entity was created by a managed identity. \ + * **Key**: The entity was created by a key. + */ +export type CreatedByType = string; + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +export function errorResponseDeserializer(item: any): ErrorResponse { + return { + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + }; +} + +/** The error detail. */ +export interface ErrorDetail { + /** The error code. */ + readonly code?: string; + /** The error message. */ + readonly message?: string; + /** The error target. */ + readonly target?: string; + /** The error details. */ + readonly details?: ErrorDetail[]; + /** The error additional info. */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +export function errorDetailDeserializer(item: any): ErrorDetail { + return { + code: item["code"], + message: item["message"], + target: item["target"], + details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]), + additionalInfo: !item["additionalInfo"] + ? item["additionalInfo"] + : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]), + }; +} + +export function errorDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorDetailDeserializer(item); + }); +} + +export function errorAdditionalInfoArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorAdditionalInfoDeserializer(item); + }); +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** The additional info type. */ + readonly type?: string; + /** The additional info. */ + readonly info?: any; +} + +export function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo { + return { + type: item["type"], + info: item["info"], + }; +} + +/** API Create or Update Parameters. */ +export interface ApiCreateOrUpdateParameter { + /** API identifier of the source API. */ + sourceApiId?: string; + /** API name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; + /** Version set details */ + apiVersionSet?: ApiVersionSetContractDetails; + /** The provisioning state */ + readonly provisioningState?: string; + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** Indicates if API revision is accessible via the gateway. */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** Properties specific to MCP API type. */ + mcpProperties?: McpProperties; + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. New formats can be added in the future */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + * New types can be added in the future. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; +} + +export function apiCreateOrUpdateParameterSerializer(item: ApiCreateOrUpdateParameter): any { + return { + properties: areAllPropsUndefined(item, [ + "sourceApiId", + "displayName", + "serviceUrl", + "path", + "protocols", + "apiVersionSet", + "description", + "authenticationSettings", + "subscriptionKeyParameterNames", + "ApiType", + "apiRevision", + "apiVersion", + "isCurrent", + "apiRevisionDescription", + "apiVersionDescription", + "apiVersionSetId", + "subscriptionRequired", + "termsOfServiceUrl", + "contact", + "license", + "mcpProperties", + "value", + "format", + "wsdlSelector", + "SoapApiType", + "TranslateRequiredQueryParametersConduct", + ]) + ? undefined + : _apiCreateOrUpdateParameterPropertiesSerializer(item), + }; +} + +/** API Create or Update Properties. */ +export interface ApiCreateOrUpdateProperties extends ApiContractProperties { + /** Content value when Importing an API. */ + value?: string; + /** Format of the Content in which the API is getting imported. New formats can be added in the future */ + format?: ContentFormat; + /** Criteria to limit import of WSDL to a subset of the document. */ + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + * New types can be added in the future. + */ + soapApiType?: SoapApiType; + /** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ + translateRequiredQueryParametersConduct?: TranslateRequiredQueryParametersConduct; +} + +export function apiCreateOrUpdatePropertiesSerializer(item: ApiCreateOrUpdateProperties): any { + return { + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsSerializer(item["apiVersionSet"]), + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + value: item["value"], + format: item["format"], + wsdlSelector: !item["wsdlSelector"] + ? item["wsdlSelector"] + : apiCreateOrUpdatePropertiesWsdlSelectorSerializer(item["wsdlSelector"]), + apiType: item["soapApiType"], + translateRequiredQueryParameters: item["translateRequiredQueryParametersConduct"], + }; +} + +/** Format of the Content in which the API is getting imported. New formats can be added in the future */ +export enum KnownContentFormat { + /** The contents are inline and Content type is a WADL document. */ + WadlXml = "wadl-xml", + /** The WADL document is hosted on a publicly accessible internet address. */ + WadlLinkJson = "wadl-link-json", + /** The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. */ + SwaggerJson = "swagger-json", + /** The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. */ + SwaggerLinkJson = "swagger-link-json", + /** The contents are inline and the document is a WSDL/Soap document. */ + Wsdl = "wsdl", + /** The WSDL document is hosted on a publicly accessible internet address. */ + WsdlLink = "wsdl-link", + /** The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. */ + Openapi = "openapi", + /** The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. */ + OpenapiJson = "openapi+json", + /** The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. */ + OpenapiLink = "openapi-link", + /** The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. */ + OpenapiJsonLink = "openapi+json-link", + /** The GraphQL API endpoint hosted on a publicly accessible internet address. */ + GraphqlLink = "graphql-link", + /** The contents are inline and Content Type is a OData XML Document. */ + Odata = "odata", + /** The OData metadata document hosted on a publicly accessible internet address. */ + OdataLink = "odata-link", + /** The contents are inline and Content Type is a gRPC protobuf file. */ + Grpc = "grpc", + /** The gRPC protobuf file is hosted on a publicly accessible internet address. */ + GrpcLink = "grpc-link", +} + +/** + * Format of the Content in which the API is getting imported. New formats can be added in the future \ + * {@link KnownContentFormat} can be used interchangeably with ContentFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **wadl-xml**: The contents are inline and Content type is a WADL document. \ + * **wadl-link-json**: The WADL document is hosted on a publicly accessible internet address. \ + * **swagger-json**: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. \ + * **swagger-link-json**: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. \ + * **wsdl**: The contents are inline and the document is a WSDL\/Soap document. \ + * **wsdl-link**: The WSDL document is hosted on a publicly accessible internet address. \ + * **openapi**: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. \ + * **openapi+json**: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. \ + * **openapi-link**: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. \ + * **openapi+json-link**: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. \ + * **graphql-link**: The GraphQL API endpoint hosted on a publicly accessible internet address. \ + * **odata**: The contents are inline and Content Type is a OData XML Document. \ + * **odata-link**: The OData metadata document hosted on a publicly accessible internet address. \ + * **grpc**: The contents are inline and Content Type is a gRPC protobuf file. \ + * **grpc-link**: The gRPC protobuf file is hosted on a publicly accessible internet address. + */ +export type ContentFormat = string; + +/** Criteria to limit import of WSDL to a subset of the document. */ +export interface ApiCreateOrUpdatePropertiesWsdlSelector { + /** Name of service to import from WSDL */ + wsdlServiceName?: string; + /** Name of endpoint(port) to import from WSDL */ + wsdlEndpointName?: string; +} + +export function apiCreateOrUpdatePropertiesWsdlSelectorSerializer( + item: ApiCreateOrUpdatePropertiesWsdlSelector, +): any { + return { wsdlServiceName: item["wsdlServiceName"], wsdlEndpointName: item["wsdlEndpointName"] }; +} + +/** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + * New types can be added in the future. + */ +export enum KnownSoapApiType { + /** Imports a SOAP API having a RESTful front end. */ + SoapToRest = "http", + /** Imports the SOAP API having a SOAP front end. */ + SoapPassThrough = "soap", + /** Imports the API having a Websocket front end. */ + WebSocket = "websocket", + /** Imports the API having a GraphQL front end. */ + GraphQL = "graphql", + /** Imports the API having a OData front end. */ + OData = "odata", + /** Imports the API having a gRPC front end. */ + GRPC = "grpc", + /** Imports the API having a Model Context Protocol (MCP) front end. */ + MCP = "mcp", +} + +/** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + * New types can be added in the future. \ + * {@link KnownSoapApiType} can be used interchangeably with SoapApiType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **http**: Imports a SOAP API having a RESTful front end. \ + * **soap**: Imports the SOAP API having a SOAP front end. \ + * **websocket**: Imports the API having a Websocket front end. \ + * **graphql**: Imports the API having a GraphQL front end. \ + * **odata**: Imports the API having a OData front end. \ + * **grpc**: Imports the API having a gRPC front end. \ + * **mcp**: Imports the API having a Model Context Protocol (MCP) front end. + */ +export type SoapApiType = string; + +/** Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' */ +export enum KnownTranslateRequiredQueryParametersConduct { + /** Translates required query parameters to template ones. Is a default value */ + Template = "template", + /** Leaves required query parameters as they are (no translation done). */ + Query = "query", +} + +/** + * Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query' \ + * {@link KnownTranslateRequiredQueryParametersConduct} can be used interchangeably with TranslateRequiredQueryParametersConduct, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **template**: Translates required query parameters to template ones. Is a default value \ + * **query**: Leaves required query parameters as they are (no translation done). + */ +export type TranslateRequiredQueryParametersConduct = string; + +/** API update contract details. */ +export interface ApiUpdateContract { + /** Description of the API. May include HTML formatting tags. */ + description?: string; + /** Collection of authentication settings included into this API. */ + authenticationSettings?: AuthenticationSettingsContract; + /** Protocols over which API is made available. */ + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + /** Type of API. */ + apiType?: ApiType; + /** Describes the revision of the API. If no value is provided, default revision 1 is created */ + apiRevision?: string; + /** Indicates the version identifier of the API if the API is versioned */ + apiVersion?: string; + /** Indicates if API revision is current api revision. */ + isCurrent?: boolean; + /** Indicates if API revision is accessible via the gateway. */ + readonly isOnline?: boolean; + /** Description of the API Revision. */ + apiRevisionDescription?: string; + /** Description of the API Version. */ + apiVersionDescription?: string; + /** A resource identifier for the related ApiVersionSet. */ + apiVersionSetId?: string; + /** Specifies whether an API or Product subscription is required for accessing the API. */ + subscriptionRequired?: boolean; + /** A URL to the Terms of Service for the API. MUST be in the format of a URL. */ + termsOfServiceUrl?: string; + /** Contact information for the API. */ + contact?: ApiContactInformation; + /** License information for the API. */ + license?: ApiLicenseInformation; + /** Properties specific to MCP API type. */ + mcpProperties?: McpProperties; + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; +} + +export function apiUpdateContractSerializer(item: ApiUpdateContract): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "authenticationSettings", + "subscriptionKeyParameterNames", + "ApiType", + "apiRevision", + "apiVersion", + "isCurrent", + "apiRevisionDescription", + "apiVersionDescription", + "apiVersionSetId", + "subscriptionRequired", + "termsOfServiceUrl", + "contact", + "license", + "mcpProperties", + "displayName", + "serviceUrl", + "path", + "protocols", + ]) + ? undefined + : _apiUpdateContractPropertiesSerializer(item), + }; +} + +/** API update contract properties. */ +export interface ApiContractUpdateProperties extends ApiEntityBaseContract { + /** API name. */ + displayName?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; +} + +export function apiContractUpdatePropertiesSerializer(item: ApiContractUpdateProperties): any { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + }; +} + +/** Paged API list representation. */ +export interface _ApiCollection { + /** Page values. */ + readonly value?: ApiContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _apiCollectionDeserializer(item: any): _ApiCollection { + return { + value: !item["value"] ? item["value"] : apiContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function apiContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return apiContractDeserializer(item); + }); +} + +/** A request to perform the connectivity check operation on a API Management service. */ +export interface ConnectivityCheckRequest { + /** Definitions about the connectivity check origin. */ + source: ConnectivityCheckRequestSource; + /** The connectivity check operation destination. */ + destination: ConnectivityCheckRequestDestination; + /** The IP version to be used. Only IPv4 is supported for now. */ + preferredIPVersion?: PreferredIPVersion; + /** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ + protocol?: ConnectivityCheckProtocol; + /** Protocol-specific configuration. */ + protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; +} + +export function connectivityCheckRequestSerializer(item: ConnectivityCheckRequest): any { + return { + source: connectivityCheckRequestSourceSerializer(item["source"]), + destination: connectivityCheckRequestDestinationSerializer(item["destination"]), + preferredIPVersion: item["preferredIPVersion"], + protocol: item["protocol"], + protocolConfiguration: !item["protocolConfiguration"] + ? item["protocolConfiguration"] + : connectivityCheckRequestProtocolConfigurationSerializer(item["protocolConfiguration"]), + }; +} + +/** Definitions about the connectivity check origin. */ +export interface ConnectivityCheckRequestSource { + /** The API Management service region from where to start the connectivity check operation. */ + region: string; + /** The particular VMSS instance from which to fire the request. */ + instance?: number; +} + +export function connectivityCheckRequestSourceSerializer( + item: ConnectivityCheckRequestSource, +): any { + return { region: item["region"], instance: item["instance"] }; +} + +/** The connectivity check operation destination. */ +export interface ConnectivityCheckRequestDestination { + /** Destination address. Can either be an IP address or a FQDN. */ + address: string; + /** Destination port. */ + port: number; +} + +export function connectivityCheckRequestDestinationSerializer( + item: ConnectivityCheckRequestDestination, +): any { + return { address: item["address"], port: item["port"] }; +} + +/** The IP version to be used. Only IPv4 is supported for now. */ +export enum KnownPreferredIPVersion { + /** IPv4 */ + IPv4 = "IPv4", +} + +/** + * The IP version to be used. Only IPv4 is supported for now. \ + * {@link KnownPreferredIPVersion} can be used interchangeably with PreferredIPVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IPv4** + */ +export type PreferredIPVersion = string; + +/** The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. */ +export enum KnownConnectivityCheckProtocol { + /** TCP */ + TCP = "TCP", + /** HTTP */ + Http = "HTTP", + /** HTTPS */ + Https = "HTTPS", +} + +/** + * The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. \ + * {@link KnownConnectivityCheckProtocol} can be used interchangeably with ConnectivityCheckProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP** \ + * **HTTP** \ + * **HTTPS** + */ +export type ConnectivityCheckProtocol = string; + +/** Protocol-specific configuration. */ +export interface ConnectivityCheckRequestProtocolConfiguration { + /** Configuration for HTTP or HTTPS requests. */ + httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; +} + +export function connectivityCheckRequestProtocolConfigurationSerializer( + item: ConnectivityCheckRequestProtocolConfiguration, +): any { + return { + HTTPConfiguration: !item["httpConfiguration"] + ? item["httpConfiguration"] + : connectivityCheckRequestProtocolConfigurationHttpConfigurationSerializer( + item["httpConfiguration"], + ), + }; +} + +/** Configuration for HTTP or HTTPS requests. */ +export interface ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { + /** The HTTP method to be used. */ + method?: Method; + /** List of HTTP status codes considered valid for the request response. */ + validStatusCodes?: number[]; + /** List of headers to be included in the request. */ + headers?: HttpHeader[]; +} + +export function connectivityCheckRequestProtocolConfigurationHttpConfigurationSerializer( + item: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration, +): any { + return { + method: item["method"], + validStatusCodes: !item["validStatusCodes"] + ? item["validStatusCodes"] + : item["validStatusCodes"].map((p: any) => { + return p; + }), + headers: !item["headers"] ? item["headers"] : httpHeaderArraySerializer(item["headers"]), + }; +} + +/** The HTTP method to be used. */ +export enum KnownMethod { + /** GET */ + GET = "GET", + /** POST */ + Post = "POST", +} + +/** + * The HTTP method to be used. \ + * {@link KnownMethod} can be used interchangeably with Method, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GET** \ + * **POST** + */ +export type Method = string; + +export function httpHeaderArraySerializer(result: Array): any[] { + return result.map((item) => { + return httpHeaderSerializer(item); + }); +} + +/** HTTP header and it's value. */ +export interface HttpHeader { + /** Header name. */ + name: string; + /** Header value. */ + value: string; +} + +export function httpHeaderSerializer(item: HttpHeader): any { + return { name: item["name"], value: item["value"] }; +} + +/** Information on the connectivity status. */ +export interface ConnectivityCheckResponse { + /** List of hops between the source and the destination. */ + readonly hops?: ConnectivityHop[]; + /** The connection status. */ + readonly connectionStatus?: ConnectionStatus; + /** Average latency in milliseconds. */ + readonly avgLatencyInMs?: number; + /** Minimum latency in milliseconds. */ + readonly minLatencyInMs?: number; + /** Maximum latency in milliseconds. */ + readonly maxLatencyInMs?: number; + /** Total number of probes sent. */ + readonly probesSent?: number; + /** Number of failed probes. */ + readonly probesFailed?: number; +} + +export function connectivityCheckResponseDeserializer(item: any): ConnectivityCheckResponse { + return { + hops: !item["hops"] ? item["hops"] : connectivityHopArrayDeserializer(item["hops"]), + connectionStatus: item["connectionStatus"], + avgLatencyInMs: item["avgLatencyInMs"], + minLatencyInMs: item["minLatencyInMs"], + maxLatencyInMs: item["maxLatencyInMs"], + probesSent: item["probesSent"], + probesFailed: item["probesFailed"], + }; +} + +export function connectivityHopArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return connectivityHopDeserializer(item); + }); +} + +/** Information about a hop between the source and the destination. */ +export interface ConnectivityHop { + /** The type of the hop. */ + readonly type?: string; + /** The ID of the hop. */ + readonly id?: string; + /** The IP address of the hop. */ + readonly address?: string; + /** The ID of the resource corresponding to this hop. */ + readonly resourceId?: string; + /** List of next hop identifiers. */ + readonly nextHopIds?: string[]; + /** List of issues. */ + readonly issues?: ConnectivityIssue[]; +} + +export function connectivityHopDeserializer(item: any): ConnectivityHop { + return { + type: item["type"], + id: item["id"], + address: item["address"], + resourceId: item["resourceId"], + nextHopIds: !item["nextHopIds"] + ? item["nextHopIds"] + : item["nextHopIds"].map((p: any) => { + return p; + }), + issues: !item["issues"] ? item["issues"] : connectivityIssueArrayDeserializer(item["issues"]), + }; +} + +export function connectivityIssueArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return connectivityIssueDeserializer(item); + }); +} + +/** Information about an issue encountered in the process of checking for connectivity. */ +export interface ConnectivityIssue { + /** The origin of the issue. */ + readonly origin?: Origin; + /** The severity of the issue. */ + readonly severity?: Severity; + /** The type of issue. */ + readonly type?: IssueType; + /** Provides additional context on the issue. */ + readonly context?: Record[]; +} + +export function connectivityIssueDeserializer(item: any): ConnectivityIssue { + return { + origin: item["origin"], + severity: item["severity"], + type: item["type"], + context: !item["context"] + ? item["context"] + : item["context"].map((p: any) => { + return Object.fromEntries(Object.entries(p).map(([k1, p1]: [string, any]) => [k1, p1])); + }), + }; +} + +/** The origin of the issue. */ +export enum KnownOrigin { + /** Local */ + Local = "Local", + /** Inbound */ + Inbound = "Inbound", + /** Outbound */ + Outbound = "Outbound", +} + +/** + * The origin of the issue. \ + * {@link KnownOrigin} can be used interchangeably with Origin, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Local** \ + * **Inbound** \ + * **Outbound** + */ +export type Origin = string; + +/** The severity of the issue. */ +export enum KnownSeverity { + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", +} + +/** + * The severity of the issue. \ + * {@link KnownSeverity} can be used interchangeably with Severity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Error** \ + * **Warning** + */ +export type Severity = string; + +/** The type of issue. */ +export enum KnownIssueType { + /** Unknown */ + Unknown = "Unknown", + /** AgentStopped */ + AgentStopped = "AgentStopped", + /** GuestFirewall */ + GuestFirewall = "GuestFirewall", + /** DnsResolution */ + DnsResolution = "DnsResolution", + /** SocketBind */ + SocketBind = "SocketBind", + /** NetworkSecurityRule */ + NetworkSecurityRule = "NetworkSecurityRule", + /** UserDefinedRoute */ + UserDefinedRoute = "UserDefinedRoute", + /** PortThrottled */ + PortThrottled = "PortThrottled", + /** Platform */ + Platform = "Platform", +} + +/** + * The type of issue. \ + * {@link KnownIssueType} can be used interchangeably with IssueType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **AgentStopped** \ + * **GuestFirewall** \ + * **DnsResolution** \ + * **SocketBind** \ + * **NetworkSecurityRule** \ + * **UserDefinedRoute** \ + * **PortThrottled** \ + * **Platform** + */ +export type IssueType = string; + +/** The connection status. */ +export enum KnownConnectionStatus { + /** Unknown */ + Unknown = "Unknown", + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected", + /** Degraded */ + Degraded = "Degraded", +} + +/** + * The connection status. \ + * {@link KnownConnectionStatus} can be used interchangeably with ConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Connected** \ + * **Disconnected** \ + * **Degraded** + */ +export type ConnectionStatus = string; + +/** ApiRelease details. */ +export interface ApiReleaseContract extends ProxyResource { + /** Identifier of the API the release belongs to. */ + apiId?: string; + /** The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + readonly createdDateTime?: Date; + /** The time the API release was updated. */ + readonly updatedDateTime?: Date; + /** Release Notes */ + notes?: string; +} + +export function apiReleaseContractSerializer(item: ApiReleaseContract): any { + return { + properties: areAllPropsUndefined(item, ["apiId", "notes"]) + ? undefined + : _apiReleaseContractPropertiesSerializer(item), + }; +} + +export function apiReleaseContractDeserializer(item: any): ApiReleaseContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _apiReleaseContractPropertiesDeserializer(item["properties"])), + }; +} + +/** API Release details */ +export interface ApiReleaseContractProperties { + /** Identifier of the API the release belongs to. */ + apiId?: string; + /** The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + readonly createdDateTime?: Date; + /** The time the API release was updated. */ + readonly updatedDateTime?: Date; + /** Release Notes */ + notes?: string; +} + +export function apiReleaseContractPropertiesSerializer(item: ApiReleaseContractProperties): any { + return { apiId: item["apiId"], notes: item["notes"] }; +} + +export function apiReleaseContractPropertiesDeserializer(item: any): ApiReleaseContractProperties { + return { + apiId: item["apiId"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + updatedDateTime: !item["updatedDateTime"] + ? item["updatedDateTime"] + : new Date(item["updatedDateTime"]), + notes: item["notes"], + }; +} + +/** Paged ApiRelease list representation. */ +export interface _ApiReleaseCollection { + /** Page values. */ + readonly value?: ApiReleaseContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _apiReleaseCollectionDeserializer(item: any): _ApiReleaseCollection { + return { + value: !item["value"] ? item["value"] : apiReleaseContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function apiReleaseContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return apiReleaseContractSerializer(item); + }); +} + +export function apiReleaseContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return apiReleaseContractDeserializer(item); + }); +} + +/** API Operation details. */ +export interface OperationContract extends ProxyResource { + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; +} + +export function operationContractSerializer(item: OperationContract): any { + return { + properties: areAllPropsUndefined(item, [ + "templateParameters", + "description", + "request", + "responses", + "policies", + "displayName", + "method", + "urlTemplate", + ]) + ? undefined + : _operationContractPropertiesSerializer(item), + }; +} + +export function operationContractDeserializer(item: any): OperationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _operationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Operation Contract Properties */ +export interface OperationContractProperties extends OperationEntityBaseContract { + /** Operation Name. */ + displayName: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate: string; +} + +export function operationContractPropertiesSerializer(item: OperationContractProperties): any { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArraySerializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractSerializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArraySerializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +export function operationContractPropertiesDeserializer(item: any): OperationContractProperties { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArrayDeserializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractDeserializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArrayDeserializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +/** API Operation Entity Base Contract details. */ +export interface OperationEntityBaseContract { + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; +} + +export function operationEntityBaseContractSerializer(item: OperationEntityBaseContract): any { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArraySerializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractSerializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArraySerializer(item["responses"]), + policies: item["policies"], + }; +} + +export function operationEntityBaseContractDeserializer(item: any): OperationEntityBaseContract { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArrayDeserializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractDeserializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArrayDeserializer(item["responses"]), + policies: item["policies"], + }; +} + +export function parameterContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return parameterContractSerializer(item); + }); +} + +export function parameterContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return parameterContractDeserializer(item); + }); +} + +/** Operation parameters details. */ +export interface ParameterContract { + /** Parameter name. */ + name: string; + /** Parameter description. */ + description?: string; + /** Parameter type. */ + type: string; + /** Default parameter value. */ + defaultValue?: string; + /** Specifies whether parameter is required or not. */ + required?: boolean; + /** Parameter values. */ + values?: string[]; + /** Schema identifier. */ + schemaId?: string; + /** Type name defined by the schema. */ + typeName?: string; + /** Exampled defined for the parameter. */ + examples?: Record; +} + +export function parameterContractSerializer(item: ParameterContract): any { + return { + name: item["name"], + description: item["description"], + type: item["type"], + defaultValue: item["defaultValue"], + required: item["required"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + schemaId: item["schemaId"], + typeName: item["typeName"], + examples: !item["examples"] + ? item["examples"] + : parameterExampleContractRecordSerializer(item["examples"]), + }; +} + +export function parameterContractDeserializer(item: any): ParameterContract { + return { + name: item["name"], + description: item["description"], + type: item["type"], + defaultValue: item["defaultValue"], + required: item["required"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + schemaId: item["schemaId"], + typeName: item["typeName"], + examples: !item["examples"] + ? item["examples"] + : parameterExampleContractRecordDeserializer(item["examples"]), + }; +} + +export function parameterExampleContractRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : parameterExampleContractSerializer(item[key]); + }); + return result; +} + +export function parameterExampleContractRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : parameterExampleContractDeserializer(item[key]); + }); + return result; +} + +/** Parameter example. */ +export interface ParameterExampleContract { + /** Short description for the example */ + summary?: string; + /** Long description for the example */ + description?: string; + /** Example value. May be a primitive value, or an object. */ + value?: any; + /** A URL that points to the literal example */ + externalValue?: string; +} + +export function parameterExampleContractSerializer(item: ParameterExampleContract): any { + return { + summary: item["summary"], + description: item["description"], + value: item["value"], + externalValue: item["externalValue"], + }; +} + +export function parameterExampleContractDeserializer(item: any): ParameterExampleContract { + return { + summary: item["summary"], + description: item["description"], + value: item["value"], + externalValue: item["externalValue"], + }; +} + +/** Operation request details. */ +export interface RequestContract { + /** Operation request description. */ + description?: string; + /** Collection of operation request query parameters. */ + queryParameters?: ParameterContract[]; + /** Collection of operation request headers. */ + headers?: ParameterContract[]; + /** Collection of operation request representations. */ + representations?: RepresentationContract[]; +} + +export function requestContractSerializer(item: RequestContract): any { + return { + description: item["description"], + queryParameters: !item["queryParameters"] + ? item["queryParameters"] + : parameterContractArraySerializer(item["queryParameters"]), + headers: !item["headers"] ? item["headers"] : parameterContractArraySerializer(item["headers"]), + representations: !item["representations"] + ? item["representations"] + : representationContractArraySerializer(item["representations"]), + }; +} + +export function requestContractDeserializer(item: any): RequestContract { + return { + description: item["description"], + queryParameters: !item["queryParameters"] + ? item["queryParameters"] + : parameterContractArrayDeserializer(item["queryParameters"]), + headers: !item["headers"] + ? item["headers"] + : parameterContractArrayDeserializer(item["headers"]), + representations: !item["representations"] + ? item["representations"] + : representationContractArrayDeserializer(item["representations"]), + }; +} + +export function representationContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return representationContractSerializer(item); + }); +} + +export function representationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return representationContractDeserializer(item); + }); +} + +/** Operation request/response representation details. */ +export interface RepresentationContract { + /** Specifies a registered or custom content type for this representation, e.g. application/xml. */ + contentType: string; + /** Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + schemaId?: string; + /** Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. */ + typeName?: string; + /** Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. */ + formParameters?: ParameterContract[]; + /** Exampled defined for the representation. */ + examples?: Record; +} + +export function representationContractSerializer(item: RepresentationContract): any { + return { + contentType: item["contentType"], + schemaId: item["schemaId"], + typeName: item["typeName"], + formParameters: !item["formParameters"] + ? item["formParameters"] + : parameterContractArraySerializer(item["formParameters"]), + examples: !item["examples"] + ? item["examples"] + : parameterExampleContractRecordSerializer(item["examples"]), + }; +} + +export function representationContractDeserializer(item: any): RepresentationContract { + return { + contentType: item["contentType"], + schemaId: item["schemaId"], + typeName: item["typeName"], + formParameters: !item["formParameters"] + ? item["formParameters"] + : parameterContractArrayDeserializer(item["formParameters"]), + examples: !item["examples"] + ? item["examples"] + : parameterExampleContractRecordDeserializer(item["examples"]), + }; +} + +export function responseContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return responseContractSerializer(item); + }); +} + +export function responseContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return responseContractDeserializer(item); + }); +} + +/** Operation response details. */ +export interface ResponseContract { + /** Operation response HTTP status code. */ + statusCode: number; + /** Operation response description. */ + description?: string; + /** Collection of operation response representations. */ + representations?: RepresentationContract[]; + /** Collection of operation response headers. */ + headers?: ParameterContract[]; +} + +export function responseContractSerializer(item: ResponseContract): any { + return { + statusCode: item["statusCode"], + description: item["description"], + representations: !item["representations"] + ? item["representations"] + : representationContractArraySerializer(item["representations"]), + headers: !item["headers"] ? item["headers"] : parameterContractArraySerializer(item["headers"]), + }; +} + +export function responseContractDeserializer(item: any): ResponseContract { + return { + statusCode: item["statusCode"], + description: item["description"], + representations: !item["representations"] + ? item["representations"] + : representationContractArrayDeserializer(item["representations"]), + headers: !item["headers"] + ? item["headers"] + : parameterContractArrayDeserializer(item["headers"]), + }; +} + +/** API Operation Update Contract details. */ +export interface OperationUpdateContract { + /** Collection of URL template parameters. */ + templateParameters?: ParameterContract[]; + /** Description of the operation. May include HTML formatting tags. */ + description?: string; + /** An entity containing request details. */ + request?: RequestContract; + /** Array of Operation responses. */ + responses?: ResponseContract[]; + /** Operation Policies */ + policies?: string; + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; +} + +export function operationUpdateContractSerializer(item: OperationUpdateContract): any { + return { + properties: areAllPropsUndefined(item, [ + "templateParameters", + "description", + "request", + "responses", + "policies", + "displayName", + "method", + "urlTemplate", + ]) + ? undefined + : _operationUpdateContractPropertiesSerializer(item), + }; +} + +/** Operation Update Contract Properties. */ +export interface OperationUpdateContractProperties extends OperationEntityBaseContract { + /** Operation Name. */ + displayName?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + urlTemplate?: string; +} + +export function operationUpdateContractPropertiesSerializer( + item: OperationUpdateContractProperties, +): any { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArraySerializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractSerializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArraySerializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +/** Paged Operation list representation. */ +export interface _OperationCollection { + /** Page values. */ + readonly value?: OperationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _operationCollectionDeserializer(item: any): _OperationCollection { + return { + value: !item["value"] ? item["value"] : operationContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function operationContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return operationContractSerializer(item); + }); +} + +export function operationContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationContractDeserializer(item); + }); +} + +/** Policy Contract details. */ +export interface PolicyContract extends ProxyResource { + /** Contents of the Policy as defined by the format. */ + value?: string; + /** Format of the policyContent. */ + format?: PolicyContentFormat; +} + +export function policyContractSerializer(item: PolicyContract): any { + return { + properties: areAllPropsUndefined(item, ["value", "format"]) + ? undefined + : _policyContractPropertiesSerializer(item), + }; +} + +export function policyContractDeserializer(item: any): PolicyContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _policyContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Policy contract Properties. */ +export interface PolicyContractProperties { + /** Contents of the Policy as defined by the format. */ + value: string; + /** Format of the policyContent. */ + format?: PolicyContentFormat; +} + +export function policyContractPropertiesSerializer(item: PolicyContractProperties): any { + return { value: item["value"], format: item["format"] }; +} + +export function policyContractPropertiesDeserializer(item: any): PolicyContractProperties { + return { + value: item["value"], + format: item["format"], + }; +} + +/** Format of the policyContent. */ +export enum KnownPolicyContentFormat { + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. */ + XmlLink = "xml-link", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml", + /** The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. */ + RawxmlLink = "rawxml-link", +} + +/** + * Format of the policyContent. \ + * {@link KnownPolicyContentFormat} can be used interchangeably with PolicyContentFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **xml**: The contents are inline and Content type is an XML document. \ + * **xml-link**: The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. \ + * **rawxml**: The contents are inline and Content type is a non XML encoded policy document. \ + * **rawxml-link**: The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. + */ +export type PolicyContentFormat = string; + +/** Known values of {@link PolicyIdName} that the service accepts. */ +export enum KnownPolicyIdName { + /** policy */ + Policy = "policy", +} + +/** Type of PolicyIdName */ +export type PolicyIdName = string; + +/** The response of the list policy operation. */ +export interface PolicyCollection { + /** Policy Contract value. */ + value?: PolicyContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function policyCollectionDeserializer(item: any): PolicyCollection { + return { + value: !item["value"] ? item["value"] : policyContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function policyContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return policyContractSerializer(item); + }); +} + +export function policyContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return policyContractDeserializer(item); + }); +} + +/** Tag Contract details. */ +export interface TagContract extends ProxyResource { + /** Tag name. */ + displayName?: string; +} + +export function tagContractDeserializer(item: any): TagContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tagContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tag contract Properties. */ +export interface TagContractProperties { + /** Tag name. */ + displayName: string; +} + +export function tagContractPropertiesSerializer(item: TagContractProperties): any { + return { displayName: item["displayName"] }; +} + +export function tagContractPropertiesDeserializer(item: any): TagContractProperties { + return { + displayName: item["displayName"], + }; +} + +/** Paged Tag list representation. */ +export interface _TagCollection { + /** Page values. */ + value?: TagContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagCollectionDeserializer(item: any): _TagCollection { + return { + value: !item["value"] ? item["value"] : tagContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return tagContractDeserializer(item); + }); +} + +/** Parameters supplied to Create/Update Tag operations. */ +export interface TagCreateUpdateParameters { + /** Tag name. */ + displayName?: string; +} + +export function tagCreateUpdateParametersSerializer(item: TagCreateUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, ["displayName"]) + ? undefined + : _tagCreateUpdateParametersPropertiesSerializer(item), + }; +} + +/** API Schema Contract details. */ +export interface SchemaContract extends ProxyResource { + /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`
- `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`
- `gRPC Schema` use `text/protobuf`. */ + contentType?: string; + /** Create or update Properties of the API Schema Document. */ + document?: SchemaDocumentProperties; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function schemaContractSerializer(item: SchemaContract): any { + return { + properties: areAllPropsUndefined(item, ["contentType", "document"]) + ? undefined + : _schemaContractPropertiesSerializer(item), + }; +} + +export function schemaContractDeserializer(item: any): SchemaContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _schemaContractPropertiesDeserializer(item["properties"])), + }; +} + +/** API Schema create or update contract Properties. */ +export interface SchemaContractProperties { + /** Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`
- `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`
- `gRPC Schema` use `text/protobuf`. */ + contentType: string; + /** The provisioning state */ + readonly provisioningState?: string; + /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ + value?: string; + /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ + definitions?: any; + /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ + components?: any; +} + +export function schemaContractPropertiesSerializer(item: SchemaContractProperties): any { + return { + contentType: item["contentType"], + document: _schemaContractPropertiesDocumentSerializer(item), + }; +} + +export function schemaContractPropertiesDeserializer(item: any): SchemaContractProperties { + return { + contentType: item["contentType"], + ..._schemaContractPropertiesDocumentDeserializer(item["document"]), + provisioningState: item["provisioningState"], + }; +} + +/** Api Schema Document Properties. */ +export interface SchemaDocumentProperties { + /** Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. */ + value?: string; + /** Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. */ + definitions?: any; + /** Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. */ + components?: any; +} + +export function schemaDocumentPropertiesSerializer(item: SchemaDocumentProperties): any { + return { value: item["value"], definitions: item["definitions"], components: item["components"] }; +} + +export function schemaDocumentPropertiesDeserializer(item: any): SchemaDocumentProperties { + return { + value: item["value"], + definitions: item["definitions"], + components: item["components"], + }; +} + +/** The response of the list schema operation. */ +export interface _SchemaCollection { + /** API Schema Contract value. */ + readonly value?: SchemaContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _schemaCollectionDeserializer(item: any): _SchemaCollection { + return { + value: !item["value"] ? item["value"] : schemaContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function schemaContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return schemaContractSerializer(item); + }); +} + +export function schemaContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return schemaContractDeserializer(item); + }); +} + +/** Diagnostic details. */ +export interface DiagnosticContract extends ProxyResource { + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId?: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Large Language Models diagnostic settings */ + largeLanguageModel?: LLMDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; +} + +export function diagnosticContractSerializer(item: DiagnosticContract): any { + return { + properties: areAllPropsUndefined(item, [ + "alwaysLog", + "loggerId", + "sampling", + "frontend", + "backend", + "largeLanguageModel", + "logClientIp", + "httpCorrelationProtocol", + "verbosity", + "operationNameFormat", + "metrics", + ]) + ? undefined + : _diagnosticContractPropertiesSerializer(item), + }; +} + +export function diagnosticContractDeserializer(item: any): DiagnosticContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _diagnosticContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Diagnostic Entity Properties */ +export interface DiagnosticContractProperties { + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Large Language Models diagnostic settings */ + largeLanguageModel?: LLMDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; +} + +export function diagnosticContractPropertiesSerializer(item: DiagnosticContractProperties): any { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsSerializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsSerializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsSerializer(item["backend"]), + largeLanguageModel: !item["largeLanguageModel"] + ? item["largeLanguageModel"] + : llmDiagnosticSettingsSerializer(item["largeLanguageModel"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +export function diagnosticContractPropertiesDeserializer(item: any): DiagnosticContractProperties { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsDeserializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsDeserializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsDeserializer(item["backend"]), + largeLanguageModel: !item["largeLanguageModel"] + ? item["largeLanguageModel"] + : llmDiagnosticSettingsDeserializer(item["largeLanguageModel"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +/** Specifies for what type of messages sampling settings should not apply. */ +export enum KnownAlwaysLog { + /** Always log all erroneous request regardless of sampling settings. */ + AllErrors = "allErrors", +} + +/** + * Specifies for what type of messages sampling settings should not apply. \ + * {@link KnownAlwaysLog} can be used interchangeably with AlwaysLog, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **allErrors**: Always log all erroneous request regardless of sampling settings. + */ +export type AlwaysLog = string; + +/** Sampling settings for Diagnostic. */ +export interface SamplingSettings { + /** Sampling type. */ + samplingType?: SamplingType; + /** Rate of sampling for fixed-rate sampling. */ + percentage?: number; +} + +export function samplingSettingsSerializer(item: SamplingSettings): any { + return { samplingType: item["samplingType"], percentage: item["percentage"] }; +} + +export function samplingSettingsDeserializer(item: any): SamplingSettings { + return { + samplingType: item["samplingType"], + percentage: item["percentage"], + }; +} + +/** Sampling type. */ +export enum KnownSamplingType { + /** Fixed-rate sampling. */ + Fixed = "fixed", +} + +/** + * Sampling type. \ + * {@link KnownSamplingType} can be used interchangeably with SamplingType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **fixed**: Fixed-rate sampling. + */ +export type SamplingType = string; + +/** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ +export interface PipelineDiagnosticSettings { + /** Diagnostic settings for request. */ + request?: HttpMessageDiagnostic; + /** Diagnostic settings for response. */ + response?: HttpMessageDiagnostic; +} + +export function pipelineDiagnosticSettingsSerializer(item: PipelineDiagnosticSettings): any { + return { + request: !item["request"] ? item["request"] : httpMessageDiagnosticSerializer(item["request"]), + response: !item["response"] + ? item["response"] + : httpMessageDiagnosticSerializer(item["response"]), + }; +} + +export function pipelineDiagnosticSettingsDeserializer(item: any): PipelineDiagnosticSettings { + return { + request: !item["request"] + ? item["request"] + : httpMessageDiagnosticDeserializer(item["request"]), + response: !item["response"] + ? item["response"] + : httpMessageDiagnosticDeserializer(item["response"]), + }; +} + +/** Http message diagnostic settings. */ +export interface HttpMessageDiagnostic { + /** Array of HTTP Headers to log. */ + headers?: string[]; + /** Body logging settings. */ + body?: BodyDiagnosticSettings; + /** Data masking settings. */ + dataMasking?: DataMasking; +} + +export function httpMessageDiagnosticSerializer(item: HttpMessageDiagnostic): any { + return { + headers: !item["headers"] + ? item["headers"] + : item["headers"].map((p: any) => { + return p; + }), + body: !item["body"] ? item["body"] : bodyDiagnosticSettingsSerializer(item["body"]), + dataMasking: !item["dataMasking"] + ? item["dataMasking"] + : dataMaskingSerializer(item["dataMasking"]), + }; +} + +export function httpMessageDiagnosticDeserializer(item: any): HttpMessageDiagnostic { + return { + headers: !item["headers"] + ? item["headers"] + : item["headers"].map((p: any) => { + return p; + }), + body: !item["body"] ? item["body"] : bodyDiagnosticSettingsDeserializer(item["body"]), + dataMasking: !item["dataMasking"] + ? item["dataMasking"] + : dataMaskingDeserializer(item["dataMasking"]), + }; +} + +/** Body logging settings. */ +export interface BodyDiagnosticSettings { + /** Number of request body bytes to log. */ + bytes?: number; +} + +export function bodyDiagnosticSettingsSerializer(item: BodyDiagnosticSettings): any { + return { bytes: item["bytes"] }; +} + +export function bodyDiagnosticSettingsDeserializer(item: any): BodyDiagnosticSettings { + return { + bytes: item["bytes"], + }; +} + +/** model interface DataMasking */ +export interface DataMasking { + /** Masking settings for Url query parameters */ + queryParams?: DataMaskingEntity[]; + /** Masking settings for headers */ + headers?: DataMaskingEntity[]; +} + +export function dataMaskingSerializer(item: DataMasking): any { + return { + queryParams: !item["queryParams"] + ? item["queryParams"] + : dataMaskingEntityArraySerializer(item["queryParams"]), + headers: !item["headers"] ? item["headers"] : dataMaskingEntityArraySerializer(item["headers"]), + }; +} + +export function dataMaskingDeserializer(item: any): DataMasking { + return { + queryParams: !item["queryParams"] + ? item["queryParams"] + : dataMaskingEntityArrayDeserializer(item["queryParams"]), + headers: !item["headers"] + ? item["headers"] + : dataMaskingEntityArrayDeserializer(item["headers"]), + }; +} + +export function dataMaskingEntityArraySerializer(result: Array): any[] { + return result.map((item) => { + return dataMaskingEntitySerializer(item); + }); +} + +export function dataMaskingEntityArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return dataMaskingEntityDeserializer(item); + }); +} + +/** model interface DataMaskingEntity */ +export interface DataMaskingEntity { + /** The name of an entity to mask (e.g. a name of a header or a query parameter). */ + value?: string; + /** Data masking mode. */ + mode?: DataMaskingMode; +} + +export function dataMaskingEntitySerializer(item: DataMaskingEntity): any { + return { value: item["value"], mode: item["mode"] }; +} + +export function dataMaskingEntityDeserializer(item: any): DataMaskingEntity { + return { + value: item["value"], + mode: item["mode"], + }; +} + +/** Data masking mode. */ +export enum KnownDataMaskingMode { + /** Mask the value of an entity. */ + Mask = "Mask", + /** Hide the presence of an entity. */ + Hide = "Hide", +} + +/** + * Data masking mode. \ + * {@link KnownDataMaskingMode} can be used interchangeably with DataMaskingMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Mask**: Mask the value of an entity. \ + * **Hide**: Hide the presence of an entity. + */ +export type DataMaskingMode = string; + +/** Diagnostic settings for Large Language Models */ +export interface LLMDiagnosticSettings { + /** Specifies whether default diagnostic should be enabled for Large Language Models or not. */ + logs?: LlmDiagnosticSettings; + /** Diagnostic settings for Large Language Models requests. */ + requests?: LLMMessageDiagnosticSettings; + /** Diagnostic settings for Large Language Models responses. */ + responses?: LLMMessageDiagnosticSettings; +} + +export function llmDiagnosticSettingsSerializer(item: LLMDiagnosticSettings): any { + return { + logs: item["logs"], + requests: !item["requests"] + ? item["requests"] + : llmMessageDiagnosticSettingsSerializer(item["requests"]), + responses: !item["responses"] + ? item["responses"] + : llmMessageDiagnosticSettingsSerializer(item["responses"]), + }; +} + +export function llmDiagnosticSettingsDeserializer(item: any): LLMDiagnosticSettings { + return { + logs: item["logs"], + requests: !item["requests"] + ? item["requests"] + : llmMessageDiagnosticSettingsDeserializer(item["requests"]), + responses: !item["responses"] + ? item["responses"] + : llmMessageDiagnosticSettingsDeserializer(item["responses"]), + }; +} + +/** Known values of {@link Llm-diagnostic-settings} that the service accepts. */ +export enum KnownLlmDiagnosticSettings { + /** Default LLM logs are enabled. */ + Enabled = "enabled", + /** Default LLM logs are disabled. */ + Disabled = "disabled", +} + +/** Type of LlmDiagnosticSettings */ +export type LlmDiagnosticSettings = string; + +/** Diagnostic settings for Large Language Models Messages */ +export interface LLMMessageDiagnosticSettings { + /** Specifies which message should be logged. Currently there is only 'all' option. */ + messages?: LlmMessageLogTypes; + /** Maximum size of message to logs in bytes. The default size is 32KB. */ + maxSizeInBytes?: number; +} + +export function llmMessageDiagnosticSettingsSerializer(item: LLMMessageDiagnosticSettings): any { + return { messages: item["messages"], maxSizeInBytes: item["maxSizeInBytes"] }; +} + +export function llmMessageDiagnosticSettingsDeserializer(item: any): LLMMessageDiagnosticSettings { + return { + messages: item["messages"], + maxSizeInBytes: item["maxSizeInBytes"], + }; +} + +/** Known values of {@link Llm-message-log-types} that the service accepts. */ +export enum KnownLlmMessageLogTypes { + /** Log all messages. */ + All = "all", +} + +/** Type of LlmMessageLogTypes */ +export type LlmMessageLogTypes = string; + +/** Sets correlation protocol to use for Application Insights diagnostics. */ +export enum KnownHttpCorrelationProtocol { + /** Do not read and inject correlation headers. */ + None = "None", + /** Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. */ + Legacy = "Legacy", + /** Inject Trace Context headers. See https://w3c.github.io/trace-context. */ + W3C = "W3C", +} + +/** + * Sets correlation protocol to use for Application Insights diagnostics. \ + * {@link KnownHttpCorrelationProtocol} can be used interchangeably with HttpCorrelationProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: Do not read and inject correlation headers. \ + * **Legacy**: Inject Request-Id and Request-Context headers with request correlation data. See https:\//github.com\/dotnet\/corefx\/blob\/master\/src\/System.Diagnostics.DiagnosticSource\/src\/HttpCorrelationProtocol.md. \ + * **W3C**: Inject Trace Context headers. See https:\//w3c.github.io\/trace-context. + */ +export type HttpCorrelationProtocol = string; + +/** The verbosity level applied to traces emitted by trace policies. */ +export enum KnownVerbosity { + /** All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. */ + Verbose = "verbose", + /** Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. */ + Information = "information", + /** Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. */ + Error = "error", +} + +/** + * The verbosity level applied to traces emitted by trace policies. \ + * {@link KnownVerbosity} can be used interchangeably with Verbosity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **verbose**: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. \ + * **information**: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. \ + * **error**: Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. + */ +export type Verbosity = string; + +/** The format of the Operation Name for Application Insights telemetries. Default is Name. */ +export enum KnownOperationNameFormat { + /** API_NAME;rev=API_REVISION - OPERATION_NAME */ + Name = "Name", + /** HTTP_VERB URL */ + Url = "Url", +} + +/** + * The format of the Operation Name for Application Insights telemetries. Default is Name. \ + * {@link KnownOperationNameFormat} can be used interchangeably with OperationNameFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Name**: API_NAME;rev=API_REVISION - OPERATION_NAME \ + * **Url**: HTTP_VERB URL + */ +export type OperationNameFormat = string; + +/** Paged Diagnostic list representation. */ +export interface _DiagnosticCollection { + /** Page values. */ + value?: DiagnosticContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _diagnosticCollectionDeserializer(item: any): _DiagnosticCollection { + return { + value: !item["value"] ? item["value"] : diagnosticContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function diagnosticContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return diagnosticContractSerializer(item); + }); +} + +export function diagnosticContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return diagnosticContractDeserializer(item); + }); +} + +/** Diagnostic details. */ +export interface DiagnosticUpdateContract extends ProxyResource { + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId?: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; +} + +export function diagnosticUpdateContractSerializer(item: DiagnosticUpdateContract): any { + return { + properties: areAllPropsUndefined(item, [ + "alwaysLog", + "loggerId", + "sampling", + "frontend", + "backend", + "logClientIp", + "httpCorrelationProtocol", + "verbosity", + "operationNameFormat", + "metrics", + ]) + ? undefined + : _diagnosticUpdateContractPropertiesSerializer(item), + }; +} + +/** Diagnostic Entity Properties */ +export interface DiagnosticContractUpdateProperties { + /** Specifies for what type of messages sampling settings should not apply. */ + alwaysLog?: AlwaysLog; + /** Resource Id of a target logger. */ + loggerId?: string; + /** Sampling settings for Diagnostic. */ + sampling?: SamplingSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. */ + frontend?: PipelineDiagnosticSettings; + /** Diagnostic settings for incoming/outgoing HTTP messages to the Backend */ + backend?: PipelineDiagnosticSettings; + /** Log the ClientIP. Default is false. */ + logClientIp?: boolean; + /** Sets correlation protocol to use for Application Insights diagnostics. */ + httpCorrelationProtocol?: HttpCorrelationProtocol; + /** The verbosity level applied to traces emitted by trace policies. */ + verbosity?: Verbosity; + /** The format of the Operation Name for Application Insights telemetries. Default is Name. */ + operationNameFormat?: OperationNameFormat; + /** Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. */ + metrics?: boolean; +} + +export function diagnosticContractUpdatePropertiesSerializer( + item: DiagnosticContractUpdateProperties, +): any { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsSerializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsSerializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsSerializer(item["backend"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +/** Issue Contract details. */ +export interface IssueContract extends ProxyResource { + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; +} + +export function issueContractSerializer(item: IssueContract): any { + return { + properties: areAllPropsUndefined(item, [ + "createdDate", + "state", + "apiId", + "title", + "description", + "userId", + ]) + ? undefined + : _issueContractPropertiesSerializer(item), + }; +} + +export function issueContractDeserializer(item: any): IssueContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _issueContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Issue contract Properties. */ +export interface IssueContractProperties extends IssueContractBaseProperties { + /** The issue title. */ + title: string; + /** Text describing the issue. */ + description: string; + /** A resource identifier for the user created the issue. */ + userId: string; +} + +export function issueContractPropertiesSerializer(item: IssueContractProperties): any { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +export function issueContractPropertiesDeserializer(item: any): IssueContractProperties { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +/** Issue contract Base Properties. */ +export interface IssueContractBaseProperties { + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; +} + +export function issueContractBasePropertiesSerializer(item: IssueContractBaseProperties): any { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + state: item["state"], + apiId: item["apiId"], + }; +} + +export function issueContractBasePropertiesDeserializer(item: any): IssueContractBaseProperties { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + state: item["state"], + apiId: item["apiId"], + }; +} + +/** Status of the issue. */ +export enum KnownState { + /** The issue is proposed. */ + Proposed = "proposed", + /** The issue is opened. */ + Open = "open", + /** The issue was removed. */ + Removed = "removed", + /** The issue is now resolved. */ + Resolved = "resolved", + /** The issue was closed. */ + Closed = "closed", +} + +/** + * Status of the issue. \ + * {@link KnownState} can be used interchangeably with State, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **proposed**: The issue is proposed. \ + * **open**: The issue is opened. \ + * **removed**: The issue was removed. \ + * **resolved**: The issue is now resolved. \ + * **closed**: The issue was closed. + */ +export type State = string; + +/** Paged Issue list representation. */ +export interface _IssueCollection { + /** Issue values. */ + readonly value?: IssueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _issueCollectionDeserializer(item: any): _IssueCollection { + return { + value: !item["value"] ? item["value"] : issueContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function issueContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return issueContractSerializer(item); + }); +} + +export function issueContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return issueContractDeserializer(item); + }); +} + +/** Wiki properties */ +export interface WikiContract extends ProxyResource { + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; +} + +export function wikiContractSerializer(item: WikiContract): any { + return { + properties: areAllPropsUndefined(item, ["documents"]) + ? undefined + : _wikiContractPropertiesSerializer(item), + }; +} + +export function wikiContractDeserializer(item: any): WikiContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _wikiContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Wiki contract details */ +export interface WikiContractProperties { + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; +} + +export function wikiContractPropertiesSerializer(item: WikiContractProperties): any { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArraySerializer(item["documents"]), + }; +} + +export function wikiContractPropertiesDeserializer(item: any): WikiContractProperties { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArrayDeserializer(item["documents"]), + }; +} + +export function wikiDocumentationContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return wikiDocumentationContractSerializer(item); + }); +} + +export function wikiDocumentationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return wikiDocumentationContractDeserializer(item); + }); +} + +/** Wiki documentation details. */ +export interface WikiDocumentationContract { + /** Documentation Identifier */ + documentationId?: string; +} + +export function wikiDocumentationContractSerializer(item: WikiDocumentationContract): any { + return { documentationId: item["documentationId"] }; +} + +export function wikiDocumentationContractDeserializer(item: any): WikiDocumentationContract { + return { + documentationId: item["documentationId"], + }; +} + +/** Wiki update contract details. */ +export interface WikiUpdateContract { + /** Collection wiki documents included into this wiki. */ + documents?: WikiDocumentationContract[]; +} + +export function wikiUpdateContractSerializer(item: WikiUpdateContract): any { + return { + properties: areAllPropsUndefined(item, ["documents"]) + ? undefined + : _wikiUpdateContractPropertiesSerializer(item), + }; +} + +/** API Version Set Contract details. */ +export interface ApiVersionSetContract extends ProxyResource { + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; +} + +export function apiVersionSetContractSerializer(item: ApiVersionSetContract): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "versionQueryName", + "versionHeaderName", + "displayName", + "versioningScheme", + ]) + ? undefined + : _apiVersionSetContractPropertiesSerializer(item), + }; +} + +export function apiVersionSetContractDeserializer(item: any): ApiVersionSetContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _apiVersionSetContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of an API Version Set. */ +export interface ApiVersionSetContractProperties extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme: VersioningScheme; +} + +export function apiVersionSetContractPropertiesSerializer( + item: ApiVersionSetContractProperties, +): any { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +export function apiVersionSetContractPropertiesDeserializer( + item: any, +): ApiVersionSetContractProperties { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +/** API Version set base parameters */ +export interface ApiVersionSetEntityBase { + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; +} + +export function apiVersionSetEntityBaseSerializer(item: ApiVersionSetEntityBase): any { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + }; +} + +export function apiVersionSetEntityBaseDeserializer(item: any): ApiVersionSetEntityBase { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + }; +} + +/** Parameters to update or create an API Version Set Contract. */ +export interface ApiVersionSetUpdateParameters { + /** Description of API Version Set. */ + description?: string; + /** Name of query parameter that indicates the API Version if versioningScheme is set to `query`. */ + versionQueryName?: string; + /** Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. */ + versionHeaderName?: string; + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; +} + +export function apiVersionSetUpdateParametersSerializer(item: ApiVersionSetUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "versionQueryName", + "versionHeaderName", + "displayName", + "versioningScheme", + ]) + ? undefined + : _apiVersionSetUpdateParametersPropertiesSerializer(item), + }; +} + +/** Properties used to create or update an API Version Set. */ +export interface ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { + /** Name of API Version Set */ + displayName?: string; + /** An value that determines where the API Version identifier will be located in a HTTP request. */ + versioningScheme?: VersioningScheme; +} + +export function apiVersionSetUpdateParametersPropertiesSerializer( + item: ApiVersionSetUpdateParametersProperties, +): any { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +/** Paged API Version Set list representation. */ +export interface _ApiVersionSetCollection { + /** Page values. */ + value?: ApiVersionSetContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _apiVersionSetCollectionDeserializer(item: any): _ApiVersionSetCollection { + return { + value: !item["value"] ? item["value"] : apiVersionSetContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function apiVersionSetContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return apiVersionSetContractSerializer(item); + }); +} + +export function apiVersionSetContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiVersionSetContractDeserializer(item); + }); +} + +/** Backend details. */ +export interface BackendContract extends ProxyResource { + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Backend Circuit Breaker Configuration */ + circuitBreaker?: BackendCircuitBreaker; + /** Azure region in which the backend is deployed. Can be optionally specified to use features such as carbon-optimized load balancer. */ + azureRegion?: string; + /** Backend Pool Properties */ + pool?: BackendBaseParametersPool; + /** Type of the backend. A backend can be either Single or Pool. */ + typePropertiesType?: BackendType; + /** Runtime Url of the Backend. Required when backend type is 'Single'. */ + url?: string; + /** Backend communication protocol. Required when backend type is 'Single'. */ + protocol?: BackendProtocol; +} + +export function backendContractSerializer(item: BackendContract): any { + return { + properties: areAllPropsUndefined(item, [ + "title", + "description", + "resourceId", + "properties", + "credentials", + "proxy", + "tls", + "circuitBreaker", + "azureRegion", + "pool", + "type", + "url", + "protocol", + ]) + ? undefined + : _backendContractPropertiesSerializer(item), + }; +} + +export function backendContractDeserializer(item: any): BackendContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _backendContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Parameters supplied to the Create Backend operation. */ +export interface BackendContractProperties extends BackendBaseParameters { + /** Runtime Url of the Backend. Required when backend type is 'Single'. */ + url?: string; + /** Backend communication protocol. Required when backend type is 'Single'. */ + protocol?: BackendProtocol; +} + +export function backendContractPropertiesSerializer(item: BackendContractProperties): any { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesSerializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractSerializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractSerializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesSerializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerSerializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolSerializer(item["pool"]), + type: item["type"], + url: item["url"], + protocol: item["protocol"], + }; +} + +export function backendContractPropertiesDeserializer(item: any): BackendContractProperties { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesDeserializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractDeserializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractDeserializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesDeserializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerDeserializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolDeserializer(item["pool"]), + type: item["type"], + url: item["url"], + protocol: item["protocol"], + }; +} + +/** Backend communication protocol. Required when backend type is 'Single'. */ +export enum KnownBackendProtocol { + /** The Backend is a RESTful service. */ + Http = "http", + /** The Backend is a SOAP service. */ + Soap = "soap", +} + +/** + * Backend communication protocol. Required when backend type is 'Single'. \ + * {@link KnownBackendProtocol} can be used interchangeably with BackendProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **http**: The Backend is a RESTful service. \ + * **soap**: The Backend is a SOAP service. + */ +export type BackendProtocol = string; + +/** Backend entity base Parameter set. */ +export interface BackendBaseParameters { + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Backend Circuit Breaker Configuration */ + circuitBreaker?: BackendCircuitBreaker; + /** Azure region in which the backend is deployed. Can be optionally specified to use features such as carbon-optimized load balancer. */ + azureRegion?: string; + /** Backend Pool Properties */ + pool?: BackendBaseParametersPool; + /** Type of the backend. A backend can be either Single or Pool. */ + type?: BackendType; +} + +export function backendBaseParametersSerializer(item: BackendBaseParameters): any { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesSerializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractSerializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractSerializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesSerializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerSerializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolSerializer(item["pool"]), + type: item["type"], + }; +} + +export function backendBaseParametersDeserializer(item: any): BackendBaseParameters { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesDeserializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractDeserializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractDeserializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesDeserializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerDeserializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolDeserializer(item["pool"]), + type: item["type"], + }; +} + +/** Properties specific to the Backend Type. */ +export interface BackendProperties { + /** Backend Service Fabric Cluster Properties */ + serviceFabricCluster?: BackendServiceFabricClusterProperties; +} + +export function backendPropertiesSerializer(item: BackendProperties): any { + return { + serviceFabricCluster: !item["serviceFabricCluster"] + ? item["serviceFabricCluster"] + : backendServiceFabricClusterPropertiesSerializer(item["serviceFabricCluster"]), + }; +} + +export function backendPropertiesDeserializer(item: any): BackendProperties { + return { + serviceFabricCluster: !item["serviceFabricCluster"] + ? item["serviceFabricCluster"] + : backendServiceFabricClusterPropertiesDeserializer(item["serviceFabricCluster"]), + }; +} + +/** Properties of the Service Fabric Type Backend. */ +export interface BackendServiceFabricClusterProperties { + /** The client certificate id for the management endpoint. */ + clientCertificateId?: string; + /** The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided */ + clientCertificatethumbprint?: string; + /** Maximum number of retries while attempting resolve the partition. */ + maxPartitionResolutionRetries?: number; + /** The cluster management endpoint. */ + managementEndpoints: string[]; + /** Thumbprints of certificates cluster management service uses for tls communication */ + serverCertificateThumbprints?: string[]; + /** Server X509 Certificate Names Collection */ + serverX509Names?: X509CertificateName[]; +} + +export function backendServiceFabricClusterPropertiesSerializer( + item: BackendServiceFabricClusterProperties, +): any { + return { + clientCertificateId: item["clientCertificateId"], + clientCertificatethumbprint: item["clientCertificatethumbprint"], + maxPartitionResolutionRetries: item["maxPartitionResolutionRetries"], + managementEndpoints: item["managementEndpoints"].map((p: any) => { + return p; + }), + serverCertificateThumbprints: !item["serverCertificateThumbprints"] + ? item["serverCertificateThumbprints"] + : item["serverCertificateThumbprints"].map((p: any) => { + return p; + }), + serverX509Names: !item["serverX509Names"] + ? item["serverX509Names"] + : x509CertificateNameArraySerializer(item["serverX509Names"]), + }; +} + +export function backendServiceFabricClusterPropertiesDeserializer( + item: any, +): BackendServiceFabricClusterProperties { + return { + clientCertificateId: item["clientCertificateId"], + clientCertificatethumbprint: item["clientCertificatethumbprint"], + maxPartitionResolutionRetries: item["maxPartitionResolutionRetries"], + managementEndpoints: item["managementEndpoints"].map((p: any) => { + return p; + }), + serverCertificateThumbprints: !item["serverCertificateThumbprints"] + ? item["serverCertificateThumbprints"] + : item["serverCertificateThumbprints"].map((p: any) => { + return p; + }), + serverX509Names: !item["serverX509Names"] + ? item["serverX509Names"] + : x509CertificateNameArrayDeserializer(item["serverX509Names"]), + }; +} + +export function x509CertificateNameArraySerializer(result: Array): any[] { + return result.map((item) => { + return x509CertificateNameSerializer(item); + }); +} + +export function x509CertificateNameArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return x509CertificateNameDeserializer(item); + }); +} + +/** Properties of server X509Names. */ +export interface X509CertificateName { + /** Common Name of the Certificate. */ + name?: string; + /** Thumbprint for the Issuer of the Certificate. */ + issuerCertificateThumbprint?: string; +} + +export function x509CertificateNameSerializer(item: X509CertificateName): any { + return { name: item["name"], issuerCertificateThumbprint: item["issuerCertificateThumbprint"] }; +} + +export function x509CertificateNameDeserializer(item: any): X509CertificateName { + return { + name: item["name"], + issuerCertificateThumbprint: item["issuerCertificateThumbprint"], + }; +} + +/** Details of the Credentials used to connect to Backend. */ +export interface BackendCredentialsContract { + /** List of Client Certificate Ids. */ + certificateIds?: string[]; + /** List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. */ + certificate?: string[]; + /** Query Parameter description. */ + query?: Record; + /** Header Parameter description. */ + header?: Record; + /** Authorization header authentication */ + authorization?: BackendAuthorizationHeaderCredentials; +} + +export function backendCredentialsContractSerializer(item: BackendCredentialsContract): any { + return { + certificateIds: !item["certificateIds"] + ? item["certificateIds"] + : item["certificateIds"].map((p: any) => { + return p; + }), + certificate: !item["certificate"] + ? item["certificate"] + : item["certificate"].map((p: any) => { + return p; + }), + query: item["query"], + header: item["header"], + authorization: !item["authorization"] + ? item["authorization"] + : backendAuthorizationHeaderCredentialsSerializer(item["authorization"]), + }; +} + +export function backendCredentialsContractDeserializer(item: any): BackendCredentialsContract { + return { + certificateIds: !item["certificateIds"] + ? item["certificateIds"] + : item["certificateIds"].map((p: any) => { + return p; + }), + certificate: !item["certificate"] + ? item["certificate"] + : item["certificate"].map((p: any) => { + return p; + }), + query: !item["query"] + ? item["query"] + : Object.fromEntries( + Object.entries(item["query"]).map(([k, p]: [string, any]) => [ + k, + p.map((p1: any) => { + return p1; + }), + ]), + ), + header: !item["header"] + ? item["header"] + : Object.fromEntries( + Object.entries(item["header"]).map(([k, p]: [string, any]) => [ + k, + p.map((p1: any) => { + return p1; + }), + ]), + ), + authorization: !item["authorization"] + ? item["authorization"] + : backendAuthorizationHeaderCredentialsDeserializer(item["authorization"]), + }; +} + +/** Authorization header information. */ +export interface BackendAuthorizationHeaderCredentials { + /** Authentication Scheme name. */ + scheme: string; + /** Authentication Parameter value. */ + parameter: string; +} + +export function backendAuthorizationHeaderCredentialsSerializer( + item: BackendAuthorizationHeaderCredentials, +): any { + return { scheme: item["scheme"], parameter: item["parameter"] }; +} + +export function backendAuthorizationHeaderCredentialsDeserializer( + item: any, +): BackendAuthorizationHeaderCredentials { + return { + scheme: item["scheme"], + parameter: item["parameter"], + }; +} + +/** Details of the Backend WebProxy Server to use in the Request to Backend. */ +export interface BackendProxyContract { + /** WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. */ + url: string; + /** Username to connect to the WebProxy server */ + username?: string; + /** Password to connect to the WebProxy Server */ + password?: string; +} + +export function backendProxyContractSerializer(item: BackendProxyContract): any { + return { url: item["url"], username: item["username"], password: item["password"] }; +} + +export function backendProxyContractDeserializer(item: any): BackendProxyContract { + return { + url: item["url"], + username: item["username"], + password: item["password"], + }; +} + +/** Properties controlling TLS Certificate Validation. */ +export interface BackendTlsProperties { + /** Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. */ + validateCertificateChain?: boolean; + /** Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. */ + validateCertificateName?: boolean; + /** Thumbprints of certificates used by the backend host for TLS communication. */ + serverCertificateThumbprints?: string[]; + /** Server X509 Certificate Names of the Backend Host. */ + serverX509Names?: X509CertificateName[]; +} + +export function backendTlsPropertiesSerializer(item: BackendTlsProperties): any { + return { + validateCertificateChain: item["validateCertificateChain"], + validateCertificateName: item["validateCertificateName"], + serverCertificateThumbprints: !item["serverCertificateThumbprints"] + ? item["serverCertificateThumbprints"] + : item["serverCertificateThumbprints"].map((p: any) => { + return p; + }), + serverX509Names: !item["serverX509Names"] + ? item["serverX509Names"] + : x509CertificateNameArraySerializer(item["serverX509Names"]), + }; +} + +export function backendTlsPropertiesDeserializer(item: any): BackendTlsProperties { + return { + validateCertificateChain: item["validateCertificateChain"], + validateCertificateName: item["validateCertificateName"], + serverCertificateThumbprints: !item["serverCertificateThumbprints"] + ? item["serverCertificateThumbprints"] + : item["serverCertificateThumbprints"].map((p: any) => { + return p; + }), + serverX509Names: !item["serverX509Names"] + ? item["serverX509Names"] + : x509CertificateNameArrayDeserializer(item["serverX509Names"]), + }; +} + +/** The configuration of the backend circuit breaker */ +export interface BackendCircuitBreaker { + /** The rules for tripping the backend. */ + rules?: CircuitBreakerRule[]; +} + +export function backendCircuitBreakerSerializer(item: BackendCircuitBreaker): any { + return { + rules: !item["rules"] ? item["rules"] : circuitBreakerRuleArraySerializer(item["rules"]), + }; +} + +export function backendCircuitBreakerDeserializer(item: any): BackendCircuitBreaker { + return { + rules: !item["rules"] ? item["rules"] : circuitBreakerRuleArrayDeserializer(item["rules"]), + }; +} + +export function circuitBreakerRuleArraySerializer(result: Array): any[] { + return result.map((item) => { + return circuitBreakerRuleSerializer(item); + }); +} + +export function circuitBreakerRuleArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return circuitBreakerRuleDeserializer(item); + }); +} + +/** Rule configuration to trip the backend. */ +export interface CircuitBreakerRule { + /** The rule name. */ + name?: string; + /** The conditions for tripping the circuit breaker. */ + failureCondition?: CircuitBreakerFailureCondition; + /** The duration for which the circuit will be tripped. */ + tripDuration?: string; + /** flag to accept Retry-After header from the backend. */ + acceptRetryAfter?: boolean; + /** The response of the backend when the circuit breaker gets open. */ + failureResponse?: BackendFailureResponse; +} + +export function circuitBreakerRuleSerializer(item: CircuitBreakerRule): any { + return { + name: item["name"], + failureCondition: !item["failureCondition"] + ? item["failureCondition"] + : circuitBreakerFailureConditionSerializer(item["failureCondition"]), + tripDuration: item["tripDuration"], + acceptRetryAfter: item["acceptRetryAfter"], + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseSerializer(item["failureResponse"]), + }; +} + +export function circuitBreakerRuleDeserializer(item: any): CircuitBreakerRule { + return { + name: item["name"], + failureCondition: !item["failureCondition"] + ? item["failureCondition"] + : circuitBreakerFailureConditionDeserializer(item["failureCondition"]), + tripDuration: item["tripDuration"], + acceptRetryAfter: item["acceptRetryAfter"], + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseDeserializer(item["failureResponse"]), + }; +} + +/** The trip conditions of the circuit breaker */ +export interface CircuitBreakerFailureCondition { + /** The threshold for opening the circuit. */ + count?: number; + /** The threshold for opening the circuit. */ + percentage?: number; + /** The interval during which the failures are counted. */ + interval?: string; + /** The status code ranges which are considered as failure. */ + statusCodeRanges?: FailureStatusCodeRange[]; + /** The error reasons which are considered as failure. */ + errorReasons?: string[]; +} + +export function circuitBreakerFailureConditionSerializer( + item: CircuitBreakerFailureCondition, +): any { + return { + count: item["count"], + percentage: item["percentage"], + interval: item["interval"], + statusCodeRanges: !item["statusCodeRanges"] + ? item["statusCodeRanges"] + : failureStatusCodeRangeArraySerializer(item["statusCodeRanges"]), + errorReasons: !item["errorReasons"] + ? item["errorReasons"] + : item["errorReasons"].map((p: any) => { + return p; + }), + }; +} + +export function circuitBreakerFailureConditionDeserializer( + item: any, +): CircuitBreakerFailureCondition { + return { + count: item["count"], + percentage: item["percentage"], + interval: item["interval"], + statusCodeRanges: !item["statusCodeRanges"] + ? item["statusCodeRanges"] + : failureStatusCodeRangeArrayDeserializer(item["statusCodeRanges"]), + errorReasons: !item["errorReasons"] + ? item["errorReasons"] + : item["errorReasons"].map((p: any) => { + return p; + }), + }; +} + +export function failureStatusCodeRangeArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return failureStatusCodeRangeSerializer(item); + }); +} + +export function failureStatusCodeRangeArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return failureStatusCodeRangeDeserializer(item); + }); +} + +/** The failure http status code range */ +export interface FailureStatusCodeRange { + /** The minimum http status code. */ + min?: number; + /** The maximum http status code. */ + max?: number; +} + +export function failureStatusCodeRangeSerializer(item: FailureStatusCodeRange): any { + return { min: item["min"], max: item["max"] }; +} + +export function failureStatusCodeRangeDeserializer(item: any): FailureStatusCodeRange { + return { + min: item["min"], + max: item["max"], + }; +} + +/** The response to be returned when a backend fails to respond */ +export interface BackendFailureResponse { + /** The status code of the response. */ + statusCode?: number; +} + +export function backendFailureResponseSerializer(item: BackendFailureResponse): any { + return { statusCode: item["statusCode"] }; +} + +export function backendFailureResponseDeserializer(item: any): BackendFailureResponse { + return { + statusCode: item["statusCode"], + }; +} + +/** model interface BackendBaseParametersPool */ +export interface BackendBaseParametersPool extends BackendPool {} + +export function backendBaseParametersPoolSerializer(item: BackendBaseParametersPool): any { + return { + services: !item["services"] + ? item["services"] + : backendPoolItemArraySerializer(item["services"]), + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseSerializer(item["failureResponse"]), + sessionAffinity: !item["sessionAffinity"] + ? item["sessionAffinity"] + : backendSessionAffinitySerializer(item["sessionAffinity"]), + }; +} + +export function backendBaseParametersPoolDeserializer(item: any): BackendBaseParametersPool { + return { + services: !item["services"] + ? item["services"] + : backendPoolItemArrayDeserializer(item["services"]), + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseDeserializer(item["failureResponse"]), + sessionAffinity: !item["sessionAffinity"] + ? item["sessionAffinity"] + : backendSessionAffinityDeserializer(item["sessionAffinity"]), + }; +} + +/** Type of the backend. A backend can be either Single or Pool. */ +export enum KnownBackendType { + /** supports single backend */ + Single = "Single", + /** supports pool backend */ + Pool = "Pool", +} + +/** + * Type of the backend. A backend can be either Single or Pool. \ + * {@link KnownBackendType} can be used interchangeably with BackendType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Single**: supports single backend \ + * **Pool**: supports pool backend + */ +export type BackendType = string; + +/** Backend pool information */ +export interface BackendPool { + /** The list of backend entities belonging to a pool. */ + services?: BackendPoolItem[]; + /** The response to be returned when all the backends in the pool are inactive. */ + failureResponse?: BackendFailureResponse; + /** The session stickiness properties of the backend pool. */ + sessionAffinity?: BackendSessionAffinity; +} + +export function backendPoolSerializer(item: BackendPool): any { + return { + services: !item["services"] + ? item["services"] + : backendPoolItemArraySerializer(item["services"]), + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseSerializer(item["failureResponse"]), + sessionAffinity: !item["sessionAffinity"] + ? item["sessionAffinity"] + : backendSessionAffinitySerializer(item["sessionAffinity"]), + }; +} + +export function backendPoolDeserializer(item: any): BackendPool { + return { + services: !item["services"] + ? item["services"] + : backendPoolItemArrayDeserializer(item["services"]), + failureResponse: !item["failureResponse"] + ? item["failureResponse"] + : backendFailureResponseDeserializer(item["failureResponse"]), + sessionAffinity: !item["sessionAffinity"] + ? item["sessionAffinity"] + : backendSessionAffinityDeserializer(item["sessionAffinity"]), + }; +} + +export function backendPoolItemArraySerializer(result: Array): any[] { + return result.map((item) => { + return backendPoolItemSerializer(item); + }); +} + +export function backendPoolItemArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return backendPoolItemDeserializer(item); + }); +} + +/** Backend pool service information */ +export interface BackendPoolItem { + /** The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity. */ + id: string; + /** The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. */ + weight?: number; + /** The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. */ + priority?: number; + /** Scope 2 carbon emission preference for the backend. When specified, the load balancer will optimize traffic flow by routing to regions that have carbon emission less than or equal to the specified category. However, when all other backends are not available it will route traffic to these regions anyway. This requires the backend to be attributed with 'azureRegion' information. */ + preferredCarbonEmission?: CarbonEmissionCategory; +} + +export function backendPoolItemSerializer(item: BackendPoolItem): any { + return { + id: item["id"], + weight: item["weight"], + priority: item["priority"], + preferredCarbonEmission: item["preferredCarbonEmission"], + }; +} + +export function backendPoolItemDeserializer(item: any): BackendPoolItem { + return { + id: item["id"], + weight: item["weight"], + priority: item["priority"], + preferredCarbonEmission: item["preferredCarbonEmission"], + }; +} + +/** Scope 2 carbon emission preference for the backend. When specified, the load balancer will optimize traffic flow by routing to regions that have carbon emission less than or equal to the specified category. However, when all other backends are not available it will route traffic to these regions anyway. This requires the backend to be attributed with 'azureRegion' information. */ +export enum KnownCarbonEmissionCategory { + /** Carbon intensity of less than or equal to 150 grams CO₂e per KWh */ + VeryLow = "VeryLow", + /** Carbon intensity between 151 & 300 (incl) grams CO₂e per KWh */ + Low = "Low", + /** Carbon intensity between 301 & 500 (incl) grams CO₂e per KWh */ + Medium = "Medium", + /** Carbon intensity between 501 & 700 (incl) grams CO₂e per KWh */ + High = "High", + /** Carbon intensity of more than 700 grams CO₂e per KWh */ + VeryHigh = "VeryHigh", +} + +/** + * Scope 2 carbon emission preference for the backend. When specified, the load balancer will optimize traffic flow by routing to regions that have carbon emission less than or equal to the specified category. However, when all other backends are not available it will route traffic to these regions anyway. This requires the backend to be attributed with 'azureRegion' information. \ + * {@link KnownCarbonEmissionCategory} can be used interchangeably with CarbonEmissionCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **VeryLow**: Carbon intensity of less than or equal to 150 grams CO₂e per KWh \ + * **Low**: Carbon intensity between 151 & 300 (incl) grams CO₂e per KWh \ + * **Medium**: Carbon intensity between 301 & 500 (incl) grams CO₂e per KWh \ + * **High**: Carbon intensity between 501 & 700 (incl) grams CO₂e per KWh \ + * **VeryHigh**: Carbon intensity of more than 700 grams CO₂e per KWh + */ +export type CarbonEmissionCategory = string; + +/** The session stickiness properties of the backend pool. */ +export interface BackendSessionAffinity { + /** The id that identifies the requests belonging to the same session. */ + sessionId?: BackendSessionId; +} + +export function backendSessionAffinitySerializer(item: BackendSessionAffinity): any { + return { + sessionId: !item["sessionId"] + ? item["sessionId"] + : backendSessionIdSerializer(item["sessionId"]), + }; +} + +export function backendSessionAffinityDeserializer(item: any): BackendSessionAffinity { + return { + sessionId: !item["sessionId"] + ? item["sessionId"] + : backendSessionIdDeserializer(item["sessionId"]), + }; +} + +/** The properties of the id that identifies the requests belonging to the same session. */ +export interface BackendSessionId { + /** Source from where the session id is extracted. */ + source?: BackendSessionIdSource; + /** Name of the variable that refers to the session id. */ + name?: string; +} + +export function backendSessionIdSerializer(item: BackendSessionId): any { + return { source: item["source"], name: item["name"] }; +} + +export function backendSessionIdDeserializer(item: any): BackendSessionId { + return { + source: item["source"], + name: item["name"], + }; +} + +/** Source from where the session id is extracted. */ +export enum KnownBackendSessionIdSource { + /** The session id is set by APIM gateway in a cookie and is extracted from the cookies in client requests. */ + Cookie = "cookie", +} + +/** + * Source from where the session id is extracted. \ + * {@link KnownBackendSessionIdSource} can be used interchangeably with BackendSessionIdSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **cookie**: The session id is set by APIM gateway in a cookie and is extracted from the cookies in client requests. + */ +export type BackendSessionIdSource = string; + +/** Backend update parameters. */ +export interface BackendUpdateParameters { + /** Backend Title. */ + title?: string; + /** Backend Description. */ + description?: string; + /** Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. */ + resourceId?: string; + /** Backend Properties contract */ + properties?: BackendProperties; + /** Backend Credentials Contract Properties */ + credentials?: BackendCredentialsContract; + /** Backend gateway Contract Properties */ + proxy?: BackendProxyContract; + /** Backend TLS Properties */ + tls?: BackendTlsProperties; + /** Backend Circuit Breaker Configuration */ + circuitBreaker?: BackendCircuitBreaker; + /** Azure region in which the backend is deployed. Can be optionally specified to use features such as carbon-optimized load balancer. */ + azureRegion?: string; + /** Backend Pool Properties */ + pool?: BackendBaseParametersPool; + /** Type of the backend. A backend can be either Single or Pool. */ + type?: BackendType; + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; +} + +export function backendUpdateParametersSerializer(item: BackendUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "title", + "description", + "resourceId", + "properties", + "credentials", + "proxy", + "tls", + "circuitBreaker", + "azureRegion", + "pool", + "type", + "url", + "protocol", + ]) + ? undefined + : _backendUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Backend operation. */ +export interface BackendUpdateParameterProperties extends BackendBaseParameters { + /** Runtime Url of the Backend. */ + url?: string; + /** Backend communication protocol. */ + protocol?: BackendProtocol; +} + +export function backendUpdateParameterPropertiesSerializer( + item: BackendUpdateParameterProperties, +): any { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesSerializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractSerializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractSerializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesSerializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerSerializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolSerializer(item["pool"]), + type: item["type"], + url: item["url"], + protocol: item["protocol"], + }; +} + +/** Paged Backend list representation. */ +export interface _BackendCollection { + /** Backend values. */ + value?: BackendContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _backendCollectionDeserializer(item: any): _BackendCollection { + return { + value: !item["value"] ? item["value"] : backendContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function backendContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return backendContractSerializer(item); + }); +} + +export function backendContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return backendContractDeserializer(item); + }); +} + +/** Certificate details. */ +export interface CertificateContract extends ProxyResource { + /** Subject attribute of the certificate. */ + subject?: string; + /** Thumbprint of the certificate. */ + thumbprint?: string; + /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractProperties; +} + +export function certificateContractDeserializer(item: any): CertificateContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _certificateContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the Certificate contract. */ +export interface CertificateContractProperties { + /** Subject attribute of the certificate. */ + subject: string; + /** Thumbprint of the certificate. */ + thumbprint: string; + /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate: Date; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractProperties; +} + +export function certificateContractPropertiesDeserializer( + item: any, +): CertificateContractProperties { + return { + subject: item["subject"], + thumbprint: item["thumbprint"], + expirationDate: new Date(item["expirationDate"]), + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractPropertiesDeserializer(item["keyVault"]), + }; +} + +/** KeyVault contract details. */ +export interface KeyVaultContractProperties extends KeyVaultContractCreateProperties { + /** Last time sync and refresh status of secret from key vault. */ + lastStatus?: KeyVaultLastAccessStatusContractProperties; +} + +export function keyVaultContractPropertiesDeserializer(item: any): KeyVaultContractProperties { + return { + secretIdentifier: item["secretIdentifier"], + identityClientId: item["identityClientId"], + lastStatus: !item["lastStatus"] + ? item["lastStatus"] + : keyVaultLastAccessStatusContractPropertiesDeserializer(item["lastStatus"]), + }; +} + +/** Issue contract Update Properties. */ +export interface KeyVaultLastAccessStatusContractProperties { + /** Last status code for sync and refresh of secret from key vault. */ + code?: string; + /** Details of the error else empty. */ + message?: string; + /** Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + timeStampUtc?: Date; +} + +export function keyVaultLastAccessStatusContractPropertiesDeserializer( + item: any, +): KeyVaultLastAccessStatusContractProperties { + return { + code: item["code"], + message: item["message"], + timeStampUtc: !item["timeStampUtc"] ? item["timeStampUtc"] : new Date(item["timeStampUtc"]), + }; +} + +/** Create keyVault contract details. */ +export interface KeyVaultContractCreateProperties { + /** Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi */ + secretIdentifier?: string; + /** Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. */ + identityClientId?: string; +} + +export function keyVaultContractCreatePropertiesSerializer( + item: KeyVaultContractCreateProperties, +): any { + return { secretIdentifier: item["secretIdentifier"], identityClientId: item["identityClientId"] }; +} + +export function keyVaultContractCreatePropertiesDeserializer( + item: any, +): KeyVaultContractCreateProperties { + return { + secretIdentifier: item["secretIdentifier"], + identityClientId: item["identityClientId"], + }; +} + +/** Certificate create or update details. */ +export interface CertificateCreateOrUpdateParameters { + /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ + data?: string; + /** Password for the Certificate */ + password?: string; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function certificateCreateOrUpdateParametersSerializer( + item: CertificateCreateOrUpdateParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["data", "password", "keyVault"]) + ? undefined + : _certificateCreateOrUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the CreateOrUpdate certificate operation. */ +export interface CertificateCreateOrUpdateProperties { + /** Base 64 encoded certificate using the application/x-pkcs12 representation. */ + data?: string; + /** Password for the Certificate */ + password?: string; + /** KeyVault location details of the certificate. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function certificateCreateOrUpdatePropertiesSerializer( + item: CertificateCreateOrUpdateProperties, +): any { + return { + data: item["data"], + password: item["password"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +/** Paged Certificates list representation. */ +export interface _CertificateCollection { + /** Page values. */ + value?: CertificateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _certificateCollectionDeserializer(item: any): _CertificateCollection { + return { + value: !item["value"] ? item["value"] : certificateContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function certificateContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return certificateContractDeserializer(item); + }); +} + +/** Contract details. */ +export interface GroupContract extends ProxyResource { + /** Group name. */ + displayName?: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. */ + readonly builtIn?: boolean; + /** Group type. */ + typePropertiesType?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupContractDeserializer(item: any): GroupContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _groupContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Group contract Properties. */ +export interface GroupContractProperties { + /** Group name. */ + displayName: string; + /** Group description. Can contain HTML formatting tags. */ + description?: string; + /** true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. */ + readonly builtIn?: boolean; + /** Group type. */ + type?: GroupType; + /** For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupContractPropertiesDeserializer(item: any): GroupContractProperties { + return { + displayName: item["displayName"], + description: item["description"], + builtIn: item["builtIn"], + type: item["type"], + externalId: item["externalId"], + }; +} + +/** Group type. */ +export type GroupType = "custom" | "system" | "external"; + +/** Parameters supplied to the Create Group operation. */ +export interface GroupCreateParameters { + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupCreateParametersSerializer(item: GroupCreateParameters): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "description", "type", "externalId"]) + ? undefined + : _groupCreateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Create Group operation. */ +export interface GroupCreateParametersProperties { + /** Group name. */ + displayName: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupCreateParametersPropertiesSerializer( + item: GroupCreateParametersProperties, +): any { + return { + displayName: item["displayName"], + description: item["description"], + type: item["type"], + externalId: item["externalId"], + }; +} + +/** Parameters supplied to the Update Group operation. */ +export interface GroupUpdateParameters { + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupUpdateParametersSerializer(item: GroupUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "description", "type", "externalId"]) + ? undefined + : _groupUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Group operation. */ +export interface GroupUpdateParametersProperties { + /** Group name. */ + displayName?: string; + /** Group description. */ + description?: string; + /** Group type. */ + type?: GroupType; + /** Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. */ + externalId?: string; +} + +export function groupUpdateParametersPropertiesSerializer( + item: GroupUpdateParametersProperties, +): any { + return { + displayName: item["displayName"], + description: item["description"], + type: item["type"], + externalId: item["externalId"], + }; +} + +/** Paged Group list representation. */ +export interface _GroupCollection { + /** Page values. */ + value?: GroupContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _groupCollectionDeserializer(item: any): _GroupCollection { + return { + value: !item["value"] ? item["value"] : groupContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function groupContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return groupContractDeserializer(item); + }); +} + +/** Logger details. */ +export interface LoggerContract extends ProxyResource { + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** + * The name and SendRule connection string of the event hub for azureEventHub logger. + * Instrumentation key for applicationInsights logger. + */ + credentials?: Record; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; + /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ + resourceId?: string; +} + +export function loggerContractSerializer(item: LoggerContract): any { + return { + properties: areAllPropsUndefined(item, [ + "loggerType", + "description", + "credentials", + "isBuffered", + "resourceId", + ]) + ? undefined + : _loggerContractPropertiesSerializer(item), + }; +} + +export function loggerContractDeserializer(item: any): LoggerContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _loggerContractPropertiesDeserializer(item["properties"])), + }; +} + +/** The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. */ +export interface LoggerContractProperties { + /** Logger type. */ + loggerType: LoggerType; + /** Logger description. */ + description?: string; + /** + * The name and SendRule connection string of the event hub for azureEventHub logger. + * Instrumentation key for applicationInsights logger. + */ + credentials?: Record; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; + /** Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). */ + resourceId?: string; +} + +export function loggerContractPropertiesSerializer(item: LoggerContractProperties): any { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: item["credentials"], + isBuffered: item["isBuffered"], + resourceId: item["resourceId"], + }; +} + +export function loggerContractPropertiesDeserializer(item: any): LoggerContractProperties { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: !item["credentials"] + ? item["credentials"] + : Object.fromEntries( + Object.entries(item["credentials"]).map(([k, p]: [string, any]) => [k, p]), + ), + isBuffered: item["isBuffered"], + resourceId: item["resourceId"], + }; +} + +/** Logger type. */ +export enum KnownLoggerType { + /** Azure Event Hub as log destination. */ + AzureEventHub = "azureEventHub", + /** Azure Application Insights as log destination. */ + ApplicationInsights = "applicationInsights", + /** Azure Monitor */ + AzureMonitor = "azureMonitor", +} + +/** + * Logger type. \ + * {@link KnownLoggerType} can be used interchangeably with LoggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **azureEventHub**: Azure Event Hub as log destination. \ + * **applicationInsights**: Azure Application Insights as log destination. \ + * **azureMonitor**: Azure Monitor + */ +export type LoggerType = string; + +/** Logger update contract. */ +export interface LoggerUpdateContract { + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** Logger credentials. */ + credentials?: Record; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; +} + +export function loggerUpdateContractSerializer(item: LoggerUpdateContract): any { + return { + properties: areAllPropsUndefined(item, [ + "loggerType", + "description", + "credentials", + "isBuffered", + ]) + ? undefined + : _loggerUpdateContractPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Logger operation. */ +export interface LoggerUpdateParameters { + /** Logger type. */ + loggerType?: LoggerType; + /** Logger description. */ + description?: string; + /** Logger credentials. */ + credentials?: Record; + /** Whether records are buffered in the logger before publishing. Default is assumed to be true. */ + isBuffered?: boolean; +} + +export function loggerUpdateParametersSerializer(item: LoggerUpdateParameters): any { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: item["credentials"], + isBuffered: item["isBuffered"], + }; +} + +/** Paged Logger list representation. */ +export interface _LoggerCollection { + /** Logger values. */ + value?: LoggerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _loggerCollectionDeserializer(item: any): _LoggerCollection { + return { + value: !item["value"] ? item["value"] : loggerContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function loggerContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return loggerContractSerializer(item); + }); +} + +export function loggerContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return loggerContractDeserializer(item); + }); +} + +/** NamedValue details. */ +export interface NamedValueContract extends ProxyResource { + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function namedValueContractDeserializer(item: any): NamedValueContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _namedValueContractPropertiesDeserializer(item["properties"])), + }; +} + +/** NamedValue Contract properties. */ +export interface NamedValueContractProperties extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractProperties; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function namedValueContractPropertiesDeserializer(item: any): NamedValueContractProperties { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractPropertiesDeserializer(item["keyVault"]), + provisioningState: item["provisioningState"], + }; +} + +/** NamedValue Entity Base Parameters set. */ +export interface NamedValueEntityBaseParameters { + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; +} + +export function namedValueEntityBaseParametersSerializer( + item: NamedValueEntityBaseParameters, +): any { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + }; +} + +export function namedValueEntityBaseParametersDeserializer( + item: any, +): NamedValueEntityBaseParameters { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + }; +} + +/** NamedValue details. */ +export interface NamedValueCreateContract extends ProxyResource { + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function namedValueCreateContractSerializer(item: NamedValueCreateContract): any { + return { + properties: areAllPropsUndefined(item, ["tags", "secret", "displayName", "value", "keyVault"]) + ? undefined + : _namedValueCreateContractPropertiesSerializer(item), + }; +} + +/** NamedValue Contract properties. */ +export interface NamedValueCreateContractProperties extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function namedValueCreateContractPropertiesSerializer( + item: NamedValueCreateContractProperties, +): any { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +/** NamedValue update Parameters. */ +export interface NamedValueUpdateParameters { + /** Optional tags that when provided can be used to filter the NamedValue list. */ + tags?: string[]; + /** Determines whether the value is a secret and should be encrypted or not. Default value is false. */ + secret?: boolean; + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function namedValueUpdateParametersSerializer(item: NamedValueUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, ["tags", "secret", "displayName", "value", "keyVault"]) + ? undefined + : _namedValueUpdateParametersPropertiesSerializer(item), + }; +} + +/** NamedValue Contract properties. */ +export interface NamedValueUpdateParameterProperties extends NamedValueEntityBaseParameters { + /** Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. */ + displayName?: string; + /** Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. */ + value?: string; + /** KeyVault location details of the namedValue. */ + keyVault?: KeyVaultContractCreateProperties; +} + +export function namedValueUpdateParameterPropertiesSerializer( + item: NamedValueUpdateParameterProperties, +): any { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +/** Paged NamedValue list representation. */ +export interface _NamedValueCollection { + /** Page values. */ + value?: NamedValueContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _namedValueCollectionDeserializer(item: any): _NamedValueCollection { + return { + value: !item["value"] ? item["value"] : namedValueContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function namedValueContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return namedValueContractDeserializer(item); + }); +} + +/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ +export interface NamedValueSecretContract { + /** This is secret value of the NamedValue entity. */ + value?: string; +} + +export function namedValueSecretContractDeserializer(item: any): NamedValueSecretContract { + return { + value: item["value"], + }; +} + +/** Notification details. */ +export interface NotificationContract extends ProxyResource { + /** Title of the Notification. */ + title?: string; + /** Description of the Notification. */ + description?: string; + /** Recipient Parameter values. */ + recipients?: RecipientsContractProperties; +} + +export function notificationContractDeserializer(item: any): NotificationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _notificationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Notification Contract properties. */ +export interface NotificationContractProperties { + /** Title of the Notification. */ + title: string; + /** Description of the Notification. */ + description?: string; + /** Recipient Parameter values. */ + recipients?: RecipientsContractProperties; +} + +export function notificationContractPropertiesDeserializer( + item: any, +): NotificationContractProperties { + return { + title: item["title"], + description: item["description"], + recipients: !item["recipients"] + ? item["recipients"] + : recipientsContractPropertiesDeserializer(item["recipients"]), + }; +} + +/** Notification Parameter contract. */ +export interface RecipientsContractProperties { + /** List of Emails subscribed for the notification. */ + emails?: string[]; + /** List of Users subscribed for the notification. */ + users?: string[]; +} + +export function recipientsContractPropertiesDeserializer(item: any): RecipientsContractProperties { + return { + emails: !item["emails"] + ? item["emails"] + : item["emails"].map((p: any) => { + return p; + }), + users: !item["users"] + ? item["users"] + : item["users"].map((p: any) => { + return p; + }), + }; +} + +/** Known values of {@link NotificationName} that the service accepts. */ +export enum KnownNotificationName { + /** The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. */ + RequestPublisherNotificationMessage = "RequestPublisherNotificationMessage", + /** The following email recipients and users will receive email notifications about new API product subscriptions. */ + PurchasePublisherNotificationMessage = "PurchasePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. */ + NewApplicationNotificationMessage = "NewApplicationNotificationMessage", + /** The following recipients will receive blind carbon copies of all emails sent to developers. */ + BCC = "BCC", + /** The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. */ + NewIssuePublisherNotificationMessage = "NewIssuePublisherNotificationMessage", + /** The following email recipients and users will receive email notifications when developer closes his account. */ + AccountClosedPublisher = "AccountClosedPublisher", + /** The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. */ + QuotaLimitApproachingPublisherNotificationMessage = "QuotaLimitApproachingPublisherNotificationMessage", +} + +/** Type of NotificationName */ +export type NotificationName = string; + +/** Paged Notification list representation. */ +export interface _NotificationCollection { + /** Page values. */ + value?: NotificationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _notificationCollectionDeserializer(item: any): _NotificationCollection { + return { + value: !item["value"] ? item["value"] : notificationContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function notificationContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return notificationContractDeserializer(item); + }); +} + +/** Policy fragment contract details. */ +export interface PolicyFragmentContract extends ProxyResource { + /** Contents of the policy fragment. */ + value?: string; + /** Policy fragment description. */ + description?: string; + /** Format of the policy fragment content. */ + format?: PolicyFragmentContentFormat; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function policyFragmentContractSerializer(item: PolicyFragmentContract): any { + return { + properties: areAllPropsUndefined(item, ["value", "description", "format"]) + ? undefined + : _policyFragmentContractPropertiesSerializer(item), + }; +} + +export function policyFragmentContractDeserializer(item: any): PolicyFragmentContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _policyFragmentContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Policy fragment contract properties. */ +export interface PolicyFragmentContractProperties { + /** Contents of the policy fragment. */ + value: string; + /** Policy fragment description. */ + description?: string; + /** Format of the policy fragment content. */ + format?: PolicyFragmentContentFormat; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function policyFragmentContractPropertiesSerializer( + item: PolicyFragmentContractProperties, +): any { + return { value: item["value"], description: item["description"], format: item["format"] }; +} + +export function policyFragmentContractPropertiesDeserializer( + item: any, +): PolicyFragmentContractProperties { + return { + value: item["value"], + description: item["description"], + format: item["format"], + provisioningState: item["provisioningState"], + }; +} + +/** Known values of {@link PolicyFragmentContentFormat} that the service accepts. */ +export enum KnownPolicyFragmentContentFormat { + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml", +} + +/** Type of PolicyFragmentContentFormat */ +export type PolicyFragmentContentFormat = string; + +/** The response of the get policy fragments operation. */ +export interface _PolicyFragmentCollection { + /** Policy fragment contract value. */ + value?: PolicyFragmentContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _policyFragmentCollectionDeserializer(item: any): _PolicyFragmentCollection { + return { + value: !item["value"] ? item["value"] : policyFragmentContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function policyFragmentContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return policyFragmentContractSerializer(item); + }); +} + +export function policyFragmentContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return policyFragmentContractDeserializer(item); + }); +} + +/** A collection of resources. */ +export interface ResourceCollection { + /** A collection of resources. */ + value?: ResourceCollectionValueItem[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function resourceCollectionDeserializer(item: any): ResourceCollection { + return { + value: !item["value"] + ? item["value"] + : resourceCollectionValueItemArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function resourceCollectionValueItemArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return resourceCollectionValueItemDeserializer(item); + }); +} + +/** model interface ResourceCollectionValueItem */ +export interface ResourceCollectionValueItem extends ProxyResource {} + +export function resourceCollectionValueItemDeserializer(item: any): ResourceCollectionValueItem { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + }; +} + +/** Sign-In settings for the Developer Portal. */ +export interface PortalSigninSettings extends ProxyResource { + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; +} + +export function portalSigninSettingsSerializer(item: PortalSigninSettings): any { + return { + properties: areAllPropsUndefined(item, ["enabled"]) + ? undefined + : _portalSigninSettingsPropertiesSerializer(item), + }; +} + +export function portalSigninSettingsDeserializer(item: any): PortalSigninSettings { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalSigninSettingsPropertiesDeserializer(item["properties"])), + }; +} + +/** Sign-in settings contract properties. */ +export interface PortalSigninSettingProperties { + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; +} + +export function portalSigninSettingPropertiesSerializer(item: PortalSigninSettingProperties): any { + return { enabled: item["enabled"] }; +} + +export function portalSigninSettingPropertiesDeserializer( + item: any, +): PortalSigninSettingProperties { + return { + enabled: item["enabled"], + }; +} + +/** Sign-Up settings for a developer portal. */ +export interface PortalSignupSettings extends ProxyResource { + /** Allow users to sign up on a developer portal. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; +} + +export function portalSignupSettingsSerializer(item: PortalSignupSettings): any { + return { + properties: areAllPropsUndefined(item, ["enabled", "termsOfService"]) + ? undefined + : _portalSignupSettingsPropertiesSerializer(item), + }; +} + +export function portalSignupSettingsDeserializer(item: any): PortalSignupSettings { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalSignupSettingsPropertiesDeserializer(item["properties"])), + }; +} + +/** Sign-up settings contract properties. */ +export interface PortalSignupSettingsProperties { + /** Allow users to sign up on a developer portal. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; +} + +export function portalSignupSettingsPropertiesSerializer( + item: PortalSignupSettingsProperties, +): any { + return { + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesSerializer(item["termsOfService"]), + }; +} + +export function portalSignupSettingsPropertiesDeserializer( + item: any, +): PortalSignupSettingsProperties { + return { + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesDeserializer(item["termsOfService"]), + }; +} + +/** Terms of service contract properties. */ +export interface TermsOfServiceProperties { + /** A terms of service text. */ + text?: string; + /** Display terms of service during a sign-up process. */ + enabled?: boolean; + /** Ask user for consent to the terms of service. */ + consentRequired?: boolean; +} + +export function termsOfServicePropertiesSerializer(item: TermsOfServiceProperties): any { + return { text: item["text"], enabled: item["enabled"], consentRequired: item["consentRequired"] }; +} + +export function termsOfServicePropertiesDeserializer(item: any): TermsOfServiceProperties { + return { + text: item["text"], + enabled: item["enabled"], + consentRequired: item["consentRequired"], + }; +} + +/** Delegation settings for a developer portal. */ +export interface PortalDelegationSettings extends ProxyResource { + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; +} + +export function portalDelegationSettingsSerializer(item: PortalDelegationSettings): any { + return { + properties: areAllPropsUndefined(item, [ + "url", + "validationKey", + "subscriptions", + "userRegistration", + ]) + ? undefined + : _portalDelegationSettingsPropertiesSerializer(item), + }; +} + +export function portalDelegationSettingsDeserializer(item: any): PortalDelegationSettings { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalDelegationSettingsPropertiesDeserializer(item["properties"])), + }; +} + +/** Delegation settings contract properties. */ +export interface PortalDelegationSettingsProperties { + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; +} + +export function portalDelegationSettingsPropertiesSerializer( + item: PortalDelegationSettingsProperties, +): any { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesSerializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesSerializer(item["userRegistration"]), + }; +} + +export function portalDelegationSettingsPropertiesDeserializer( + item: any, +): PortalDelegationSettingsProperties { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesDeserializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesDeserializer(item["userRegistration"]), + }; +} + +/** Subscriptions delegation settings properties. */ +export interface SubscriptionsDelegationSettingsProperties { + /** Enable or disable delegation for subscriptions. */ + enabled?: boolean; +} + +export function subscriptionsDelegationSettingsPropertiesSerializer( + item: SubscriptionsDelegationSettingsProperties, +): any { + return { enabled: item["enabled"] }; +} + +export function subscriptionsDelegationSettingsPropertiesDeserializer( + item: any, +): SubscriptionsDelegationSettingsProperties { + return { + enabled: item["enabled"], + }; +} + +/** User registration delegation settings properties. */ +export interface RegistrationDelegationSettingsProperties { + /** Enable or disable delegation for user registration. */ + enabled?: boolean; +} + +export function registrationDelegationSettingsPropertiesSerializer( + item: RegistrationDelegationSettingsProperties, +): any { + return { enabled: item["enabled"] }; +} + +export function registrationDelegationSettingsPropertiesDeserializer( + item: any, +): RegistrationDelegationSettingsProperties { + return { + enabled: item["enabled"], + }; +} + +/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ +export interface PortalSettingValidationKeyContract { + /** This is secret value of the validation key in portal settings. */ + validationKey?: string; +} + +export function portalSettingValidationKeyContractDeserializer( + item: any, +): PortalSettingValidationKeyContract { + return { + validationKey: item["validationKey"], + }; +} + +/** Product details. */ +export interface ProductContract extends ProxyResource { + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** Type of supported authentication for the product. The application configuration is required for application-token authentication type. The subscription-key authentication type is used by default. If the property is omitted, the subscription-key authentication type is used. */ + authenticationType?: ProductAuthType[]; + /** Specifies identity provider settings needed to authorize applications API calls. */ + application?: ProductEntityBaseParametersApplication; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; +} + +export function productContractSerializer(item: ProductContract): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "terms", + "subscriptionRequired", + "approvalRequired", + "subscriptionsLimit", + "authenticationType", + "application", + "state", + "displayName", + ]) + ? undefined + : _productContractPropertiesSerializer(item), + }; +} + +export function productContractDeserializer(item: any): ProductContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _productContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Product profile. */ +export interface ProductContractProperties extends ProductEntityBaseParameters { + /** Product name. */ + displayName: string; +} + +export function productContractPropertiesSerializer(item: ProductContractProperties): any { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationSerializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +export function productContractPropertiesDeserializer(item: any): ProductContractProperties { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationDeserializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +/** Product Entity Base Parameters */ +export interface ProductEntityBaseParameters { + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** Type of supported authentication for the product. The application configuration is required for application-token authentication type. The subscription-key authentication type is used by default. If the property is omitted, the subscription-key authentication type is used. */ + authenticationType?: ProductAuthType[]; + /** Specifies identity provider settings needed to authorize applications API calls. */ + application?: ProductEntityBaseParametersApplication; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; +} + +export function productEntityBaseParametersSerializer(item: ProductEntityBaseParameters): any { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationSerializer(item["application"]), + state: item["state"], + }; +} + +export function productEntityBaseParametersDeserializer(item: any): ProductEntityBaseParameters { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationDeserializer(item["application"]), + state: item["state"], + }; +} + +/** Known values of {@link ProductAuthType} that the service accepts. */ +export enum KnownProductAuthType { + /** subscription-key */ + SubscriptionKey = "subscription-key", + /** application-token */ + ApplicationToken = "application-token", +} + +/** Type of ProductAuthType */ +export type ProductAuthType = string; + +/** Specifies identity provider settings needed to authorize applications API calls. */ +export interface ProductEntityBaseParametersApplication extends ProductApplicationContract {} + +export function productEntityBaseParametersApplicationSerializer( + item: ProductEntityBaseParametersApplication, +): any { + return { + entra: !item["entra"] + ? item["entra"] + : productApplicationContractEntraSerializer(item["entra"]), + }; +} + +export function productEntityBaseParametersApplicationDeserializer( + item: any, +): ProductEntityBaseParametersApplication { + return { + entra: !item["entra"] + ? item["entra"] + : productApplicationContractEntraDeserializer(item["entra"]), + }; +} + +/** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ +export type ProductState = "notPublished" | "published"; + +/** Specifies Microsoft Entra settings needed to authorize product API calls using client applications. */ +export interface ProductApplicationContract { + /** Specifies Microsoft Entra settings needed to authorize product API calls using client application with Microsoft Entra OAuth token. */ + entra?: ProductApplicationContractEntra; +} + +export function productApplicationContractSerializer(item: ProductApplicationContract): any { + return { + entra: !item["entra"] + ? item["entra"] + : productApplicationContractEntraSerializer(item["entra"]), + }; +} + +export function productApplicationContractDeserializer(item: any): ProductApplicationContract { + return { + entra: !item["entra"] + ? item["entra"] + : productApplicationContractEntraDeserializer(item["entra"]), + }; +} + +/** Specifies Microsoft Entra settings needed to authorize product API calls using client application with Microsoft Entra OAuth token. */ +export interface ProductApplicationContractEntra { + /** Product facing EntraID application client ID. */ + applicationId?: string; + /** The EntraID application audience claim. The audience claim is used to validate the token. */ + audience?: string; +} + +export function productApplicationContractEntraSerializer( + item: ProductApplicationContractEntra, +): any { + return { applicationId: item["applicationId"], audience: item["audience"] }; +} + +export function productApplicationContractEntraDeserializer( + item: any, +): ProductApplicationContractEntra { + return { + applicationId: item["applicationId"], + audience: item["audience"], + }; +} + +/** Product Update parameters. */ +export interface ProductUpdateParameters { + /** Product description. May include HTML formatting tags. */ + description?: string; + /** Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. */ + terms?: string; + /** Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ + subscriptionRequired?: boolean; + /** whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ + approvalRequired?: boolean; + /** Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. */ + subscriptionsLimit?: number; + /** Type of supported authentication for the product. The application configuration is required for application-token authentication type. The subscription-key authentication type is used by default. If the property is omitted, the subscription-key authentication type is used. */ + authenticationType?: ProductAuthType[]; + /** Specifies identity provider settings needed to authorize applications API calls. */ + application?: ProductEntityBaseParametersApplication; + /** whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. */ + state?: ProductState; + /** Product name. */ + displayName?: string; +} + +export function productUpdateParametersSerializer(item: ProductUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "terms", + "subscriptionRequired", + "approvalRequired", + "subscriptionsLimit", + "authenticationType", + "application", + "state", + "displayName", + ]) + ? undefined + : _productUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Product operation. */ +export interface ProductUpdateProperties extends ProductEntityBaseParameters { + /** Product name. */ + displayName?: string; +} + +export function productUpdatePropertiesSerializer(item: ProductUpdateProperties): any { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationSerializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +/** Paged Products list representation. */ +export interface _ProductCollection { + /** Page values. */ + value?: ProductContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _productCollectionDeserializer(item: any): _ProductCollection { + return { + value: !item["value"] ? item["value"] : productContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function productContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return productContractSerializer(item); + }); +} + +export function productContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return productContractDeserializer(item); + }); +} + +/** Product-API link details. */ +export interface ProductApiLinkContract extends ProxyResource { + /** Full resource Id of an API. */ + apiId?: string; +} + +export function productApiLinkContractSerializer(item: ProductApiLinkContract): any { + return { + properties: areAllPropsUndefined(item, ["apiId"]) + ? undefined + : _productApiLinkContractPropertiesSerializer(item), + }; +} + +export function productApiLinkContractDeserializer(item: any): ProductApiLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _productApiLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Product-API link entity properties. */ +export interface ProductApiLinkContractProperties { + /** Full resource Id of an API. */ + apiId: string; +} + +export function productApiLinkContractPropertiesSerializer( + item: ProductApiLinkContractProperties, +): any { + return { apiId: item["apiId"] }; +} + +export function productApiLinkContractPropertiesDeserializer( + item: any, +): ProductApiLinkContractProperties { + return { + apiId: item["apiId"], + }; +} + +/** Paged Product-API link list representation. */ +export interface _ProductApiLinkCollection { + /** Page values. */ + value?: ProductApiLinkContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _productApiLinkCollectionDeserializer(item: any): _ProductApiLinkCollection { + return { + value: !item["value"] ? item["value"] : productApiLinkContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function productApiLinkContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return productApiLinkContractSerializer(item); + }); +} + +export function productApiLinkContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return productApiLinkContractDeserializer(item); + }); +} + +/** Product-group link details. */ +export interface ProductGroupLinkContract extends ProxyResource { + /** Full resource Id of a group. */ + groupId?: string; +} + +export function productGroupLinkContractSerializer(item: ProductGroupLinkContract): any { + return { + properties: areAllPropsUndefined(item, ["groupId"]) + ? undefined + : _productGroupLinkContractPropertiesSerializer(item), + }; +} + +export function productGroupLinkContractDeserializer(item: any): ProductGroupLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _productGroupLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Product-group link entity properties. */ +export interface ProductGroupLinkContractProperties { + /** Full resource Id of a group. */ + groupId: string; +} + +export function productGroupLinkContractPropertiesSerializer( + item: ProductGroupLinkContractProperties, +): any { + return { groupId: item["groupId"] }; +} + +export function productGroupLinkContractPropertiesDeserializer( + item: any, +): ProductGroupLinkContractProperties { + return { + groupId: item["groupId"], + }; +} + +/** Paged Product-group link list representation. */ +export interface _ProductGroupLinkCollection { + /** Page values. */ + value?: ProductGroupLinkContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _productGroupLinkCollectionDeserializer(item: any): _ProductGroupLinkCollection { + return { + value: !item["value"] + ? item["value"] + : productGroupLinkContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function productGroupLinkContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return productGroupLinkContractSerializer(item); + }); +} + +export function productGroupLinkContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return productGroupLinkContractDeserializer(item); + }); +} + +/** Global Schema Contract details. */ +export interface GlobalSchemaContract extends ProxyResource { + /** Schema Type. Immutable. */ + schemaType?: SchemaType; + /** Free-form schema entity description. */ + description?: string; + /** Json-encoded string for non json-based schema. */ + value?: any; + /** Global Schema document object for json-based schema formats(e.g. json schema). */ + document?: any; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function globalSchemaContractSerializer(item: GlobalSchemaContract): any { + return { + properties: areAllPropsUndefined(item, ["SchemaType", "description", "value", "document"]) + ? undefined + : _globalSchemaContractPropertiesSerializer(item), + }; +} + +export function globalSchemaContractDeserializer(item: any): GlobalSchemaContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _globalSchemaContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Schema create or update contract Properties. */ +export interface GlobalSchemaContractProperties { + /** Schema Type. Immutable. */ + schemaType: SchemaType; + /** Free-form schema entity description. */ + description?: string; + /** Json-encoded string for non json-based schema. */ + value?: any; + /** Global Schema document object for json-based schema formats(e.g. json schema). */ + document?: any; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function globalSchemaContractPropertiesSerializer( + item: GlobalSchemaContractProperties, +): any { + return { + schemaType: item["schemaType"], + description: item["description"], + value: item["value"], + document: item["document"], + }; +} + +export function globalSchemaContractPropertiesDeserializer( + item: any, +): GlobalSchemaContractProperties { + return { + schemaType: item["schemaType"], + description: item["description"], + value: item["value"], + document: item["document"], + provisioningState: item["provisioningState"], + }; +} + +/** Schema Type. Immutable. */ +export enum KnownSchemaType { + /** XML schema type. */ + Xml = "xml", + /** Json schema type. */ + Json = "json", +} + +/** + * Schema Type. Immutable. \ + * {@link KnownSchemaType} can be used interchangeably with SchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **xml**: XML schema type. \ + * **json**: Json schema type. + */ +export type SchemaType = string; + +/** The response of the list schema operation. */ +export interface _GlobalSchemaCollection { + /** Global Schema Contract value. */ + readonly value?: GlobalSchemaContract[]; + /** Total record count number. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _globalSchemaCollectionDeserializer(item: any): _GlobalSchemaCollection { + return { + value: !item["value"] ? item["value"] : globalSchemaContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function globalSchemaContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return globalSchemaContractSerializer(item); + }); +} + +export function globalSchemaContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return globalSchemaContractDeserializer(item); + }); +} + +/** Subscription details. */ +export interface SubscriptionContract extends ProxyResource { + /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** The name of the subscription, or null if the subscription has no name. */ + displayName?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdDate?: Date; + /** Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + startDate?: Date; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + endDate?: Date; + /** Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + notificationDate?: Date; + /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing is enabled */ + allowTracing?: boolean; +} + +export function subscriptionContractDeserializer(item: any): SubscriptionContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _subscriptionContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Subscription details. */ +export interface SubscriptionContractProperties { + /** The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope: string; + /** The name of the subscription, or null if the subscription has no name. */ + displayName?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state: SubscriptionState; + /** Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdDate?: Date; + /** Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + startDate?: Date; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + endDate?: Date; + /** Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + notificationDate?: Date; + /** Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Optional subscription comment added by an administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing is enabled */ + allowTracing?: boolean; +} + +export function subscriptionContractPropertiesDeserializer( + item: any, +): SubscriptionContractProperties { + return { + ownerId: item["ownerId"], + scope: item["scope"], + displayName: item["displayName"], + state: item["state"], + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + startDate: !item["startDate"] ? item["startDate"] : new Date(item["startDate"]), + expirationDate: !item["expirationDate"] + ? item["expirationDate"] + : new Date(item["expirationDate"]), + endDate: !item["endDate"] ? item["endDate"] : new Date(item["endDate"]), + notificationDate: !item["notificationDate"] + ? item["notificationDate"] + : new Date(item["notificationDate"]), + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + stateComment: item["stateComment"], + allowTracing: item["allowTracing"], + }; +} + +/** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ +export type SubscriptionState = + | "suspended" + | "active" + | "expired" + | "submitted" + | "rejected" + | "cancelled"; + +/** Paged Subscriptions list representation. */ +export interface _SubscriptionCollection { + /** Page values. */ + value?: SubscriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _subscriptionCollectionDeserializer(item: any): _SubscriptionCollection { + return { + value: !item["value"] ? item["value"] : subscriptionContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function subscriptionContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return subscriptionContractDeserializer(item); + }); +} + +/** Subscription create details. */ +export interface SubscriptionCreateParameters { + /** User (user id path) for whom subscription is being created in form /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope?: string; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. If not specified during request key will be generated automatically. */ + primaryKey?: string; + /** Secondary subscription key. If not specified during request key will be generated automatically. */ + secondaryKey?: string; + /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; +} + +export function subscriptionCreateParametersSerializer(item: SubscriptionCreateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "ownerId", + "scope", + "displayName", + "primaryKey", + "secondaryKey", + "state", + "allowTracing", + ]) + ? undefined + : _subscriptionCreateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Create subscription operation. */ +export interface SubscriptionCreateParameterProperties { + /** User (user id path) for whom subscription is being created in form /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId}. */ + scope: string; + /** Subscription name. */ + displayName: string; + /** Primary subscription key. If not specified during request key will be generated automatically. */ + primaryKey?: string; + /** Secondary subscription key. If not specified during request key will be generated automatically. */ + secondaryKey?: string; + /** Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; +} + +export function subscriptionCreateParameterPropertiesSerializer( + item: SubscriptionCreateParameterProperties, +): any { + return { + ownerId: item["ownerId"], + scope: item["scope"], + displayName: item["displayName"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + state: item["state"], + allowTracing: item["allowTracing"], + }; +} + +/** Subscription update details. */ +export interface SubscriptionUpdateParameters { + /** User identifier path: /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId} */ + scope?: string; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. */ + primaryKey?: string; + /** Secondary subscription key. */ + secondaryKey?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; +} + +export function subscriptionUpdateParametersSerializer(item: SubscriptionUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "ownerId", + "scope", + "expirationDate", + "displayName", + "primaryKey", + "secondaryKey", + "state", + "stateComment", + "allowTracing", + ]) + ? undefined + : _subscriptionUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update subscription operation. */ +export interface SubscriptionUpdateParameterProperties { + /** User identifier path: /users/{userId} */ + ownerId?: string; + /** Scope like /products/{productId} or /apis or /apis/{apiId} */ + scope?: string; + /** Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expirationDate?: Date; + /** Subscription name. */ + displayName?: string; + /** Primary subscription key. */ + primaryKey?: string; + /** Secondary subscription key. */ + secondaryKey?: string; + /** Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. */ + state?: SubscriptionState; + /** Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. */ + stateComment?: string; + /** Determines whether tracing can be enabled */ + allowTracing?: boolean; +} + +export function subscriptionUpdateParameterPropertiesSerializer( + item: SubscriptionUpdateParameterProperties, +): any { + return { + ownerId: item["ownerId"], + scope: item["scope"], + expirationDate: !item["expirationDate"] + ? item["expirationDate"] + : item["expirationDate"].toISOString(), + displayName: item["displayName"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + state: item["state"], + stateComment: item["stateComment"], + allowTracing: item["allowTracing"], + }; +} + +/** Subscription keys. */ +export interface SubscriptionKeysContract { + /** Subscription primary key. */ + primaryKey?: string; + /** Subscription secondary key. */ + secondaryKey?: string; +} + +export function subscriptionKeysContractDeserializer(item: any): SubscriptionKeysContract { + return { + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + }; +} + +/** Tag-API link details. */ +export interface TagApiLinkContract extends ProxyResource { + /** Full resource Id of an API. */ + apiId?: string; +} + +export function tagApiLinkContractSerializer(item: TagApiLinkContract): any { + return { + properties: areAllPropsUndefined(item, ["apiId"]) + ? undefined + : _tagApiLinkContractPropertiesSerializer(item), + }; +} + +export function tagApiLinkContractDeserializer(item: any): TagApiLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tagApiLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tag-API link entity properties. */ +export interface TagApiLinkContractProperties { + /** Full resource Id of an API. */ + apiId: string; +} + +export function tagApiLinkContractPropertiesSerializer(item: TagApiLinkContractProperties): any { + return { apiId: item["apiId"] }; +} + +export function tagApiLinkContractPropertiesDeserializer(item: any): TagApiLinkContractProperties { + return { + apiId: item["apiId"], + }; +} + +/** Paged Tag-API link list representation. */ +export interface _TagApiLinkCollection { + /** Page values. */ + value?: TagApiLinkContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagApiLinkCollectionDeserializer(item: any): _TagApiLinkCollection { + return { + value: !item["value"] ? item["value"] : tagApiLinkContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagApiLinkContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return tagApiLinkContractSerializer(item); + }); +} + +export function tagApiLinkContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return tagApiLinkContractDeserializer(item); + }); +} + +/** Tag-operation link details. */ +export interface TagOperationLinkContract extends ProxyResource { + /** Full resource Id of an API operation. */ + operationId?: string; +} + +export function tagOperationLinkContractSerializer(item: TagOperationLinkContract): any { + return { + properties: areAllPropsUndefined(item, ["operationId"]) + ? undefined + : _tagOperationLinkContractPropertiesSerializer(item), + }; +} + +export function tagOperationLinkContractDeserializer(item: any): TagOperationLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tagOperationLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tag-operation link entity properties. */ +export interface TagOperationLinkContractProperties { + /** Full resource Id of an API operation. */ + operationId: string; +} + +export function tagOperationLinkContractPropertiesSerializer( + item: TagOperationLinkContractProperties, +): any { + return { operationId: item["operationId"] }; +} + +export function tagOperationLinkContractPropertiesDeserializer( + item: any, +): TagOperationLinkContractProperties { + return { + operationId: item["operationId"], + }; +} + +/** Paged Tag-operation link list representation. */ +export interface _TagOperationLinkCollection { + /** Page values. */ + value?: TagOperationLinkContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagOperationLinkCollectionDeserializer(item: any): _TagOperationLinkCollection { + return { + value: !item["value"] + ? item["value"] + : tagOperationLinkContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagOperationLinkContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return tagOperationLinkContractSerializer(item); + }); +} + +export function tagOperationLinkContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tagOperationLinkContractDeserializer(item); + }); +} + +/** Tag-product link details. */ +export interface TagProductLinkContract extends ProxyResource { + /** Full resource Id of a product. */ + productId?: string; +} + +export function tagProductLinkContractSerializer(item: TagProductLinkContract): any { + return { + properties: areAllPropsUndefined(item, ["productId"]) + ? undefined + : _tagProductLinkContractPropertiesSerializer(item), + }; +} + +export function tagProductLinkContractDeserializer(item: any): TagProductLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tagProductLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tag-product link entity properties. */ +export interface TagProductLinkContractProperties { + /** Full resource Id of a product. */ + productId: string; +} + +export function tagProductLinkContractPropertiesSerializer( + item: TagProductLinkContractProperties, +): any { + return { productId: item["productId"] }; +} + +export function tagProductLinkContractPropertiesDeserializer( + item: any, +): TagProductLinkContractProperties { + return { + productId: item["productId"], + }; +} + +/** Paged Tag-product link list representation. */ +export interface _TagProductLinkCollection { + /** Page values. */ + value?: TagProductLinkContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagProductLinkCollectionDeserializer(item: any): _TagProductLinkCollection { + return { + value: !item["value"] ? item["value"] : tagProductLinkContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagProductLinkContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return tagProductLinkContractSerializer(item); + }); +} + +export function tagProductLinkContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tagProductLinkContractDeserializer(item); + }); +} + +/** Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. */ +export interface _OperationListResult { + /** List of operations supported by the resource provider. */ + value?: Operation[]; + /** URL to get the next set of operation list results if there are any. */ + nextLink?: string; +} + +export function _operationListResultDeserializer(item: any): _OperationListResult { + return { + value: !item["value"] ? item["value"] : operationArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function operationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return operationDeserializer(item); + }); +} + +/** REST API operation */ +export interface Operation { + /** Operation name: {provider}/{resource}/{operation} */ + name?: string; + /** The object that describes the operation. */ + display?: OperationDisplay; + /** The operation origin. */ + origin?: string; + /** The operation properties. */ + properties?: any; +} + +export function operationDeserializer(item: any): Operation { + return { + name: item["name"], + display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]), + origin: item["origin"], + properties: item["properties"], + }; +} + +/** The object that describes the operation. */ +export interface OperationDisplay { + /** Friendly name of the resource provider */ + provider?: string; + /** Operation type: read, write, delete, listKeys/action, etc. */ + operation?: string; + /** Resource type on which the operation is performed. */ + resource?: string; + /** Friendly name of the operation */ + description?: string; +} + +export function operationDisplayDeserializer(item: any): OperationDisplay { + return { + provider: item["provider"], + operation: item["operation"], + resource: item["resource"], + description: item["description"], + }; +} + +/** A single API Management gateway resource in List or Get response. */ +export interface ApiManagementGatewayResource extends TrackedResource { + /** SKU properties of the API Management gateway. */ + sku: ApiManagementGatewaySkuProperties; + /** ETag of the resource. */ + readonly etag?: string; + /** The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Information regarding how the gateway should be exposed. */ + frontend?: FrontendConfiguration; + /** Information regarding how the gateway should integrate with backend systems. */ + backend?: BackendConfiguration; + /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ + configurationApi?: GatewayConfigurationApi; + /** The type of VPN in which API Management gateway needs to be configured in. */ + virtualNetworkType?: VirtualNetworkType; +} + +export function apiManagementGatewayResourceSerializer(item: ApiManagementGatewayResource): any { + return { + tags: item["tags"], + location: item["location"], + properties: _apiManagementGatewayResourcePropertiesSerializer(item), + sku: apiManagementGatewaySkuPropertiesSerializer(item["sku"]), + }; +} + +export function apiManagementGatewayResourceDeserializer(item: any): ApiManagementGatewayResource { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._apiManagementGatewayResourcePropertiesDeserializer(item["properties"]), + sku: apiManagementGatewaySkuPropertiesDeserializer(item["sku"]), + etag: item["etag"], + }; +} + +/** Properties of an API Management gateway resource description. */ +export interface ApiManagementGatewayProperties extends ApiManagementGatewayBaseProperties {} + +export function apiManagementGatewayPropertiesSerializer( + item: ApiManagementGatewayProperties, +): any { + return { + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationSerializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationSerializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiSerializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +export function apiManagementGatewayPropertiesDeserializer( + item: any, +): ApiManagementGatewayProperties { + return { + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationDeserializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationDeserializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiDeserializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +/** API Management gateway resource SKU properties. */ +export interface ApiManagementGatewaySkuProperties { + /** Name of the Sku. */ + name: ApiGatewaySkuType; + /** Capacity of the SKU (number of deployed units of the SKU) */ + capacity?: number; +} + +export function apiManagementGatewaySkuPropertiesSerializer( + item: ApiManagementGatewaySkuProperties, +): any { + return { name: item["name"], capacity: item["capacity"] }; +} + +export function apiManagementGatewaySkuPropertiesDeserializer( + item: any, +): ApiManagementGatewaySkuProperties { + return { + name: item["name"], + capacity: item["capacity"], + }; +} + +/** Name of the Sku. */ +export enum KnownApiGatewaySkuType { + /** Standard SKU of the API gateway. */ + Standard = "Standard", + /** Standard SKU of the API gateway to be used in Workspaces. */ + WorkspaceGatewayStandard = "WorkspaceGatewayStandard", + /** Premium SKU of the API gateway to be used in Workspaces. */ + WorkspaceGatewayPremium = "WorkspaceGatewayPremium", +} + +/** + * Name of the Sku. \ + * {@link KnownApiGatewaySkuType} can be used interchangeably with ApiGatewaySkuType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard**: Standard SKU of the API gateway. \ + * **WorkspaceGatewayStandard**: Standard SKU of the API gateway to be used in Workspaces. \ + * **WorkspaceGatewayPremium**: Premium SKU of the API gateway to be used in Workspaces. + */ +export type ApiGatewaySkuType = string; + +/** Base Properties of an API Management gateway resource description. */ +export interface ApiManagementGatewayBaseProperties { + /** The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Information regarding how the gateway should be exposed. */ + frontend?: FrontendConfiguration; + /** Information regarding how the gateway should integrate with backend systems. */ + backend?: BackendConfiguration; + /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ + configurationApi?: GatewayConfigurationApi; + /** The type of VPN in which API Management gateway needs to be configured in. */ + virtualNetworkType?: VirtualNetworkType; +} + +export function apiManagementGatewayBasePropertiesSerializer( + item: ApiManagementGatewayBaseProperties, +): any { + return { + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationSerializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationSerializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiSerializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +export function apiManagementGatewayBasePropertiesDeserializer( + item: any, +): ApiManagementGatewayBaseProperties { + return { + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationDeserializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationDeserializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiDeserializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +/** Information regarding how the gateway should be exposed. */ +export interface FrontendConfiguration { + /** The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. */ + readonly defaultHostname?: string; +} + +export function frontendConfigurationSerializer(_item: FrontendConfiguration): any { + return {}; +} + +export function frontendConfigurationDeserializer(item: any): FrontendConfiguration { + return { + defaultHostname: item["defaultHostname"], + }; +} + +/** Information regarding how the gateway should integrate with backend systems. */ +export interface BackendConfiguration { + /** The default hostname of the data-plane gateway to which requests can be sent. */ + subnet?: BackendSubnetConfiguration; +} + +export function backendConfigurationSerializer(item: BackendConfiguration): any { + return { + subnet: !item["subnet"] ? item["subnet"] : backendSubnetConfigurationSerializer(item["subnet"]), + }; +} + +export function backendConfigurationDeserializer(item: any): BackendConfiguration { + return { + subnet: !item["subnet"] + ? item["subnet"] + : backendSubnetConfigurationDeserializer(item["subnet"]), + }; +} + +/** Information regarding how the subnet to which the gateway should be injected. */ +export interface BackendSubnetConfiguration { + /** The ARM ID of the subnet in which the backend systems are hosted. */ + id?: string; +} + +export function backendSubnetConfigurationSerializer(item: BackendSubnetConfiguration): any { + return { id: item["id"] }; +} + +export function backendSubnetConfigurationDeserializer(item: any): BackendSubnetConfiguration { + return { + id: item["id"], + }; +} + +/** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ +export interface GatewayConfigurationApi { + /** Hostname to which the agent connects to propagate configuration to the cloud. */ + readonly hostname?: string; +} + +export function gatewayConfigurationApiSerializer(_item: GatewayConfigurationApi): any { + return {}; +} + +export function gatewayConfigurationApiDeserializer(item: any): GatewayConfigurationApi { + return { + hostname: item["hostname"], + }; +} + +/** The type of VPN in which API Management gateway needs to be configured in. */ +export enum KnownVirtualNetworkType { + /** The API Management gateway is not part of any Virtual Network. */ + None = "None", + /** The API Management gateway is part of Virtual Network and it is accessible from Internet. */ + External = "External", + /** The API Management gateway is part of Virtual Network and it is only accessible from within the virtual network. */ + Internal = "Internal", +} + +/** + * The type of VPN in which API Management gateway needs to be configured in. \ + * {@link KnownVirtualNetworkType} can be used interchangeably with VirtualNetworkType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: The API Management gateway is not part of any Virtual Network. \ + * **External**: The API Management gateway is part of Virtual Network and it is accessible from Internet. \ + * **Internal**: The API Management gateway is part of Virtual Network and it is only accessible from within the virtual network. + */ +export type VirtualNetworkType = string; + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: Record; + /** The geo-location where the resource lives */ + location: string; +} + +export function trackedResourceSerializer(item: TrackedResource): any { + return { tags: item["tags"], location: item["location"] }; +} + +export function trackedResourceDeserializer(item: any): TrackedResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + }; +} + +/** Parameter supplied to Update API Management gateway. */ +export interface ApiManagementGatewayUpdateParameters extends ApimResource { + /** SKU properties of the API Management gateway. */ + sku?: ApiManagementGatewaySkuPropertiesForPatch; + /** ETag of the resource. */ + readonly etag?: string; + /** The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Information regarding how the gateway should be exposed. */ + frontend?: FrontendConfiguration; + /** Information regarding how the gateway should integrate with backend systems. */ + backend?: BackendConfiguration; + /** Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. */ + configurationApi?: GatewayConfigurationApi; + /** The type of VPN in which API Management gateway needs to be configured in. */ + virtualNetworkType?: VirtualNetworkType; +} + +export function apiManagementGatewayUpdateParametersSerializer( + item: ApiManagementGatewayUpdateParameters, +): any { + return { + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "frontend", + "backend", + "configurationApi", + "virtualNetworkType", + ]) + ? undefined + : _apiManagementGatewayUpdateParametersPropertiesSerializer(item), + sku: !item["sku"] + ? item["sku"] + : apiManagementGatewaySkuPropertiesForPatchSerializer(item["sku"]), + }; +} + +/** Properties of an API Management gateway resource description. */ +export interface ApiManagementGatewayUpdateProperties extends ApiManagementGatewayBaseProperties {} + +export function apiManagementGatewayUpdatePropertiesSerializer( + item: ApiManagementGatewayUpdateProperties, +): any { + return { + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationSerializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationSerializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiSerializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +/** API Management gateway resource SKU properties for PATCH operations given nothing should be required. */ +export interface ApiManagementGatewaySkuPropertiesForPatch { + /** Name of the Sku. */ + name?: ApiGatewaySkuType; + /** Capacity of the SKU (number of deployed units of the SKU) */ + capacity?: number; +} + +export function apiManagementGatewaySkuPropertiesForPatchSerializer( + item: ApiManagementGatewaySkuPropertiesForPatch, +): any { + return { name: item["name"], capacity: item["capacity"] }; +} + +/** The Resource definition. */ +export interface ApimResource { + /** Resource ID. */ + readonly id?: string; + /** Resource name. */ + readonly name?: string; + /** Resource type for API Management resource is set to Microsoft.ApiManagement. */ + readonly type?: string; + /** Resource tags. */ + tags?: Record; +} + +export function apimResourceSerializer(item: ApimResource): any { + return { tags: item["tags"] }; +} + +/** The response of the List API Management gateway operation. */ +export interface _ApiManagementGatewayListResult { + /** Result of the List API Management gateway operation. */ + value: ApiManagementGatewayResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; +} + +export function _apiManagementGatewayListResultDeserializer( + item: any, +): _ApiManagementGatewayListResult { + return { + value: apiManagementGatewayResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function apiManagementGatewayResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementGatewayResourceSerializer(item); + }); +} + +export function apiManagementGatewayResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementGatewayResourceDeserializer(item); + }); +} + +/** The API Management gateway SKUs operation response. */ +export interface _GatewayResourceSkuResults { + /** The list of skus available for the gateway. */ + value: GatewayResourceSkuResult[]; + /** The uri to fetch the next page of API Management gateway Skus. */ + nextLink?: string; +} + +export function _gatewayResourceSkuResultsDeserializer(item: any): _GatewayResourceSkuResults { + return { + value: gatewayResourceSkuResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function gatewayResourceSkuResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayResourceSkuResultDeserializer(item); + }); +} + +/** Describes an available API Management gateway SKU. */ +export interface GatewayResourceSkuResult { + /** The type of resource the SKU applies to. */ + readonly resourceType?: string; + /** Specifies API Management gateway SKU. */ + readonly sku?: GatewaySku; + /** Specifies the number of API Management gateway units. */ + readonly capacity?: GatewaySkuCapacity; +} + +export function gatewayResourceSkuResultDeserializer(item: any): GatewayResourceSkuResult { + return { + resourceType: item["resourceType"], + sku: !item["sku"] ? item["sku"] : gatewaySkuDeserializer(item["sku"]), + capacity: !item["capacity"] + ? item["capacity"] + : gatewaySkuCapacityDeserializer(item["capacity"]), + }; +} + +/** Describes an available API Management SKU for gateways. */ +export interface GatewaySku { + /** Name of the Sku. */ + name?: ApiGatewaySkuType; +} + +export function gatewaySkuDeserializer(item: any): GatewaySku { + return { + name: item["name"], + }; +} + +/** Describes scaling information of a SKU. */ +export interface GatewaySkuCapacity { + /** The minimum capacity. */ + readonly minimum?: number; + /** The maximum capacity that can be set. */ + readonly maximum?: number; + /** The default capacity. */ + readonly default?: number; + /** The scale type applicable to the sku. */ + readonly scaleType?: GatewaySkuCapacityScaleType; +} + +export function gatewaySkuCapacityDeserializer(item: any): GatewaySkuCapacity { + return { + minimum: item["minimum"], + maximum: item["maximum"], + default: item["default"], + scaleType: item["scaleType"], + }; +} + +/** The scale type applicable to the sku. */ +export enum KnownGatewaySkuCapacityScaleType { + /** Supported scale type automatic. */ + Automatic = "Automatic", + /** Supported scale type manual. */ + Manual = "Manual", + /** Scaling not supported. */ + None = "None", +} + +/** + * The scale type applicable to the sku. \ + * {@link KnownGatewaySkuCapacityScaleType} can be used interchangeably with GatewaySkuCapacityScaleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automatic**: Supported scale type automatic. \ + * **Manual**: Supported scale type manual. \ + * **None**: Scaling not supported. + */ +export type GatewaySkuCapacityScaleType = string; + +/** Paged Tag list representation. */ +export interface _TagResourceCollection { + /** Page values. */ + value?: TagResourceContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagResourceCollectionDeserializer(item: any): _TagResourceCollection { + return { + value: !item["value"] ? item["value"] : tagResourceContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagResourceContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return tagResourceContractDeserializer(item); + }); +} + +/** TagResource contract properties. */ +export interface TagResourceContract { + /** Tag associated with the resource. */ + tag: TagTagResourceContractProperties; + /** API associated with the tag. */ + api?: ApiTagResourceContractProperties; + /** Operation associated with the tag. */ + operation?: OperationTagResourceContractProperties; + /** Product associated with the tag. */ + product?: ProductTagResourceContractProperties; +} + +export function tagResourceContractDeserializer(item: any): TagResourceContract { + return { + tag: tagTagResourceContractPropertiesDeserializer(item["tag"]), + api: !item["api"] ? item["api"] : apiTagResourceContractPropertiesDeserializer(item["api"]), + operation: !item["operation"] + ? item["operation"] + : operationTagResourceContractPropertiesDeserializer(item["operation"]), + product: !item["product"] + ? item["product"] + : productTagResourceContractPropertiesDeserializer(item["product"]), + }; +} + +/** Contract defining the Tag property in the Tag Resource Contract */ +export interface TagTagResourceContractProperties { + /** Tag identifier */ + id?: string; + /** Tag Name */ + name?: string; +} + +export function tagTagResourceContractPropertiesDeserializer( + item: any, +): TagTagResourceContractProperties { + return { + id: item["id"], + name: item["name"], + }; +} + +/** API contract properties for the Tag Resources. */ +export interface ApiTagResourceContractProperties extends ApiEntityBaseContract { + /** API identifier in the form /apis/{apiId}. */ + id?: string; + /** API name. */ + name?: string; + /** Absolute URL of the backend service implementing this API. */ + serviceUrl?: string; + /** Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. */ + path?: string; + /** Describes on which protocols the operations in this API can be invoked. */ + protocols?: Protocol[]; +} + +export function apiTagResourceContractPropertiesDeserializer( + item: any, +): ApiTagResourceContractProperties { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractDeserializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractDeserializer(item["subscriptionKeyParameterNames"]), + apiType: item["type"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + isOnline: item["isOnline"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] + ? item["contact"] + : apiContactInformationDeserializer(item["contact"]), + license: !item["license"] + ? item["license"] + : apiLicenseInformationDeserializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesDeserializer(item["mcpProperties"]), + id: item["id"], + name: item["name"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + }; +} + +/** Operation Entity contract Properties. */ +export interface OperationTagResourceContractProperties { + /** Identifier of the operation in form /operations/{operationId}. */ + id?: string; + /** Operation name. */ + readonly name?: string; + /** API Name. */ + readonly apiName?: string; + /** API Revision. */ + readonly apiRevision?: string; + /** API Version. */ + readonly apiVersion?: string; + /** Operation Description. */ + readonly description?: string; + /** A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. */ + readonly method?: string; + /** Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} */ + readonly urlTemplate?: string; +} + +export function operationTagResourceContractPropertiesDeserializer( + item: any, +): OperationTagResourceContractProperties { + return { + id: item["id"], + name: item["name"], + apiName: item["apiName"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + description: item["description"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +/** Product profile. */ +export interface ProductTagResourceContractProperties extends ProductEntityBaseParameters { + /** Identifier of the product in the form of /products/{productId} */ + id?: string; + /** Product name. */ + name: string; +} + +export function productTagResourceContractPropertiesDeserializer( + item: any, +): ProductTagResourceContractProperties { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationDeserializer(item["application"]), + state: item["state"], + id: item["id"], + name: item["name"], + }; +} + +/** Paged API Revision list representation. */ +export interface _ApiRevisionCollection { + /** Page values. */ + readonly value?: ApiRevisionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _apiRevisionCollectionDeserializer(item: any): _ApiRevisionCollection { + return { + value: !item["value"] ? item["value"] : apiRevisionContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function apiRevisionContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return apiRevisionContractDeserializer(item); + }); +} + +/** Summary of revision metadata. */ +export interface ApiRevisionContract { + /** Identifier of the API Revision. */ + readonly apiId?: string; + /** Revision number of API. */ + readonly apiRevision?: string; + /** The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + readonly createdDateTime?: Date; + /** The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + readonly updatedDateTime?: Date; + /** Description of the API Revision. */ + readonly description?: string; + /** Gateway URL for accessing the non-current API Revision. */ + readonly privateUrl?: string; + /** Indicates if API revision is the current api revision. */ + readonly isOnline?: boolean; + /** Indicates if API revision is accessible via the gateway. */ + readonly isCurrent?: boolean; +} + +export function apiRevisionContractDeserializer(item: any): ApiRevisionContract { + return { + apiId: item["apiId"], + apiRevision: item["apiRevision"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + updatedDateTime: !item["updatedDateTime"] + ? item["updatedDateTime"] + : new Date(item["updatedDateTime"]), + description: item["description"], + privateUrl: item["privateUrl"], + isOnline: item["isOnline"], + isCurrent: item["isCurrent"], + }; +} + +/** A single API Management service resource in List or Get response. */ +export interface ApiManagementServiceResource extends TrackedResource { + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** ETag of the resource. */ + readonly etag?: string; + /** The availability zones. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management service, which is targeted by the long running operation started on the service. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Gateway URL of the API Management service. */ + readonly gatewayUrl?: string; + /** Gateway URL of the API Management service in the Default Region. */ + readonly gatewayRegionalUrl?: string; + /** Publisher portal endpoint Url of the API Management service. */ + readonly portalUrl?: string; + /** Management API endpoint URL of the API Management service. */ + readonly managementApiUrl?: string; + /** SCM endpoint URL of the API Management service. */ + readonly scmUrl?: string; + /** DEveloper Portal endpoint URL of the API Management service. */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly publicIPAddresses?: string[]; + /** Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Configuration API configuration of the API Management service. */ + configurationApi?: ConfigurationApi; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: Record; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** Compute Platform Version running the service in this location. */ + readonly platformVersion?: PlatformVersion; + /** Status of legacy portal in the API Management service. */ + legacyPortalStatus?: LegacyPortalStatus; + /** Status of developer portal in this API Management service. */ + developerPortalStatus?: DeveloperPortalStatus; + /** Release Channel of this API Management service. */ + releaseChannel?: ReleaseChannel; + /** Zone Redundant Requirement when creating StandardV2 and PremiumV2. If this flag is set to True, will return a APIM service with Zone redundant or fail the request if any underneath component cannot be zone redundant. */ + zoneRedundant?: boolean; + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; +} + +export function apiManagementServiceResourceSerializer(item: ApiManagementServiceResource): any { + return { + tags: item["tags"], + location: item["location"], + properties: _apiManagementServiceResourcePropertiesSerializer(item), + sku: apiManagementServiceSkuPropertiesSerializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : apiManagementServiceIdentitySerializer(item["identity"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +export function apiManagementServiceResourceDeserializer(item: any): ApiManagementServiceResource { + return { + tags: !item["tags"] + ? item["tags"] + : Object.fromEntries(Object.entries(item["tags"]).map(([k, p]: [string, any]) => [k, p])), + location: item["location"], + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._apiManagementServiceResourcePropertiesDeserializer(item["properties"]), + sku: apiManagementServiceSkuPropertiesDeserializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : apiManagementServiceIdentityDeserializer(item["identity"]), + etag: item["etag"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Properties of an API Management service resource description. */ +export interface ApiManagementServiceProperties extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail: string; + /** Publisher name. */ + publisherName: string; +} + +export function apiManagementServicePropertiesSerializer( + item: ApiManagementServiceProperties, +): any { + return { + notificationSenderEmail: item["notificationSenderEmail"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArraySerializer(item["hostnameConfigurations"]), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiSerializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArraySerializer(item["additionalLocations"]), + customProperties: item["customProperties"], + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArraySerializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintSerializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArraySerializer(item["privateEndpointConnections"]), + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +export function apiManagementServicePropertiesDeserializer( + item: any, +): ApiManagementServiceProperties { + return { + notificationSenderEmail: item["notificationSenderEmail"], + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + gatewayUrl: item["gatewayUrl"], + gatewayRegionalUrl: item["gatewayRegionalUrl"], + portalUrl: item["portalUrl"], + managementApiUrl: item["managementApiUrl"], + scmUrl: item["scmUrl"], + developerPortalUrl: item["developerPortalUrl"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArrayDeserializer(item["hostnameConfigurations"]), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : item["publicIPAddresses"].map((p: any) => { + return p; + }), + privateIPAddresses: !item["privateIPAddresses"] + ? item["privateIPAddresses"] + : item["privateIPAddresses"].map((p: any) => { + return p; + }), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiDeserializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationDeserializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArrayDeserializer(item["additionalLocations"]), + customProperties: !item["customProperties"] + ? item["customProperties"] + : Object.fromEntries( + Object.entries(item["customProperties"]).map(([k, p]: [string, any]) => [k, p]), + ), + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArrayDeserializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + outboundPublicIPAddresses: !item["outboundPublicIPAddresses"] + ? item["outboundPublicIPAddresses"] + : item["outboundPublicIPAddresses"].map((p: any) => { + return p; + }), + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintDeserializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArrayDeserializer(item["privateEndpointConnections"]), + platformVersion: item["platformVersion"], + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +/** API Management service resource SKU properties. */ +export interface ApiManagementServiceSkuProperties { + /** Name of the Sku. */ + name: SkuType; + /** Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. */ + capacity: number; +} + +export function apiManagementServiceSkuPropertiesSerializer( + item: ApiManagementServiceSkuProperties, +): any { + return { name: item["name"], capacity: item["capacity"] }; +} + +export function apiManagementServiceSkuPropertiesDeserializer( + item: any, +): ApiManagementServiceSkuProperties { + return { + name: item["name"], + capacity: item["capacity"], + }; +} + +/** Name of the Sku. */ +export enum KnownSkuType { + /** Developer SKU of Api Management. */ + Developer = "Developer", + /** Standard SKU of Api Management. */ + Standard = "Standard", + /** Premium SKU of Api Management. */ + Premium = "Premium", + /** Basic SKU of Api Management. */ + Basic = "Basic", + /** Consumption SKU of Api Management. */ + Consumption = "Consumption", + /** Isolated SKU of Api Management. */ + Isolated = "Isolated", + /** BasicV2 SKU of Api Management. */ + BasicV2 = "BasicV2", + /** StandardV2 SKU of Api Management. */ + StandardV2 = "StandardV2", + /** PremiumV2 SKU of Api Management. */ + PremiumV2 = "PremiumV2", +} + +/** + * Name of the Sku. \ + * {@link KnownSkuType} can be used interchangeably with SkuType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Developer**: Developer SKU of Api Management. \ + * **Standard**: Standard SKU of Api Management. \ + * **Premium**: Premium SKU of Api Management. \ + * **Basic**: Basic SKU of Api Management. \ + * **Consumption**: Consumption SKU of Api Management. \ + * **Isolated**: Isolated SKU of Api Management. \ + * **BasicV2**: BasicV2 SKU of Api Management. \ + * **StandardV2**: StandardV2 SKU of Api Management. \ + * **PremiumV2**: PremiumV2 SKU of Api Management. + */ +export type SkuType = string; + +/** Identity properties of the Api Management service resource. */ +export interface ApiManagementServiceIdentity { + /** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type: ApimIdentityType; + /** The principal id of the identity. */ + readonly principalId?: string; + /** The client tenant id of the identity. */ + readonly tenantId?: string; + /** + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: Record; +} + +export function apiManagementServiceIdentitySerializer(item: ApiManagementServiceIdentity): any { + return { + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : userIdentityPropertiesRecordSerializer(item["userAssignedIdentities"]), + }; +} + +export function apiManagementServiceIdentityDeserializer(item: any): ApiManagementServiceIdentity { + return { + type: item["type"], + principalId: item["principalId"], + tenantId: item["tenantId"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : userIdentityPropertiesRecordDeserializer(item["userAssignedIdentities"]), + }; +} + +/** The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ +export enum KnownApimIdentityType { + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssigned, UserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", + /** None */ + None = "None", +} + +/** + * The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. \ + * {@link KnownApimIdentityType} can be used interchangeably with ApimIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned, UserAssigned** \ + * **None** + */ +export type ApimIdentityType = string; + +export function userIdentityPropertiesRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : userIdentityPropertiesSerializer(item[key]); + }); + return result; +} + +export function userIdentityPropertiesRecordDeserializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : userIdentityPropertiesDeserializer(item[key]); + }); + return result; +} + +/** model interface UserIdentityProperties */ +export interface UserIdentityProperties { + /** The principal id of user assigned identity. */ + principalId?: string; + /** The client id of user assigned identity. */ + clientId?: string; +} + +export function userIdentityPropertiesSerializer(item: UserIdentityProperties): any { + return { principalId: item["principalId"], clientId: item["clientId"] }; +} + +export function userIdentityPropertiesDeserializer(item: any): UserIdentityProperties { + return { + principalId: item["principalId"], + clientId: item["clientId"], + }; +} + +/** Base Properties of an API Management service resource description. */ +export interface ApiManagementServiceBaseProperties { + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management service, which is targeted by the long running operation started on the service. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Gateway URL of the API Management service. */ + readonly gatewayUrl?: string; + /** Gateway URL of the API Management service in the Default Region. */ + readonly gatewayRegionalUrl?: string; + /** Publisher portal endpoint Url of the API Management service. */ + readonly portalUrl?: string; + /** Management API endpoint URL of the API Management service. */ + readonly managementApiUrl?: string; + /** SCM endpoint URL of the API Management service. */ + readonly scmUrl?: string; + /** DEveloper Portal endpoint URL of the API Management service. */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly publicIPAddresses?: string[]; + /** Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Configuration API configuration of the API Management service. */ + configurationApi?: ConfigurationApi; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: Record; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** Compute Platform Version running the service in this location. */ + readonly platformVersion?: PlatformVersion; + /** Status of legacy portal in the API Management service. */ + legacyPortalStatus?: LegacyPortalStatus; + /** Status of developer portal in this API Management service. */ + developerPortalStatus?: DeveloperPortalStatus; + /** Release Channel of this API Management service. */ + releaseChannel?: ReleaseChannel; + /** Zone Redundant Requirement when creating StandardV2 and PremiumV2. If this flag is set to True, will return a APIM service with Zone redundant or fail the request if any underneath component cannot be zone redundant. */ + zoneRedundant?: boolean; +} + +export function apiManagementServiceBasePropertiesSerializer( + item: ApiManagementServiceBaseProperties, +): any { + return { + notificationSenderEmail: item["notificationSenderEmail"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArraySerializer(item["hostnameConfigurations"]), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiSerializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArraySerializer(item["additionalLocations"]), + customProperties: item["customProperties"], + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArraySerializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintSerializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArraySerializer(item["privateEndpointConnections"]), + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + }; +} + +export function apiManagementServiceBasePropertiesDeserializer( + item: any, +): ApiManagementServiceBaseProperties { + return { + notificationSenderEmail: item["notificationSenderEmail"], + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + gatewayUrl: item["gatewayUrl"], + gatewayRegionalUrl: item["gatewayRegionalUrl"], + portalUrl: item["portalUrl"], + managementApiUrl: item["managementApiUrl"], + scmUrl: item["scmUrl"], + developerPortalUrl: item["developerPortalUrl"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArrayDeserializer(item["hostnameConfigurations"]), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : item["publicIPAddresses"].map((p: any) => { + return p; + }), + privateIPAddresses: !item["privateIPAddresses"] + ? item["privateIPAddresses"] + : item["privateIPAddresses"].map((p: any) => { + return p; + }), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiDeserializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationDeserializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArrayDeserializer(item["additionalLocations"]), + customProperties: !item["customProperties"] + ? item["customProperties"] + : Object.fromEntries( + Object.entries(item["customProperties"]).map(([k, p]: [string, any]) => [k, p]), + ), + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArrayDeserializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + outboundPublicIPAddresses: !item["outboundPublicIPAddresses"] + ? item["outboundPublicIPAddresses"] + : item["outboundPublicIPAddresses"].map((p: any) => { + return p; + }), + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintDeserializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArrayDeserializer(item["privateEndpointConnections"]), + platformVersion: item["platformVersion"], + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + }; +} + +export function hostnameConfigurationArraySerializer(result: Array): any[] { + return result.map((item) => { + return hostnameConfigurationSerializer(item); + }); +} + +export function hostnameConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return hostnameConfigurationDeserializer(item); + }); +} + +/** Custom hostname configuration. */ +export interface HostnameConfiguration { + /** Hostname type. */ + type: HostnameType; + /** Hostname to configure on the Api Management service. */ + hostName: string; + /** Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* */ + keyVaultId?: string; + /** System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. */ + identityClientId?: string; + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. */ + defaultSslBinding?: boolean; + /** Specify true to always negotiate client certificate on the hostname. Default Value is false. */ + negotiateClientCertificate?: boolean; + /** Certificate information. */ + certificate?: CertificateInformation; + /** Certificate Source. */ + certificateSource?: CertificateSource; + /** Certificate Status. */ + certificateStatus?: CertificateStatus; +} + +export function hostnameConfigurationSerializer(item: HostnameConfiguration): any { + return { + type: item["type"], + hostName: item["hostName"], + keyVaultId: item["keyVaultId"], + identityClientId: item["identityClientId"], + encodedCertificate: item["encodedCertificate"], + certificatePassword: item["certificatePassword"], + defaultSslBinding: item["defaultSslBinding"], + negotiateClientCertificate: item["negotiateClientCertificate"], + certificate: !item["certificate"] + ? item["certificate"] + : certificateInformationSerializer(item["certificate"]), + certificateSource: item["certificateSource"], + certificateStatus: item["certificateStatus"], + }; +} + +export function hostnameConfigurationDeserializer(item: any): HostnameConfiguration { + return { + type: item["type"], + hostName: item["hostName"], + keyVaultId: item["keyVaultId"], + identityClientId: item["identityClientId"], + encodedCertificate: item["encodedCertificate"], + certificatePassword: item["certificatePassword"], + defaultSslBinding: item["defaultSslBinding"], + negotiateClientCertificate: item["negotiateClientCertificate"], + certificate: !item["certificate"] + ? item["certificate"] + : certificateInformationDeserializer(item["certificate"]), + certificateSource: item["certificateSource"], + certificateStatus: item["certificateStatus"], + }; +} + +/** Hostname type. */ +export enum KnownHostnameType { + /** Proxy */ + Proxy = "Proxy", + /** Portal */ + Portal = "Portal", + /** Management */ + Management = "Management", + /** Scm */ + Scm = "Scm", + /** DeveloperPortal */ + DeveloperPortal = "DeveloperPortal", + /** ConfigurationApi */ + ConfigurationApi = "ConfigurationApi", +} + +/** + * Hostname type. \ + * {@link KnownHostnameType} can be used interchangeably with HostnameType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Proxy** \ + * **Portal** \ + * **Management** \ + * **Scm** \ + * **DeveloperPortal** \ + * **ConfigurationApi** + */ +export type HostnameType = string; + +/** SSL certificate information. */ +export interface CertificateInformation { + /** Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry: Date; + /** Thumbprint of the certificate. */ + thumbprint: string; + /** Subject of the certificate. */ + subject: string; +} + +export function certificateInformationSerializer(item: CertificateInformation): any { + return { + expiry: item["expiry"].toISOString(), + thumbprint: item["thumbprint"], + subject: item["subject"], + }; +} + +export function certificateInformationDeserializer(item: any): CertificateInformation { + return { + expiry: new Date(item["expiry"]), + thumbprint: item["thumbprint"], + subject: item["subject"], + }; +} + +/** Certificate Source. */ +export enum KnownCertificateSource { + /** Managed */ + Managed = "Managed", + /** KeyVault */ + KeyVault = "KeyVault", + /** Custom */ + Custom = "Custom", + /** BuiltIn */ + BuiltIn = "BuiltIn", +} + +/** + * Certificate Source. \ + * {@link KnownCertificateSource} can be used interchangeably with CertificateSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Managed** \ + * **KeyVault** \ + * **Custom** \ + * **BuiltIn** + */ +export type CertificateSource = string; + +/** Certificate Status. */ +export enum KnownCertificateStatus { + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress", +} + +/** + * Certificate Status. \ + * {@link KnownCertificateStatus} can be used interchangeably with CertificateStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Completed** \ + * **Failed** \ + * **InProgress** + */ +export type CertificateStatus = string; + +/** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ +export enum KnownPublicNetworkAccess { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + +/** Information regarding the Configuration API of the API Management service. */ +export interface ConfigurationApi { + /** Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' */ + legacyApi?: LegacyApiState; +} + +export function configurationApiSerializer(item: ConfigurationApi): any { + return { legacyApi: item["legacyApi"] }; +} + +export function configurationApiDeserializer(item: any): ConfigurationApi { + return { + legacyApi: item["legacyApi"], + }; +} + +/** Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' */ +export enum KnownLegacyApiState { + /** Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to it. */ + Enabled = "Enabled", + /** Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect to it. */ + Disabled = "Disabled", +} + +/** + * Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' \ + * {@link KnownLegacyApiState} can be used interchangeably with LegacyApiState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to it. \ + * **Disabled**: Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect to it. + */ +export type LegacyApiState = string; + +/** Configuration of a virtual network to which API Management service is deployed. */ +export interface VirtualNetworkConfiguration { + /** The virtual network ID. This is typically a GUID. Expect a null GUID by default. */ + readonly vnetid?: string; + /** The name of the subnet. */ + readonly subnetname?: string; + /** The full resource ID of a subnet in a virtual network to deploy the API Management service in. */ + subnetResourceId?: string; +} + +export function virtualNetworkConfigurationSerializer(item: VirtualNetworkConfiguration): any { + return { subnetResourceId: item["subnetResourceId"] }; +} + +export function virtualNetworkConfigurationDeserializer(item: any): VirtualNetworkConfiguration { + return { + vnetid: item["vnetid"], + subnetname: item["subnetname"], + subnetResourceId: item["subnetResourceId"], + }; +} + +export function additionalLocationArraySerializer(result: Array): any[] { + return result.map((item) => { + return additionalLocationSerializer(item); + }); +} + +export function additionalLocationArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return additionalLocationDeserializer(item); + }); +} + +/** Description of an additional API Management resource location. */ +export interface AdditionalLocation { + /** The location name of the additional region among Azure Data center regions. */ + location: string; + /** SKU properties of the API Management service. */ + sku: ApiManagementServiceSkuProperties; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly publicIPAddresses?: string[]; + /** Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Virtual network configuration for the location. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Gateway URL of the API Management service in the Region. */ + readonly gatewayRegionalUrl?: string; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. */ + disableGateway?: boolean; + /** Compute Platform Version running the service. */ + readonly platformVersion?: PlatformVersion; +} + +export function additionalLocationSerializer(item: AdditionalLocation): any { + return { + location: item["location"], + sku: apiManagementServiceSkuPropertiesSerializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + publicIpAddressId: item["publicIpAddressId"], + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + }; +} + +export function additionalLocationDeserializer(item: any): AdditionalLocation { + return { + location: item["location"], + sku: apiManagementServiceSkuPropertiesDeserializer(item["sku"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : item["publicIPAddresses"].map((p: any) => { + return p; + }), + privateIPAddresses: !item["privateIPAddresses"] + ? item["privateIPAddresses"] + : item["privateIPAddresses"].map((p: any) => { + return p; + }), + publicIpAddressId: item["publicIpAddressId"], + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationDeserializer(item["virtualNetworkConfiguration"]), + gatewayRegionalUrl: item["gatewayRegionalUrl"], + natGatewayState: item["natGatewayState"], + outboundPublicIPAddresses: !item["outboundPublicIPAddresses"] + ? item["outboundPublicIPAddresses"] + : item["outboundPublicIPAddresses"].map((p: any) => { + return p; + }), + disableGateway: item["disableGateway"], + platformVersion: item["platformVersion"], + }; +} + +/** Property can be used to enable NAT Gateway for this API Management service. */ +export enum KnownNatGatewayState { + /** Nat Gateway is enabled for the service. */ + Enabled = "Enabled", + /** Nat Gateway is disabled for the service. */ + Disabled = "Disabled", +} + +/** + * Property can be used to enable NAT Gateway for this API Management service. \ + * {@link KnownNatGatewayState} can be used interchangeably with NatGatewayState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Nat Gateway is enabled for the service. \ + * **Disabled**: Nat Gateway is disabled for the service. + */ +export type NatGatewayState = string; + +/** Compute Platform Version running the service. */ +export enum KnownPlatformVersion { + /** Platform version cannot be determined, as compute platform is not deployed. */ + Undetermined = "undetermined", + /** Platform running the service on Single Tenant V1 platform. */ + Stv1 = "stv1", + /** Platform running the service on Single Tenant V2 platform. */ + Stv2 = "stv2", + /** Platform running the service on Multi Tenant V1 platform. */ + Mtv1 = "mtv1", + /** Platform running the service on Single Tenant V2 platform on newer Hardware. */ + Stv21 = "stv2.1", +} + +/** + * Compute Platform Version running the service. \ + * {@link KnownPlatformVersion} can be used interchangeably with PlatformVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **undetermined**: Platform version cannot be determined, as compute platform is not deployed. \ + * **stv1**: Platform running the service on Single Tenant V1 platform. \ + * **stv2**: Platform running the service on Single Tenant V2 platform. \ + * **mtv1**: Platform running the service on Multi Tenant V1 platform. \ + * **stv2.1**: Platform running the service on Single Tenant V2 platform on newer Hardware. + */ +export type PlatformVersion = string; + +export function certificateConfigurationArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return certificateConfigurationSerializer(item); + }); +} + +export function certificateConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return certificateConfigurationDeserializer(item); + }); +} + +/** Certificate configuration which consist of non-trusted intermediates and root certificates. */ +export interface CertificateConfiguration { + /** Base64 Encoded certificate. */ + encodedCertificate?: string; + /** Certificate Password. */ + certificatePassword?: string; + /** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ + storeName: CertificateConfigurationStoreName; + /** Certificate information. */ + certificate?: CertificateInformation; +} + +export function certificateConfigurationSerializer(item: CertificateConfiguration): any { + return { + encodedCertificate: item["encodedCertificate"], + certificatePassword: item["certificatePassword"], + storeName: item["storeName"], + certificate: !item["certificate"] + ? item["certificate"] + : certificateInformationSerializer(item["certificate"]), + }; +} + +export function certificateConfigurationDeserializer(item: any): CertificateConfiguration { + return { + encodedCertificate: item["encodedCertificate"], + certificatePassword: item["certificatePassword"], + storeName: item["storeName"], + certificate: !item["certificate"] + ? item["certificate"] + : certificateInformationDeserializer(item["certificate"]), + }; +} + +/** The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. */ +export enum KnownCertificateConfigurationStoreName { + /** CertificateAuthority */ + CertificateAuthority = "CertificateAuthority", + /** Root */ + Root = "Root", +} + +/** + * The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. \ + * {@link KnownCertificateConfigurationStoreName} can be used interchangeably with CertificateConfigurationStoreName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CertificateAuthority** \ + * **Root** + */ +export type CertificateConfigurationStoreName = string; + +/** Control Plane Apis version constraint for the API Management service. */ +export interface ApiVersionConstraint { + /** Limit control plane API calls to API Management service with version equal to or newer than this value. */ + minApiVersion?: string; +} + +export function apiVersionConstraintSerializer(item: ApiVersionConstraint): any { + return { minApiVersion: item["minApiVersion"] }; +} + +export function apiVersionConstraintDeserializer(item: any): ApiVersionConstraint { + return { + minApiVersion: item["minApiVersion"], + }; +} + +export function remotePrivateEndpointConnectionWrapperArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return remotePrivateEndpointConnectionWrapperSerializer(item); + }); +} + +export function remotePrivateEndpointConnectionWrapperArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return remotePrivateEndpointConnectionWrapperDeserializer(item); + }); +} + +/** Remote Private Endpoint Connection resource. */ +export interface RemotePrivateEndpointConnectionWrapper { + /** Private Endpoint connection resource id */ + id?: string; + /** Private Endpoint Connection Name */ + name?: string; + /** Private Endpoint Connection Resource Type */ + type?: string; + /** The resource of private end point. */ + privateEndpoint?: ArmIdWrapper; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: string; + /** All the Group ids. */ + readonly groupIds?: string[]; +} + +export function remotePrivateEndpointConnectionWrapperSerializer( + item: RemotePrivateEndpointConnectionWrapper, +): any { + return { + id: item["id"], + name: item["name"], + type: item["type"], + properties: areAllPropsUndefined(item, ["privateEndpoint", "privateLinkServiceConnectionState"]) + ? undefined + : _remotePrivateEndpointConnectionWrapperPropertiesSerializer(item), + }; +} + +export function remotePrivateEndpointConnectionWrapperDeserializer( + item: any, +): RemotePrivateEndpointConnectionWrapper { + return { + id: item["id"], + name: item["name"], + type: item["type"], + ...(!item["properties"] + ? item["properties"] + : _remotePrivateEndpointConnectionWrapperPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the PrivateEndpointConnectProperties. */ +export interface PrivateEndpointConnectionWrapperProperties { + /** The resource of private end point. */ + privateEndpoint?: ArmIdWrapper; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: string; + /** All the Group ids. */ + readonly groupIds?: string[]; +} + +export function privateEndpointConnectionWrapperPropertiesSerializer( + item: PrivateEndpointConnectionWrapperProperties, +): any { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : armIdWrapperSerializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: privateLinkServiceConnectionStateSerializer( + item["privateLinkServiceConnectionState"], + ), + }; +} + +export function privateEndpointConnectionWrapperPropertiesDeserializer( + item: any, +): PrivateEndpointConnectionWrapperProperties { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : armIdWrapperDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: privateLinkServiceConnectionStateDeserializer( + item["privateLinkServiceConnectionState"], + ), + provisioningState: item["provisioningState"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + }; +} + +/** A wrapper for an ARM resource id */ +export interface ArmIdWrapper { + readonly id?: string; +} + +export function armIdWrapperSerializer(_item: ArmIdWrapper): any { + return {}; +} + +export function armIdWrapperDeserializer(item: any): ArmIdWrapper { + return { + id: item["id"], + }; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + +export function privateLinkServiceConnectionStateSerializer( + item: PrivateLinkServiceConnectionState, +): any { + return { + status: item["status"], + description: item["description"], + actionsRequired: item["actionsRequired"], + }; +} + +export function privateLinkServiceConnectionStateDeserializer( + item: any, +): PrivateLinkServiceConnectionState { + return { + status: item["status"], + description: item["description"], + actionsRequired: item["actionsRequired"], + }; +} + +/** The private endpoint connection status. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + /** Connection waiting for approval or rejection */ + Pending = "Pending", + /** Connection approved */ + Approved = "Approved", + /** Connection Rejected */ + Rejected = "Rejected", +} + +/** + * The private endpoint connection status. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending**: Connection waiting for approval or rejection \ + * **Approved**: Connection approved \ + * **Rejected**: Connection Rejected + */ +export type PrivateEndpointServiceConnectionStatus = string; + +/** Status of legacy portal in the API Management service. */ +export enum KnownLegacyPortalStatus { + /** Legacy Portal is enabled for the service. */ + Enabled = "Enabled", + /** Legacy Portal is disabled for the service. */ + Disabled = "Disabled", +} + +/** + * Status of legacy portal in the API Management service. \ + * {@link KnownLegacyPortalStatus} can be used interchangeably with LegacyPortalStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Legacy Portal is enabled for the service. \ + * **Disabled**: Legacy Portal is disabled for the service. + */ +export type LegacyPortalStatus = string; + +/** Status of developer portal in this API Management service. */ +export enum KnownDeveloperPortalStatus { + /** Developer Portal is enabled for the service. */ + Enabled = "Enabled", + /** Developer Portal is disabled for the service. */ + Disabled = "Disabled", +} + +/** + * Status of developer portal in this API Management service. \ + * {@link KnownDeveloperPortalStatus} can be used interchangeably with DeveloperPortalStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Developer Portal is enabled for the service. \ + * **Disabled**: Developer Portal is disabled for the service. + */ +export type DeveloperPortalStatus = string; + +/** Release Channel of this API Management service. */ +export enum KnownReleaseChannel { + /** Preview Channel of the service. */ + Preview = "Preview", + /** Default Channel of the service. */ + Default = "Default", + /** Stable Channel of the service. */ + Stable = "Stable", +} + +/** + * Release Channel of this API Management service. \ + * {@link KnownReleaseChannel} can be used interchangeably with ReleaseChannel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Preview**: Preview Channel of the service. \ + * **Default**: Default Channel of the service. \ + * **Stable**: Stable Channel of the service. + */ +export type ReleaseChannel = string; + +/** Parameter supplied to Update Api Management Service. */ +export interface ApiManagementServiceUpdateParameters extends ApimResource { + /** SKU properties of the API Management service. */ + sku?: ApiManagementServiceSkuProperties; + /** Managed service identity of the Api Management service. */ + identity?: ApiManagementServiceIdentity; + /** ETag of the resource. */ + readonly etag?: string; + /** A list of availability zones denoting where the resource needs to come from. */ + zones?: string[]; + /** Email address from which the notification will be sent. */ + notificationSenderEmail?: string; + /** The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. */ + readonly provisioningState?: string; + /** The provisioning state of the API Management service, which is targeted by the long running operation started on the service. */ + readonly targetProvisioningState?: string; + /** Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly createdAtUtc?: Date; + /** Gateway URL of the API Management service. */ + readonly gatewayUrl?: string; + /** Gateway URL of the API Management service in the Default Region. */ + readonly gatewayRegionalUrl?: string; + /** Publisher portal endpoint Url of the API Management service. */ + readonly portalUrl?: string; + /** Management API endpoint URL of the API Management service. */ + readonly managementApiUrl?: string; + /** SCM endpoint URL of the API Management service. */ + readonly scmUrl?: string; + /** DEveloper Portal endpoint URL of the API Management service. */ + readonly developerPortalUrl?: string; + /** Custom hostname configuration of the API Management service. */ + hostnameConfigurations?: HostnameConfiguration[]; + /** Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly publicIPAddresses?: string[]; + /** Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. */ + readonly privateIPAddresses?: string[]; + /** Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. */ + publicIpAddressId?: string; + /** Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' */ + publicNetworkAccess?: PublicNetworkAccess; + /** Configuration API configuration of the API Management service. */ + configurationApi?: ConfigurationApi; + /** Virtual network configuration of the API Management service. */ + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + /** Additional datacenter locations of the API Management service. */ + additionalLocations?: AdditionalLocation[]; + /** Custom properties of the API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.

You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.
Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */ + customProperties?: Record; + /** List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. */ + certificates?: CertificateConfiguration[]; + /** Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. */ + enableClientCertificate?: boolean; + /** Property can be used to enable NAT Gateway for this API Management service. */ + natGatewayState?: NatGatewayState; + /** Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. */ + readonly outboundPublicIPAddresses?: string[]; + /** Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. */ + disableGateway?: boolean; + /** The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. */ + virtualNetworkType?: VirtualNetworkType; + /** Control Plane Apis version constraint for the API Management service. */ + apiVersionConstraint?: ApiVersionConstraint; + /** Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. */ + restore?: boolean; + /** List of Private Endpoint Connections of this service. */ + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + /** Compute Platform Version running the service in this location. */ + readonly platformVersion?: PlatformVersion; + /** Status of legacy portal in the API Management service. */ + legacyPortalStatus?: LegacyPortalStatus; + /** Status of developer portal in this API Management service. */ + developerPortalStatus?: DeveloperPortalStatus; + /** Release Channel of this API Management service. */ + releaseChannel?: ReleaseChannel; + /** Zone Redundant Requirement when creating StandardV2 and PremiumV2. If this flag is set to True, will return a APIM service with Zone redundant or fail the request if any underneath component cannot be zone redundant. */ + zoneRedundant?: boolean; + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; +} + +export function apiManagementServiceUpdateParametersSerializer( + item: ApiManagementServiceUpdateParameters, +): any { + return { + tags: item["tags"], + properties: areAllPropsUndefined(item, [ + "notificationSenderEmail", + "hostnameConfigurations", + "publicIpAddressId", + "publicNetworkAccess", + "configurationApi", + "virtualNetworkConfiguration", + "additionalLocations", + "customProperties", + "certificates", + "enableClientCertificate", + "natGatewayState", + "disableGateway", + "virtualNetworkType", + "apiVersionConstraint", + "restore", + "privateEndpointConnections", + "legacyPortalStatus", + "developerPortalStatus", + "releaseChannel", + "zoneRedundant", + "publisherEmail", + "publisherName", + ]) + ? undefined + : _apiManagementServiceUpdateParametersPropertiesSerializer(item), + sku: !item["sku"] ? item["sku"] : apiManagementServiceSkuPropertiesSerializer(item["sku"]), + identity: !item["identity"] + ? item["identity"] + : apiManagementServiceIdentitySerializer(item["identity"]), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** Properties of an API Management service resource description. */ +export interface ApiManagementServiceUpdateProperties extends ApiManagementServiceBaseProperties { + /** Publisher email. */ + publisherEmail?: string; + /** Publisher name. */ + publisherName?: string; +} + +export function apiManagementServiceUpdatePropertiesSerializer( + item: ApiManagementServiceUpdateProperties, +): any { + return { + notificationSenderEmail: item["notificationSenderEmail"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArraySerializer(item["hostnameConfigurations"]), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiSerializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArraySerializer(item["additionalLocations"]), + customProperties: item["customProperties"], + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArraySerializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintSerializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArraySerializer(item["privateEndpointConnections"]), + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +/** The response of the List API Management services operation. */ +export interface _ApiManagementServiceListResult { + /** Result of the List API Management services operation. */ + value: ApiManagementServiceResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; +} + +export function _apiManagementServiceListResultDeserializer( + item: any, +): _ApiManagementServiceListResult { + return { + value: apiManagementServiceResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function apiManagementServiceResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementServiceResourceSerializer(item); + }); +} + +export function apiManagementServiceResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementServiceResourceDeserializer(item); + }); +} + +/** Parameters supplied to the Backup/Restore of an API Management service operation. */ +export interface ApiManagementServiceBackupRestoreParameters { + /** The name of the Azure storage account (used to place/retrieve the backup). */ + storageAccount: string; + /** The name of the blob container (used to place/retrieve the backup). */ + containerName: string; + /** The name of the backup file to create/retrieve. */ + backupName: string; + /** The type of access to be used for the storage account. */ + accessType?: AccessType; + /** Storage account access key. Required only if `accessType` is set to `AccessKey`. */ + accessKey?: string; + /** The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. */ + clientId?: string; +} + +export function apiManagementServiceBackupRestoreParametersSerializer( + item: ApiManagementServiceBackupRestoreParameters, +): any { + return { + storageAccount: item["storageAccount"], + containerName: item["containerName"], + backupName: item["backupName"], + accessType: item["accessType"], + accessKey: item["accessKey"], + clientId: item["clientId"], + }; +} + +/** The type of access to be used for the storage account. */ +export enum KnownAccessType { + /** Use access key. */ + AccessKey = "AccessKey", + /** Use system assigned managed identity. */ + SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity", + /** Use user assigned managed identity. */ + UserAssignedManagedIdentity = "UserAssignedManagedIdentity", +} + +/** + * The type of access to be used for the storage account. \ + * {@link KnownAccessType} can be used interchangeably with AccessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AccessKey**: Use access key. \ + * **SystemAssignedManagedIdentity**: Use system assigned managed identity. \ + * **UserAssignedManagedIdentity**: Use user assigned managed identity. + */ +export type AccessType = string; + +/** Describes an available API Management SKU. */ +export interface MigrateToStv2Contract { + /** Mode of Migration to stv2. Default is PreserveIp. */ + mode?: MigrateToStv2Mode; +} + +export function migrateToStv2ContractSerializer(item: MigrateToStv2Contract): any { + return { mode: item["mode"] }; +} + +/** Mode of Migration to stv2. Default is PreserveIp. */ +export enum KnownMigrateToStv2Mode { + /** Migrate API Management service to stv2 from stv1, by reserving the IP Address of the service. This will have a downtime of upto 15 minutes, while the IP address is getting migrate to new infrastructure. */ + PreserveIp = "PreserveIp", + /** Migrate API Management service to stv2 from stv1. This will have no downtime as the service configuration will be migrated to new infrastructure, but the IP address will changed. */ + NewIP = "NewIP", +} + +/** + * Mode of Migration to stv2. Default is PreserveIp. \ + * {@link KnownMigrateToStv2Mode} can be used interchangeably with MigrateToStv2Mode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PreserveIp**: Migrate API Management service to stv2 from stv1, by reserving the IP Address of the service. This will have a downtime of upto 15 minutes, while the IP address is getting migrate to new infrastructure. \ + * **NewIP**: Migrate API Management service to stv2 from stv1. This will have no downtime as the service configuration will be migrated to new infrastructure, but the IP address will changed. + */ +export type MigrateToStv2Mode = string; + +/** The response of the GetSsoToken operation. */ +export interface ApiManagementServiceGetSsoTokenResult { + /** Redirect URL to the Publisher Portal containing the SSO token. */ + redirectUri?: string; +} + +export function apiManagementServiceGetSsoTokenResultDeserializer( + item: any, +): ApiManagementServiceGetSsoTokenResult { + return { + redirectUri: item["redirectUri"], + }; +} + +/** Parameter supplied to the Apply Network configuration operation. */ +export interface ApiManagementServiceApplyNetworkConfigurationParameters { + /** Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. */ + location?: string; +} + +export function apiManagementServiceApplyNetworkConfigurationParametersSerializer( + item: ApiManagementServiceApplyNetworkConfigurationParameters, +): any { + return { location: item["location"] }; +} + +/** Parameters supplied to the CheckNameAvailability operation. */ +export interface ApiManagementServiceCheckNameAvailabilityParameters { + /** The name to check for availability. */ + name: string; +} + +export function apiManagementServiceCheckNameAvailabilityParametersSerializer( + item: ApiManagementServiceCheckNameAvailabilityParameters, +): any { + return { name: item["name"] }; +} + +/** Response of the CheckNameAvailability operation. */ +export interface ApiManagementServiceNameAvailabilityResult { + /** True if the name is available and can be used to create a new API Management service; otherwise false. */ + readonly nameAvailable?: boolean; + /** If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. */ + readonly message?: string; + /** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ + reason?: NameAvailabilityReason; +} + +export function apiManagementServiceNameAvailabilityResultDeserializer( + item: any, +): ApiManagementServiceNameAvailabilityResult { + return { + nameAvailable: item["nameAvailable"], + message: item["message"], + reason: item["reason"], + }; +} + +/** Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. */ +export type NameAvailabilityReason = "Valid" | "Invalid" | "AlreadyExists"; + +/** Response of the GetDomainOwnershipIdentifier operation. */ +export interface ApiManagementServiceGetDomainOwnershipIdentifierResult { + /** The domain ownership identifier value. */ + readonly domainOwnershipIdentifier?: string; +} + +export function apiManagementServiceGetDomainOwnershipIdentifierResultDeserializer( + item: any, +): ApiManagementServiceGetDomainOwnershipIdentifierResult { + return { + domainOwnershipIdentifier: item["domainOwnershipIdentifier"], + }; +} + +/** The response of All Policies. */ +export interface _AllPoliciesCollection { + /** AllPolicies Contract value. */ + value?: AllPoliciesContract[]; + /** Next page link if any. */ + nextLink?: string; +} + +export function _allPoliciesCollectionDeserializer(item: any): _AllPoliciesCollection { + return { + value: !item["value"] ? item["value"] : allPoliciesContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function allPoliciesContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return allPoliciesContractDeserializer(item); + }); +} + +/** AllPolicies Contract details. */ +export interface AllPoliciesContract extends ProxyResource { + /** Policy Identifier */ + referencePolicyId?: string; + /** Policy Restriction Compliance State */ + complianceState?: PolicyComplianceState; +} + +export function allPoliciesContractDeserializer(item: any): AllPoliciesContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _allPoliciesContractPropertiesDeserializer(item["properties"])), + }; +} + +/** AllPolicies Properties. */ +export interface AllPoliciesContractProperties { + /** Policy Identifier */ + referencePolicyId?: string; + /** Policy Restriction Compliance State */ + complianceState?: PolicyComplianceState; +} + +export function allPoliciesContractPropertiesDeserializer( + item: any, +): AllPoliciesContractProperties { + return { + referencePolicyId: item["referencePolicyId"], + complianceState: item["complianceState"], + }; +} + +/** Policy Restriction Compliance State */ +export enum KnownPolicyComplianceState { + /** The policy restriction compliance state has not yet been determined. */ + Pending = "Pending", + /** The scope in restriction is out of compliance. */ + NonCompliant = "NonCompliant", + /** The scope in restriction is in compliance. */ + Compliant = "Compliant", +} + +/** + * Policy Restriction Compliance State \ + * {@link KnownPolicyComplianceState} can be used interchangeably with PolicyComplianceState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending**: The policy restriction compliance state has not yet been determined. \ + * **NonCompliant**: The scope in restriction is out of compliance. \ + * **Compliant**: The scope in restriction is in compliance. + */ +export type PolicyComplianceState = string; + +/** The API Management service SKUs operation response. */ +export interface _ResourceSkuResults { + /** The list of skus available for the service. */ + value: ResourceSkuResult[]; + /** The uri to fetch the next page of API Management service Skus. */ + nextLink?: string; +} + +export function _resourceSkuResultsDeserializer(item: any): _ResourceSkuResults { + return { + value: resourceSkuResultArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function resourceSkuResultArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return resourceSkuResultDeserializer(item); + }); +} + +/** Describes an available API Management service SKU. */ +export interface ResourceSkuResult { + /** The type of resource the SKU applies to. */ + readonly resourceType?: string; + /** Specifies API Management SKU. */ + readonly sku?: ResourceSku; + /** Specifies the number of API Management units. */ + readonly capacity?: ResourceSkuCapacity; +} + +export function resourceSkuResultDeserializer(item: any): ResourceSkuResult { + return { + resourceType: item["resourceType"], + sku: !item["sku"] ? item["sku"] : resourceSkuDeserializer(item["sku"]), + capacity: !item["capacity"] + ? item["capacity"] + : resourceSkuCapacityDeserializer(item["capacity"]), + }; +} + +/** Describes an available API Management SKU. */ +export interface ResourceSku { + /** Name of the Sku. */ + name?: SkuType; +} + +export function resourceSkuDeserializer(item: any): ResourceSku { + return { + name: item["name"], + }; +} + +/** Describes scaling information of a SKU. */ +export interface ResourceSkuCapacity { + /** The minimum capacity. */ + readonly minimum?: number; + /** The maximum capacity that can be set. */ + readonly maximum?: number; + /** The default capacity. */ + readonly default?: number; + /** The scale type applicable to the sku. */ + readonly scaleType?: ResourceSkuCapacityScaleType; +} + +export function resourceSkuCapacityDeserializer(item: any): ResourceSkuCapacity { + return { + minimum: item["minimum"], + maximum: item["maximum"], + default: item["default"], + scaleType: item["scaleType"], + }; +} + +/** The scale type applicable to the sku. */ +export enum KnownResourceSkuCapacityScaleType { + /** Supported scale type automatic. */ + Automatic = "automatic", + /** Supported scale type manual. */ + Manual = "manual", + /** Scaling not supported. */ + None = "none", +} + +/** + * The scale type applicable to the sku. \ + * {@link KnownResourceSkuCapacityScaleType} can be used interchangeably with ResourceSkuCapacityScaleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **automatic**: Supported scale type automatic. \ + * **manual**: Supported scale type manual. \ + * **none**: Scaling not supported. + */ +export type ResourceSkuCapacityScaleType = string; + +/** Network Status in the Location */ +export interface NetworkStatusContractByLocation { + /** Location of service */ + location?: string; + /** Network status in Location */ + networkStatus?: NetworkStatusContract; +} + +export function networkStatusContractByLocationDeserializer( + item: any, +): NetworkStatusContractByLocation { + return { + location: item["location"], + networkStatus: !item["networkStatus"] + ? item["networkStatus"] + : networkStatusContractDeserializer(item["networkStatus"]), + }; +} + +/** Network Status details. */ +export interface NetworkStatusContract { + /** Gets the list of DNS servers IPV4 addresses. */ + dnsServers: string[]; + /** Gets the list of Connectivity Status to the Resources on which the service depends upon. */ + connectivityStatus: ConnectivityStatusContract[]; +} + +export function networkStatusContractDeserializer(item: any): NetworkStatusContract { + return { + dnsServers: item["dnsServers"].map((p: any) => { + return p; + }), + connectivityStatus: connectivityStatusContractArrayDeserializer(item["connectivityStatus"]), + }; +} + +export function connectivityStatusContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return connectivityStatusContractDeserializer(item); + }); +} + +/** Details about connectivity to a resource. */ +export interface ConnectivityStatusContract { + /** The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. */ + name: string; + /** Resource Connectivity Status Type identifier. */ + status: ConnectivityStatusType; + /** Error details of the connectivity to the resource. */ + error?: string; + /** The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + lastUpdated: Date; + /** The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + lastStatusChange: Date; + /** Resource Type. */ + resourceType: string; + /** Whether this is optional. */ + isOptional: boolean; +} + +export function connectivityStatusContractDeserializer(item: any): ConnectivityStatusContract { + return { + name: item["name"], + status: item["status"], + error: item["error"], + lastUpdated: new Date(item["lastUpdated"]), + lastStatusChange: new Date(item["lastStatusChange"]), + resourceType: item["resourceType"], + isOptional: item["isOptional"], + }; +} + +/** Resource Connectivity Status Type identifier. */ +export enum KnownConnectivityStatusType { + /** initializing */ + Initializing = "initializing", + /** success */ + Success = "success", + /** failure */ + Failure = "failure", +} + +/** + * Resource Connectivity Status Type identifier. \ + * {@link KnownConnectivityStatusType} can be used interchangeably with ConnectivityStatusType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **initializing** \ + * **success** \ + * **failure** + */ +export type ConnectivityStatusType = string; + +/** Collection of Outbound Environment Endpoints */ +export interface OutboundEnvironmentEndpointList { + /** Collection of resources. */ + value: OutboundEnvironmentEndpoint[]; + /** Link to next page of resources. */ + readonly nextLink?: string; +} + +export function outboundEnvironmentEndpointListDeserializer( + item: any, +): OutboundEnvironmentEndpointList { + return { + value: outboundEnvironmentEndpointArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function outboundEnvironmentEndpointArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return outboundEnvironmentEndpointDeserializer(item); + }); +} + +/** Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. */ +export interface OutboundEnvironmentEndpoint { + /** The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. */ + category?: string; + /** The endpoints that the Api Management Service reaches the service at. */ + endpoints?: EndpointDependency[]; +} + +export function outboundEnvironmentEndpointDeserializer(item: any): OutboundEnvironmentEndpoint { + return { + category: item["category"], + endpoints: !item["endpoints"] + ? item["endpoints"] + : endpointDependencyArrayDeserializer(item["endpoints"]), + }; +} + +export function endpointDependencyArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return endpointDependencyDeserializer(item); + }); +} + +/** A domain name that a service is reached at. */ +export interface EndpointDependency { + /** The domain name of the dependency. */ + domainName?: string; + /** The Ports used when connecting to DomainName. */ + endpointDetails?: EndpointDetail[]; +} + +export function endpointDependencyDeserializer(item: any): EndpointDependency { + return { + domainName: item["domainName"], + endpointDetails: !item["endpointDetails"] + ? item["endpointDetails"] + : endpointDetailArrayDeserializer(item["endpointDetails"]), + }; +} + +export function endpointDetailArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return endpointDetailDeserializer(item); + }); +} + +/** Current TCP connectivity information from the Api Management Service to a single endpoint. */ +export interface EndpointDetail { + /** The port an endpoint is connected to. */ + port?: number; + /** The region of the dependency. */ + region?: string; +} + +export function endpointDetailDeserializer(item: any): EndpointDetail { + return { + port: item["port"], + region: item["region"], + }; +} + +/** Descriptions of API Management policies. */ +export interface PolicyDescriptionCollection { + /** Descriptions of API Management policies. */ + value?: PolicyDescriptionContract[]; + /** Total record count number. */ + count?: number; +} + +export function policyDescriptionCollectionDeserializer(item: any): PolicyDescriptionCollection { + return { + value: !item["value"] + ? item["value"] + : policyDescriptionContractArrayDeserializer(item["value"]), + count: item["count"], + }; +} + +export function policyDescriptionContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return policyDescriptionContractDeserializer(item); + }); +} + +/** Policy description details. */ +export interface PolicyDescriptionContract extends ProxyResource { + /** Policy description. */ + readonly description?: string; + /** Binary OR value of the Snippet scope. */ + readonly scope?: number; +} + +export function policyDescriptionContractDeserializer(item: any): PolicyDescriptionContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _policyDescriptionContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Policy description properties. */ +export interface PolicyDescriptionContractProperties { + /** Policy description. */ + readonly description?: string; + /** Binary OR value of the Snippet scope. */ + readonly scope?: number; +} + +export function policyDescriptionContractPropertiesDeserializer( + item: any, +): PolicyDescriptionContractProperties { + return { + description: item["description"], + scope: item["scope"], + }; +} + +/** Long Running Git Operation Results. */ +export interface OperationResultContract extends ProxyResource { + /** Operation result identifier. */ + idPropertiesId?: string; + /** Status of an async operation. */ + status?: AsyncOperationStatus; + /** Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + started?: Date; + /** Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. */ + readonly actionLog?: OperationResultLogItemContract[]; +} + +export function operationResultContractDeserializer(item: any): OperationResultContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _operationResultContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Operation Result. */ +export interface OperationResultContractProperties { + /** Operation result identifier. */ + id?: string; + /** Status of an async operation. */ + status?: AsyncOperationStatus; + /** Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + started?: Date; + /** Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + updated?: Date; + /** Optional result info. */ + resultInfo?: string; + /** Error Body Contract */ + error?: ErrorResponseBody; + /** This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. */ + readonly actionLog?: OperationResultLogItemContract[]; +} + +export function operationResultContractPropertiesDeserializer( + item: any, +): OperationResultContractProperties { + return { + id: item["id"], + status: item["status"], + started: !item["started"] ? item["started"] : new Date(item["started"]), + updated: !item["updated"] ? item["updated"] : new Date(item["updated"]), + resultInfo: item["resultInfo"], + error: !item["error"] ? item["error"] : errorResponseBodyDeserializer(item["error"]), + actionLog: !item["actionLog"] + ? item["actionLog"] + : operationResultLogItemContractArrayDeserializer(item["actionLog"]), + }; +} + +/** Status of an async operation. */ +export type AsyncOperationStatus = "Started" | "InProgress" | "Succeeded" | "Failed"; + +/** Error Body contract. */ +export interface ErrorResponseBody { + /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */ + code?: string; + /** Human-readable representation of the error. */ + message?: string; + /** The list of invalid fields send in request, in case of validation error. */ + details?: ErrorFieldContract[]; +} + +export function errorResponseBodyDeserializer(item: any): ErrorResponseBody { + return { + code: item["code"], + message: item["message"], + details: !item["details"] + ? item["details"] + : errorFieldContractArrayDeserializer(item["details"]), + }; +} + +export function errorFieldContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return errorFieldContractDeserializer(item); + }); +} + +/** Error Field contract. */ +export interface ErrorFieldContract { + /** Property level error code. */ + code?: string; + /** Human-readable representation of property-level error. */ + message?: string; + /** Property name. */ + target?: string; +} + +export function errorFieldContractDeserializer(item: any): ErrorFieldContract { + return { + code: item["code"], + message: item["message"], + target: item["target"], + }; +} + +export function operationResultLogItemContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return operationResultLogItemContractDeserializer(item); + }); +} + +/** Log of the entity being created, updated or deleted. */ +export interface OperationResultLogItemContract { + /** The type of entity contract. */ + objectType?: string; + /** Action like create/update/delete. */ + action?: string; + /** Identifier of the entity being created/updated/deleted. */ + objectKey?: string; +} + +export function operationResultLogItemContractDeserializer( + item: any, +): OperationResultLogItemContract { + return { + objectType: item["objectType"], + action: item["action"], + objectKey: item["objectKey"], + }; +} + +/** Descriptions of API Management policies. */ +export interface PortalSettingsCollection { + /** Descriptions of API Management policies. */ + value?: PortalSettingsContract[]; + /** Total record count number. */ + count?: number; +} + +export function portalSettingsCollectionDeserializer(item: any): PortalSettingsCollection { + return { + value: !item["value"] ? item["value"] : portalSettingsContractArrayDeserializer(item["value"]), + count: item["count"], + }; +} + +export function portalSettingsContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return portalSettingsContractDeserializer(item); + }); +} + +/** Portal Settings for the Developer Portal. */ +export interface PortalSettingsContract extends ProxyResource { + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; +} + +export function portalSettingsContractDeserializer(item: any): PortalSettingsContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalSettingsContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Sign-in settings contract properties. */ +export interface PortalSettingsContractProperties { + /** A delegation Url. */ + url?: string; + /** A base64-encoded validation key to validate, that a request is coming from Azure API Management. */ + validationKey?: string; + /** Subscriptions delegation settings. */ + subscriptions?: SubscriptionsDelegationSettingsProperties; + /** User registration delegation settings. */ + userRegistration?: RegistrationDelegationSettingsProperties; + /** Redirect Anonymous users to the Sign-In page. */ + enabled?: boolean; + /** Terms of service contract properties. */ + termsOfService?: TermsOfServiceProperties; +} + +export function portalSettingsContractPropertiesDeserializer( + item: any, +): PortalSettingsContractProperties { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesDeserializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesDeserializer(item["userRegistration"]), + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesDeserializer(item["termsOfService"]), + }; +} + +/** Paged Quota Counter list representation. */ +export interface QuotaCounterCollection { + /** Quota counter values. */ + value?: QuotaCounterContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function quotaCounterCollectionDeserializer(item: any): QuotaCounterCollection { + return { + value: !item["value"] ? item["value"] : quotaCounterContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function quotaCounterContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return quotaCounterContractDeserializer(item); + }); +} + +/** Quota counter details. */ +export interface QuotaCounterContract { + /** The Key value of the Counter. Must not be empty. */ + counterKey: string; + /** Identifier of the Period for which the counter was collected. Must not be empty. */ + periodKey: string; + /** The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + periodStartTime: Date; + /** The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + periodEndTime: Date; + /** Quota Value Properties */ + value?: QuotaCounterValueContractProperties; +} + +export function quotaCounterContractDeserializer(item: any): QuotaCounterContract { + return { + counterKey: item["counterKey"], + periodKey: item["periodKey"], + periodStartTime: new Date(item["periodStartTime"]), + periodEndTime: new Date(item["periodEndTime"]), + value: !item["value"] + ? item["value"] + : quotaCounterValueContractPropertiesDeserializer(item["value"]), + }; +} + +/** Quota counter value details. */ +export interface QuotaCounterValueContractProperties { + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; +} + +export function quotaCounterValueContractPropertiesSerializer( + item: QuotaCounterValueContractProperties, +): any { + return { callsCount: item["callsCount"], kbTransferred: item["kbTransferred"] }; +} + +export function quotaCounterValueContractPropertiesDeserializer( + item: any, +): QuotaCounterValueContractProperties { + return { + callsCount: item["callsCount"], + kbTransferred: item["kbTransferred"], + }; +} + +/** Quota counter value details. */ +export interface QuotaCounterValueUpdateContract { + /** Number of times Counter was called. */ + callsCount?: number; + /** Data Transferred in KiloBytes. */ + kbTransferred?: number; +} + +export function quotaCounterValueUpdateContractSerializer( + item: QuotaCounterValueUpdateContract, +): any { + return { + properties: areAllPropsUndefined(item, ["callsCount", "kbTransferred"]) + ? undefined + : _quotaCounterValueUpdateContractPropertiesSerializer(item), + }; +} + +/** Lists Regions operation response details. */ +export interface _RegionListResult { + /** Lists of Regions. */ + value?: RegionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _regionListResultDeserializer(item: any): _RegionListResult { + return { + value: !item["value"] ? item["value"] : regionContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function regionContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return regionContractDeserializer(item); + }); +} + +/** Region profile. */ +export interface RegionContract { + /** Region name. */ + readonly name?: string; + /** whether Region is the master region. */ + isMasterRegion?: boolean; + /** whether Region is deleted. */ + isDeleted?: boolean; +} + +export function regionContractDeserializer(item: any): RegionContract { + return { + name: item["name"], + isMasterRegion: item["isMasterRegion"], + isDeleted: item["isDeleted"], + }; +} + +/** Paged Report records list representation. */ +export interface _ReportCollection { + /** Page values. */ + value?: ReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _reportCollectionDeserializer(item: any): _ReportCollection { + return { + value: !item["value"] ? item["value"] : reportRecordContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function reportRecordContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return reportRecordContractDeserializer(item); + }); +} + +/** Report data. */ +export interface ReportRecordContract { + /** Name depending on report endpoint specifies product, API, operation or developer name. */ + name?: string; + /** Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + timestamp?: Date; + /** Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). */ + interval?: string; + /** Country to which this record data is related. */ + country?: string; + /** Country region to which this record data is related. */ + region?: string; + /** Zip code to which this record data is related. */ + zip?: string; + /** User identifier path. /users/{userId} */ + readonly userId?: string; + /** Product identifier path. /products/{productId} */ + readonly productId?: string; + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** API region identifier. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect */ + callCountSuccess?: number; + /** Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests */ + callCountBlocked?: number; + /** Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 */ + callCountFailed?: number; + /** Number of other calls. */ + callCountOther?: number; + /** Total number of calls. */ + callCountTotal?: number; + /** Bandwidth consumed. */ + bandwidth?: number; + /** Number of times when content was served from cache policy. */ + cacheHitCount?: number; + /** Number of times content was fetched from backend. */ + cacheMissCount?: number; + /** Average time it took to process request. */ + apiTimeAvg?: number; + /** Minimum time it took to process request. */ + apiTimeMin?: number; + /** Maximum time it took to process request. */ + apiTimeMax?: number; + /** Average time it took to process request on backend. */ + serviceTimeAvg?: number; + /** Minimum time it took to process request on backend. */ + serviceTimeMin?: number; + /** Maximum time it took to process request on backend. */ + serviceTimeMax?: number; +} + +export function reportRecordContractDeserializer(item: any): ReportRecordContract { + return { + name: item["name"], + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + interval: item["interval"], + country: item["country"], + region: item["region"], + zip: item["zip"], + userId: item["userId"], + productId: item["productId"], + apiId: item["apiId"], + operationId: item["operationId"], + apiRegion: item["apiRegion"], + subscriptionId: item["subscriptionId"], + callCountSuccess: item["callCountSuccess"], + callCountBlocked: item["callCountBlocked"], + callCountFailed: item["callCountFailed"], + callCountOther: item["callCountOther"], + callCountTotal: item["callCountTotal"], + bandwidth: item["bandwidth"], + cacheHitCount: item["cacheHitCount"], + cacheMissCount: item["cacheMissCount"], + apiTimeAvg: item["apiTimeAvg"], + apiTimeMin: item["apiTimeMin"], + apiTimeMax: item["apiTimeMax"], + serviceTimeAvg: item["serviceTimeAvg"], + serviceTimeMin: item["serviceTimeMin"], + serviceTimeMax: item["serviceTimeMax"], + }; +} + +/** Paged Report records list representation. */ +export interface _RequestReportCollection { + /** Page values. */ + value?: RequestReportRecordContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _requestReportCollectionDeserializer(item: any): _RequestReportCollection { + return { + value: !item["value"] + ? item["value"] + : requestReportRecordContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function requestReportRecordContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return requestReportRecordContractDeserializer(item); + }); +} + +/** Request Report data. */ +export interface RequestReportRecordContract { + /** API identifier path. /apis/{apiId} */ + apiId?: string; + /** Operation identifier path. /apis/{apiId}/operations/{operationId} */ + operationId?: string; + /** Product identifier path. /products/{productId} */ + readonly productId?: string; + /** User identifier path. /users/{userId} */ + readonly userId?: string; + /** The HTTP method associated with this request.. */ + method?: string; + /** The full URL associated with this request. */ + url?: string; + /** The client IP address associated with this request. */ + ipAddress?: string; + /** The HTTP status code received by the gateway as a result of forwarding this request to the backend. */ + backendResponseCode?: string; + /** The HTTP status code returned by the gateway. */ + responseCode?: number; + /** The size of the response returned by the gateway. */ + responseSize?: number; + /** The date and time when this request was received by the gateway in ISO 8601 format. */ + timestamp?: Date; + /** Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. */ + cache?: string; + /** The total time it took to process this request. */ + apiTime?: number; + /** he time it took to forward this request to the backend and get the response back. */ + serviceTime?: number; + /** Azure region where the gateway that processed this request is located. */ + apiRegion?: string; + /** Subscription identifier path. /subscriptions/{subscriptionId} */ + subscriptionId?: string; + /** Request Identifier. */ + requestId?: string; + /** The size of this request.. */ + requestSize?: number; +} + +export function requestReportRecordContractDeserializer(item: any): RequestReportRecordContract { + return { + apiId: item["apiId"], + operationId: item["operationId"], + productId: item["productId"], + userId: item["userId"], + method: item["method"], + url: item["url"], + ipAddress: item["ipAddress"], + backendResponseCode: item["backendResponseCode"], + responseCode: item["responseCode"], + responseSize: item["responseSize"], + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + cache: item["cache"], + apiTime: item["apiTime"], + serviceTime: item["serviceTime"], + apiRegion: item["apiRegion"], + subscriptionId: item["subscriptionId"], + requestId: item["requestId"], + requestSize: item["requestSize"], + }; +} + +/** GraphQL API Resolver details. */ +export interface ResolverContract extends ProxyResource { + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; +} + +export function resolverContractSerializer(item: ResolverContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "path", "description"]) + ? undefined + : _resolverContractPropertiesSerializer(item), + }; +} + +export function resolverContractDeserializer(item: any): ResolverContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _resolverContractPropertiesDeserializer(item["properties"])), + }; +} + +/** GraphQL API Resolver Entity Base Contract details. */ +export interface ResolverEntityBaseContract { + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; +} + +export function resolverEntityBaseContractSerializer(item: ResolverEntityBaseContract): any { + return { displayName: item["displayName"], path: item["path"], description: item["description"] }; +} + +export function resolverEntityBaseContractDeserializer(item: any): ResolverEntityBaseContract { + return { + displayName: item["displayName"], + path: item["path"], + description: item["description"], + }; +} + +/** GraphQL API Resolver Update Contract details. */ +export interface ResolverUpdateContract { + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; +} + +export function resolverUpdateContractSerializer(item: ResolverUpdateContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "path", "description"]) + ? undefined + : _resolverUpdateContractPropertiesSerializer(item), + }; +} + +/** Resolver Update Contract Properties. */ +export interface ResolverUpdateContractProperties { + /** Resolver Name. */ + displayName?: string; + /** Path is type/field being resolved. */ + path?: string; + /** Description of the resolver. May include HTML formatting tags. */ + description?: string; +} + +export function resolverUpdateContractPropertiesSerializer( + item: ResolverUpdateContractProperties, +): any { + return { displayName: item["displayName"], path: item["path"], description: item["description"] }; +} + +/** Paged Resolver list representation. */ +export interface _ResolverCollection { + /** Page values. */ + readonly value?: ResolverContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _resolverCollectionDeserializer(item: any): _ResolverCollection { + return { + value: !item["value"] ? item["value"] : resolverContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function resolverContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return resolverContractSerializer(item); + }); +} + +export function resolverContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return resolverContractDeserializer(item); + }); +} + +/** Issue update Parameters. */ +export interface IssueUpdateContract { + /** Date and time when the issue was created. */ + createdDate?: Date; + /** Status of the issue. */ + state?: State; + /** A resource identifier for the API the issue was created for. */ + apiId?: string; + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; +} + +export function issueUpdateContractSerializer(item: IssueUpdateContract): any { + return { + properties: areAllPropsUndefined(item, [ + "createdDate", + "state", + "apiId", + "title", + "description", + "userId", + ]) + ? undefined + : _issueUpdateContractPropertiesSerializer(item), + }; +} + +/** Issue contract Update Properties. */ +export interface IssueUpdateContractProperties extends IssueContractBaseProperties { + /** The issue title. */ + title?: string; + /** Text describing the issue. */ + description?: string; + /** A resource identifier for the user created the issue. */ + userId?: string; +} + +export function issueUpdateContractPropertiesSerializer(item: IssueUpdateContractProperties): any { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +/** Issue Comment Contract details. */ +export interface IssueCommentContract extends ProxyResource { + /** Comment text. */ + text?: string; + /** Date and time when the comment was created. */ + createdDate?: Date; + /** A resource identifier for the user who left the comment. */ + userId?: string; +} + +export function issueCommentContractSerializer(item: IssueCommentContract): any { + return { + properties: areAllPropsUndefined(item, ["text", "createdDate", "userId"]) + ? undefined + : _issueCommentContractPropertiesSerializer(item), + }; +} + +export function issueCommentContractDeserializer(item: any): IssueCommentContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _issueCommentContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Issue Comment contract Properties. */ +export interface IssueCommentContractProperties { + /** Comment text. */ + text: string; + /** Date and time when the comment was created. */ + createdDate?: Date; + /** A resource identifier for the user who left the comment. */ + userId: string; +} + +export function issueCommentContractPropertiesSerializer( + item: IssueCommentContractProperties, +): any { + return { + text: item["text"], + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + userId: item["userId"], + }; +} + +export function issueCommentContractPropertiesDeserializer( + item: any, +): IssueCommentContractProperties { + return { + text: item["text"], + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + userId: item["userId"], + }; +} + +/** Paged Issue Comment list representation. */ +export interface _IssueCommentCollection { + /** Issue Comment values. */ + readonly value?: IssueCommentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _issueCommentCollectionDeserializer(item: any): _IssueCommentCollection { + return { + value: !item["value"] ? item["value"] : issueCommentContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function issueCommentContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return issueCommentContractSerializer(item); + }); +} + +export function issueCommentContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return issueCommentContractDeserializer(item); + }); +} + +/** Issue Attachment Contract details. */ +export interface IssueAttachmentContract extends ProxyResource { + /** Filename by which the binary data will be saved. */ + title?: string; + /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ + contentFormat?: string; + /** An HTTP link or Base64-encoded binary data. */ + content?: string; +} + +export function issueAttachmentContractSerializer(item: IssueAttachmentContract): any { + return { + properties: areAllPropsUndefined(item, ["title", "contentFormat", "content"]) + ? undefined + : _issueAttachmentContractPropertiesSerializer(item), + }; +} + +export function issueAttachmentContractDeserializer(item: any): IssueAttachmentContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _issueAttachmentContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Issue Attachment contract Properties. */ +export interface IssueAttachmentContractProperties { + /** Filename by which the binary data will be saved. */ + title: string; + /** Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. */ + contentFormat: string; + /** An HTTP link or Base64-encoded binary data. */ + content: string; +} + +export function issueAttachmentContractPropertiesSerializer( + item: IssueAttachmentContractProperties, +): any { + return { title: item["title"], contentFormat: item["contentFormat"], content: item["content"] }; +} + +export function issueAttachmentContractPropertiesDeserializer( + item: any, +): IssueAttachmentContractProperties { + return { + title: item["title"], + contentFormat: item["contentFormat"], + content: item["content"], + }; +} + +/** Paged Issue Attachment list representation. */ +export interface _IssueAttachmentCollection { + /** Issue Attachment values. */ + readonly value?: IssueAttachmentContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _issueAttachmentCollectionDeserializer(item: any): _IssueAttachmentCollection { + return { + value: !item["value"] ? item["value"] : issueAttachmentContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function issueAttachmentContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return issueAttachmentContractSerializer(item); + }); +} + +export function issueAttachmentContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return issueAttachmentContractDeserializer(item); + }); +} + +/** Contract details. */ +export interface TagDescriptionContract extends ProxyResource { + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; +} + +export function tagDescriptionContractDeserializer(item: any): TagDescriptionContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tagDescriptionContractPropertiesDeserializer(item["properties"])), + }; +} + +/** TagDescription contract Properties. */ +export interface TagDescriptionContractProperties extends TagDescriptionBaseProperties { + /** Identifier of the tag in the form of /tags/{tagId} */ + tagId?: string; + /** Tag name. */ + displayName?: string; +} + +export function tagDescriptionContractPropertiesDeserializer( + item: any, +): TagDescriptionContractProperties { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + tagId: item["tagId"], + displayName: item["displayName"], + }; +} + +/** Parameters supplied to the Create TagDescription operation. */ +export interface TagDescriptionBaseProperties { + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; +} + +export function tagDescriptionBasePropertiesSerializer(item: TagDescriptionBaseProperties): any { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + }; +} + +export function tagDescriptionBasePropertiesDeserializer(item: any): TagDescriptionBaseProperties { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + }; +} + +/** Parameters supplied to the Create TagDescription operation. */ +export interface TagDescriptionCreateParameters { + /** Description of the Tag. */ + description?: string; + /** Absolute URL of external resources describing the tag. */ + externalDocsUrl?: string; + /** Description of the external resources describing the tag. */ + externalDocsDescription?: string; +} + +export function tagDescriptionCreateParametersSerializer( + item: TagDescriptionCreateParameters, +): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "externalDocsUrl", + "externalDocsDescription", + ]) + ? undefined + : _tagDescriptionCreateParametersPropertiesSerializer(item), + }; +} + +/** Paged TagDescription list representation. */ +export interface _TagDescriptionCollection { + /** Page values. */ + value?: TagDescriptionContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _tagDescriptionCollectionDeserializer(item: any): _TagDescriptionCollection { + return { + value: !item["value"] ? item["value"] : tagDescriptionContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function tagDescriptionContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tagDescriptionContractDeserializer(item); + }); +} + +/** Paged Wiki list representation. */ +export interface _WikiCollection { + /** Page values. */ + readonly value?: WikiContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _wikiCollectionDeserializer(item: any): _WikiCollection { + return { + value: !item["value"] ? item["value"] : wikiContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function wikiContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return wikiContractSerializer(item); + }); +} + +export function wikiContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return wikiContractDeserializer(item); + }); +} + +/** Tool details. */ +export interface ToolContract extends ProxyResource { + /** Tool Name. MCP tool name must contain only letters, numbers, underscores, and hyphens. */ + displayName?: string; + /** Description of the tool. */ + description?: string; + /** Identifier of the operation this MCP tool is associated with in the form of /apis/{apiId}/operations/{operationId}. */ + operationId?: string; +} + +export function toolContractSerializer(item: ToolContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "description", "operationId"]) + ? undefined + : _toolContractPropertiesSerializer(item), + }; +} + +export function toolContractDeserializer(item: any): ToolContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _toolContractPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface ToolContractProperties */ +export interface ToolContractProperties { + /** Tool Name. MCP tool name must contain only letters, numbers, underscores, and hyphens. */ + displayName?: string; + /** Description of the tool. */ + description?: string; + /** Identifier of the operation this MCP tool is associated with in the form of /apis/{apiId}/operations/{operationId}. */ + operationId?: string; +} + +export function toolContractPropertiesSerializer(item: ToolContractProperties): any { + return { + displayName: item["displayName"], + description: item["description"], + operationId: item["operationId"], + }; +} + +export function toolContractPropertiesDeserializer(item: any): ToolContractProperties { + return { + displayName: item["displayName"], + description: item["description"], + operationId: item["operationId"], + }; +} + +/** Paged Tool list representation. */ +export interface _ToolCollection { + /** Page values of Tools contract. */ + readonly value?: ToolContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _toolCollectionDeserializer(item: any): _ToolCollection { + return { + value: !item["value"] ? item["value"] : toolContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function toolContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return toolContractSerializer(item); + }); +} + +export function toolContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return toolContractDeserializer(item); + }); +} + +/** Authorization Provider contract. */ +export interface AuthorizationProviderContract extends ProxyResource { + /** Authorization Provider name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Identity provider name. Must be 1 to 300 characters long. */ + identityProvider?: string; + /** OAuth2 settings */ + oauth2?: AuthorizationProviderOAuth2Settings; +} + +export function authorizationProviderContractSerializer(item: AuthorizationProviderContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "identityProvider", "oauth2"]) + ? undefined + : _authorizationProviderContractPropertiesSerializer(item), + }; +} + +export function authorizationProviderContractDeserializer( + item: any, +): AuthorizationProviderContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _authorizationProviderContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Authorization Provider details. */ +export interface AuthorizationProviderContractProperties { + /** Authorization Provider name. Must be 1 to 300 characters long. */ + displayName?: string; + /** Identity provider name. Must be 1 to 300 characters long. */ + identityProvider?: string; + /** OAuth2 settings */ + oauth2?: AuthorizationProviderOAuth2Settings; +} + +export function authorizationProviderContractPropertiesSerializer( + item: AuthorizationProviderContractProperties, +): any { + return { + displayName: item["displayName"], + identityProvider: item["identityProvider"], + oauth2: !item["oauth2"] + ? item["oauth2"] + : authorizationProviderOAuth2SettingsSerializer(item["oauth2"]), + }; +} + +export function authorizationProviderContractPropertiesDeserializer( + item: any, +): AuthorizationProviderContractProperties { + return { + displayName: item["displayName"], + identityProvider: item["identityProvider"], + oauth2: !item["oauth2"] + ? item["oauth2"] + : authorizationProviderOAuth2SettingsDeserializer(item["oauth2"]), + }; +} + +/** OAuth2 settings details */ +export interface AuthorizationProviderOAuth2Settings { + /** Redirect URL to be set in the OAuth application. */ + redirectUrl?: string; + /** OAuth2 settings */ + grantTypes?: AuthorizationProviderOAuth2GrantTypes; + /** Key Vault reference for client secret storage */ + keyVault?: AuthorizationProviderKeyVaultContract; + /** Federated identity credentials properties. */ + readonly federatedIdentityCredentialsProperties?: AuthorizationProviderFederatedIdentityCredentialsProperties; +} + +export function authorizationProviderOAuth2SettingsSerializer( + item: AuthorizationProviderOAuth2Settings, +): any { + return { + redirectUrl: item["redirectUrl"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : authorizationProviderOAuth2GrantTypesSerializer(item["grantTypes"]), + keyVault: !item["keyVault"] + ? item["keyVault"] + : authorizationProviderKeyVaultContractSerializer(item["keyVault"]), + }; +} + +export function authorizationProviderOAuth2SettingsDeserializer( + item: any, +): AuthorizationProviderOAuth2Settings { + return { + redirectUrl: item["redirectUrl"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : authorizationProviderOAuth2GrantTypesDeserializer(item["grantTypes"]), + keyVault: !item["keyVault"] + ? item["keyVault"] + : authorizationProviderKeyVaultContractDeserializer(item["keyVault"]), + federatedIdentityCredentialsProperties: !item["federatedIdentityCredentialsProperties"] + ? item["federatedIdentityCredentialsProperties"] + : authorizationProviderFederatedIdentityCredentialsPropertiesDeserializer( + item["federatedIdentityCredentialsProperties"], + ), + }; +} + +/** Authorization Provider oauth2 grant types settings */ +export interface AuthorizationProviderOAuth2GrantTypes { + /** OAuth2 authorization code grant parameters */ + authorizationCode?: Record; + /** OAuth2 client credential grant parameters */ + clientCredentials?: Record; + /** OAuth2 authorization code grant with federated identity credentials parameters */ + authorizationCodeWithFederatedIdentityCredentials?: AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType; +} + +export function authorizationProviderOAuth2GrantTypesSerializer( + item: AuthorizationProviderOAuth2GrantTypes, +): any { + return { + authorizationCode: item["authorizationCode"], + clientCredentials: item["clientCredentials"], + authorizationCodeWithFederatedIdentityCredentials: !item[ + "authorizationCodeWithFederatedIdentityCredentials" + ] + ? item["authorizationCodeWithFederatedIdentityCredentials"] + : authorizationProviderOAuth2FederatedIdentityCredentialsGrantTypeSerializer( + item["authorizationCodeWithFederatedIdentityCredentials"], + ), + }; +} + +export function authorizationProviderOAuth2GrantTypesDeserializer( + item: any, +): AuthorizationProviderOAuth2GrantTypes { + return { + authorizationCode: !item["authorizationCode"] + ? item["authorizationCode"] + : Object.fromEntries( + Object.entries(item["authorizationCode"]).map(([k, p]: [string, any]) => [k, p]), + ), + clientCredentials: !item["clientCredentials"] + ? item["clientCredentials"] + : Object.fromEntries( + Object.entries(item["clientCredentials"]).map(([k, p]: [string, any]) => [k, p]), + ), + authorizationCodeWithFederatedIdentityCredentials: !item[ + "authorizationCodeWithFederatedIdentityCredentials" + ] + ? item["authorizationCodeWithFederatedIdentityCredentials"] + : authorizationProviderOAuth2FederatedIdentityCredentialsGrantTypeDeserializer( + item["authorizationCodeWithFederatedIdentityCredentials"], + ), + }; +} + +/** OAuth2 authorization code with federated identity credentials grant type parameters. */ +export interface AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType { + /** Client ID of the application in the identity provider. */ + clientId?: string; + /** The type of client assertion used for federated identity credentials. */ + readonly clientAssertionType?: string; + /** The resource URI for the target service. */ + resourceUri?: string; + /** Tenant ID of the identity provider. */ + tenantId?: string; +} + +export function authorizationProviderOAuth2FederatedIdentityCredentialsGrantTypeSerializer( + item: AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType, +): any { + return { + clientId: item["clientId"], + resourceUri: item["resourceUri"], + tenantId: item["tenantId"], + }; +} + +export function authorizationProviderOAuth2FederatedIdentityCredentialsGrantTypeDeserializer( + item: any, +): AuthorizationProviderOAuth2FederatedIdentityCredentialsGrantType { + return { + clientId: item["clientId"], + clientAssertionType: item["clientAssertionType"], + resourceUri: item["resourceUri"], + tenantId: item["tenantId"], + }; +} + +/** Authorization Provider KeyVault contract properties. */ +export interface AuthorizationProviderKeyVaultContract extends AuthorizationProviderKeyVaultCreateProperties { + /** When the secret was last updated in key vault. */ + readonly updated?: Date; + /** Last time sync and refresh of secret from key vault. */ + readonly lastStatus?: KeyVaultLastAccessStatusContractProperties; +} + +export function authorizationProviderKeyVaultContractSerializer( + item: AuthorizationProviderKeyVaultContract, +): any { + return { secretIdentifier: item["secretIdentifier"] }; +} + +export function authorizationProviderKeyVaultContractDeserializer( + item: any, +): AuthorizationProviderKeyVaultContract { + return { + secretIdentifier: item["secretIdentifier"], + updated: !item["updated"] ? item["updated"] : new Date(item["updated"]), + lastStatus: !item["lastStatus"] + ? item["lastStatus"] + : keyVaultLastAccessStatusContractPropertiesDeserializer(item["lastStatus"]), + }; +} + +/** Federated identity credentials properties returned by the authorization provider. */ +export interface AuthorizationProviderFederatedIdentityCredentialsProperties { + /** The issuer URL of the federated identity credentials. */ + readonly issuer?: string; + /** The subject identifier of the federated identity credentials. */ + readonly subject?: string; + /** The audience of the federated identity credentials. */ + readonly audience?: string; +} + +export function authorizationProviderFederatedIdentityCredentialsPropertiesDeserializer( + item: any, +): AuthorizationProviderFederatedIdentityCredentialsProperties { + return { + issuer: item["issuer"], + subject: item["subject"], + audience: item["audience"], + }; +} + +/** Authorization Provider KeyVault create contract properties. */ +export interface AuthorizationProviderKeyVaultCreateProperties { + /** Key vault secret identifier for client secret. When provided, client secret will be retrieved from the provided key vault secret. */ + secretIdentifier?: string; +} + +export function authorizationProviderKeyVaultCreatePropertiesSerializer( + item: AuthorizationProviderKeyVaultCreateProperties, +): any { + return { secretIdentifier: item["secretIdentifier"] }; +} + +export function authorizationProviderKeyVaultCreatePropertiesDeserializer( + item: any, +): AuthorizationProviderKeyVaultCreateProperties { + return { + secretIdentifier: item["secretIdentifier"], + }; +} + +/** Paged Authorization Provider list representation. */ +export interface _AuthorizationProviderCollection { + /** Page values. */ + value?: AuthorizationProviderContract[]; + /** Next page link if any. */ + nextLink?: string; +} + +export function _authorizationProviderCollectionDeserializer( + item: any, +): _AuthorizationProviderCollection { + return { + value: !item["value"] + ? item["value"] + : authorizationProviderContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function authorizationProviderContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationProviderContractSerializer(item); + }); +} + +export function authorizationProviderContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationProviderContractDeserializer(item); + }); +} + +/** Authorization contract. */ +export interface AuthorizationContract extends ProxyResource { + /** Authorization type options */ + authorizationType?: AuthorizationType; + /** OAuth2 grant type options */ + oAuth2GrantType?: OAuth2GrantType; + /** Authorization parameters */ + parameters?: Record; + /** Authorization error details. */ + error?: AuthorizationError; + /** Status of the Authorization */ + status?: string; +} + +export function authorizationContractSerializer(item: AuthorizationContract): any { + return { + properties: areAllPropsUndefined(item, [ + "AuthorizationType", + "OAuth2GrantType", + "parameters", + "error", + "status", + ]) + ? undefined + : _authorizationContractPropertiesSerializer(item), + }; +} + +export function authorizationContractDeserializer(item: any): AuthorizationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _authorizationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Authorization details. */ +export interface AuthorizationContractProperties { + /** Authorization type options */ + authorizationType?: AuthorizationType; + /** OAuth2 grant type options */ + oAuth2GrantType?: OAuth2GrantType; + /** Authorization parameters */ + parameters?: Record; + /** Authorization error details. */ + error?: AuthorizationError; + /** Status of the Authorization */ + status?: string; +} + +export function authorizationContractPropertiesSerializer( + item: AuthorizationContractProperties, +): any { + return { + authorizationType: item["authorizationType"], + oauth2grantType: item["oAuth2GrantType"], + parameters: item["parameters"], + error: !item["error"] ? item["error"] : authorizationErrorSerializer(item["error"]), + status: item["status"], + }; +} + +export function authorizationContractPropertiesDeserializer( + item: any, +): AuthorizationContractProperties { + return { + authorizationType: item["authorizationType"], + oAuth2GrantType: item["oauth2grantType"], + parameters: !item["parameters"] + ? item["parameters"] + : Object.fromEntries( + Object.entries(item["parameters"]).map(([k, p]: [string, any]) => [k, p]), + ), + error: !item["error"] ? item["error"] : authorizationErrorDeserializer(item["error"]), + status: item["status"], + }; +} + +/** Authorization type options */ +export enum KnownAuthorizationType { + /** OAuth2 authorization type */ + OAuth2 = "OAuth2", +} + +/** + * Authorization type options \ + * {@link KnownAuthorizationType} can be used interchangeably with AuthorizationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OAuth2**: OAuth2 authorization type + */ +export type AuthorizationType = string; + +/** OAuth2 grant type options */ +export enum KnownOAuth2GrantType { + /** Authorization Code grant */ + AuthorizationCode = "AuthorizationCode", + /** Client Credential grant */ + ClientCredentials = "ClientCredentials", +} + +/** + * OAuth2 grant type options \ + * {@link KnownOAuth2GrantType} can be used interchangeably with OAuth2GrantType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AuthorizationCode**: Authorization Code grant \ + * **ClientCredentials**: Client Credential grant + */ +export type OAuth2GrantType = string; + +/** Authorization error details. */ +export interface AuthorizationError { + /** Error code */ + code?: string; + /** Error message */ + message?: string; +} + +export function authorizationErrorSerializer(item: AuthorizationError): any { + return { code: item["code"], message: item["message"] }; +} + +export function authorizationErrorDeserializer(item: any): AuthorizationError { + return { + code: item["code"], + message: item["message"], + }; +} + +/** Paged Authorization list representation. */ +export interface _AuthorizationCollection { + /** Page values. */ + value?: AuthorizationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _authorizationCollectionDeserializer(item: any): _AuthorizationCollection { + return { + value: !item["value"] ? item["value"] : authorizationContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function authorizationContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return authorizationContractSerializer(item); + }); +} + +export function authorizationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationContractDeserializer(item); + }); +} + +/** Authorization confirm consent code request contract. */ +export interface AuthorizationConfirmConsentCodeRequestContract { + /** The consent code from the authorization server after authorizing and consenting. */ + consentCode?: string; +} + +export function authorizationConfirmConsentCodeRequestContractSerializer( + item: AuthorizationConfirmConsentCodeRequestContract, +): any { + return { consentCode: item["consentCode"] }; +} + +/** Authorization login request contract. */ +export interface AuthorizationLoginRequestContract { + /** The redirect URL after login has completed. */ + postLoginRedirectUrl?: string; +} + +export function authorizationLoginRequestContractSerializer( + item: AuthorizationLoginRequestContract, +): any { + return { postLoginRedirectUrl: item["postLoginRedirectUrl"] }; +} + +/** Authorization login response contract. */ +export interface AuthorizationLoginResponseContract { + /** The login link */ + loginLink?: string; +} + +export function authorizationLoginResponseContractDeserializer( + item: any, +): AuthorizationLoginResponseContract { + return { + loginLink: item["loginLink"], + }; +} + +/** Authorization access policy contract. */ +export interface AuthorizationAccessPolicyContract extends ProxyResource { + /** The allowed Azure Active Directory Application IDs */ + appIds?: string[]; + /** The Tenant Id */ + tenantId?: string; + /** The Object Id */ + objectId?: string; +} + +export function authorizationAccessPolicyContractSerializer( + item: AuthorizationAccessPolicyContract, +): any { + return { + properties: areAllPropsUndefined(item, ["appIds", "tenantId", "objectId"]) + ? undefined + : _authorizationAccessPolicyContractPropertiesSerializer(item), + }; +} + +export function authorizationAccessPolicyContractDeserializer( + item: any, +): AuthorizationAccessPolicyContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _authorizationAccessPolicyContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Authorization Access Policy details. */ +export interface AuthorizationAccessPolicyContractProperties { + /** The allowed Azure Active Directory Application IDs */ + appIds?: string[]; + /** The Tenant Id */ + tenantId?: string; + /** The Object Id */ + objectId?: string; +} + +export function authorizationAccessPolicyContractPropertiesSerializer( + item: AuthorizationAccessPolicyContractProperties, +): any { + return { + appIds: !item["appIds"] + ? item["appIds"] + : item["appIds"].map((p: any) => { + return p; + }), + tenantId: item["tenantId"], + objectId: item["objectId"], + }; +} + +export function authorizationAccessPolicyContractPropertiesDeserializer( + item: any, +): AuthorizationAccessPolicyContractProperties { + return { + appIds: !item["appIds"] + ? item["appIds"] + : item["appIds"].map((p: any) => { + return p; + }), + tenantId: item["tenantId"], + objectId: item["objectId"], + }; +} + +/** Paged Authorization Access Policy list representation. */ +export interface _AuthorizationAccessPolicyCollection { + /** Page values. */ + value?: AuthorizationAccessPolicyContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Paged Authorization Access Policy list representation. */ + nextLink?: string; +} + +export function _authorizationAccessPolicyCollectionDeserializer( + item: any, +): _AuthorizationAccessPolicyCollection { + return { + value: !item["value"] + ? item["value"] + : authorizationAccessPolicyContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function authorizationAccessPolicyContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationAccessPolicyContractSerializer(item); + }); +} + +export function authorizationAccessPolicyContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationAccessPolicyContractDeserializer(item); + }); +} + +/** External OAuth authorization server settings. */ +export interface AuthorizationServerContract extends ProxyResource { + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; +} + +export function authorizationServerContractSerializer(item: AuthorizationServerContract): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "authorizationMethods", + "clientAuthenticationMethod", + "tokenBodyParameters", + "tokenEndpoint", + "supportState", + "defaultScope", + "bearerTokenSendingMethods", + "resourceOwnerUsername", + "resourceOwnerPassword", + "displayName", + "useInTestConsole", + "useInApiDocumentation", + "clientRegistrationEndpoint", + "authorizationEndpoint", + "grantTypes", + "clientId", + "clientSecret", + ]) + ? undefined + : _authorizationServerContractPropertiesSerializer(item), + }; +} + +export function authorizationServerContractDeserializer(item: any): AuthorizationServerContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _authorizationServerContractPropertiesDeserializer(item["properties"])), + }; +} + +/** External OAuth authorization server settings Properties. */ +export interface AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; +} + +export function authorizationServerContractPropertiesSerializer( + item: AuthorizationServerContractProperties, +): any { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArraySerializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +export function authorizationServerContractPropertiesDeserializer( + item: any, +): AuthorizationServerContractProperties { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArrayDeserializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +/** Known values of {@link GrantType} that the service accepts. */ +export enum KnownGrantType { + /** Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. */ + AuthorizationCode = "authorizationCode", + /** Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. */ + Implicit = "implicit", + /** Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. */ + ResourceOwnerPassword = "resourceOwnerPassword", + /** Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. */ + ClientCredentials = "clientCredentials", +} + +/** Type of GrantType */ +export type GrantType = string; + +/** External OAuth authorization server Update settings contract. */ +export interface AuthorizationServerContractBaseProperties { + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; +} + +export function authorizationServerContractBasePropertiesSerializer( + item: AuthorizationServerContractBaseProperties, +): any { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArraySerializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + }; +} + +export function authorizationServerContractBasePropertiesDeserializer( + item: any, +): AuthorizationServerContractBaseProperties { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArrayDeserializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + }; +} + +/** Type of AuthorizationMethod */ +export type AuthorizationMethod = + | "HEAD" + | "OPTIONS" + | "TRACE" + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE"; + +/** Known values of {@link ClientAuthenticationMethod} that the service accepts. */ +export enum KnownClientAuthenticationMethod { + /** Basic Client Authentication method. */ + Basic = "Basic", + /** Body based Authentication method. */ + Body = "Body", +} + +/** Type of ClientAuthenticationMethod */ +export type ClientAuthenticationMethod = string; + +export function tokenBodyParameterContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return tokenBodyParameterContractSerializer(item); + }); +} + +export function tokenBodyParameterContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tokenBodyParameterContractDeserializer(item); + }); +} + +/** OAuth acquire token request body parameter (www-url-form-encoded). */ +export interface TokenBodyParameterContract { + /** body parameter name. */ + name: string; + /** body parameter value. */ + value: string; +} + +export function tokenBodyParameterContractSerializer(item: TokenBodyParameterContract): any { + return { name: item["name"], value: item["value"] }; +} + +export function tokenBodyParameterContractDeserializer(item: any): TokenBodyParameterContract { + return { + name: item["name"], + value: item["value"], + }; +} + +/** Known values of {@link BearerTokenSendingMethod} that the service accepts. */ +export enum KnownBearerTokenSendingMethod { + /** authorizationHeader */ + AuthorizationHeader = "authorizationHeader", + /** query */ + Query = "query", +} + +/** Type of BearerTokenSendingMethod */ +export type BearerTokenSendingMethod = string; + +/** External OAuth authorization server settings. */ +export interface AuthorizationServerUpdateContract extends ProxyResource { + /** Description of the authorization server. Can contain HTML formatting tags. */ + description?: string; + /** HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. */ + authorizationMethods?: AuthorizationMethod[]; + /** Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ + clientAuthenticationMethod?: ClientAuthenticationMethod[]; + /** Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. */ + tokenBodyParameters?: TokenBodyParameterContract[]; + /** OAuth token endpoint. Contains absolute URI to entity being referenced. */ + tokenEndpoint?: string; + /** If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ + supportState?: boolean; + /** Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. */ + defaultScope?: string; + /** Specifies the mechanism by which access token is passed to the API. */ + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; +} + +export function authorizationServerUpdateContractSerializer( + item: AuthorizationServerUpdateContract, +): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "authorizationMethods", + "clientAuthenticationMethod", + "tokenBodyParameters", + "tokenEndpoint", + "supportState", + "defaultScope", + "bearerTokenSendingMethods", + "resourceOwnerUsername", + "resourceOwnerPassword", + "displayName", + "useInTestConsole", + "useInApiDocumentation", + "clientRegistrationEndpoint", + "authorizationEndpoint", + "grantTypes", + "clientId", + "clientSecret", + ]) + ? undefined + : _authorizationServerUpdateContractPropertiesSerializer(item), + }; +} + +/** External OAuth authorization server Update settings contract. */ +export interface AuthorizationServerUpdateContractProperties extends AuthorizationServerContractBaseProperties { + /** User-friendly authorization server name. */ + displayName?: string; + /** If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; + /** Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. */ + clientRegistrationEndpoint?: string; + /** OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. */ + authorizationEndpoint?: string; + /** Form of an authorization grant, which the client uses to request the access token. */ + grantTypes?: GrantType[]; + /** Client or app id registered with this authorization server. */ + clientId?: string; + /** Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; +} + +export function authorizationServerUpdateContractPropertiesSerializer( + item: AuthorizationServerUpdateContractProperties, +): any { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArraySerializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +/** Paged OAuth2 Authorization Servers list representation. */ +export interface _AuthorizationServerCollection { + /** Page values. */ + value?: AuthorizationServerContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _authorizationServerCollectionDeserializer( + item: any, +): _AuthorizationServerCollection { + return { + value: !item["value"] + ? item["value"] + : authorizationServerContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function authorizationServerContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationServerContractSerializer(item); + }); +} + +export function authorizationServerContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return authorizationServerContractDeserializer(item); + }); +} + +/** OAuth Server Secrets Contract. */ +export interface AuthorizationServerSecretsContract { + /** oAuth Authorization Server Secrets. */ + clientSecret?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. */ + resourceOwnerUsername?: string; + /** Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. */ + resourceOwnerPassword?: string; +} + +export function authorizationServerSecretsContractDeserializer( + item: any, +): AuthorizationServerSecretsContract { + return { + clientSecret: item["clientSecret"], + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + }; +} + +/** Reconnect request parameters. */ +export interface BackendReconnectContract extends ProxyResource { + /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ + after?: string; +} + +export function backendReconnectContractSerializer(item: BackendReconnectContract): any { + return { + properties: areAllPropsUndefined(item, ["after"]) + ? undefined + : _backendReconnectContractPropertiesSerializer(item), + }; +} + +/** Properties to control reconnect requests. */ +export interface BackendReconnectProperties { + /** Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. */ + after?: string; +} + +export function backendReconnectPropertiesSerializer(item: BackendReconnectProperties): any { + return { after: item["after"] }; +} + +/** Cache details. */ +export interface CacheContract extends ProxyResource { + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; +} + +export function cacheContractSerializer(item: CacheContract): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "connectionString", + "useFromLocation", + "resourceId", + ]) + ? undefined + : _cacheContractPropertiesSerializer(item), + }; +} + +export function cacheContractDeserializer(item: any): CacheContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _cacheContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the Cache contract. */ +export interface CacheContractProperties { + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; +} + +export function cacheContractPropertiesSerializer(item: CacheContractProperties): any { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +export function cacheContractPropertiesDeserializer(item: any): CacheContractProperties { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +/** Cache update details. */ +export interface CacheUpdateParameters { + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; +} + +export function cacheUpdateParametersSerializer(item: CacheUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "description", + "connectionString", + "useFromLocation", + "resourceId", + ]) + ? undefined + : _cacheUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Cache operation. */ +export interface CacheUpdateProperties { + /** Cache description */ + description?: string; + /** Runtime connection string to cache */ + connectionString?: string; + /** Location identifier to use cache from (should be either 'default' or valid Azure region identifier) */ + useFromLocation?: string; + /** Original uri of entity in external system cache points to */ + resourceId?: string; +} + +export function cacheUpdatePropertiesSerializer(item: CacheUpdateProperties): any { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +/** Paged Caches list representation. */ +export interface _CacheCollection { + /** Page values. */ + value?: CacheContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _cacheCollectionDeserializer(item: any): _CacheCollection { + return { + value: !item["value"] ? item["value"] : cacheContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function cacheContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return cacheContractSerializer(item); + }); +} + +export function cacheContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return cacheContractDeserializer(item); + }); +} + +/** Content type contract details. */ +export interface ContentTypeContract extends ProxyResource { + /** Content type identifier */ + idPropertiesId?: string; + /** Content type name. Must be 1 to 250 characters long. */ + namePropertiesName?: string; + /** Content type description. */ + description?: string; + /** Content type schema. */ + schema?: any; + /** Content type version. */ + version?: string; +} + +export function contentTypeContractSerializer(item: ContentTypeContract): any { + return { + properties: areAllPropsUndefined(item, ["id", "name", "description", "schema", "version"]) + ? undefined + : _contentTypeContractPropertiesSerializer(item), + }; +} + +export function contentTypeContractDeserializer(item: any): ContentTypeContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _contentTypeContractPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface ContentTypeContractProperties */ +export interface ContentTypeContractProperties { + /** Content type identifier */ + id?: string; + /** Content type name. Must be 1 to 250 characters long. */ + name?: string; + /** Content type description. */ + description?: string; + /** Content type schema. */ + schema?: any; + /** Content type version. */ + version?: string; +} + +export function contentTypeContractPropertiesSerializer(item: ContentTypeContractProperties): any { + return { + id: item["id"], + name: item["name"], + description: item["description"], + schema: item["schema"], + version: item["version"], + }; +} + +export function contentTypeContractPropertiesDeserializer( + item: any, +): ContentTypeContractProperties { + return { + id: item["id"], + name: item["name"], + description: item["description"], + schema: item["schema"], + version: item["version"], + }; +} + +/** Paged list of content types. */ +export interface _ContentTypeCollection { + /** Collection of content items. */ + readonly value?: ContentTypeContract[]; + /** Next page link, if any. */ + readonly nextLink?: string; +} + +export function _contentTypeCollectionDeserializer(item: any): _ContentTypeCollection { + return { + value: !item["value"] ? item["value"] : contentTypeContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function contentTypeContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return contentTypeContractSerializer(item); + }); +} + +export function contentTypeContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return contentTypeContractDeserializer(item); + }); +} + +/** Content type contract details. */ +export interface ContentItemContract extends ProxyResource { + /** Properties of the content item. */ + properties?: Record; +} + +export function contentItemContractSerializer(item: ContentItemContract): any { + return { properties: item["properties"] }; +} + +export function contentItemContractDeserializer(item: any): ContentItemContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + properties: !item["properties"] + ? item["properties"] + : Object.fromEntries( + Object.entries(item["properties"]).map(([k, p]: [string, any]) => [k, p]), + ), + }; +} + +/** Paged list of content items. */ +export interface _ContentItemCollection { + /** Collection of content items. */ + readonly value?: ContentItemContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _contentItemCollectionDeserializer(item: any): _ContentItemCollection { + return { + value: !item["value"] ? item["value"] : contentItemContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function contentItemContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return contentItemContractSerializer(item); + }); +} + +export function contentItemContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return contentItemContractDeserializer(item); + }); +} + +/** Deleted API Management Service information. */ +export interface DeletedServiceContract extends ProxyResource { + /** API Management Service Master Location. */ + readonly location?: string; + /** Fully-qualified API Management Service Resource ID */ + serviceId?: string; + /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + scheduledPurgeDate?: Date; + /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + deletionDate?: Date; +} + +export function deletedServiceContractDeserializer(item: any): DeletedServiceContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _deletedServiceContractPropertiesDeserializer(item["properties"])), + location: item["location"], + }; +} + +/** model interface DeletedServiceContractProperties */ +export interface DeletedServiceContractProperties { + /** Fully-qualified API Management Service Resource ID */ + serviceId?: string; + /** UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + scheduledPurgeDate?: Date; + /** UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. */ + deletionDate?: Date; +} + +export function deletedServiceContractPropertiesDeserializer( + item: any, +): DeletedServiceContractProperties { + return { + serviceId: item["serviceId"], + scheduledPurgeDate: !item["scheduledPurgeDate"] + ? item["scheduledPurgeDate"] + : new Date(item["scheduledPurgeDate"]), + deletionDate: !item["deletionDate"] ? item["deletionDate"] : new Date(item["deletionDate"]), + }; +} + +/** Paged deleted API Management Services List Representation. */ +export interface _DeletedServicesCollection { + /** Page values. */ + readonly value?: DeletedServiceContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _deletedServicesCollectionDeserializer(item: any): _DeletedServicesCollection { + return { + value: !item["value"] ? item["value"] : deletedServiceContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function deletedServiceContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return deletedServiceContractDeserializer(item); + }); +} + +/** Markdown documentation details. */ +export interface DocumentationContract extends ProxyResource { + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; +} + +export function documentationContractSerializer(item: DocumentationContract): any { + return { + properties: areAllPropsUndefined(item, ["title", "content"]) + ? undefined + : _documentationContractPropertiesSerializer(item), + }; +} + +export function documentationContractDeserializer(item: any): DocumentationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _documentationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Markdown documentation details. */ +export interface DocumentationContractProperties { + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; +} + +export function documentationContractPropertiesSerializer( + item: DocumentationContractProperties, +): any { + return { title: item["title"], content: item["content"] }; +} + +export function documentationContractPropertiesDeserializer( + item: any, +): DocumentationContractProperties { + return { + title: item["title"], + content: item["content"], + }; +} + +/** Documentation update contract details. */ +export interface DocumentationUpdateContract { + /** documentation title. */ + title?: string; + /** Markdown documentation content. */ + content?: string; +} + +export function documentationUpdateContractSerializer(item: DocumentationUpdateContract): any { + return { + properties: areAllPropsUndefined(item, ["title", "content"]) + ? undefined + : _documentationUpdateContractPropertiesSerializer(item), + }; +} + +/** Paged Documentation list representation. */ +export interface _DocumentationCollection { + /** Page values. */ + readonly value?: DocumentationContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _documentationCollectionDeserializer(item: any): _DocumentationCollection { + return { + value: !item["value"] ? item["value"] : documentationContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function documentationContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return documentationContractSerializer(item); + }); +} + +export function documentationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return documentationContractDeserializer(item); + }); +} + +/** Email Template details. */ +export interface EmailTemplateContract extends ProxyResource { + /** Subject of the Template. */ + subject?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Whether the template is the default template provided by API Management or has been edited. */ + readonly isDefault?: boolean; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; +} + +export function emailTemplateContractDeserializer(item: any): EmailTemplateContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _emailTemplateContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Email Template Contract properties. */ +export interface EmailTemplateContractProperties { + /** Subject of the Template. */ + subject: string; + /** Email Template Body. This should be a valid XDocument */ + body: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Whether the template is the default template provided by API Management or has been edited. */ + readonly isDefault?: boolean; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; +} + +export function emailTemplateContractPropertiesDeserializer( + item: any, +): EmailTemplateContractProperties { + return { + subject: item["subject"], + body: item["body"], + title: item["title"], + description: item["description"], + isDefault: item["isDefault"], + parameters: !item["parameters"] + ? item["parameters"] + : emailTemplateParametersContractPropertiesArrayDeserializer(item["parameters"]), + }; +} + +export function emailTemplateParametersContractPropertiesArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return emailTemplateParametersContractPropertiesSerializer(item); + }); +} + +export function emailTemplateParametersContractPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return emailTemplateParametersContractPropertiesDeserializer(item); + }); +} + +/** Email Template Parameter contract. */ +export interface EmailTemplateParametersContractProperties { + /** Template parameter name. */ + name?: string; + /** Template parameter title. */ + title?: string; + /** Template parameter description. */ + description?: string; +} + +export function emailTemplateParametersContractPropertiesSerializer( + item: EmailTemplateParametersContractProperties, +): any { + return { name: item["name"], title: item["title"], description: item["description"] }; +} + +export function emailTemplateParametersContractPropertiesDeserializer( + item: any, +): EmailTemplateParametersContractProperties { + return { + name: item["name"], + title: item["title"], + description: item["description"], + }; +} + +/** Known values of {@link TemplateName} that the service accepts. */ +export enum KnownTemplateName { + /** applicationApprovedNotificationMessage */ + ApplicationApprovedNotificationMessage = "applicationApprovedNotificationMessage", + /** accountClosedDeveloper */ + AccountClosedDeveloper = "accountClosedDeveloper", + /** quotaLimitApproachingDeveloperNotificationMessage */ + QuotaLimitApproachingDeveloperNotificationMessage = "quotaLimitApproachingDeveloperNotificationMessage", + /** newDeveloperNotificationMessage */ + NewDeveloperNotificationMessage = "newDeveloperNotificationMessage", + /** emailChangeIdentityDefault */ + EmailChangeIdentityDefault = "emailChangeIdentityDefault", + /** inviteUserNotificationMessage */ + InviteUserNotificationMessage = "inviteUserNotificationMessage", + /** newCommentNotificationMessage */ + NewCommentNotificationMessage = "newCommentNotificationMessage", + /** confirmSignUpIdentityDefault */ + ConfirmSignUpIdentityDefault = "confirmSignUpIdentityDefault", + /** newIssueNotificationMessage */ + NewIssueNotificationMessage = "newIssueNotificationMessage", + /** purchaseDeveloperNotificationMessage */ + PurchaseDeveloperNotificationMessage = "purchaseDeveloperNotificationMessage", + /** passwordResetIdentityDefault */ + PasswordResetIdentityDefault = "passwordResetIdentityDefault", + /** passwordResetByAdminNotificationMessage */ + PasswordResetByAdminNotificationMessage = "passwordResetByAdminNotificationMessage", + /** rejectDeveloperNotificationMessage */ + RejectDeveloperNotificationMessage = "rejectDeveloperNotificationMessage", + /** requestDeveloperNotificationMessage */ + RequestDeveloperNotificationMessage = "requestDeveloperNotificationMessage", +} + +/** Type of TemplateName */ +export type TemplateName = string; + +/** Email Template update Parameters. */ +export interface EmailTemplateUpdateParameters { + /** Subject of the Template. */ + subject?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; +} + +export function emailTemplateUpdateParametersSerializer(item: EmailTemplateUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "subject", + "title", + "description", + "body", + "parameters", + ]) + ? undefined + : _emailTemplateUpdateParametersPropertiesSerializer(item), + }; +} + +/** Email Template Update Contract properties. */ +export interface EmailTemplateUpdateParameterProperties { + /** Subject of the Template. */ + subject?: string; + /** Title of the Template. */ + title?: string; + /** Description of the Email Template. */ + description?: string; + /** Email Template Body. This should be a valid XDocument */ + body?: string; + /** Email Template Parameter values. */ + parameters?: EmailTemplateParametersContractProperties[]; +} + +export function emailTemplateUpdateParameterPropertiesSerializer( + item: EmailTemplateUpdateParameterProperties, +): any { + return { + subject: item["subject"], + title: item["title"], + description: item["description"], + body: item["body"], + parameters: !item["parameters"] + ? item["parameters"] + : emailTemplateParametersContractPropertiesArraySerializer(item["parameters"]), + }; +} + +/** Paged email template list representation. */ +export interface _EmailTemplateCollection { + /** Page values. */ + value?: EmailTemplateContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _emailTemplateCollectionDeserializer(item: any): _EmailTemplateCollection { + return { + value: !item["value"] ? item["value"] : emailTemplateContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function emailTemplateContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return emailTemplateContractDeserializer(item); + }); +} + +/** A single API Management gateway resource in List or Get response. */ +export interface ApiManagementGatewayConfigConnectionResource extends ProxyResource { + /** ETag of the resource. */ + readonly etag?: string; + /** The current provisioning state of the API Management gateway config connection */ + readonly provisioningState?: string; + /** The link to the API Management service workspace. */ + sourceId?: string; + /** The default hostname of the data-plane gateway. */ + readonly defaultHostname?: string; + /** The hostnames of the data-plane gateway to which requests can be sent. */ + hostnames?: string[]; +} + +export function apiManagementGatewayConfigConnectionResourceSerializer( + item: ApiManagementGatewayConfigConnectionResource, +): any { + return { properties: _apiManagementGatewayConfigConnectionResourcePropertiesSerializer(item) }; +} + +export function apiManagementGatewayConfigConnectionResourceDeserializer( + item: any, +): ApiManagementGatewayConfigConnectionResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._apiManagementGatewayConfigConnectionResourcePropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** model interface GatewayConfigConnectionBaseProperties */ +export interface GatewayConfigConnectionBaseProperties { + /** The current provisioning state of the API Management gateway config connection */ + readonly provisioningState?: string; + /** The link to the API Management service workspace. */ + sourceId?: string; + /** The default hostname of the data-plane gateway. */ + readonly defaultHostname?: string; + /** The hostnames of the data-plane gateway to which requests can be sent. */ + hostnames?: string[]; +} + +export function gatewayConfigConnectionBasePropertiesSerializer( + item: GatewayConfigConnectionBaseProperties, +): any { + return { + sourceId: item["sourceId"], + hostnames: !item["hostnames"] + ? item["hostnames"] + : item["hostnames"].map((p: any) => { + return p; + }), + }; +} + +export function gatewayConfigConnectionBasePropertiesDeserializer( + item: any, +): GatewayConfigConnectionBaseProperties { + return { + provisioningState: item["provisioningState"], + sourceId: item["sourceId"], + defaultHostname: item["defaultHostname"], + hostnames: !item["hostnames"] + ? item["hostnames"] + : item["hostnames"].map((p: any) => { + return p; + }), + }; +} + +/** The response of the List API Management gateway operation. */ +export interface _ApiManagementGatewayConfigConnectionListResult { + /** Result of the List API Management gateway config connection operation. */ + value: ApiManagementGatewayConfigConnectionResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; +} + +export function _apiManagementGatewayConfigConnectionListResultDeserializer( + item: any, +): _ApiManagementGatewayConfigConnectionListResult { + return { + value: apiManagementGatewayConfigConnectionResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function apiManagementGatewayConfigConnectionResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementGatewayConfigConnectionResourceSerializer(item); + }); +} + +export function apiManagementGatewayConfigConnectionResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementGatewayConfigConnectionResourceDeserializer(item); + }); +} + +/** A single API Management gateway hostname binding resource in List or Get response. */ +export interface GatewayHostnameBindingResource extends ProxyResource { + /** If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. */ + readonly eTag?: string; + /** The current provisioning state of the API Management gateway hostname binding. */ + readonly provisioningState?: string; + /** The default hostname of the data-plane gateway. */ + hostname: string; + /** The link to the API Management service workspace. */ + keyVault: GatewayHostnameBindingKeyVault; + /** The hostnames of the data-plane gateway to which requests can be sent. */ + readonly certificate?: GatewayHostnameBindingCertificate; +} + +export function gatewayHostnameBindingResourceSerializer( + item: GatewayHostnameBindingResource, +): any { + return { properties: _gatewayHostnameBindingResourcePropertiesSerializer(item) }; +} + +export function gatewayHostnameBindingResourceDeserializer( + item: any, +): GatewayHostnameBindingResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._gatewayHostnameBindingResourcePropertiesDeserializer(item["properties"]), + eTag: item["etag"], + }; +} + +/** model interface GatewayHostnameBindingBaseProperties */ +export interface GatewayHostnameBindingBaseProperties { + /** The current provisioning state of the API Management gateway hostname binding. */ + readonly provisioningState?: string; + /** The default hostname of the data-plane gateway. */ + hostname: string; + /** The link to the API Management service workspace. */ + keyVault: GatewayHostnameBindingKeyVault; + /** The hostnames of the data-plane gateway to which requests can be sent. */ + readonly certificate?: GatewayHostnameBindingCertificate; +} + +export function gatewayHostnameBindingBasePropertiesSerializer( + item: GatewayHostnameBindingBaseProperties, +): any { + return { + hostname: item["hostname"], + keyVault: gatewayHostnameBindingKeyVaultSerializer(item["keyVault"]), + }; +} + +export function gatewayHostnameBindingBasePropertiesDeserializer( + item: any, +): GatewayHostnameBindingBaseProperties { + return { + provisioningState: item["provisioningState"], + hostname: item["hostname"], + keyVault: gatewayHostnameBindingKeyVaultDeserializer(item["keyVault"]), + certificate: !item["certificate"] + ? item["certificate"] + : gatewayHostnameBindingCertificateDeserializer(item["certificate"]), + }; +} + +/** model interface GatewayHostnameBindingKeyVault */ +export interface GatewayHostnameBindingKeyVault { + /** The current provisioning state of the API Management gateway hostname binding. */ + secretId: string; + /** The default hostname of the data-plane gateway. */ + identityClientId?: string; + /** The last status of the Key Vault certificate fetch process. */ + lastStatus?: GatewayHostnameBindingKeyVaultLastStatus; +} + +export function gatewayHostnameBindingKeyVaultSerializer( + item: GatewayHostnameBindingKeyVault, +): any { + return { + secretId: item["secretId"], + identityClientId: item["identityClientId"], + lastStatus: !item["lastStatus"] + ? item["lastStatus"] + : gatewayHostnameBindingKeyVaultLastStatusSerializer(item["lastStatus"]), + }; +} + +export function gatewayHostnameBindingKeyVaultDeserializer( + item: any, +): GatewayHostnameBindingKeyVault { + return { + secretId: item["secretId"], + identityClientId: item["identityClientId"], + lastStatus: !item["lastStatus"] + ? item["lastStatus"] + : gatewayHostnameBindingKeyVaultLastStatusDeserializer(item["lastStatus"]), + }; +} + +/** model interface GatewayHostnameBindingKeyVaultLastStatus */ +export interface GatewayHostnameBindingKeyVaultLastStatus { + /** The last status of the Key Vault certificate fetch process. */ + readonly code?: KeyVaultFetchCode; + /** The last time the Key Vault certificate fetch process was attempted. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly timeStampUtc?: Date; + /** The last time the Key Vault certificate fetch process was successful. Only when the fetch process has succeeded at least once and current state is failed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + readonly lastSuccessTimeStampUtc?: Date; +} + +export function gatewayHostnameBindingKeyVaultLastStatusSerializer( + _item: GatewayHostnameBindingKeyVaultLastStatus, +): any { + return {}; +} + +export function gatewayHostnameBindingKeyVaultLastStatusDeserializer( + item: any, +): GatewayHostnameBindingKeyVaultLastStatus { + return { + code: item["code"], + timeStampUtc: !item["timeStampUtc"] ? item["timeStampUtc"] : new Date(item["timeStampUtc"]), + lastSuccessTimeStampUtc: !item["lastSuccessTimeStampUtc"] + ? item["lastSuccessTimeStampUtc"] + : new Date(item["lastSuccessTimeStampUtc"]), + }; +} + +/** The last status of the Key Vault certificate fetch process. */ +export type KeyVaultFetchCode = "Success" | "Failed"; + +/** model interface GatewayHostnameBindingCertificate */ +export interface GatewayHostnameBindingCertificate { + /** The thumbprint of the certificate. */ + readonly thumbprint?: string; + /** The subject of the certificate. */ + readonly subject?: string; + /** The expiration date of the certificate. */ + readonly expiry?: Date; +} + +export function gatewayHostnameBindingCertificateDeserializer( + item: any, +): GatewayHostnameBindingCertificate { + return { + thumbprint: item["thumbprint"], + subject: item["subject"], + expiry: !item["expiry"] ? item["expiry"] : new Date(item["expiry"]), + }; +} + +/** The response of the List API Management gateway hostname binding operation. */ +export interface _GatewayHostnameBindingListResult { + /** Result of the List API Management gateway hostname binding operation. */ + value: GatewayHostnameBindingResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management gateway hostname bindings. */ + nextLink?: string; +} + +export function _gatewayHostnameBindingListResultDeserializer( + item: any, +): _GatewayHostnameBindingListResult { + return { + value: gatewayHostnameBindingResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function gatewayHostnameBindingResourceArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayHostnameBindingResourceSerializer(item); + }); +} + +export function gatewayHostnameBindingResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayHostnameBindingResourceDeserializer(item); + }); +} + +/** Gateway details. */ +export interface GatewayContract extends ProxyResource { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Gateway location. */ + locationData?: ResourceLocationDataContract; + /** Gateway description */ + description?: string; +} + +export function gatewayContractSerializer(item: GatewayContract): any { + return { + properties: areAllPropsUndefined(item, ["locationData", "description"]) + ? undefined + : _gatewayContractPropertiesSerializer(item), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentitySerializer(item["identity"]), + }; +} + +export function gatewayContractDeserializer(item: any): GatewayContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _gatewayContractPropertiesDeserializer(item["properties"])), + identity: !item["identity"] + ? item["identity"] + : managedServiceIdentityDeserializer(item["identity"]), + }; +} + +/** Properties of the Gateway contract. */ +export interface GatewayContractProperties { + /** Gateway location. */ + locationData?: ResourceLocationDataContract; + /** Gateway description */ + description?: string; +} + +export function gatewayContractPropertiesSerializer(item: GatewayContractProperties): any { + return { + locationData: !item["locationData"] + ? item["locationData"] + : resourceLocationDataContractSerializer(item["locationData"]), + description: item["description"], + }; +} + +export function gatewayContractPropertiesDeserializer(item: any): GatewayContractProperties { + return { + locationData: !item["locationData"] + ? item["locationData"] + : resourceLocationDataContractDeserializer(item["locationData"]), + description: item["description"], + }; +} + +/** Resource location data properties. */ +export interface ResourceLocationDataContract { + /** A canonical name for the geographic or physical location. */ + name: string; + /** The city or locality where the resource is located. */ + city?: string; + /** The district, state, or province where the resource is located. */ + district?: string; + /** The country or region where the resource is located. */ + countryOrRegion?: string; +} + +export function resourceLocationDataContractSerializer(item: ResourceLocationDataContract): any { + return { + name: item["name"], + city: item["city"], + district: item["district"], + countryOrRegion: item["countryOrRegion"], + }; +} + +export function resourceLocationDataContractDeserializer(item: any): ResourceLocationDataContract { + return { + name: item["name"], + city: item["city"], + district: item["district"], + countryOrRegion: item["countryOrRegion"], + }; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { + /** The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly principalId?: string; + /** The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ + readonly tenantId?: string; + /** The type of managed identity assigned to this resource. */ + type: ManagedServiceIdentityType; + /** The identities assigned to this resource by the user. */ + userAssignedIdentities?: Record; +} + +export function managedServiceIdentitySerializer(item: ManagedServiceIdentity): any { + return { type: item["type"], userAssignedIdentities: item["userAssignedIdentities"] }; +} + +export function managedServiceIdentityDeserializer(item: any): ManagedServiceIdentity { + return { + principalId: item["principalId"], + tenantId: item["tenantId"], + type: item["type"], + userAssignedIdentities: !item["userAssignedIdentities"] + ? item["userAssignedIdentities"] + : Object.fromEntries( + Object.entries(item["userAssignedIdentities"]).map(([k, p]: [string, any]) => [ + k, + !p ? p : userAssignedIdentityDeserializer(p), + ]), + ), + }; +} + +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +export enum KnownManagedServiceIdentityType { + /** No managed identity. */ + None = "None", + /** System assigned managed identity. */ + SystemAssigned = "SystemAssigned", + /** User assigned managed identity. */ + UserAssigned = "UserAssigned", + /** System and user assigned managed identity. */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +} + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None**: No managed identity. \ + * **SystemAssigned**: System assigned managed identity. \ + * **UserAssigned**: User assigned managed identity. \ + * **SystemAssigned,UserAssigned**: System and user assigned managed identity. + */ +export type ManagedServiceIdentityType = string; + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** The principal ID of the assigned identity. */ + readonly principalId?: string; + /** The client ID of the assigned identity. */ + readonly clientId?: string; +} + +export function userAssignedIdentitySerializer(_item: UserAssignedIdentity): any { + return {}; +} + +export function userAssignedIdentityDeserializer(item: any): UserAssignedIdentity { + return { + principalId: item["principalId"], + clientId: item["clientId"], + }; +} + +/** Paged Gateway list representation. */ +export interface _GatewayCollection { + /** Page values. */ + readonly value?: GatewayContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _gatewayCollectionDeserializer(item: any): _GatewayCollection { + return { + value: !item["value"] ? item["value"] : gatewayContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function gatewayContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return gatewayContractSerializer(item); + }); +} + +export function gatewayContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return gatewayContractDeserializer(item); + }); +} + +/** Gateway authentication keys. */ +export interface GatewayKeysContract { + /** Primary gateway key. */ + primary?: string; + /** Secondary gateway key. */ + secondary?: string; +} + +export function gatewayKeysContractDeserializer(item: any): GatewayKeysContract { + return { + primary: item["primary"], + secondary: item["secondary"], + }; +} + +/** Gateway key regeneration request contract properties. */ +export interface GatewayKeyRegenerationRequestContract { + /** The Key being regenerated. */ + keyType: KeyType; +} + +export function gatewayKeyRegenerationRequestContractSerializer( + item: GatewayKeyRegenerationRequestContract, +): any { + return { keyType: item["keyType"] }; +} + +/** The Key to be used to generate token for user. */ +export type KeyType = "primary" | "secondary"; + +/** Gateway token request contract properties. */ +export interface GatewayTokenRequestContract { + /** The Key to be used to generate gateway token. */ + keyType: KeyType; + /** The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry: Date; +} + +export function gatewayTokenRequestContractSerializer(item: GatewayTokenRequestContract): any { + return { keyType: item["keyType"], expiry: item["expiry"].toISOString() }; +} + +/** Gateway access token. */ +export interface GatewayTokenContract { + /** Shared Access Authentication token value for the Gateway. */ + value?: string; +} + +export function gatewayTokenContractDeserializer(item: any): GatewayTokenContract { + return { + value: item["value"], + }; +} + +/** List debug credentials properties. */ +export interface GatewayListDebugCredentialsContract { + /** Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When property is not specified, them value PT1H is used. */ + credentialsExpireAfter?: string; + /** Purposes of debug credential. */ + purposes: GatewayListDebugCredentialsContractPurpose[]; + /** Full resource Id of an API. */ + apiId: string; +} + +export function gatewayListDebugCredentialsContractSerializer( + item: GatewayListDebugCredentialsContract, +): any { + return { + credentialsExpireAfter: item["credentialsExpireAfter"], + purposes: item["purposes"].map((p: any) => { + return p; + }), + apiId: item["apiId"], + }; +} + +/** Purpose of debug credential. */ +export enum KnownGatewayListDebugCredentialsContractPurpose { + /** The tracing purpose. */ + Tracing = "tracing", +} + +/** + * Purpose of debug credential. \ + * {@link KnownGatewayListDebugCredentialsContractPurpose} can be used interchangeably with GatewayListDebugCredentialsContractPurpose, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **tracing**: The tracing purpose. + */ +export type GatewayListDebugCredentialsContractPurpose = string; + +/** Gateway debug credentials. */ +export interface GatewayDebugCredentialsContract { + /** Gateway debug token. */ + token?: string; +} + +export function gatewayDebugCredentialsContractDeserializer( + item: any, +): GatewayDebugCredentialsContract { + return { + token: item["token"], + }; +} + +/** List trace properties. */ +export interface GatewayListTraceContract { + /** Trace id. */ + traceId?: string; +} + +export function gatewayListTraceContractSerializer(item: GatewayListTraceContract): any { + return { traceId: item["traceId"] }; +} + +/** Association entity details. */ +export interface AssociationContract extends ProxyResource { + /** Provisioning state. */ + provisioningState?: "created"; +} + +export function associationContractSerializer(item: AssociationContract): any { + return { + properties: areAllPropsUndefined(item, ["provisioningState"]) + ? undefined + : _associationContractPropertiesSerializer(item), + }; +} + +/** Association entity contract properties. */ +export interface AssociationContractProperties { + /** Provisioning state. */ + provisioningState?: "created"; +} + +export function associationContractPropertiesSerializer(item: AssociationContractProperties): any { + return { provisioningState: item["provisioningState"] }; +} + +/** Gateway hostname configuration details. */ +export interface GatewayHostnameConfigurationContract extends ProxyResource { + /** Hostname value. Supports valid domain name, partial or full wildcard */ + hostname?: string; + /** Identifier of Certificate entity that will be used for TLS connection establishment */ + certificateId?: string; + /** Determines whether gateway requests client certificate */ + negotiateClientCertificate?: boolean; + /** Specifies if TLS 1.0 is supported */ + tls10Enabled?: boolean; + /** Specifies if TLS 1.1 is supported */ + tls11Enabled?: boolean; + /** Specifies if HTTP/2.0 is supported */ + http2Enabled?: boolean; +} + +export function gatewayHostnameConfigurationContractSerializer( + item: GatewayHostnameConfigurationContract, +): any { + return { + properties: areAllPropsUndefined(item, [ + "hostname", + "certificateId", + "negotiateClientCertificate", + "tls10Enabled", + "tls11Enabled", + "http2Enabled", + ]) + ? undefined + : _gatewayHostnameConfigurationContractPropertiesSerializer(item), + }; +} + +export function gatewayHostnameConfigurationContractDeserializer( + item: any, +): GatewayHostnameConfigurationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _gatewayHostnameConfigurationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Gateway hostname configuration details. */ +export interface GatewayHostnameConfigurationContractProperties { + /** Hostname value. Supports valid domain name, partial or full wildcard */ + hostname?: string; + /** Identifier of Certificate entity that will be used for TLS connection establishment */ + certificateId?: string; + /** Determines whether gateway requests client certificate */ + negotiateClientCertificate?: boolean; + /** Specifies if TLS 1.0 is supported */ + tls10Enabled?: boolean; + /** Specifies if TLS 1.1 is supported */ + tls11Enabled?: boolean; + /** Specifies if HTTP/2.0 is supported */ + http2Enabled?: boolean; +} + +export function gatewayHostnameConfigurationContractPropertiesSerializer( + item: GatewayHostnameConfigurationContractProperties, +): any { + return { + hostname: item["hostname"], + certificateId: item["certificateId"], + negotiateClientCertificate: item["negotiateClientCertificate"], + tls10Enabled: item["tls10Enabled"], + tls11Enabled: item["tls11Enabled"], + http2Enabled: item["http2Enabled"], + }; +} + +export function gatewayHostnameConfigurationContractPropertiesDeserializer( + item: any, +): GatewayHostnameConfigurationContractProperties { + return { + hostname: item["hostname"], + certificateId: item["certificateId"], + negotiateClientCertificate: item["negotiateClientCertificate"], + tls10Enabled: item["tls10Enabled"], + tls11Enabled: item["tls11Enabled"], + http2Enabled: item["http2Enabled"], + }; +} + +/** Paged Gateway hostname configuration list representation. */ +export interface _GatewayHostnameConfigurationCollection { + /** Page values. */ + readonly value?: GatewayHostnameConfigurationContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _gatewayHostnameConfigurationCollectionDeserializer( + item: any, +): _GatewayHostnameConfigurationCollection { + return { + value: !item["value"] + ? item["value"] + : gatewayHostnameConfigurationContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function gatewayHostnameConfigurationContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayHostnameConfigurationContractSerializer(item); + }); +} + +export function gatewayHostnameConfigurationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayHostnameConfigurationContractDeserializer(item); + }); +} + +/** Gateway certificate authority details. */ +export interface GatewayCertificateAuthorityContract extends ProxyResource { + /** Determines whether certificate authority is trusted. */ + isTrusted?: boolean; +} + +export function gatewayCertificateAuthorityContractSerializer( + item: GatewayCertificateAuthorityContract, +): any { + return { + properties: areAllPropsUndefined(item, ["isTrusted"]) + ? undefined + : _gatewayCertificateAuthorityContractPropertiesSerializer(item), + }; +} + +export function gatewayCertificateAuthorityContractDeserializer( + item: any, +): GatewayCertificateAuthorityContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _gatewayCertificateAuthorityContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Gateway certificate authority details. */ +export interface GatewayCertificateAuthorityContractProperties { + /** Determines whether certificate authority is trusted. */ + isTrusted?: boolean; +} + +export function gatewayCertificateAuthorityContractPropertiesSerializer( + item: GatewayCertificateAuthorityContractProperties, +): any { + return { isTrusted: item["isTrusted"] }; +} + +export function gatewayCertificateAuthorityContractPropertiesDeserializer( + item: any, +): GatewayCertificateAuthorityContractProperties { + return { + isTrusted: item["isTrusted"], + }; +} + +/** Paged Gateway certificate authority list representation. */ +export interface _GatewayCertificateAuthorityCollection { + /** Page values. */ + readonly value?: GatewayCertificateAuthorityContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _gatewayCertificateAuthorityCollectionDeserializer( + item: any, +): _GatewayCertificateAuthorityCollection { + return { + value: !item["value"] + ? item["value"] + : gatewayCertificateAuthorityContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function gatewayCertificateAuthorityContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayCertificateAuthorityContractSerializer(item); + }); +} + +export function gatewayCertificateAuthorityContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return gatewayCertificateAuthorityContractDeserializer(item); + }); +} + +/** Paged Users list representation. */ +export interface _UserCollection { + /** Page values. */ + value?: UserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _userCollectionDeserializer(item: any): _UserCollection { + return { + value: !item["value"] ? item["value"] : userContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function userContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return userContractDeserializer(item); + }); +} + +/** User details. */ +export interface UserContract extends ProxyResource { + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + registrationDate?: Date; + /** Collection of groups user is part of. */ + readonly groups?: GroupContractProperties[]; +} + +export function userContractDeserializer(item: any): UserContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _userContractPropertiesDeserializer(item["properties"])), + }; +} + +/** User profile. */ +export interface UserContractProperties extends UserEntityBaseParameters { + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** Email address. */ + email?: string; + /** Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + registrationDate?: Date; + /** Collection of groups user is part of. */ + readonly groups?: GroupContractProperties[]; +} + +export function userContractPropertiesDeserializer(item: any): UserContractProperties { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArrayDeserializer(item["identities"]), + firstName: item["firstName"], + lastName: item["lastName"], + email: item["email"], + registrationDate: !item["registrationDate"] + ? item["registrationDate"] + : new Date(item["registrationDate"]), + groups: !item["groups"] + ? item["groups"] + : groupContractPropertiesArrayDeserializer(item["groups"]), + }; +} + +export function groupContractPropertiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return groupContractPropertiesDeserializer(item); + }); +} + +/** User Entity Base Parameters set. */ +export interface UserEntityBaseParameters { + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; +} + +export function userEntityBaseParametersSerializer(item: UserEntityBaseParameters): any { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArraySerializer(item["identities"]), + }; +} + +export function userEntityBaseParametersDeserializer(item: any): UserEntityBaseParameters { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArrayDeserializer(item["identities"]), + }; +} + +/** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ +export enum KnownUserState { + /** User state is active. */ + Active = "active", + /** User is blocked. Blocked users cannot authenticate at developer portal or call API. */ + Blocked = "blocked", + /** User account is pending. Requires identity confirmation before it can be made active. */ + Pending = "pending", + /** User account is closed. All identities and related entities are removed. */ + Deleted = "deleted", +} + +/** + * Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. \ + * {@link KnownUserState} can be used interchangeably with UserState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **active**: User state is active. \ + * **blocked**: User is blocked. Blocked users cannot authenticate at developer portal or call API. \ + * **pending**: User account is pending. Requires identity confirmation before it can be made active. \ + * **deleted**: User account is closed. All identities and related entities are removed. + */ +export type UserState = string; + +export function userIdentityContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return userIdentityContractSerializer(item); + }); +} + +export function userIdentityContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return userIdentityContractDeserializer(item); + }); +} + +/** User identity details. */ +export interface UserIdentityContract { + /** Identity provider name. */ + provider?: string; + /** Identifier value within provider. */ + id?: string; +} + +export function userIdentityContractSerializer(item: UserIdentityContract): any { + return { provider: item["provider"], id: item["id"] }; +} + +export function userIdentityContractDeserializer(item: any): UserIdentityContract { + return { + provider: item["provider"], + id: item["id"], + }; +} + +/** Identity Provider details. */ +export interface IdentityProviderContract extends ProxyResource { + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderContractDeserializer(item: any): IdentityProviderContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _identityProviderContractPropertiesDeserializer(item["properties"])), + }; +} + +/** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ +export interface IdentityProviderContractProperties extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderContractPropertiesDeserializer( + item: any, +): IdentityProviderContractProperties { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +/** Known values of {@link IdentityProviderType} that the service accepts. */ +export enum KnownIdentityProviderType { + /** Facebook as Identity provider. */ + Facebook = "facebook", + /** Google as Identity provider. */ + Google = "google", + /** Microsoft Live as Identity provider. */ + Microsoft = "microsoft", + /** Twitter as Identity provider. */ + Twitter = "twitter", + /** Azure Active Directory as Identity provider. */ + Aad = "aad", + /** Azure Active Directory B2C as Identity provider. */ + AadB2C = "aadB2C", +} + +/** Type of IdentityProviderType */ +export type IdentityProviderType = string; + +/** Identity Provider Base Parameter Properties. */ +export interface IdentityProviderBaseParameters { + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; +} + +export function identityProviderBaseParametersSerializer( + item: IdentityProviderBaseParameters, +): any { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + }; +} + +export function identityProviderBaseParametersDeserializer( + item: any, +): IdentityProviderBaseParameters { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + }; +} + +/** Identity Provider details. */ +export interface IdentityProviderCreateContract extends ProxyResource { + /** Identity Provider Type identifier. */ + typePropertiesType?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret?: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderCreateContractSerializer( + item: IdentityProviderCreateContract, +): any { + return { + properties: areAllPropsUndefined(item, [ + "type", + "signinTenant", + "allowedTenants", + "authority", + "signupPolicyName", + "signinPolicyName", + "profileEditingPolicyName", + "passwordResetPolicyName", + "clientLibrary", + "clientId", + "clientSecret", + "certificateId", + ]) + ? undefined + : _identityProviderCreateContractPropertiesSerializer(item), + }; +} + +/** The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. */ +export interface IdentityProviderCreateContractProperties extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + clientSecret: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderCreateContractPropertiesSerializer( + item: IdentityProviderCreateContractProperties, +): any { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +/** Parameters supplied to update Identity Provider */ +export interface IdentityProviderUpdateParameters { + /** Identity Provider Type identifier. */ + type?: IdentityProviderType; + /** The TenantId to use instead of Common when logging into Active Directory */ + signinTenant?: string; + /** List of Allowed Tenants when configuring Azure Active Directory login. */ + allowedTenants?: string[]; + /** OpenID Connect discovery endpoint hostname for AAD or AAD B2C. */ + authority?: string; + /** Signup Policy Name. Only applies to AAD B2C Identity Provider. */ + signupPolicyName?: string; + /** Signin Policy Name. Only applies to AAD B2C Identity Provider. */ + signinPolicyName?: string; + /** Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. */ + profileEditingPolicyName?: string; + /** Password Reset Policy Name. Only applies to AAD B2C Identity Provider. */ + passwordResetPolicyName?: string; + /** The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. */ + clientLibrary?: string; + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderUpdateParametersSerializer( + item: IdentityProviderUpdateParameters, +): any { + return { + properties: areAllPropsUndefined(item, [ + "type", + "signinTenant", + "allowedTenants", + "authority", + "signupPolicyName", + "signinPolicyName", + "profileEditingPolicyName", + "passwordResetPolicyName", + "clientLibrary", + "clientId", + "clientSecret", + "certificateId", + ]) + ? undefined + : _identityProviderUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update Identity Provider operation. */ +export interface IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { + /** Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. */ + clientId?: string; + /** Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. */ + clientSecret?: string; + /** Certificate full resource ID used in external Identity Provider */ + certificateId?: string; +} + +export function identityProviderUpdatePropertiesSerializer( + item: IdentityProviderUpdateProperties, +): any { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +/** List of all the Identity Providers configured on the service instance. */ +export interface _IdentityProviderList { + /** Identity Provider configuration values. */ + value?: IdentityProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _identityProviderListDeserializer(item: any): _IdentityProviderList { + return { + value: !item["value"] + ? item["value"] + : identityProviderContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function identityProviderContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return identityProviderContractDeserializer(item); + }); +} + +/** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ +export interface ClientSecretContract { + /** Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. */ + clientSecret?: string; +} + +export function clientSecretContractDeserializer(item: any): ClientSecretContract { + return { + clientSecret: item["clientSecret"], + }; +} + +/** Paged Recipient User list representation. */ +export interface RecipientUserCollection { + /** Page values. */ + value?: RecipientUserContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function recipientUserCollectionDeserializer(item: any): RecipientUserCollection { + return { + value: !item["value"] ? item["value"] : recipientUserContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function recipientUserContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return recipientUserContractDeserializer(item); + }); +} + +/** Recipient User details. */ +export interface RecipientUserContract extends ProxyResource { + /** API Management UserId subscribed to notification. */ + userId?: string; +} + +export function recipientUserContractDeserializer(item: any): RecipientUserContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _recipientUserContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Recipient User Contract Properties. */ +export interface RecipientUsersContractProperties { + /** API Management UserId subscribed to notification. */ + userId?: string; +} + +export function recipientUsersContractPropertiesDeserializer( + item: any, +): RecipientUsersContractProperties { + return { + userId: item["userId"], + }; +} + +/** Paged Recipient User list representation. */ +export interface RecipientEmailCollection { + /** Page values. */ + value?: RecipientEmailContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function recipientEmailCollectionDeserializer(item: any): RecipientEmailCollection { + return { + value: !item["value"] ? item["value"] : recipientEmailContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function recipientEmailContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return recipientEmailContractDeserializer(item); + }); +} + +/** Recipient Email details. */ +export interface RecipientEmailContract extends ProxyResource { + /** User Email subscribed to notification. */ + email?: string; +} + +export function recipientEmailContractDeserializer(item: any): RecipientEmailContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _recipientEmailContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Recipient Email Contract Properties. */ +export interface RecipientEmailContractProperties { + /** User Email subscribed to notification. */ + email?: string; +} + +export function recipientEmailContractPropertiesDeserializer( + item: any, +): RecipientEmailContractProperties { + return { + email: item["email"], + }; +} + +/** OpenId Connect Provider details. */ +export interface OpenidConnectProviderContract extends ProxyResource { + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; +} + +export function openidConnectProviderContractSerializer(item: OpenidConnectProviderContract): any { + return { + properties: areAllPropsUndefined(item, [ + "displayName", + "description", + "metadataEndpoint", + "clientId", + "clientSecret", + "useInTestConsole", + "useInApiDocumentation", + ]) + ? undefined + : _openidConnectProviderContractPropertiesSerializer(item), + }; +} + +export function openidConnectProviderContractDeserializer( + item: any, +): OpenidConnectProviderContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _openidConnectProviderContractPropertiesDeserializer(item["properties"])), + }; +} + +/** OpenID Connect Providers Contract. */ +export interface OpenidConnectProviderContractProperties { + /** User-friendly OpenID Connect Provider name. */ + displayName: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint: string; + /** Client ID of developer console which is the client application. */ + clientId: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; +} + +export function openidConnectProviderContractPropertiesSerializer( + item: OpenidConnectProviderContractProperties, +): any { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +export function openidConnectProviderContractPropertiesDeserializer( + item: any, +): OpenidConnectProviderContractProperties { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +/** Parameters supplied to the Update OpenID Connect Provider operation. */ +export interface OpenidConnectProviderUpdateContract { + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; +} + +export function openidConnectProviderUpdateContractSerializer( + item: OpenidConnectProviderUpdateContract, +): any { + return { + properties: areAllPropsUndefined(item, [ + "displayName", + "description", + "metadataEndpoint", + "clientId", + "clientSecret", + "useInTestConsole", + "useInApiDocumentation", + ]) + ? undefined + : _openidConnectProviderUpdateContractPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update OpenID Connect Provider operation. */ +export interface OpenidConnectProviderUpdateContractProperties { + /** User-friendly OpenID Connect Provider name. */ + displayName?: string; + /** User-friendly description of OpenID Connect Provider. */ + description?: string; + /** Metadata endpoint URI. */ + metadataEndpoint?: string; + /** Client ID of developer console which is the client application. */ + clientId?: string; + /** Client Secret of developer console which is the client application. */ + clientSecret?: string; + /** If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. */ + useInTestConsole?: boolean; + /** If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. */ + useInApiDocumentation?: boolean; +} + +export function openidConnectProviderUpdateContractPropertiesSerializer( + item: OpenidConnectProviderUpdateContractProperties, +): any { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +/** Paged OpenIdProviders list representation. */ +export interface _OpenIdConnectProviderCollection { + /** Page values. */ + value?: OpenidConnectProviderContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _openIdConnectProviderCollectionDeserializer( + item: any, +): _OpenIdConnectProviderCollection { + return { + value: !item["value"] + ? item["value"] + : openidConnectProviderContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function openidConnectProviderContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return openidConnectProviderContractSerializer(item); + }); +} + +export function openidConnectProviderContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return openidConnectProviderContractDeserializer(item); + }); +} + +/** Policy restriction contract details. */ +export interface PolicyRestrictionContract extends ProxyResource { + /** Path to the policy document. */ + scope?: string; + /** Indicates if base policy should be enforced for the policy document. */ + requireBase?: PolicyRestrictionRequireBase; +} + +export function policyRestrictionContractSerializer(item: PolicyRestrictionContract): any { + return { + properties: areAllPropsUndefined(item, ["scope", "requireBase"]) + ? undefined + : _policyRestrictionContractPropertiesSerializer(item), + }; +} + +export function policyRestrictionContractDeserializer(item: any): PolicyRestrictionContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _policyRestrictionContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Policy restrictions contract properties. */ +export interface PolicyRestrictionContractProperties { + /** Path to the policy document. */ + scope?: string; + /** Indicates if base policy should be enforced for the policy document. */ + requireBase?: PolicyRestrictionRequireBase; +} + +export function policyRestrictionContractPropertiesSerializer( + item: PolicyRestrictionContractProperties, +): any { + return { scope: item["scope"], requireBase: item["requireBase"] }; +} + +export function policyRestrictionContractPropertiesDeserializer( + item: any, +): PolicyRestrictionContractProperties { + return { + scope: item["scope"], + requireBase: item["requireBase"], + }; +} + +/** Indicates if base policy should be enforced for the policy document. */ +export enum KnownPolicyRestrictionRequireBase { + /** The policy is required to have base policy */ + True = "true", + /** The policy does not require to have base policy */ + False = "false", +} + +/** + * Indicates if base policy should be enforced for the policy document. \ + * {@link KnownPolicyRestrictionRequireBase} can be used interchangeably with PolicyRestrictionRequireBase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **true**: The policy is required to have base policy \ + * **false**: The policy does not require to have base policy + */ +export type PolicyRestrictionRequireBase = string; + +/** Policy restriction contract details. */ +export interface PolicyRestrictionUpdateContract { + /** Path to the policy document. */ + scope?: string; + /** Indicates if base policy should be enforced for the policy document. */ + requireBase?: PolicyRestrictionRequireBase; +} + +export function policyRestrictionUpdateContractSerializer( + item: PolicyRestrictionUpdateContract, +): any { + return { + properties: areAllPropsUndefined(item, ["scope", "requireBase"]) + ? undefined + : _policyRestrictionUpdateContractPropertiesSerializer(item), + }; +} + +/** The response of the get policy restrictions operation. */ +export interface _PolicyRestrictionCollection { + /** Page values. */ + value?: PolicyRestrictionContract[]; + /** Next page link if any. */ + nextLink?: string; +} + +export function _policyRestrictionCollectionDeserializer(item: any): _PolicyRestrictionCollection { + return { + value: !item["value"] + ? item["value"] + : policyRestrictionContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function policyRestrictionContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return policyRestrictionContractSerializer(item); + }); +} + +export function policyRestrictionContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return policyRestrictionContractDeserializer(item); + }); +} + +/** The developer portal configuration contract. */ +export interface PortalConfigContract extends ProxyResource { + /** Enable or disable Basic authentication method. */ + enableBasicAuth?: boolean; + signin?: PortalConfigPropertiesSignin; + signup?: PortalConfigPropertiesSignup; + /** The developer portal delegation settings. */ + delegation?: PortalConfigDelegationProperties; + /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ + cors?: PortalConfigCorsProperties; + /** The developer portal Content Security Policy (CSP) settings. */ + csp?: PortalConfigCspProperties; +} + +export function portalConfigContractSerializer(item: PortalConfigContract): any { + return { + properties: areAllPropsUndefined(item, [ + "enableBasicAuth", + "signin", + "signup", + "delegation", + "cors", + "csp", + ]) + ? undefined + : _portalConfigContractPropertiesSerializer(item), + }; +} + +export function portalConfigContractDeserializer(item: any): PortalConfigContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalConfigContractPropertiesDeserializer(item["properties"])), + }; +} + +/** The developer portal configuration contract properties. */ +export interface PortalConfigProperties { + /** Enable or disable Basic authentication method. */ + enableBasicAuth?: boolean; + signin?: PortalConfigPropertiesSignin; + signup?: PortalConfigPropertiesSignup; + /** The developer portal delegation settings. */ + delegation?: PortalConfigDelegationProperties; + /** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ + cors?: PortalConfigCorsProperties; + /** The developer portal Content Security Policy (CSP) settings. */ + csp?: PortalConfigCspProperties; +} + +export function portalConfigPropertiesSerializer(item: PortalConfigProperties): any { + return { + enableBasicAuth: item["enableBasicAuth"], + signin: !item["signin"] + ? item["signin"] + : portalConfigPropertiesSigninSerializer(item["signin"]), + signup: !item["signup"] + ? item["signup"] + : portalConfigPropertiesSignupSerializer(item["signup"]), + delegation: !item["delegation"] + ? item["delegation"] + : portalConfigDelegationPropertiesSerializer(item["delegation"]), + cors: !item["cors"] ? item["cors"] : portalConfigCorsPropertiesSerializer(item["cors"]), + csp: !item["csp"] ? item["csp"] : portalConfigCspPropertiesSerializer(item["csp"]), + }; +} + +export function portalConfigPropertiesDeserializer(item: any): PortalConfigProperties { + return { + enableBasicAuth: item["enableBasicAuth"], + signin: !item["signin"] + ? item["signin"] + : portalConfigPropertiesSigninDeserializer(item["signin"]), + signup: !item["signup"] + ? item["signup"] + : portalConfigPropertiesSignupDeserializer(item["signup"]), + delegation: !item["delegation"] + ? item["delegation"] + : portalConfigDelegationPropertiesDeserializer(item["delegation"]), + cors: !item["cors"] ? item["cors"] : portalConfigCorsPropertiesDeserializer(item["cors"]), + csp: !item["csp"] ? item["csp"] : portalConfigCspPropertiesDeserializer(item["csp"]), + }; +} + +/** model interface PortalConfigPropertiesSignin */ +export interface PortalConfigPropertiesSignin { + /** Redirect anonymous users to the sign-in page. */ + require?: boolean; +} + +export function portalConfigPropertiesSigninSerializer(item: PortalConfigPropertiesSignin): any { + return { require: item["require"] }; +} + +export function portalConfigPropertiesSigninDeserializer(item: any): PortalConfigPropertiesSignin { + return { + require: item["require"], + }; +} + +/** model interface PortalConfigPropertiesSignup */ +export interface PortalConfigPropertiesSignup { + /** Terms of service settings. */ + termsOfService?: PortalConfigTermsOfServiceProperties; +} + +export function portalConfigPropertiesSignupSerializer(item: PortalConfigPropertiesSignup): any { + return { + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : portalConfigTermsOfServicePropertiesSerializer(item["termsOfService"]), + }; +} + +export function portalConfigPropertiesSignupDeserializer(item: any): PortalConfigPropertiesSignup { + return { + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : portalConfigTermsOfServicePropertiesDeserializer(item["termsOfService"]), + }; +} + +/** Terms of service contract properties. */ +export interface PortalConfigTermsOfServiceProperties { + /** A terms of service text. */ + text?: string; + /** Ask user for consent to the terms of service. */ + requireConsent?: boolean; +} + +export function portalConfigTermsOfServicePropertiesSerializer( + item: PortalConfigTermsOfServiceProperties, +): any { + return { text: item["text"], requireConsent: item["requireConsent"] }; +} + +export function portalConfigTermsOfServicePropertiesDeserializer( + item: any, +): PortalConfigTermsOfServiceProperties { + return { + text: item["text"], + requireConsent: item["requireConsent"], + }; +} + +/** model interface PortalConfigDelegationProperties */ +export interface PortalConfigDelegationProperties { + /** Enable or disable delegation for user registration. */ + delegateRegistration?: boolean; + /** Enable or disable delegation for product subscriptions. */ + delegateSubscription?: boolean; + /** A delegation endpoint URL. */ + delegationUrl?: string; + /** A base64-encoded validation key to ensure requests originate from Azure API Management service. */ + validationKey?: string; +} + +export function portalConfigDelegationPropertiesSerializer( + item: PortalConfigDelegationProperties, +): any { + return { + delegateRegistration: item["delegateRegistration"], + delegateSubscription: item["delegateSubscription"], + delegationUrl: item["delegationUrl"], + validationKey: item["validationKey"], + }; +} + +export function portalConfigDelegationPropertiesDeserializer( + item: any, +): PortalConfigDelegationProperties { + return { + delegateRegistration: item["delegateRegistration"], + delegateSubscription: item["delegateSubscription"], + delegationUrl: item["delegationUrl"], + validationKey: item["validationKey"], + }; +} + +/** The developer portal Cross-Origin Resource Sharing (CORS) settings. */ +export interface PortalConfigCorsProperties { + /** Allowed origins, e.g. `https://trusted.com`. */ + allowedOrigins?: string[]; +} + +export function portalConfigCorsPropertiesSerializer(item: PortalConfigCorsProperties): any { + return { + allowedOrigins: !item["allowedOrigins"] + ? item["allowedOrigins"] + : item["allowedOrigins"].map((p: any) => { + return p; + }), + }; +} + +export function portalConfigCorsPropertiesDeserializer(item: any): PortalConfigCorsProperties { + return { + allowedOrigins: !item["allowedOrigins"] + ? item["allowedOrigins"] + : item["allowedOrigins"].map((p: any) => { + return p; + }), + }; +} + +/** The developer portal Content Security Policy (CSP) settings. */ +export interface PortalConfigCspProperties { + /** The mode of the developer portal Content Security Policy (CSP). */ + mode?: PortalSettingsCspMode; + /** The URLs used by the browser to report CSP violations. */ + reportUri?: string[]; + /** Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. */ + allowedSources?: string[]; +} + +export function portalConfigCspPropertiesSerializer(item: PortalConfigCspProperties): any { + return { + mode: item["mode"], + reportUri: !item["reportUri"] + ? item["reportUri"] + : item["reportUri"].map((p: any) => { + return p; + }), + allowedSources: !item["allowedSources"] + ? item["allowedSources"] + : item["allowedSources"].map((p: any) => { + return p; + }), + }; +} + +export function portalConfigCspPropertiesDeserializer(item: any): PortalConfigCspProperties { + return { + mode: item["mode"], + reportUri: !item["reportUri"] + ? item["reportUri"] + : item["reportUri"].map((p: any) => { + return p; + }), + allowedSources: !item["allowedSources"] + ? item["allowedSources"] + : item["allowedSources"].map((p: any) => { + return p; + }), + }; +} + +/** The mode of the developer portal Content Security Policy (CSP). */ +export enum KnownPortalSettingsCspMode { + /** The browser will block requests not matching allowed origins. */ + Enabled = "enabled", + /** The browser will not apply the origin restrictions. */ + Disabled = "disabled", + /** The browser will report requests not matching allowed origins without blocking them. */ + ReportOnly = "reportOnly", +} + +/** + * The mode of the developer portal Content Security Policy (CSP). \ + * {@link KnownPortalSettingsCspMode} can be used interchangeably with PortalSettingsCspMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **enabled**: The browser will block requests not matching allowed origins. \ + * **disabled**: The browser will not apply the origin restrictions. \ + * **reportOnly**: The browser will report requests not matching allowed origins without blocking them. + */ +export type PortalSettingsCspMode = string; + +/** The collection of the developer portal configurations. */ +export interface _PortalConfigCollection { + /** The developer portal configurations. */ + value?: PortalConfigContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _portalConfigCollectionDeserializer(item: any): _PortalConfigCollection { + return { + value: !item["value"] ? item["value"] : portalConfigContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function portalConfigContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return portalConfigContractSerializer(item); + }); +} + +export function portalConfigContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return portalConfigContractDeserializer(item); + }); +} + +/** Client application details. */ +export interface ClientApplicationContract extends ProxyResource { + /** Client application name. */ + displayName?: string; + /** Client application description. */ + description?: string; + /** A resource identifier for the user who owns the application. */ + ownerId?: string; + /** Microsoft EntraID Application ID (Client ID). This is the value that is used to identify the application when it is requesting access tokens from Microsoft EntraID. This property is read-only and will be set by the system when the application is created. */ + readonly entraApplicationId?: string; + /** Tenant ID is a unique identifier (a GUID) for an organization directory in Microsoft’s cloud. It’s used to identify tenants across Microsoft services. */ + readonly entraTenantId?: string; + /** Client application state. The value derives the state of an application based on the statuses of its associated ClientApplicationProductLinks. */ + readonly state?: ClientApplicationState; +} + +export function clientApplicationContractSerializer(item: ClientApplicationContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "description", "ownerId"]) + ? undefined + : _clientApplicationContractPropertiesSerializer(item), + }; +} + +export function clientApplicationContractDeserializer(item: any): ClientApplicationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _clientApplicationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Client Application Entity Properties */ +export interface ClientApplicationContractProperties { + /** Client application name. */ + displayName: string; + /** Client application description. */ + description?: string; + /** A resource identifier for the user who owns the application. */ + ownerId: string; + /** Microsoft EntraID Application ID (Client ID). This is the value that is used to identify the application when it is requesting access tokens from Microsoft EntraID. This property is read-only and will be set by the system when the application is created. */ + readonly entraApplicationId?: string; + /** Tenant ID is a unique identifier (a GUID) for an organization directory in Microsoft’s cloud. It’s used to identify tenants across Microsoft services. */ + readonly entraTenantId?: string; + /** Client application state. The value derives the state of an application based on the statuses of its associated ClientApplicationProductLinks. */ + readonly state?: ClientApplicationState; +} + +export function clientApplicationContractPropertiesSerializer( + item: ClientApplicationContractProperties, +): any { + return { + displayName: item["displayName"], + description: item["description"], + ownerId: item["ownerId"], + }; +} + +export function clientApplicationContractPropertiesDeserializer( + item: any, +): ClientApplicationContractProperties { + return { + displayName: item["displayName"], + description: item["description"], + ownerId: item["ownerId"], + entraApplicationId: item["entraApplicationId"], + entraTenantId: item["entraTenantId"], + state: item["state"], + }; +} + +/** Client application state. The value derives the state of an application based on the statuses of its associated ClientApplicationProductLinks. */ +export enum KnownClientApplicationState { + /** If there are no associated ClientApplicationLinks or all ClientApplicationLinks are in a state that doesn't meet the criteria for the states: active, rejected, approved (e.g., a mix of active and rejected without any approved). */ + Pending = "pending", + /** If there are no approved ClientApplicationLink, but at least one ClientApplicationLink is active, the Application is considered active */ + Active = "active", + /** If all ClientApplicationLinks are rejected, the Application is considered rejected */ + Rejected = "rejected", + /** If at least one ClientApplicationLink is approved, the Application is considered approved */ + Approved = "approved", +} + +/** + * Client application state. The value derives the state of an application based on the statuses of its associated ClientApplicationProductLinks. \ + * {@link KnownClientApplicationState} can be used interchangeably with ClientApplicationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **pending**: If there are no associated ClientApplicationLinks or all ClientApplicationLinks are in a state that doesn't meet the criteria for the states: active, rejected, approved (e.g., a mix of active and rejected without any approved). \ + * **active**: If there are no approved ClientApplicationLink, but at least one ClientApplicationLink is active, the Application is considered active \ + * **rejected**: If all ClientApplicationLinks are rejected, the Application is considered rejected \ + * **approved**: If at least one ClientApplicationLink is approved, the Application is considered approved + */ +export type ClientApplicationState = string; + +/** Paged ClientApplication list representation. */ +export interface _ClientApplicationCollection { + /** Page values. */ + value?: ClientApplicationContract[]; + /** Next page link if any. */ + nextLink?: string; +} + +export function _clientApplicationCollectionDeserializer(item: any): _ClientApplicationCollection { + return { + value: !item["value"] + ? item["value"] + : clientApplicationContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function clientApplicationContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return clientApplicationContractSerializer(item); + }); +} + +export function clientApplicationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clientApplicationContractDeserializer(item); + }); +} + +/** Specifies client application secrets needed to authorize applications API calls */ +export interface ClientApplicationSecretsContract { + /** Microsoft EntraID client application secrets */ + entra?: ClientApplicationSecretsContractEntra; +} + +export function clientApplicationSecretsContractDeserializer( + item: any, +): ClientApplicationSecretsContract { + return { + entra: !item["entra"] + ? item["entra"] + : clientApplicationSecretsContractEntraDeserializer(item["entra"]), + }; +} + +/** Microsoft EntraID client application secrets */ +export interface ClientApplicationSecretsContractEntra { + /** EntraID client application secret */ + clientSecret?: string; + /** EntraID client application secret expiration date. */ + readonly expiresAt?: Date; +} + +export function clientApplicationSecretsContractEntraDeserializer( + item: any, +): ClientApplicationSecretsContractEntra { + return { + clientSecret: item["clientSecret"], + expiresAt: !item["expiresAt"] ? item["expiresAt"] : new Date(item["expiresAt"]), + }; +} + +/** Specifies Client Application - Product link assignment */ +export interface ClientApplicationProductLinkContract extends ProxyResource { + /** The unique resource identifier of the Product. */ + productId?: string; +} + +export function clientApplicationProductLinkContractSerializer( + item: ClientApplicationProductLinkContract, +): any { + return { + properties: areAllPropsUndefined(item, ["productId"]) + ? undefined + : _clientApplicationProductLinkContractPropertiesSerializer(item), + }; +} + +export function clientApplicationProductLinkContractDeserializer( + item: any, +): ClientApplicationProductLinkContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _clientApplicationProductLinkContractPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface ClientApplicationProductLinkContractProperties */ +export interface ClientApplicationProductLinkContractProperties { + /** The unique resource identifier of the Product. */ + productId: string; +} + +export function clientApplicationProductLinkContractPropertiesSerializer( + item: ClientApplicationProductLinkContractProperties, +): any { + return { productId: item["productId"] }; +} + +export function clientApplicationProductLinkContractPropertiesDeserializer( + item: any, +): ClientApplicationProductLinkContractProperties { + return { + productId: item["productId"], + }; +} + +/** Paged ClientApplicationProductLinkContract list representation. */ +export interface _ClientApplicationProductLinkCollection { + /** Page values. */ + value?: ClientApplicationProductLinkContract[]; + /** Next page link if any. */ + nextLink?: string; +} + +export function _clientApplicationProductLinkCollectionDeserializer( + item: any, +): _ClientApplicationProductLinkCollection { + return { + value: !item["value"] + ? item["value"] + : clientApplicationProductLinkContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function clientApplicationProductLinkContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return clientApplicationProductLinkContractSerializer(item); + }); +} + +export function clientApplicationProductLinkContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return clientApplicationProductLinkContractDeserializer(item); + }); +} + +/** Portal Revision's contract details. */ +export interface PortalRevisionContract extends ProxyResource { + /** Portal revision description. */ + description?: string; + /** Portal revision publishing status details. */ + readonly statusDetails?: string; + /** Status of the portal's revision. */ + readonly status?: PortalRevisionStatus; + /** Indicates if the portal's revision is public. */ + isCurrent?: boolean; + /** Portal's revision creation date and time. */ + readonly createdDateTime?: Date; + /** Last updated date and time. */ + readonly updatedDateTime?: Date; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function portalRevisionContractSerializer(item: PortalRevisionContract): any { + return { + properties: areAllPropsUndefined(item, ["description", "isCurrent"]) + ? undefined + : _portalRevisionContractPropertiesSerializer(item), + }; +} + +export function portalRevisionContractDeserializer(item: any): PortalRevisionContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _portalRevisionContractPropertiesDeserializer(item["properties"])), + }; +} + +/** model interface PortalRevisionContractProperties */ +export interface PortalRevisionContractProperties { + /** Portal revision description. */ + description?: string; + /** Portal revision publishing status details. */ + readonly statusDetails?: string; + /** Status of the portal's revision. */ + readonly status?: PortalRevisionStatus; + /** Indicates if the portal's revision is public. */ + isCurrent?: boolean; + /** Portal's revision creation date and time. */ + readonly createdDateTime?: Date; + /** Last updated date and time. */ + readonly updatedDateTime?: Date; + /** The provisioning state */ + readonly provisioningState?: string; +} + +export function portalRevisionContractPropertiesSerializer( + item: PortalRevisionContractProperties, +): any { + return { description: item["description"], isCurrent: item["isCurrent"] }; +} + +export function portalRevisionContractPropertiesDeserializer( + item: any, +): PortalRevisionContractProperties { + return { + description: item["description"], + statusDetails: item["statusDetails"], + status: item["status"], + isCurrent: item["isCurrent"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + updatedDateTime: !item["updatedDateTime"] + ? item["updatedDateTime"] + : new Date(item["updatedDateTime"]), + provisioningState: item["provisioningState"], + }; +} + +/** Status of the portal's revision. */ +export enum KnownPortalRevisionStatus { + /** Portal's revision has been queued. */ + Pending = "pending", + /** Portal's revision is being published. */ + Publishing = "publishing", + /** Portal's revision publishing completed. */ + Completed = "completed", + /** Portal's revision publishing failed. */ + Failed = "failed", +} + +/** + * Status of the portal's revision. \ + * {@link KnownPortalRevisionStatus} can be used interchangeably with PortalRevisionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **pending**: Portal's revision has been queued. \ + * **publishing**: Portal's revision is being published. \ + * **completed**: Portal's revision publishing completed. \ + * **failed**: Portal's revision publishing failed. + */ +export type PortalRevisionStatus = string; + +/** Paged list of portal revisions. */ +export interface _PortalRevisionCollection { + /** Collection of portal revisions. */ + readonly value?: PortalRevisionContract[]; + /** Next page link, if any. */ + readonly nextLink?: string; +} + +export function _portalRevisionCollectionDeserializer(item: any): _PortalRevisionCollection { + return { + value: !item["value"] ? item["value"] : portalRevisionContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function portalRevisionContractArraySerializer( + result: Array, +): any[] { + return result.map((item) => { + return portalRevisionContractSerializer(item); + }); +} + +export function portalRevisionContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return portalRevisionContractDeserializer(item); + }); +} + +/** A private endpoint connection resource */ +export interface PrivateEndpointConnection extends Resource { + /** The group ids for the private endpoint resource. */ + readonly groupIds?: string[]; + /** The private endpoint resource. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +export function privateEndpointConnectionDeserializer(item: any): PrivateEndpointConnection { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _privateEndpointConnectionPropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of the private endpoint connection. */ +export interface PrivateEndpointConnectionProperties { + /** The group ids for the private endpoint resource. */ + readonly groupIds?: string[]; + /** The private endpoint resource. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** The provisioning state of the private endpoint connection resource. */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +export function privateEndpointConnectionPropertiesDeserializer( + item: any, +): PrivateEndpointConnectionProperties { + return { + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: privateLinkServiceConnectionStateDeserializer( + item["privateLinkServiceConnectionState"], + ), + provisioningState: item["provisioningState"], + }; +} + +/** The private endpoint resource. */ +export interface PrivateEndpoint { + /** The resource identifier of the private endpoint */ + readonly id?: string; +} + +export function privateEndpointDeserializer(item: any): PrivateEndpoint { + return { + id: item["id"], + }; +} + +/** The current provisioning state. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + /** Connection has been provisioned */ + Succeeded = "Succeeded", + /** Connection is being created */ + Creating = "Creating", + /** Connection is being deleted */ + Deleting = "Deleting", + /** Connection provisioning has failed */ + Failed = "Failed", +} + +/** + * The current provisioning state. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded**: Connection has been provisioned \ + * **Creating**: Connection is being created \ + * **Deleting**: Connection is being deleted \ + * **Failed**: Connection provisioning has failed + */ +export type PrivateEndpointConnectionProvisioningState = string; + +/** A request to approve or reject a private endpoint connection */ +export interface PrivateEndpointConnectionRequest { + /** Private Endpoint Connection Resource Id. */ + id?: string; + /** The connection state of the private endpoint connection. */ + properties?: PrivateEndpointConnectionRequestProperties; +} + +export function privateEndpointConnectionRequestSerializer( + item: PrivateEndpointConnectionRequest, +): any { + return { + id: item["id"], + properties: !item["properties"] + ? item["properties"] + : privateEndpointConnectionRequestPropertiesSerializer(item["properties"]), + }; +} + +/** The connection state of the private endpoint connection. */ +export interface PrivateEndpointConnectionRequestProperties { + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +export function privateEndpointConnectionRequestPropertiesSerializer( + item: PrivateEndpointConnectionRequestProperties, +): any { + return { + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +/** The response of a PrivateEndpointConnection list operation. */ +export interface _PrivateEndpointConnectionListResult { + /** The PrivateEndpointConnection items on this page */ + value: PrivateEndpointConnection[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function _privateEndpointConnectionListResultDeserializer( + item: any, +): _PrivateEndpointConnectionListResult { + return { + value: privateEndpointConnectionArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function privateEndpointConnectionArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return privateEndpointConnectionDeserializer(item); + }); +} + +/** A private link resource */ +export interface PrivateLinkResource extends Resource { + /** The private link resource group id. */ + readonly groupId?: string; + /** The private link resource required member names. */ + readonly requiredMembers?: string[]; + /** The private link resource private link DNS zone name. */ + requiredZoneNames?: string[]; +} + +export function privateLinkResourceDeserializer(item: any): PrivateLinkResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _privateLinkResourcePropertiesDeserializer(item["properties"])), + }; +} + +/** Properties of a private link resource. */ +export interface PrivateLinkResourceProperties { + /** The private link resource group id. */ + readonly groupId?: string; + /** The private link resource required member names. */ + readonly requiredMembers?: string[]; + /** The private link resource private link DNS zone name. */ + requiredZoneNames?: string[]; +} + +export function privateLinkResourcePropertiesDeserializer( + item: any, +): PrivateLinkResourceProperties { + return { + groupId: item["groupId"], + requiredMembers: !item["requiredMembers"] + ? item["requiredMembers"] + : item["requiredMembers"].map((p: any) => { + return p; + }), + requiredZoneNames: !item["requiredZoneNames"] + ? item["requiredZoneNames"] + : item["requiredZoneNames"].map((p: any) => { + return p; + }), + }; +} + +/** The response of a PrivateLinkResource list operation. */ +export interface PrivateLinkResourceListResult { + /** The PrivateLinkResource items on this page */ + value: PrivateLinkResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +export function privateLinkResourceListResultDeserializer( + item: any, +): PrivateLinkResourceListResult { + return { + value: privateLinkResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function privateLinkResourceArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return privateLinkResourceDeserializer(item); + }); +} + +/** Tenant Settings. */ +export interface TenantSettingsContract extends ProxyResource { + /** Tenant settings */ + settings?: Record; +} + +export function tenantSettingsContractDeserializer(item: any): TenantSettingsContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tenantSettingsContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tenant access information contract of the API Management service. */ +export interface TenantSettingsContractProperties { + /** Tenant settings */ + settings?: Record; +} + +export function tenantSettingsContractPropertiesDeserializer( + item: any, +): TenantSettingsContractProperties { + return { + settings: !item["settings"] + ? item["settings"] + : Object.fromEntries(Object.entries(item["settings"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +/** Known values of {@link SettingsTypeName} that the service accepts. */ +export enum KnownSettingsTypeName { + /** public */ + Public = "public", +} + +/** Type of SettingsTypeName */ +export type SettingsTypeName = string; + +/** Paged AccessInformation list representation. */ +export interface _TenantSettingsCollection { + /** Page values. */ + readonly value?: TenantSettingsContract[]; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _tenantSettingsCollectionDeserializer(item: any): _TenantSettingsCollection { + return { + value: !item["value"] ? item["value"] : tenantSettingsContractArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function tenantSettingsContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return tenantSettingsContractDeserializer(item); + }); +} + +/** Tenant Settings. */ +export interface AccessInformationContract extends ProxyResource { + /** Access Information type ('access' or 'gitAccess') */ + idPropertiesId?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationContractDeserializer(item: any): AccessInformationContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _accessInformationContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tenant access information contract of the API Management service. */ +export interface AccessInformationContractProperties { + /** Access Information type ('access' or 'gitAccess') */ + id?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationContractPropertiesDeserializer( + item: any, +): AccessInformationContractProperties { + return { + id: item["id"], + principalId: item["principalId"], + enabled: item["enabled"], + }; +} + +/** Known values of {@link AccessIdName} that the service accepts. */ +export enum KnownAccessIdName { + /** access */ + Access = "access", + /** gitAccess */ + GitAccess = "gitAccess", +} + +/** Type of AccessIdName */ +export type AccessIdName = string; + +/** Tenant access information update parameters. */ +export interface AccessInformationCreateParameters { + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationCreateParametersSerializer( + item: AccessInformationCreateParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["principalId", "primaryKey", "secondaryKey", "enabled"]) + ? undefined + : _accessInformationCreateParametersPropertiesSerializer(item), + }; +} + +/** Tenant access information update parameters of the API Management service */ +export interface AccessInformationCreateParameterProperties { + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationCreateParameterPropertiesSerializer( + item: AccessInformationCreateParameterProperties, +): any { + return { + principalId: item["principalId"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + enabled: item["enabled"], + }; +} + +/** Tenant access information update parameters. */ +export interface AccessInformationUpdateParameters { + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationUpdateParametersSerializer( + item: AccessInformationUpdateParameters, +): any { + return { + properties: areAllPropsUndefined(item, ["enabled"]) + ? undefined + : _accessInformationUpdateParametersPropertiesSerializer(item), + }; +} + +/** Tenant access information update parameters of the API Management service */ +export interface AccessInformationUpdateParameterProperties { + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationUpdateParameterPropertiesSerializer( + item: AccessInformationUpdateParameterProperties, +): any { + return { enabled: item["enabled"] }; +} + +/** Paged AccessInformation list representation. */ +export interface _AccessInformationCollection { + /** Page values. */ + readonly value?: AccessInformationContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + readonly nextLink?: string; +} + +export function _accessInformationCollectionDeserializer(item: any): _AccessInformationCollection { + return { + value: !item["value"] + ? item["value"] + : accessInformationContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function accessInformationContractArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return accessInformationContractDeserializer(item); + }); +} + +/** Tenant access information contract of the API Management service. */ +export interface AccessInformationSecretsContract { + /** Access Information type ('access' or 'gitAccess') */ + id?: string; + /** Principal (User) Identifier. */ + principalId?: string; + /** Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + primaryKey?: string; + /** Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. */ + secondaryKey?: string; + /** Determines whether direct access is enabled. */ + enabled?: boolean; +} + +export function accessInformationSecretsContractDeserializer( + item: any, +): AccessInformationSecretsContract { + return { + id: item["id"], + principalId: item["principalId"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + enabled: item["enabled"], + }; +} + +/** Deploy Tenant Configuration Contract. */ +export interface DeployConfigurationParameters { + /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ + branch?: string; + /** The value enforcing deleting subscriptions to products that are deleted in this update. */ + force?: boolean; +} + +export function deployConfigurationParametersSerializer(item: DeployConfigurationParameters): any { + return { + properties: areAllPropsUndefined(item, ["branch", "force"]) + ? undefined + : _deployConfigurationParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Deploy Configuration operation. */ +export interface DeployConfigurationParameterProperties { + /** The name of the Git branch from which the configuration is to be deployed to the configuration database. */ + branch: string; + /** The value enforcing deleting subscriptions to products that are deleted in this update. */ + force?: boolean; +} + +export function deployConfigurationParameterPropertiesSerializer( + item: DeployConfigurationParameterProperties, +): any { + return { branch: item["branch"], force: item["force"] }; +} + +/** Save Tenant Configuration Contract details. */ +export interface SaveConfigurationParameter { + /** The name of the Git branch in which to commit the current configuration snapshot. */ + branch?: string; + /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ + force?: boolean; +} + +export function saveConfigurationParameterSerializer(item: SaveConfigurationParameter): any { + return { + properties: areAllPropsUndefined(item, ["branch", "force"]) + ? undefined + : _saveConfigurationParameterPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Save Tenant Configuration operation. */ +export interface SaveConfigurationParameterProperties { + /** The name of the Git branch in which to commit the current configuration snapshot. */ + branch: string; + /** The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. */ + force?: boolean; +} + +export function saveConfigurationParameterPropertiesSerializer( + item: SaveConfigurationParameterProperties, +): any { + return { branch: item["branch"], force: item["force"] }; +} + +/** Result of Tenant Configuration Sync State. */ +export interface TenantConfigurationSyncStateContract extends ProxyResource { + /** The name of Git branch. */ + branch?: string; + /** The latest commit Id. */ + commitId?: string; + /** value indicating if last sync was save (true) or deploy (false) operation. */ + isExport?: boolean; + /** value indicating if last synchronization was later than the configuration change. */ + isSynced?: boolean; + /** value indicating whether Git configuration access is enabled. */ + isGitEnabled?: boolean; + /** The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + syncDate?: Date; + /** The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + configurationChangeDate?: Date; + /** Most recent tenant configuration operation identifier */ + lastOperationId?: string; +} + +export function tenantConfigurationSyncStateContractDeserializer( + item: any, +): TenantConfigurationSyncStateContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _tenantConfigurationSyncStateContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Tenant Configuration Synchronization State. */ +export interface TenantConfigurationSyncStateContractProperties { + /** The name of Git branch. */ + branch?: string; + /** The latest commit Id. */ + commitId?: string; + /** value indicating if last sync was save (true) or deploy (false) operation. */ + isExport?: boolean; + /** value indicating if last synchronization was later than the configuration change. */ + isSynced?: boolean; + /** value indicating whether Git configuration access is enabled. */ + isGitEnabled?: boolean; + /** The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + syncDate?: Date; + /** The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + configurationChangeDate?: Date; + /** Most recent tenant configuration operation identifier */ + lastOperationId?: string; +} + +export function tenantConfigurationSyncStateContractPropertiesDeserializer( + item: any, +): TenantConfigurationSyncStateContractProperties { + return { + branch: item["branch"], + commitId: item["commitId"], + isExport: item["isExport"], + isSynced: item["isSynced"], + isGitEnabled: item["isGitEnabled"], + syncDate: !item["syncDate"] ? item["syncDate"] : new Date(item["syncDate"]), + configurationChangeDate: !item["configurationChangeDate"] + ? item["configurationChangeDate"] + : new Date(item["configurationChangeDate"]), + lastOperationId: item["lastOperationId"], + }; +} + +/** User create details. */ +export interface UserCreateParameters { + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; +} + +export function userCreateParametersSerializer(item: UserCreateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "state", + "note", + "identities", + "email", + "firstName", + "lastName", + "password", + "appType", + "confirmation", + ]) + ? undefined + : _userCreateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Create User operation. */ +export interface UserCreateParameterProperties extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email: string; + /** First name. */ + firstName: string; + /** Last name. */ + lastName: string; + /** User Password. If no value is provided, a default password is generated. */ + password?: string; + /** Determines the type of application which send the create user request. Default is legacy portal. */ + appType?: AppType; + /** Determines the type of confirmation e-mail that will be sent to the newly created user. */ + confirmation?: Confirmation; +} + +export function userCreateParameterPropertiesSerializer(item: UserCreateParameterProperties): any { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArraySerializer(item["identities"]), + email: item["email"], + firstName: item["firstName"], + lastName: item["lastName"], + password: item["password"], + appType: item["appType"], + confirmation: item["confirmation"], + }; +} + +/** Known values of {@link AppType} that the service accepts. */ +export enum KnownAppType { + /** User create request was sent by legacy developer portal. */ + Portal = "portal", + /** User create request was sent by new developer portal. */ + DeveloperPortal = "developerPortal", +} + +/** Type of AppType */ +export type AppType = string; + +/** Determines the type of confirmation e-mail that will be sent to the newly created user. */ +export enum KnownConfirmation { + /** Send an e-mail to the user confirming they have successfully signed up. */ + Signup = "signup", + /** Send an e-mail inviting the user to sign-up and complete registration. */ + Invite = "invite", +} + +/** + * Determines the type of confirmation e-mail that will be sent to the newly created user. \ + * {@link KnownConfirmation} can be used interchangeably with Confirmation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **signup**: Send an e-mail to the user confirming they have successfully signed up. \ + * **invite**: Send an e-mail inviting the user to sign-up and complete registration. + */ +export type Confirmation = string; + +/** User update parameters. */ +export interface UserUpdateParameters { + /** Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. */ + state?: UserState; + /** Optional note about a user set by the administrator. */ + note?: string; + /** Collection of user identities. */ + identities?: UserIdentityContract[]; + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; +} + +export function userUpdateParametersSerializer(item: UserUpdateParameters): any { + return { + properties: areAllPropsUndefined(item, [ + "state", + "note", + "identities", + "email", + "password", + "firstName", + "lastName", + ]) + ? undefined + : _userUpdateParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Update User operation. */ +export interface UserUpdateParametersProperties extends UserEntityBaseParameters { + /** Email address. Must not be empty and must be unique within the service instance. */ + email?: string; + /** User Password. */ + password?: string; + /** First name. */ + firstName?: string; + /** Last name. */ + lastName?: string; +} + +export function userUpdateParametersPropertiesSerializer( + item: UserUpdateParametersProperties, +): any { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArraySerializer(item["identities"]), + email: item["email"], + password: item["password"], + firstName: item["firstName"], + lastName: item["lastName"], + }; +} + +/** Generate SSO Url operations response details. */ +export interface GenerateSsoUrlResult { + /** Redirect Url containing the SSO URL value. */ + value?: string; +} + +export function generateSsoUrlResultDeserializer(item: any): GenerateSsoUrlResult { + return { + value: item["value"], + }; +} + +/** Get User Token parameters. */ +export interface UserTokenParameters { + /** The Key to be used to generate token for user. */ + keyType?: KeyType; + /** The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry?: Date; +} + +export function userTokenParametersSerializer(item: UserTokenParameters): any { + return { + properties: areAllPropsUndefined(item, ["keyType", "expiry"]) + ? undefined + : _userTokenParametersPropertiesSerializer(item), + }; +} + +/** Parameters supplied to the Get User Token operation. */ +export interface UserTokenParameterProperties { + /** The Key to be used to generate token for user. */ + keyType: KeyType; + /** The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. */ + expiry: Date; +} + +export function userTokenParameterPropertiesSerializer(item: UserTokenParameterProperties): any { + return { keyType: item["keyType"], expiry: item["expiry"].toISOString() }; +} + +/** Get User Token response details. */ +export interface UserTokenResult { + /** Shared Access Authorization token for the User. */ + value?: string; +} + +export function userTokenResultDeserializer(item: any): UserTokenResult { + return { + value: item["value"], + }; +} + +/** List of Users Identity list representation. */ +export interface _UserIdentityCollection { + /** User Identity values. */ + value?: UserIdentityContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _userIdentityCollectionDeserializer(item: any): _UserIdentityCollection { + return { + value: !item["value"] ? item["value"] : userIdentityContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +/** A single API Management WorkspaceLinks in List or Get response. */ +export interface ApiManagementWorkspaceLinksResource extends ProxyResource { + /** ETag of the resource. */ + readonly etag?: string; + /** The link to the API Management service workspace. */ + workspaceId?: string; + /** The array of linked gateways. */ + gateways?: WorkspaceLinksGateway[]; +} + +export function apiManagementWorkspaceLinksResourceDeserializer( + item: any, +): ApiManagementWorkspaceLinksResource { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ..._apiManagementWorkspaceLinksResourcePropertiesDeserializer(item["properties"]), + etag: item["etag"], + }; +} + +/** Properties of an API Management workspaceLinks resource. */ +export interface ApiManagementWorkspaceLinksProperties extends WorkspaceLinksBaseProperties {} + +export function apiManagementWorkspaceLinksPropertiesDeserializer( + item: any, +): ApiManagementWorkspaceLinksProperties { + return { + workspaceId: item["workspaceId"], + gateways: !item["gateways"] + ? item["gateways"] + : workspaceLinksGatewayArrayDeserializer(item["gateways"]), + }; +} + +/** model interface WorkspaceLinksBaseProperties */ +export interface WorkspaceLinksBaseProperties { + /** The link to the API Management service workspace. */ + workspaceId?: string; + /** The array of linked gateways. */ + gateways?: WorkspaceLinksGateway[]; +} + +export function workspaceLinksBasePropertiesDeserializer(item: any): WorkspaceLinksBaseProperties { + return { + workspaceId: item["workspaceId"], + gateways: !item["gateways"] + ? item["gateways"] + : workspaceLinksGatewayArrayDeserializer(item["gateways"]), + }; +} + +export function workspaceLinksGatewayArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return workspaceLinksGatewayDeserializer(item); + }); +} + +/** model interface WorkspaceLinksGateway */ +export interface WorkspaceLinksGateway { + /** The link to the API Management gateway. */ + id?: string; +} + +export function workspaceLinksGatewayDeserializer(item: any): WorkspaceLinksGateway { + return { + id: item["id"], + }; +} + +/** The response of the List API Management WorkspaceLink operation. */ +export interface _ApiManagementWorkspaceLinksListResult { + /** Result of the List API Management WorkspaceLinks operation. */ + value: ApiManagementWorkspaceLinksResource[]; + /** Link to the next set of results. Not empty if Value contains incomplete list of API Management services. */ + nextLink?: string; +} + +export function _apiManagementWorkspaceLinksListResultDeserializer( + item: any, +): _ApiManagementWorkspaceLinksListResult { + return { + value: apiManagementWorkspaceLinksResourceArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function apiManagementWorkspaceLinksResourceArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementWorkspaceLinksResourceDeserializer(item); + }); +} + +/** Workspace details. */ +export interface WorkspaceContract extends ProxyResource { + /** Name of the workspace. */ + displayName?: string; + /** Description of the workspace. */ + description?: string; +} + +export function workspaceContractSerializer(item: WorkspaceContract): any { + return { + properties: areAllPropsUndefined(item, ["displayName", "description"]) + ? undefined + : _workspaceContractPropertiesSerializer(item), + }; +} + +export function workspaceContractDeserializer(item: any): WorkspaceContract { + return { + id: item["id"], + name: item["name"], + type: item["type"], + systemData: !item["systemData"] + ? item["systemData"] + : systemDataDeserializer(item["systemData"]), + ...(!item["properties"] + ? item["properties"] + : _workspaceContractPropertiesDeserializer(item["properties"])), + }; +} + +/** Workspace entity properties. */ +export interface WorkspaceContractProperties { + /** Name of the workspace. */ + displayName: string; + /** Description of the workspace. */ + description?: string; +} + +export function workspaceContractPropertiesSerializer(item: WorkspaceContractProperties): any { + return { displayName: item["displayName"], description: item["description"] }; +} + +export function workspaceContractPropertiesDeserializer(item: any): WorkspaceContractProperties { + return { + displayName: item["displayName"], + description: item["description"], + }; +} + +/** Paged workspace list representation. */ +export interface _WorkspaceCollection { + /** Page values. */ + value?: WorkspaceContract[]; + /** Total record count number across all pages. */ + count?: number; + /** Next page link if any. */ + nextLink?: string; +} + +export function _workspaceCollectionDeserializer(item: any): _WorkspaceCollection { + return { + value: !item["value"] ? item["value"] : workspaceContractArrayDeserializer(item["value"]), + count: item["count"], + nextLink: item["nextLink"], + }; +} + +export function workspaceContractArraySerializer(result: Array): any[] { + return result.map((item) => { + return workspaceContractSerializer(item); + }); +} + +export function workspaceContractArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return workspaceContractDeserializer(item); + }); +} + +/** API Export result. */ +export interface ApiExportResult { + /** ResourceId of the API which was exported. */ + id?: string; + /** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ + exportResultFormat?: ExportResultFormat; + /** The object defining the schema of the exported API Detail */ + value?: ApiExportResultValue; +} + +export function apiExportResultDeserializer(item: any): ApiExportResult { + return { + id: item["id"], + exportResultFormat: item["format"], + value: !item["value"] ? item["value"] : apiExportResultValueDeserializer(item["value"]), + }; +} + +/** Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ +export enum KnownExportResultFormat { + /** The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. */ + Swagger = "swagger-link-json", + /** Export the API Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link-json", + /** The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link+xml", + /** Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. */ + OpenApi = "openapi-link", +} + +/** + * Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. \ + * {@link KnownExportResultFormat} can be used interchangeably with ExportResultFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **swagger-link-json**: The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. \ + * **wadl-link-json**: Export the API Definition in WADL Schema to Storage Blob. \ + * **wsdl-link+xml**: The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` \ + * **openapi-link**: Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. + */ +export type ExportResultFormat = string; + +/** The object defining the schema of the exported API Detail */ +export interface ApiExportResultValue { + /** Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. */ + link?: string; +} + +export function apiExportResultValueDeserializer(item: any): ApiExportResultValue { + return { + link: item["link"], + }; +} + +/** The List Resource Skus operation response. */ +export interface _ApiManagementSkusResult { + /** The list of skus available for the subscription. */ + value: ApiManagementSku[]; + /** The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus */ + readonly nextLink?: string; +} + +export function _apiManagementSkusResultDeserializer(item: any): _ApiManagementSkusResult { + return { + value: apiManagementSkuArrayDeserializer(item["value"]), + nextLink: item["nextLink"], + }; +} + +export function apiManagementSkuArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return apiManagementSkuDeserializer(item); + }); +} + +/** Describes an available ApiManagement SKU. */ +export interface ApiManagementSku { + /** The type of resource the SKU applies to. */ + readonly resourceType?: string; + /** The name of SKU. */ + readonly name?: string; + /** Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** */ + readonly tier?: string; + /** The Size of the SKU. */ + readonly size?: string; + /** The Family of this particular SKU. */ + readonly family?: string; + /** The Kind of resources that are supported in this SKU. */ + readonly kind?: string; + /** Specifies the number of virtual machines in the scale set. */ + readonly capacity?: ApiManagementSkuCapacity; + /** The set of locations that the SKU is available. */ + readonly locations?: string[]; + /** A list of locations and availability zones in those locations where the SKU is available. */ + readonly locationInfo?: ApiManagementSkuLocationInfo[]; + /** The api versions that support this SKU. */ + readonly apiVersions?: string[]; + /** Metadata for retrieving price info. */ + readonly costs?: ApiManagementSkuCosts[]; + /** A name value pair to describe the capability. */ + readonly capabilities?: ApiManagementSkuCapabilities[]; + /** The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. */ + readonly restrictions?: ApiManagementSkuRestrictions[]; +} + +export function apiManagementSkuDeserializer(item: any): ApiManagementSku { + return { + resourceType: item["resourceType"], + name: item["name"], + tier: item["tier"], + size: item["size"], + family: item["family"], + kind: item["kind"], + capacity: !item["capacity"] + ? item["capacity"] + : apiManagementSkuCapacityDeserializer(item["capacity"]), + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + locationInfo: !item["locationInfo"] + ? item["locationInfo"] + : apiManagementSkuLocationInfoArrayDeserializer(item["locationInfo"]), + apiVersions: !item["apiVersions"] + ? item["apiVersions"] + : item["apiVersions"].map((p: any) => { + return p; + }), + costs: !item["costs"] ? item["costs"] : apiManagementSkuCostsArrayDeserializer(item["costs"]), + capabilities: !item["capabilities"] + ? item["capabilities"] + : apiManagementSkuCapabilitiesArrayDeserializer(item["capabilities"]), + restrictions: !item["restrictions"] + ? item["restrictions"] + : apiManagementSkuRestrictionsArrayDeserializer(item["restrictions"]), + }; +} + +/** Describes scaling information of a SKU. */ +export interface ApiManagementSkuCapacity { + /** The minimum capacity. */ + readonly minimum?: number; + /** The maximum capacity that can be set. */ + readonly maximum?: number; + /** The default capacity. */ + readonly default?: number; + /** The scale type applicable to the sku. */ + readonly scaleType?: ApiManagementSkuCapacityScaleType; +} + +export function apiManagementSkuCapacityDeserializer(item: any): ApiManagementSkuCapacity { + return { + minimum: item["minimum"], + maximum: item["maximum"], + default: item["default"], + scaleType: item["scaleType"], + }; +} + +/** The scale type applicable to the sku. */ +export type ApiManagementSkuCapacityScaleType = "Automatic" | "Manual" | "None"; + +export function apiManagementSkuLocationInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementSkuLocationInfoDeserializer(item); + }); +} + +/** model interface ApiManagementSkuLocationInfo */ +export interface ApiManagementSkuLocationInfo { + /** Location of the SKU */ + readonly location?: string; + /** List of availability zones where the SKU is supported. */ + readonly zones?: string[]; + /** Details of capabilities available to a SKU in specific zones. */ + readonly zoneDetails?: ApiManagementSkuZoneDetails[]; +} + +export function apiManagementSkuLocationInfoDeserializer(item: any): ApiManagementSkuLocationInfo { + return { + location: item["location"], + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + zoneDetails: !item["zoneDetails"] + ? item["zoneDetails"] + : apiManagementSkuZoneDetailsArrayDeserializer(item["zoneDetails"]), + }; +} + +export function apiManagementSkuZoneDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementSkuZoneDetailsDeserializer(item); + }); +} + +/** Describes The zonal capabilities of a SKU. */ +export interface ApiManagementSkuZoneDetails { + /** The set of zones that the SKU is available in with the specified capabilities. */ + readonly name?: string[]; + /** A list of capabilities that are available for the SKU in the specified list of zones. */ + readonly capabilities?: ApiManagementSkuCapabilities[]; +} + +export function apiManagementSkuZoneDetailsDeserializer(item: any): ApiManagementSkuZoneDetails { + return { + name: !item["name"] + ? item["name"] + : item["name"].map((p: any) => { + return p; + }), + capabilities: !item["capabilities"] + ? item["capabilities"] + : apiManagementSkuCapabilitiesArrayDeserializer(item["capabilities"]), + }; +} + +export function apiManagementSkuCapabilitiesArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementSkuCapabilitiesDeserializer(item); + }); +} + +/** Describes The SKU capabilities object. */ +export interface ApiManagementSkuCapabilities { + /** An invariant to describe the feature. */ + readonly name?: string; + /** An invariant if the feature is measured by quantity. */ + readonly value?: string; +} + +export function apiManagementSkuCapabilitiesDeserializer(item: any): ApiManagementSkuCapabilities { + return { + name: item["name"], + value: item["value"], + }; +} + +export function apiManagementSkuCostsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementSkuCostsDeserializer(item); + }); +} + +/** Describes metadata for retrieving price info. */ +export interface ApiManagementSkuCosts { + /** Used for querying price from commerce. */ + readonly meterID?: string; + /** The multiplier is needed to extend the base metered cost. */ + readonly quantity?: number; + /** An invariant to show the extended unit. */ + readonly extendedUnit?: string; +} + +export function apiManagementSkuCostsDeserializer(item: any): ApiManagementSkuCosts { + return { + meterID: item["meterID"], + quantity: item["quantity"], + extendedUnit: item["extendedUnit"], + }; +} + +export function apiManagementSkuRestrictionsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return apiManagementSkuRestrictionsDeserializer(item); + }); +} + +/** Describes scaling information of a SKU. */ +export interface ApiManagementSkuRestrictions { + /** The type of restrictions. */ + readonly type?: ApiManagementSkuRestrictionsType; + /** The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. */ + readonly values?: string[]; + /** The information about the restriction where the SKU cannot be used. */ + readonly restrictionInfo?: ApiManagementSkuRestrictionInfo; + /** The reason for restriction. */ + readonly reasonCode?: ApiManagementSkuRestrictionsReasonCode; +} + +export function apiManagementSkuRestrictionsDeserializer(item: any): ApiManagementSkuRestrictions { + return { + type: item["type"], + values: !item["values"] + ? item["values"] + : item["values"].map((p: any) => { + return p; + }), + restrictionInfo: !item["restrictionInfo"] + ? item["restrictionInfo"] + : apiManagementSkuRestrictionInfoDeserializer(item["restrictionInfo"]), + reasonCode: item["reasonCode"], + }; +} + +/** The type of restrictions. */ +export type ApiManagementSkuRestrictionsType = "Location" | "Zone"; + +/** model interface ApiManagementSkuRestrictionInfo */ +export interface ApiManagementSkuRestrictionInfo { + /** Locations where the SKU is restricted */ + readonly locations?: string[]; + /** List of availability zones where the SKU is restricted. */ + readonly zones?: string[]; +} + +export function apiManagementSkuRestrictionInfoDeserializer( + item: any, +): ApiManagementSkuRestrictionInfo { + return { + locations: !item["locations"] + ? item["locations"] + : item["locations"].map((p: any) => { + return p; + }), + zones: !item["zones"] + ? item["zones"] + : item["zones"].map((p: any) => { + return p; + }), + }; +} + +/** The reason for restriction. */ +export type ApiManagementSkuRestrictionsReasonCode = "QuotaId" | "NotAvailableForSubscription"; + +/** The current status of an async operation. */ +export interface OperationStatusResult { + /** Fully qualified ID for the async operation. */ + id?: string; + /** Name of the async operation. */ + name?: string; + /** Operation status. */ + status: string; + /** Percent of the operation that is complete. */ + percentComplete?: number; + /** The start time of the operation. */ + startTime?: Date; + /** The end time of the operation. */ + endTime?: Date; + /** The operations list. */ + operations?: OperationStatusResult[]; + /** If present, details of the operation error. */ + error?: ErrorDetail; + /** Fully qualified ID of the resource against which the original async operation was started. */ + readonly resourceId?: string; +} + +export function operationStatusResultDeserializer(item: any): OperationStatusResult { + return { + id: item["id"], + name: item["name"], + status: item["status"], + percentComplete: item["percentComplete"], + startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]), + endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]), + operations: !item["operations"] + ? item["operations"] + : operationStatusResultArrayDeserializer(item["operations"]), + error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]), + resourceId: item["resourceId"], + }; +} + +export function operationStatusResultArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return operationStatusResultDeserializer(item); + }); +} + +/** Known values of {@link PolicyExportFormat} that the service accepts. */ +export enum KnownPolicyExportFormat { + /** The contents are inline and Content type is an XML document. */ + Xml = "xml", + /** The contents are inline and Content type is a non XML encoded policy document. */ + Rawxml = "rawxml", +} + +/** Type of PolicyExportFormat */ +export type PolicyExportFormat = string; + +/** Known values of {@link KeyVaultRefreshState} that the service accepts. */ +export enum KnownKeyVaultRefreshState { + /** Entities for which KeyVault refresh failed. */ + True = "true", + /** Entities for which KeyVault refresh succeeded */ + False = "false", +} + +/** Type of KeyVaultRefreshState */ +export type KeyVaultRefreshState = string; +/** Type of PolicyScopeContract */ +export type PolicyScopeContract = "Tenant" | "Product" | "Api" | "Operation" | "All"; + +/** Known values of {@link ConfigurationIdName} that the service accepts. */ +export enum KnownConfigurationIdName { + /** configuration */ + Configuration = "configuration", +} + +/** Type of ConfigurationIdName */ +export type ConfigurationIdName = string; + +/** Known values of {@link ExportFormat} that the service accepts. */ +export enum KnownExportFormat { + /** Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. */ + Swagger = "swagger-link", + /** Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` */ + Wsdl = "wsdl-link", + /** Export the Api Definition in WADL Schema to Storage Blob. */ + Wadl = "wadl-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. */ + Openapi = "openapi-link", + /** Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. */ + OpenapiJson = "openapi+json-link", +} + +/** Type of ExportFormat */ +export type ExportFormat = string; + +/** Known values of {@link ExportApi} that the service accepts. */ +export enum KnownExportApi { + /** true */ + True = "true", +} + +/** Type of ExportApi */ +export type ExportApi = string; + +/** The available API versions. */ +export enum KnownVersions { + /** The 2025-09-01-preview API version. */ + V20250901Preview = "2025-09-01-preview", +} + +export function networkStatusContractByLocationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return networkStatusContractByLocationDeserializer(item); + }); +} + +export function _apiContractPropertiesSerializer(item: ApiContract): any { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsSerializer(item["apiVersionSet"]), + }; +} + +export function _apiContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractDeserializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractDeserializer(item["subscriptionKeyParameterNames"]), + apiType: item["type"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + isOnline: item["isOnline"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] + ? item["contact"] + : apiContactInformationDeserializer(item["contact"]), + license: !item["license"] + ? item["license"] + : apiLicenseInformationDeserializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesDeserializer(item["mcpProperties"]), + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsDeserializer(item["apiVersionSet"]), + provisioningState: item["provisioningState"], + }; +} + +export function _apiCreateOrUpdateParameterPropertiesSerializer( + item: ApiCreateOrUpdateParameter, +): any { + return { + sourceApiId: item["sourceApiId"], + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + apiVersionSet: !item["apiVersionSet"] + ? item["apiVersionSet"] + : apiVersionSetContractDetailsSerializer(item["apiVersionSet"]), + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + value: item["value"], + format: item["format"], + wsdlSelector: !item["wsdlSelector"] + ? item["wsdlSelector"] + : apiCreateOrUpdatePropertiesWsdlSelectorSerializer(item["wsdlSelector"]), + apiType: item["soapApiType"], + translateRequiredQueryParameters: item["translateRequiredQueryParametersConduct"], + }; +} + +export function _apiUpdateContractPropertiesSerializer(item: ApiUpdateContract): any { + return { + description: item["description"], + authenticationSettings: !item["authenticationSettings"] + ? item["authenticationSettings"] + : authenticationSettingsContractSerializer(item["authenticationSettings"]), + subscriptionKeyParameterNames: !item["subscriptionKeyParameterNames"] + ? item["subscriptionKeyParameterNames"] + : subscriptionKeyParameterNamesContractSerializer(item["subscriptionKeyParameterNames"]), + type: item["apiType"], + apiRevision: item["apiRevision"], + apiVersion: item["apiVersion"], + isCurrent: item["isCurrent"], + apiRevisionDescription: item["apiRevisionDescription"], + apiVersionDescription: item["apiVersionDescription"], + apiVersionSetId: item["apiVersionSetId"], + subscriptionRequired: item["subscriptionRequired"], + termsOfServiceUrl: item["termsOfServiceUrl"], + contact: !item["contact"] ? item["contact"] : apiContactInformationSerializer(item["contact"]), + license: !item["license"] ? item["license"] : apiLicenseInformationSerializer(item["license"]), + mcpProperties: !item["mcpProperties"] + ? item["mcpProperties"] + : mcpPropertiesSerializer(item["mcpProperties"]), + displayName: item["displayName"], + serviceUrl: item["serviceUrl"], + path: item["path"], + protocols: !item["protocols"] + ? item["protocols"] + : item["protocols"].map((p: any) => { + return p; + }), + }; +} + +export function _apiReleaseContractPropertiesSerializer(item: ApiReleaseContract): any { + return { apiId: item["apiId"], notes: item["notes"] }; +} + +export function _apiReleaseContractPropertiesDeserializer(item: any) { + return { + apiId: item["apiId"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + updatedDateTime: !item["updatedDateTime"] + ? item["updatedDateTime"] + : new Date(item["updatedDateTime"]), + notes: item["notes"], + }; +} + +export function _operationContractPropertiesSerializer(item: OperationContract): any { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArraySerializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractSerializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArraySerializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +export function _operationContractPropertiesDeserializer(item: any) { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArrayDeserializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractDeserializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArrayDeserializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +export function _operationUpdateContractPropertiesSerializer(item: OperationUpdateContract): any { + return { + templateParameters: !item["templateParameters"] + ? item["templateParameters"] + : parameterContractArraySerializer(item["templateParameters"]), + description: item["description"], + request: !item["request"] ? item["request"] : requestContractSerializer(item["request"]), + responses: !item["responses"] + ? item["responses"] + : responseContractArraySerializer(item["responses"]), + policies: item["policies"], + displayName: item["displayName"], + method: item["method"], + urlTemplate: item["urlTemplate"], + }; +} + +export function _policyContractPropertiesSerializer(item: PolicyContract): any { + return { value: item["value"], format: item["format"] }; +} + +export function _policyContractPropertiesDeserializer(item: any) { + return { + value: item["value"], + format: item["format"], + }; +} + +export function _tagContractPropertiesSerializer(item: TagContract): any { + return { displayName: item["displayName"] }; +} + +export function _tagContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + }; +} + +export function _tagCreateUpdateParametersPropertiesSerializer( + item: TagCreateUpdateParameters, +): any { + return { displayName: item["displayName"] }; +} + +export function _tagCreateUpdateParametersPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + }; +} + +export function _schemaContractPropertiesDocumentSerializer(item: SchemaContractProperties): any { + return { value: item["value"], definitions: item["definitions"], components: item["components"] }; +} + +export function _schemaContractPropertiesDocumentDeserializer(item: any) { + return { + value: item["value"], + definitions: item["definitions"], + components: item["components"], + }; +} + +export function _schemaContractPropertiesSerializer(item: SchemaContract): any { + return { + contentType: item["contentType"], + document: !item["document"] + ? item["document"] + : schemaDocumentPropertiesSerializer(item["document"]), + }; +} + +export function _schemaContractPropertiesDeserializer(item: any) { + return { + contentType: item["contentType"], + document: !item["document"] + ? item["document"] + : schemaDocumentPropertiesDeserializer(item["document"]), + provisioningState: item["provisioningState"], + }; +} + +export function _diagnosticContractPropertiesSerializer(item: DiagnosticContract): any { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsSerializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsSerializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsSerializer(item["backend"]), + largeLanguageModel: !item["largeLanguageModel"] + ? item["largeLanguageModel"] + : llmDiagnosticSettingsSerializer(item["largeLanguageModel"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +export function _diagnosticContractPropertiesDeserializer(item: any) { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsDeserializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsDeserializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsDeserializer(item["backend"]), + largeLanguageModel: !item["largeLanguageModel"] + ? item["largeLanguageModel"] + : llmDiagnosticSettingsDeserializer(item["largeLanguageModel"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +export function _diagnosticUpdateContractPropertiesSerializer(item: DiagnosticUpdateContract): any { + return { + alwaysLog: item["alwaysLog"], + loggerId: item["loggerId"], + sampling: !item["sampling"] ? item["sampling"] : samplingSettingsSerializer(item["sampling"]), + frontend: !item["frontend"] + ? item["frontend"] + : pipelineDiagnosticSettingsSerializer(item["frontend"]), + backend: !item["backend"] + ? item["backend"] + : pipelineDiagnosticSettingsSerializer(item["backend"]), + logClientIp: item["logClientIp"], + httpCorrelationProtocol: item["httpCorrelationProtocol"], + verbosity: item["verbosity"], + operationNameFormat: item["operationNameFormat"], + metrics: item["metrics"], + }; +} + +export function _issueContractPropertiesSerializer(item: IssueContract): any { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +export function _issueContractPropertiesDeserializer(item: any) { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +export function _wikiContractPropertiesSerializer(item: WikiContract): any { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArraySerializer(item["documents"]), + }; +} + +export function _wikiContractPropertiesDeserializer(item: any) { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArrayDeserializer(item["documents"]), + }; +} + +export function _wikiUpdateContractPropertiesSerializer(item: WikiUpdateContract): any { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArraySerializer(item["documents"]), + }; +} + +export function _wikiUpdateContractPropertiesDeserializer(item: any) { + return { + documents: !item["documents"] + ? item["documents"] + : wikiDocumentationContractArrayDeserializer(item["documents"]), + }; +} + +export function _apiVersionSetContractPropertiesSerializer(item: ApiVersionSetContract): any { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +export function _apiVersionSetContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +export function _apiVersionSetUpdateParametersPropertiesSerializer( + item: ApiVersionSetUpdateParameters, +): any { + return { + description: item["description"], + versionQueryName: item["versionQueryName"], + versionHeaderName: item["versionHeaderName"], + displayName: item["displayName"], + versioningScheme: item["versioningScheme"], + }; +} + +export function _backendContractPropertiesSerializer(item: BackendContract): any { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesSerializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractSerializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractSerializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesSerializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerSerializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolSerializer(item["pool"]), + type: item["typePropertiesType"], + url: item["url"], + protocol: item["protocol"], + }; +} + +export function _backendContractPropertiesDeserializer(item: any) { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesDeserializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractDeserializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractDeserializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesDeserializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerDeserializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolDeserializer(item["pool"]), + typePropertiesType: item["type"], + url: item["url"], + protocol: item["protocol"], + }; +} + +export function _backendUpdateParametersPropertiesSerializer(item: BackendUpdateParameters): any { + return { + title: item["title"], + description: item["description"], + resourceId: item["resourceId"], + properties: !item["properties"] + ? item["properties"] + : backendPropertiesSerializer(item["properties"]), + credentials: !item["credentials"] + ? item["credentials"] + : backendCredentialsContractSerializer(item["credentials"]), + proxy: !item["proxy"] ? item["proxy"] : backendProxyContractSerializer(item["proxy"]), + tls: !item["tls"] ? item["tls"] : backendTlsPropertiesSerializer(item["tls"]), + circuitBreaker: !item["circuitBreaker"] + ? item["circuitBreaker"] + : backendCircuitBreakerSerializer(item["circuitBreaker"]), + azureRegion: item["azureRegion"], + pool: !item["pool"] ? item["pool"] : backendBaseParametersPoolSerializer(item["pool"]), + type: item["type"], + url: item["url"], + protocol: item["protocol"], + }; +} + +export function _certificateContractPropertiesDeserializer(item: any) { + return { + subject: item["subject"], + thumbprint: item["thumbprint"], + expirationDate: !item["expirationDate"] + ? item["expirationDate"] + : new Date(item["expirationDate"]), + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractPropertiesDeserializer(item["keyVault"]), + }; +} + +export function _certificateCreateOrUpdateParametersPropertiesSerializer( + item: CertificateCreateOrUpdateParameters, +): any { + return { + data: item["data"], + password: item["password"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +export function _groupContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + description: item["description"], + builtIn: item["builtIn"], + typePropertiesType: item["type"], + externalId: item["externalId"], + }; +} + +export function _groupCreateParametersPropertiesSerializer(item: GroupCreateParameters): any { + return { + displayName: item["displayName"], + description: item["description"], + type: item["type"], + externalId: item["externalId"], + }; +} + +export function _groupUpdateParametersPropertiesSerializer(item: GroupUpdateParameters): any { + return { + displayName: item["displayName"], + description: item["description"], + type: item["type"], + externalId: item["externalId"], + }; +} + +export function _loggerContractPropertiesSerializer(item: LoggerContract): any { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: item["credentials"], + isBuffered: item["isBuffered"], + resourceId: item["resourceId"], + }; +} + +export function _loggerContractPropertiesDeserializer(item: any) { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: !item["credentials"] + ? item["credentials"] + : Object.fromEntries( + Object.entries(item["credentials"]).map(([k, p]: [string, any]) => [k, p]), + ), + isBuffered: item["isBuffered"], + resourceId: item["resourceId"], + }; +} + +export function _loggerUpdateContractPropertiesSerializer(item: LoggerUpdateContract): any { + return { + loggerType: item["loggerType"], + description: item["description"], + credentials: item["credentials"], + isBuffered: item["isBuffered"], + }; +} + +export function _namedValueContractPropertiesDeserializer(item: any) { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractPropertiesDeserializer(item["keyVault"]), + provisioningState: item["provisioningState"], + }; +} + +export function _namedValueCreateContractPropertiesSerializer(item: NamedValueCreateContract): any { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +export function _namedValueUpdateParametersPropertiesSerializer( + item: NamedValueUpdateParameters, +): any { + return { + tags: !item["tags"] + ? item["tags"] + : item["tags"].map((p: any) => { + return p; + }), + secret: item["secret"], + displayName: item["displayName"], + value: item["value"], + keyVault: !item["keyVault"] + ? item["keyVault"] + : keyVaultContractCreatePropertiesSerializer(item["keyVault"]), + }; +} + +export function _notificationContractPropertiesDeserializer(item: any) { + return { + title: item["title"], + description: item["description"], + recipients: !item["recipients"] + ? item["recipients"] + : recipientsContractPropertiesDeserializer(item["recipients"]), + }; +} + +export function _policyFragmentContractPropertiesSerializer(item: PolicyFragmentContract): any { + return { value: item["value"], description: item["description"], format: item["format"] }; +} + +export function _policyFragmentContractPropertiesDeserializer(item: any) { + return { + value: item["value"], + description: item["description"], + format: item["format"], + provisioningState: item["provisioningState"], + }; +} + +export function _portalSigninSettingsPropertiesSerializer(item: PortalSigninSettings): any { + return { enabled: item["enabled"] }; +} + +export function _portalSigninSettingsPropertiesDeserializer(item: any) { + return { + enabled: item["enabled"], + }; +} + +export function _portalSignupSettingsPropertiesSerializer(item: PortalSignupSettings): any { + return { + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesSerializer(item["termsOfService"]), + }; +} + +export function _portalSignupSettingsPropertiesDeserializer(item: any) { + return { + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesDeserializer(item["termsOfService"]), + }; +} + +export function _portalDelegationSettingsPropertiesSerializer(item: PortalDelegationSettings): any { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesSerializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesSerializer(item["userRegistration"]), + }; +} + +export function _portalDelegationSettingsPropertiesDeserializer(item: any) { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesDeserializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesDeserializer(item["userRegistration"]), + }; +} + +export function _productContractPropertiesSerializer(item: ProductContract): any { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationSerializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +export function _productContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationDeserializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +export function _productUpdateParametersPropertiesSerializer(item: ProductUpdateParameters): any { + return { + description: item["description"], + terms: item["terms"], + subscriptionRequired: item["subscriptionRequired"], + approvalRequired: item["approvalRequired"], + subscriptionsLimit: item["subscriptionsLimit"], + authenticationType: !item["authenticationType"] + ? item["authenticationType"] + : item["authenticationType"].map((p: any) => { + return p; + }), + application: !item["application"] + ? item["application"] + : productEntityBaseParametersApplicationSerializer(item["application"]), + state: item["state"], + displayName: item["displayName"], + }; +} + +export function _productApiLinkContractPropertiesSerializer(item: ProductApiLinkContract): any { + return { apiId: item["apiId"] }; +} + +export function _productApiLinkContractPropertiesDeserializer(item: any) { + return { + apiId: item["apiId"], + }; +} + +export function _productGroupLinkContractPropertiesSerializer(item: ProductGroupLinkContract): any { + return { groupId: item["groupId"] }; +} + +export function _productGroupLinkContractPropertiesDeserializer(item: any) { + return { + groupId: item["groupId"], + }; +} + +export function _globalSchemaContractPropertiesSerializer(item: GlobalSchemaContract): any { + return { + schemaType: item["schemaType"], + description: item["description"], + value: item["value"], + document: item["document"], + }; +} + +export function _globalSchemaContractPropertiesDeserializer(item: any) { + return { + schemaType: item["schemaType"], + description: item["description"], + value: item["value"], + document: item["document"], + provisioningState: item["provisioningState"], + }; +} + +export function _subscriptionContractPropertiesDeserializer(item: any) { + return { + ownerId: item["ownerId"], + scope: item["scope"], + displayName: item["displayName"], + state: item["state"], + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + startDate: !item["startDate"] ? item["startDate"] : new Date(item["startDate"]), + expirationDate: !item["expirationDate"] + ? item["expirationDate"] + : new Date(item["expirationDate"]), + endDate: !item["endDate"] ? item["endDate"] : new Date(item["endDate"]), + notificationDate: !item["notificationDate"] + ? item["notificationDate"] + : new Date(item["notificationDate"]), + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + stateComment: item["stateComment"], + allowTracing: item["allowTracing"], + }; +} + +export function _subscriptionCreateParametersPropertiesSerializer( + item: SubscriptionCreateParameters, +): any { + return { + ownerId: item["ownerId"], + scope: item["scope"], + displayName: item["displayName"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + state: item["state"], + allowTracing: item["allowTracing"], + }; +} + +export function _subscriptionUpdateParametersPropertiesSerializer( + item: SubscriptionUpdateParameters, +): any { + return { + ownerId: item["ownerId"], + scope: item["scope"], + expirationDate: !item["expirationDate"] + ? item["expirationDate"] + : item["expirationDate"].toISOString(), + displayName: item["displayName"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + state: item["state"], + stateComment: item["stateComment"], + allowTracing: item["allowTracing"], + }; +} + +export function _tagApiLinkContractPropertiesSerializer(item: TagApiLinkContract): any { + return { apiId: item["apiId"] }; +} + +export function _tagApiLinkContractPropertiesDeserializer(item: any) { + return { + apiId: item["apiId"], + }; +} + +export function _tagOperationLinkContractPropertiesSerializer(item: TagOperationLinkContract): any { + return { operationId: item["operationId"] }; +} + +export function _tagOperationLinkContractPropertiesDeserializer(item: any) { + return { + operationId: item["operationId"], + }; +} + +export function _tagProductLinkContractPropertiesSerializer(item: TagProductLinkContract): any { + return { productId: item["productId"] }; +} + +export function _tagProductLinkContractPropertiesDeserializer(item: any) { + return { + productId: item["productId"], + }; +} + +export function _apiManagementGatewayResourcePropertiesSerializer( + item: ApiManagementGatewayResource, +): any { + return { + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationSerializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationSerializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiSerializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +export function _apiManagementGatewayResourcePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationDeserializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationDeserializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiDeserializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +export function _apiManagementGatewayUpdateParametersPropertiesSerializer( + item: ApiManagementGatewayUpdateParameters, +): any { + return { + frontend: !item["frontend"] + ? item["frontend"] + : frontendConfigurationSerializer(item["frontend"]), + backend: !item["backend"] ? item["backend"] : backendConfigurationSerializer(item["backend"]), + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : gatewayConfigurationApiSerializer(item["configurationApi"]), + virtualNetworkType: item["virtualNetworkType"], + }; +} + +export function _apiManagementServiceResourcePropertiesSerializer( + item: ApiManagementServiceResource, +): any { + return { + notificationSenderEmail: item["notificationSenderEmail"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArraySerializer(item["hostnameConfigurations"]), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiSerializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArraySerializer(item["additionalLocations"]), + customProperties: item["customProperties"], + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArraySerializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintSerializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArraySerializer(item["privateEndpointConnections"]), + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +export function _apiManagementServiceResourcePropertiesDeserializer(item: any) { + return { + notificationSenderEmail: item["notificationSenderEmail"], + provisioningState: item["provisioningState"], + targetProvisioningState: item["targetProvisioningState"], + createdAtUtc: !item["createdAtUtc"] ? item["createdAtUtc"] : new Date(item["createdAtUtc"]), + gatewayUrl: item["gatewayUrl"], + gatewayRegionalUrl: item["gatewayRegionalUrl"], + portalUrl: item["portalUrl"], + managementApiUrl: item["managementApiUrl"], + scmUrl: item["scmUrl"], + developerPortalUrl: item["developerPortalUrl"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArrayDeserializer(item["hostnameConfigurations"]), + publicIPAddresses: !item["publicIPAddresses"] + ? item["publicIPAddresses"] + : item["publicIPAddresses"].map((p: any) => { + return p; + }), + privateIPAddresses: !item["privateIPAddresses"] + ? item["privateIPAddresses"] + : item["privateIPAddresses"].map((p: any) => { + return p; + }), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiDeserializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationDeserializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArrayDeserializer(item["additionalLocations"]), + customProperties: !item["customProperties"] + ? item["customProperties"] + : Object.fromEntries( + Object.entries(item["customProperties"]).map(([k, p]: [string, any]) => [k, p]), + ), + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArrayDeserializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + outboundPublicIPAddresses: !item["outboundPublicIPAddresses"] + ? item["outboundPublicIPAddresses"] + : item["outboundPublicIPAddresses"].map((p: any) => { + return p; + }), + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintDeserializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArrayDeserializer(item["privateEndpointConnections"]), + platformVersion: item["platformVersion"], + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +export function _remotePrivateEndpointConnectionWrapperPropertiesSerializer( + item: RemotePrivateEndpointConnectionWrapper, +): any { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : armIdWrapperSerializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateSerializer(item["privateLinkServiceConnectionState"]), + }; +} + +export function _remotePrivateEndpointConnectionWrapperPropertiesDeserializer(item: any) { + return { + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : armIdWrapperDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + }; +} + +export function _apiManagementServiceUpdateParametersPropertiesSerializer( + item: ApiManagementServiceUpdateParameters, +): any { + return { + notificationSenderEmail: item["notificationSenderEmail"], + hostnameConfigurations: !item["hostnameConfigurations"] + ? item["hostnameConfigurations"] + : hostnameConfigurationArraySerializer(item["hostnameConfigurations"]), + publicIpAddressId: item["publicIpAddressId"], + publicNetworkAccess: item["publicNetworkAccess"], + configurationApi: !item["configurationApi"] + ? item["configurationApi"] + : configurationApiSerializer(item["configurationApi"]), + virtualNetworkConfiguration: !item["virtualNetworkConfiguration"] + ? item["virtualNetworkConfiguration"] + : virtualNetworkConfigurationSerializer(item["virtualNetworkConfiguration"]), + additionalLocations: !item["additionalLocations"] + ? item["additionalLocations"] + : additionalLocationArraySerializer(item["additionalLocations"]), + customProperties: item["customProperties"], + certificates: !item["certificates"] + ? item["certificates"] + : certificateConfigurationArraySerializer(item["certificates"]), + enableClientCertificate: item["enableClientCertificate"], + natGatewayState: item["natGatewayState"], + disableGateway: item["disableGateway"], + virtualNetworkType: item["virtualNetworkType"], + apiVersionConstraint: !item["apiVersionConstraint"] + ? item["apiVersionConstraint"] + : apiVersionConstraintSerializer(item["apiVersionConstraint"]), + restore: item["restore"], + privateEndpointConnections: !item["privateEndpointConnections"] + ? item["privateEndpointConnections"] + : remotePrivateEndpointConnectionWrapperArraySerializer(item["privateEndpointConnections"]), + legacyPortalStatus: item["legacyPortalStatus"], + developerPortalStatus: item["developerPortalStatus"], + releaseChannel: item["releaseChannel"], + zoneRedundant: item["zoneRedundant"], + publisherEmail: item["publisherEmail"], + publisherName: item["publisherName"], + }; +} + +export function _allPoliciesContractPropertiesDeserializer(item: any) { + return { + referencePolicyId: item["referencePolicyId"], + complianceState: item["complianceState"], + }; +} + +export function _policyDescriptionContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + scope: item["scope"], + }; +} + +export function _operationResultContractPropertiesDeserializer(item: any) { + return { + idPropertiesId: item["id"], + status: item["status"], + started: !item["started"] ? item["started"] : new Date(item["started"]), + updated: !item["updated"] ? item["updated"] : new Date(item["updated"]), + resultInfo: item["resultInfo"], + error: !item["error"] ? item["error"] : errorResponseBodyDeserializer(item["error"]), + actionLog: !item["actionLog"] + ? item["actionLog"] + : operationResultLogItemContractArrayDeserializer(item["actionLog"]), + }; +} + +export function _portalSettingsContractPropertiesDeserializer(item: any) { + return { + url: item["url"], + validationKey: item["validationKey"], + subscriptions: !item["subscriptions"] + ? item["subscriptions"] + : subscriptionsDelegationSettingsPropertiesDeserializer(item["subscriptions"]), + userRegistration: !item["userRegistration"] + ? item["userRegistration"] + : registrationDelegationSettingsPropertiesDeserializer(item["userRegistration"]), + enabled: item["enabled"], + termsOfService: !item["termsOfService"] + ? item["termsOfService"] + : termsOfServicePropertiesDeserializer(item["termsOfService"]), + }; +} + +export function _quotaCounterValueUpdateContractPropertiesSerializer( + item: QuotaCounterValueUpdateContract, +): any { + return { callsCount: item["callsCount"], kbTransferred: item["kbTransferred"] }; +} + +export function _quotaCounterValueUpdateContractPropertiesDeserializer(item: any) { + return { + callsCount: item["callsCount"], + kbTransferred: item["kbTransferred"], + }; +} + +export function _resolverContractPropertiesSerializer(item: ResolverContract): any { + return { displayName: item["displayName"], path: item["path"], description: item["description"] }; +} + +export function _resolverContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + path: item["path"], + description: item["description"], + }; +} + +export function _resolverUpdateContractPropertiesSerializer(item: ResolverUpdateContract): any { + return { displayName: item["displayName"], path: item["path"], description: item["description"] }; +} + +export function _issueUpdateContractPropertiesSerializer(item: IssueUpdateContract): any { + return { + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + state: item["state"], + apiId: item["apiId"], + title: item["title"], + description: item["description"], + userId: item["userId"], + }; +} + +export function _issueCommentContractPropertiesSerializer(item: IssueCommentContract): any { + return { + text: item["text"], + createdDate: !item["createdDate"] ? item["createdDate"] : item["createdDate"].toISOString(), + userId: item["userId"], + }; +} + +export function _issueCommentContractPropertiesDeserializer(item: any) { + return { + text: item["text"], + createdDate: !item["createdDate"] ? item["createdDate"] : new Date(item["createdDate"]), + userId: item["userId"], + }; +} + +export function _issueAttachmentContractPropertiesSerializer(item: IssueAttachmentContract): any { + return { title: item["title"], contentFormat: item["contentFormat"], content: item["content"] }; +} + +export function _issueAttachmentContractPropertiesDeserializer(item: any) { + return { + title: item["title"], + contentFormat: item["contentFormat"], + content: item["content"], + }; +} + +export function _tagDescriptionContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + tagId: item["tagId"], + displayName: item["displayName"], + }; +} + +export function _tagDescriptionCreateParametersPropertiesSerializer( + item: TagDescriptionCreateParameters, +): any { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + }; +} + +export function _tagDescriptionCreateParametersPropertiesDeserializer(item: any) { + return { + description: item["description"], + externalDocsUrl: item["externalDocsUrl"], + externalDocsDescription: item["externalDocsDescription"], + }; +} + +export function _toolContractPropertiesSerializer(item: ToolContract): any { + return { + displayName: item["displayName"], + description: item["description"], + operationId: item["operationId"], + }; +} + +export function _toolContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + description: item["description"], + operationId: item["operationId"], + }; +} + +export function _authorizationProviderContractPropertiesSerializer( + item: AuthorizationProviderContract, +): any { + return { + displayName: item["displayName"], + identityProvider: item["identityProvider"], + oauth2: !item["oauth2"] + ? item["oauth2"] + : authorizationProviderOAuth2SettingsSerializer(item["oauth2"]), + }; +} + +export function _authorizationProviderContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + identityProvider: item["identityProvider"], + oauth2: !item["oauth2"] + ? item["oauth2"] + : authorizationProviderOAuth2SettingsDeserializer(item["oauth2"]), + }; +} + +export function _authorizationContractPropertiesSerializer(item: AuthorizationContract): any { + return { + authorizationType: item["authorizationType"], + oauth2grantType: item["oAuth2GrantType"], + parameters: item["parameters"], + error: !item["error"] ? item["error"] : authorizationErrorSerializer(item["error"]), + status: item["status"], + }; +} + +export function _authorizationContractPropertiesDeserializer(item: any) { + return { + authorizationType: item["authorizationType"], + oAuth2GrantType: item["oauth2grantType"], + parameters: !item["parameters"] + ? item["parameters"] + : Object.fromEntries( + Object.entries(item["parameters"]).map(([k, p]: [string, any]) => [k, p]), + ), + error: !item["error"] ? item["error"] : authorizationErrorDeserializer(item["error"]), + status: item["status"], + }; +} + +export function _authorizationAccessPolicyContractPropertiesSerializer( + item: AuthorizationAccessPolicyContract, +): any { + return { + appIds: !item["appIds"] + ? item["appIds"] + : item["appIds"].map((p: any) => { + return p; + }), + tenantId: item["tenantId"], + objectId: item["objectId"], + }; +} + +export function _authorizationAccessPolicyContractPropertiesDeserializer(item: any) { + return { + appIds: !item["appIds"] + ? item["appIds"] + : item["appIds"].map((p: any) => { + return p; + }), + tenantId: item["tenantId"], + objectId: item["objectId"], + }; +} + +export function _authorizationServerContractPropertiesSerializer( + item: AuthorizationServerContract, +): any { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArraySerializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +export function _authorizationServerContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArrayDeserializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +export function _authorizationServerUpdateContractPropertiesSerializer( + item: AuthorizationServerUpdateContract, +): any { + return { + description: item["description"], + authorizationMethods: !item["authorizationMethods"] + ? item["authorizationMethods"] + : item["authorizationMethods"].map((p: any) => { + return p; + }), + clientAuthenticationMethod: !item["clientAuthenticationMethod"] + ? item["clientAuthenticationMethod"] + : item["clientAuthenticationMethod"].map((p: any) => { + return p; + }), + tokenBodyParameters: !item["tokenBodyParameters"] + ? item["tokenBodyParameters"] + : tokenBodyParameterContractArraySerializer(item["tokenBodyParameters"]), + tokenEndpoint: item["tokenEndpoint"], + supportState: item["supportState"], + defaultScope: item["defaultScope"], + bearerTokenSendingMethods: !item["bearerTokenSendingMethods"] + ? item["bearerTokenSendingMethods"] + : item["bearerTokenSendingMethods"].map((p: any) => { + return p; + }), + resourceOwnerUsername: item["resourceOwnerUsername"], + resourceOwnerPassword: item["resourceOwnerPassword"], + displayName: item["displayName"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + clientRegistrationEndpoint: item["clientRegistrationEndpoint"], + authorizationEndpoint: item["authorizationEndpoint"], + grantTypes: !item["grantTypes"] + ? item["grantTypes"] + : item["grantTypes"].map((p: any) => { + return p; + }), + clientId: item["clientId"], + clientSecret: item["clientSecret"], + }; +} + +export function _backendReconnectContractPropertiesSerializer(item: BackendReconnectContract): any { + return { after: item["after"] }; +} + +export function _cacheContractPropertiesSerializer(item: CacheContract): any { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +export function _cacheContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +export function _cacheUpdateParametersPropertiesSerializer(item: CacheUpdateParameters): any { + return { + description: item["description"], + connectionString: item["connectionString"], + useFromLocation: item["useFromLocation"], + resourceId: item["resourceId"], + }; +} + +export function _contentTypeContractPropertiesSerializer(item: ContentTypeContract): any { + return { + id: item["idPropertiesId"], + name: item["namePropertiesName"], + description: item["description"], + schema: item["schema"], + version: item["version"], + }; +} + +export function _contentTypeContractPropertiesDeserializer(item: any) { + return { + idPropertiesId: item["id"], + namePropertiesName: item["name"], + description: item["description"], + schema: item["schema"], + version: item["version"], + }; +} + +export function _deletedServiceContractPropertiesDeserializer(item: any) { + return { + serviceId: item["serviceId"], + scheduledPurgeDate: !item["scheduledPurgeDate"] + ? item["scheduledPurgeDate"] + : new Date(item["scheduledPurgeDate"]), + deletionDate: !item["deletionDate"] ? item["deletionDate"] : new Date(item["deletionDate"]), + }; +} + +export function _documentationContractPropertiesSerializer(item: DocumentationContract): any { + return { title: item["title"], content: item["content"] }; +} + +export function _documentationContractPropertiesDeserializer(item: any) { + return { + title: item["title"], + content: item["content"], + }; +} + +export function _documentationUpdateContractPropertiesSerializer( + item: DocumentationUpdateContract, +): any { + return { title: item["title"], content: item["content"] }; +} + +export function _documentationUpdateContractPropertiesDeserializer(item: any) { + return { + title: item["title"], + content: item["content"], + }; +} + +export function _emailTemplateContractPropertiesDeserializer(item: any) { + return { + subject: item["subject"], + body: item["body"], + title: item["title"], + description: item["description"], + isDefault: item["isDefault"], + parameters: !item["parameters"] + ? item["parameters"] + : emailTemplateParametersContractPropertiesArrayDeserializer(item["parameters"]), + }; +} + +export function _emailTemplateUpdateParametersPropertiesSerializer( + item: EmailTemplateUpdateParameters, +): any { + return { + subject: item["subject"], + title: item["title"], + description: item["description"], + body: item["body"], + parameters: !item["parameters"] + ? item["parameters"] + : emailTemplateParametersContractPropertiesArraySerializer(item["parameters"]), + }; +} + +export function _apiManagementGatewayConfigConnectionResourcePropertiesSerializer( + item: ApiManagementGatewayConfigConnectionResource, +): any { + return { + sourceId: item["sourceId"], + hostnames: !item["hostnames"] + ? item["hostnames"] + : item["hostnames"].map((p: any) => { + return p; + }), + }; +} + +export function _apiManagementGatewayConfigConnectionResourcePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + sourceId: item["sourceId"], + defaultHostname: item["defaultHostname"], + hostnames: !item["hostnames"] + ? item["hostnames"] + : item["hostnames"].map((p: any) => { + return p; + }), + }; +} + +export function _gatewayHostnameBindingResourcePropertiesSerializer( + item: GatewayHostnameBindingResource, +): any { + return { + hostname: item["hostname"], + keyVault: gatewayHostnameBindingKeyVaultSerializer(item["keyVault"]), + }; +} + +export function _gatewayHostnameBindingResourcePropertiesDeserializer(item: any) { + return { + provisioningState: item["provisioningState"], + hostname: item["hostname"], + keyVault: gatewayHostnameBindingKeyVaultDeserializer(item["keyVault"]), + certificate: !item["certificate"] + ? item["certificate"] + : gatewayHostnameBindingCertificateDeserializer(item["certificate"]), + }; +} + +export function _gatewayContractPropertiesSerializer(item: GatewayContract): any { + return { + locationData: !item["locationData"] + ? item["locationData"] + : resourceLocationDataContractSerializer(item["locationData"]), + description: item["description"], + }; +} + +export function _gatewayContractPropertiesDeserializer(item: any) { + return { + locationData: !item["locationData"] + ? item["locationData"] + : resourceLocationDataContractDeserializer(item["locationData"]), + description: item["description"], + }; +} + +export function _associationContractPropertiesSerializer(item: AssociationContract): any { + return { provisioningState: item["provisioningState"] }; +} + +export function _gatewayHostnameConfigurationContractPropertiesSerializer( + item: GatewayHostnameConfigurationContract, +): any { + return { + hostname: item["hostname"], + certificateId: item["certificateId"], + negotiateClientCertificate: item["negotiateClientCertificate"], + tls10Enabled: item["tls10Enabled"], + tls11Enabled: item["tls11Enabled"], + http2Enabled: item["http2Enabled"], + }; +} + +export function _gatewayHostnameConfigurationContractPropertiesDeserializer(item: any) { + return { + hostname: item["hostname"], + certificateId: item["certificateId"], + negotiateClientCertificate: item["negotiateClientCertificate"], + tls10Enabled: item["tls10Enabled"], + tls11Enabled: item["tls11Enabled"], + http2Enabled: item["http2Enabled"], + }; +} + +export function _gatewayCertificateAuthorityContractPropertiesSerializer( + item: GatewayCertificateAuthorityContract, +): any { + return { isTrusted: item["isTrusted"] }; +} + +export function _gatewayCertificateAuthorityContractPropertiesDeserializer(item: any) { + return { + isTrusted: item["isTrusted"], + }; +} + +export function _userContractPropertiesDeserializer(item: any) { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArrayDeserializer(item["identities"]), + firstName: item["firstName"], + lastName: item["lastName"], + email: item["email"], + registrationDate: !item["registrationDate"] + ? item["registrationDate"] + : new Date(item["registrationDate"]), + groups: !item["groups"] + ? item["groups"] + : groupContractPropertiesArrayDeserializer(item["groups"]), + }; +} + +export function _identityProviderContractPropertiesDeserializer(item: any) { + return { + typePropertiesType: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +export function _identityProviderCreateContractPropertiesSerializer( + item: IdentityProviderCreateContract, +): any { + return { + type: item["typePropertiesType"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +export function _identityProviderUpdateParametersPropertiesSerializer( + item: IdentityProviderUpdateParameters, +): any { + return { + type: item["type"], + signinTenant: item["signinTenant"], + allowedTenants: !item["allowedTenants"] + ? item["allowedTenants"] + : item["allowedTenants"].map((p: any) => { + return p; + }), + authority: item["authority"], + signupPolicyName: item["signupPolicyName"], + signinPolicyName: item["signinPolicyName"], + profileEditingPolicyName: item["profileEditingPolicyName"], + passwordResetPolicyName: item["passwordResetPolicyName"], + clientLibrary: item["clientLibrary"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + certificateId: item["certificateId"], + }; +} + +export function _recipientUserContractPropertiesDeserializer(item: any) { + return { + userId: item["userId"], + }; +} + +export function _recipientEmailContractPropertiesDeserializer(item: any) { + return { + email: item["email"], + }; +} + +export function _openidConnectProviderContractPropertiesSerializer( + item: OpenidConnectProviderContract, +): any { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +export function _openidConnectProviderContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +export function _openidConnectProviderUpdateContractPropertiesSerializer( + item: OpenidConnectProviderUpdateContract, +): any { + return { + displayName: item["displayName"], + description: item["description"], + metadataEndpoint: item["metadataEndpoint"], + clientId: item["clientId"], + clientSecret: item["clientSecret"], + useInTestConsole: item["useInTestConsole"], + useInApiDocumentation: item["useInApiDocumentation"], + }; +} + +export function _policyRestrictionContractPropertiesSerializer( + item: PolicyRestrictionContract, +): any { + return { scope: item["scope"], requireBase: item["requireBase"] }; +} + +export function _policyRestrictionContractPropertiesDeserializer(item: any) { + return { + scope: item["scope"], + requireBase: item["requireBase"], + }; +} + +export function _policyRestrictionUpdateContractPropertiesSerializer( + item: PolicyRestrictionUpdateContract, +): any { + return { scope: item["scope"], requireBase: item["requireBase"] }; +} + +export function _policyRestrictionUpdateContractPropertiesDeserializer(item: any) { + return { + scope: item["scope"], + requireBase: item["requireBase"], + }; +} + +export function _portalConfigContractPropertiesSerializer(item: PortalConfigContract): any { + return { + enableBasicAuth: item["enableBasicAuth"], + signin: !item["signin"] + ? item["signin"] + : portalConfigPropertiesSigninSerializer(item["signin"]), + signup: !item["signup"] + ? item["signup"] + : portalConfigPropertiesSignupSerializer(item["signup"]), + delegation: !item["delegation"] + ? item["delegation"] + : portalConfigDelegationPropertiesSerializer(item["delegation"]), + cors: !item["cors"] ? item["cors"] : portalConfigCorsPropertiesSerializer(item["cors"]), + csp: !item["csp"] ? item["csp"] : portalConfigCspPropertiesSerializer(item["csp"]), + }; +} + +export function _portalConfigContractPropertiesDeserializer(item: any) { + return { + enableBasicAuth: item["enableBasicAuth"], + signin: !item["signin"] + ? item["signin"] + : portalConfigPropertiesSigninDeserializer(item["signin"]), + signup: !item["signup"] + ? item["signup"] + : portalConfigPropertiesSignupDeserializer(item["signup"]), + delegation: !item["delegation"] + ? item["delegation"] + : portalConfigDelegationPropertiesDeserializer(item["delegation"]), + cors: !item["cors"] ? item["cors"] : portalConfigCorsPropertiesDeserializer(item["cors"]), + csp: !item["csp"] ? item["csp"] : portalConfigCspPropertiesDeserializer(item["csp"]), + }; +} + +export function _clientApplicationContractPropertiesSerializer( + item: ClientApplicationContract, +): any { + return { + displayName: item["displayName"], + description: item["description"], + ownerId: item["ownerId"], + }; +} + +export function _clientApplicationContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + description: item["description"], + ownerId: item["ownerId"], + entraApplicationId: item["entraApplicationId"], + entraTenantId: item["entraTenantId"], + state: item["state"], + }; +} + +export function _clientApplicationProductLinkContractPropertiesSerializer( + item: ClientApplicationProductLinkContract, +): any { + return { productId: item["productId"] }; +} + +export function _clientApplicationProductLinkContractPropertiesDeserializer(item: any) { + return { + productId: item["productId"], + }; +} + +export function _portalRevisionContractPropertiesSerializer(item: PortalRevisionContract): any { + return { description: item["description"], isCurrent: item["isCurrent"] }; +} + +export function _portalRevisionContractPropertiesDeserializer(item: any) { + return { + description: item["description"], + statusDetails: item["statusDetails"], + status: item["status"], + isCurrent: item["isCurrent"], + createdDateTime: !item["createdDateTime"] + ? item["createdDateTime"] + : new Date(item["createdDateTime"]), + updatedDateTime: !item["updatedDateTime"] + ? item["updatedDateTime"] + : new Date(item["updatedDateTime"]), + provisioningState: item["provisioningState"], + }; +} + +export function _privateEndpointConnectionPropertiesDeserializer(item: any) { + return { + groupIds: !item["groupIds"] + ? item["groupIds"] + : item["groupIds"].map((p: any) => { + return p; + }), + privateEndpoint: !item["privateEndpoint"] + ? item["privateEndpoint"] + : privateEndpointDeserializer(item["privateEndpoint"]), + privateLinkServiceConnectionState: !item["privateLinkServiceConnectionState"] + ? item["privateLinkServiceConnectionState"] + : privateLinkServiceConnectionStateDeserializer(item["privateLinkServiceConnectionState"]), + provisioningState: item["provisioningState"], + }; +} + +export function _privateLinkResourcePropertiesDeserializer(item: any) { + return { + groupId: item["groupId"], + requiredMembers: !item["requiredMembers"] + ? item["requiredMembers"] + : item["requiredMembers"].map((p: any) => { + return p; + }), + requiredZoneNames: !item["requiredZoneNames"] + ? item["requiredZoneNames"] + : item["requiredZoneNames"].map((p: any) => { + return p; + }), + }; +} + +export function _tenantSettingsContractPropertiesDeserializer(item: any) { + return { + settings: !item["settings"] + ? item["settings"] + : Object.fromEntries(Object.entries(item["settings"]).map(([k, p]: [string, any]) => [k, p])), + }; +} + +export function _accessInformationContractPropertiesDeserializer(item: any) { + return { + idPropertiesId: item["id"], + principalId: item["principalId"], + enabled: item["enabled"], + }; +} + +export function _accessInformationCreateParametersPropertiesSerializer( + item: AccessInformationCreateParameters, +): any { + return { + principalId: item["principalId"], + primaryKey: item["primaryKey"], + secondaryKey: item["secondaryKey"], + enabled: item["enabled"], + }; +} + +export function _accessInformationUpdateParametersPropertiesSerializer( + item: AccessInformationUpdateParameters, +): any { + return { enabled: item["enabled"] }; +} + +export function _deployConfigurationParametersPropertiesSerializer( + item: DeployConfigurationParameters, +): any { + return { branch: item["branch"], force: item["force"] }; +} + +export function _saveConfigurationParameterPropertiesSerializer( + item: SaveConfigurationParameter, +): any { + return { branch: item["branch"], force: item["force"] }; +} + +export function _tenantConfigurationSyncStateContractPropertiesDeserializer(item: any) { + return { + branch: item["branch"], + commitId: item["commitId"], + isExport: item["isExport"], + isSynced: item["isSynced"], + isGitEnabled: item["isGitEnabled"], + syncDate: !item["syncDate"] ? item["syncDate"] : new Date(item["syncDate"]), + configurationChangeDate: !item["configurationChangeDate"] + ? item["configurationChangeDate"] + : new Date(item["configurationChangeDate"]), + lastOperationId: item["lastOperationId"], + }; +} + +export function _userCreateParametersPropertiesSerializer(item: UserCreateParameters): any { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArraySerializer(item["identities"]), + email: item["email"], + firstName: item["firstName"], + lastName: item["lastName"], + password: item["password"], + appType: item["appType"], + confirmation: item["confirmation"], + }; +} + +export function _userUpdateParametersPropertiesSerializer(item: UserUpdateParameters): any { + return { + state: item["state"], + note: item["note"], + identities: !item["identities"] + ? item["identities"] + : userIdentityContractArraySerializer(item["identities"]), + email: item["email"], + password: item["password"], + firstName: item["firstName"], + lastName: item["lastName"], + }; +} + +export function _userTokenParametersPropertiesSerializer(item: UserTokenParameters): any { + return { + keyType: item["keyType"], + expiry: !item["expiry"] ? item["expiry"] : item["expiry"].toISOString(), + }; +} + +export function _apiManagementWorkspaceLinksResourcePropertiesDeserializer(item: any) { + return { + workspaceId: item["workspaceId"], + gateways: !item["gateways"] + ? item["gateways"] + : workspaceLinksGatewayArrayDeserializer(item["gateways"]), + }; +} + +export function _workspaceContractPropertiesSerializer(item: WorkspaceContract): any { + return { displayName: item["displayName"], description: item["description"] }; +} + +export function _workspaceContractPropertiesDeserializer(item: any) { + return { + displayName: item["displayName"], + description: item["description"], + }; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts b/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts deleted file mode 100644 index 40e419e0bb4c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/models/parameters.ts +++ /dev/null @@ -1,1939 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - ApiManagementGatewayResource as ApiManagementGatewayResourceMapper, - ApiManagementGatewayUpdateParameters as ApiManagementGatewayUpdateParametersMapper, - ApiCreateOrUpdateParameter as ApiCreateOrUpdateParameterMapper, - ApiUpdateContract as ApiUpdateContractMapper, - ApiReleaseContract as ApiReleaseContractMapper, - OperationContract as OperationContractMapper, - OperationUpdateContract as OperationUpdateContractMapper, - PolicyContract as PolicyContractMapper, - TagCreateUpdateParameters as TagCreateUpdateParametersMapper, - ResolverContract as ResolverContractMapper, - ResolverUpdateContract as ResolverUpdateContractMapper, - SchemaContract as SchemaContractMapper, - DiagnosticContract as DiagnosticContractMapper, - IssueContract as IssueContractMapper, - IssueUpdateContract as IssueUpdateContractMapper, - IssueCommentContract as IssueCommentContractMapper, - IssueAttachmentContract as IssueAttachmentContractMapper, - TagDescriptionCreateParameters as TagDescriptionCreateParametersMapper, - WikiContract as WikiContractMapper, - WikiUpdateContract as WikiUpdateContractMapper, - ApiVersionSetContract as ApiVersionSetContractMapper, - ApiVersionSetUpdateParameters as ApiVersionSetUpdateParametersMapper, - AuthorizationProviderContract as AuthorizationProviderContractMapper, - AuthorizationContract as AuthorizationContractMapper, - AuthorizationConfirmConsentCodeRequestContract as AuthorizationConfirmConsentCodeRequestContractMapper, - AuthorizationLoginRequestContract as AuthorizationLoginRequestContractMapper, - AuthorizationAccessPolicyContract as AuthorizationAccessPolicyContractMapper, - AuthorizationServerContract as AuthorizationServerContractMapper, - AuthorizationServerUpdateContract as AuthorizationServerUpdateContractMapper, - BackendContract as BackendContractMapper, - BackendUpdateParameters as BackendUpdateParametersMapper, - BackendReconnectContract as BackendReconnectContractMapper, - CacheContract as CacheContractMapper, - CacheUpdateParameters as CacheUpdateParametersMapper, - CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper, - ConnectivityCheckRequest as ConnectivityCheckRequestMapper, - ContentTypeContract as ContentTypeContractMapper, - ContentItemContract as ContentItemContractMapper, - ApiManagementServiceBackupRestoreParameters as ApiManagementServiceBackupRestoreParametersMapper, - ApiManagementServiceResource as ApiManagementServiceResourceMapper, - ApiManagementServiceUpdateParameters as ApiManagementServiceUpdateParametersMapper, - MigrateToStv2Contract as MigrateToStv2ContractMapper, - ApiManagementServiceCheckNameAvailabilityParameters as ApiManagementServiceCheckNameAvailabilityParametersMapper, - ApiManagementServiceApplyNetworkConfigurationParameters as ApiManagementServiceApplyNetworkConfigurationParametersMapper, - DocumentationContract as DocumentationContractMapper, - DocumentationUpdateContract as DocumentationUpdateContractMapper, - EmailTemplateUpdateParameters as EmailTemplateUpdateParametersMapper, - ApiManagementGatewayConfigConnectionResource as ApiManagementGatewayConfigConnectionResourceMapper, - GatewayContract as GatewayContractMapper, - GatewayKeyRegenerationRequestContract as GatewayKeyRegenerationRequestContractMapper, - GatewayTokenRequestContract as GatewayTokenRequestContractMapper, - GatewayListDebugCredentialsContract as GatewayListDebugCredentialsContractMapper, - GatewayListTraceContract as GatewayListTraceContractMapper, - GatewayHostnameConfigurationContract as GatewayHostnameConfigurationContractMapper, - AssociationContract as AssociationContractMapper, - GatewayCertificateAuthorityContract as GatewayCertificateAuthorityContractMapper, - GroupCreateParameters as GroupCreateParametersMapper, - GroupUpdateParameters as GroupUpdateParametersMapper, - IdentityProviderCreateContract as IdentityProviderCreateContractMapper, - IdentityProviderUpdateParameters as IdentityProviderUpdateParametersMapper, - LoggerContract as LoggerContractMapper, - LoggerUpdateContract as LoggerUpdateContractMapper, - NamedValueCreateContract as NamedValueCreateContractMapper, - NamedValueUpdateParameters as NamedValueUpdateParametersMapper, - OpenidConnectProviderContract as OpenidConnectProviderContractMapper, - OpenidConnectProviderUpdateContract as OpenidConnectProviderUpdateContractMapper, - PolicyFragmentContract as PolicyFragmentContractMapper, - PolicyRestrictionContract as PolicyRestrictionContractMapper, - PolicyRestrictionUpdateContract as PolicyRestrictionUpdateContractMapper, - PortalConfigContract as PortalConfigContractMapper, - PortalRevisionContract as PortalRevisionContractMapper, - PortalSigninSettings as PortalSigninSettingsMapper, - PortalSignupSettings as PortalSignupSettingsMapper, - PortalDelegationSettings as PortalDelegationSettingsMapper, - PrivateEndpointConnectionRequest as PrivateEndpointConnectionRequestMapper, - ProductContract as ProductContractMapper, - ProductUpdateParameters as ProductUpdateParametersMapper, - ProductApiLinkContract as ProductApiLinkContractMapper, - ProductGroupLinkContract as ProductGroupLinkContractMapper, - QuotaCounterValueUpdateContract as QuotaCounterValueUpdateContractMapper, - GlobalSchemaContract as GlobalSchemaContractMapper, - SubscriptionCreateParameters as SubscriptionCreateParametersMapper, - SubscriptionUpdateParameters as SubscriptionUpdateParametersMapper, - TagApiLinkContract as TagApiLinkContractMapper, - TagOperationLinkContract as TagOperationLinkContractMapper, - TagProductLinkContract as TagProductLinkContractMapper, - AccessInformationCreateParameters as AccessInformationCreateParametersMapper, - AccessInformationUpdateParameters as AccessInformationUpdateParametersMapper, - DeployConfigurationParameters as DeployConfigurationParametersMapper, - SaveConfigurationParameter as SaveConfigurationParameterMapper, - UserCreateParameters as UserCreateParametersMapper, - UserUpdateParameters as UserUpdateParametersMapper, - UserTokenParameters as UserTokenParametersMapper, - DiagnosticUpdateContract as DiagnosticUpdateContractMapper, - WorkspaceContract as WorkspaceContractMapper, -} from "../models/mappers.js"; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementGatewayResourceMapper, -}; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - xmlName: "$host", - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - xmlName: "resourceGroupName", - type: { - name: "String", - }, - }, -}; - -export const gatewayName: OperationURLParameter = { - parameterPath: "gatewayName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), - MaxLength: 45, - MinLength: 1, - }, - serializedName: "gatewayName", - required: true, - xmlName: "gatewayName", - type: { - name: "String", - }, - }, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2024-05-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - xmlName: "subscriptionId", - type: { - name: "Uuid", - }, - }, -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementGatewayUpdateParametersMapper, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - xmlName: "nextLink", - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const serviceName: OperationURLParameter = { - parameterPath: "serviceName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), - MaxLength: 50, - MinLength: 1, - }, - serializedName: "serviceName", - required: true, - xmlName: "serviceName", - type: { - name: "String", - }, - }, -}; - -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - xmlName: "$filter", - type: { - name: "String", - }, - }, -}; - -export const top: OperationQueryParameter = { - parameterPath: ["options", "top"], - mapper: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "$top", - xmlName: "$top", - type: { - name: "Number", - }, - }, -}; - -export const skip: OperationQueryParameter = { - parameterPath: ["options", "skip"], - mapper: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "$skip", - xmlName: "$skip", - type: { - name: "Number", - }, - }, -}; - -export const tags: OperationQueryParameter = { - parameterPath: ["options", "tags"], - mapper: { - serializedName: "tags", - xmlName: "tags", - type: { - name: "String", - }, - }, -}; - -export const expandApiVersionSet: OperationQueryParameter = { - parameterPath: ["options", "expandApiVersionSet"], - mapper: { - serializedName: "expandApiVersionSet", - xmlName: "expandApiVersionSet", - type: { - name: "Boolean", - }, - }, -}; - -export const apiId: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String", - }, - }, -}; - -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: ApiCreateOrUpdateParameterMapper, -}; - -export const ifMatch: OperationParameter = { - parameterPath: ["options", "ifMatch"], - mapper: { - serializedName: "If-Match", - xmlName: "If-Match", - type: { - name: "String", - }, - }, -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: ApiUpdateContractMapper, -}; - -export const ifMatch1: OperationParameter = { - parameterPath: "ifMatch", - mapper: { - serializedName: "If-Match", - required: true, - xmlName: "If-Match", - type: { - name: "String", - }, - }, -}; - -export const deleteRevisions: OperationQueryParameter = { - parameterPath: ["options", "deleteRevisions"], - mapper: { - serializedName: "deleteRevisions", - xmlName: "deleteRevisions", - type: { - name: "Boolean", - }, - }, -}; - -export const includeNotTaggedApis: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedApis"], - mapper: { - serializedName: "includeNotTaggedApis", - xmlName: "includeNotTaggedApis", - type: { - name: "Boolean", - }, - }, -}; - -export const apiId1: OperationURLParameter = { - parameterPath: "apiId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "apiId", - required: true, - xmlName: "apiId", - type: { - name: "String", - }, - }, -}; - -export const releaseId: OperationURLParameter = { - parameterPath: "releaseId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "releaseId", - required: true, - xmlName: "releaseId", - type: { - name: "String", - }, - }, -}; - -export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: ApiReleaseContractMapper, -}; - -export const operationId: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "operationId", - required: true, - xmlName: "operationId", - type: { - name: "String", - }, - }, -}; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: OperationContractMapper, -}; - -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: OperationUpdateContractMapper, -}; - -export const policyId: OperationURLParameter = { - parameterPath: "policyId", - mapper: { - serializedName: "policyId", - required: true, - xmlName: "policyId", - type: { - name: "String", - }, - }, -}; - -export const format: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - defaultValue: "xml", - serializedName: "format", - xmlName: "format", - type: { - name: "String", - }, - }, -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyContractMapper, -}; - -export const tagId: OperationURLParameter = { - parameterPath: "tagId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "tagId", - required: true, - xmlName: "tagId", - type: { - name: "String", - }, - }, -}; - -export const productId: OperationURLParameter = { - parameterPath: "productId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "productId", - required: true, - xmlName: "productId", - type: { - name: "String", - }, - }, -}; - -export const scope: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "String", - }, - }, -}; - -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: TagCreateUpdateParametersMapper, -}; - -export const resolverId: OperationURLParameter = { - parameterPath: "resolverId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "resolverId", - required: true, - xmlName: "resolverId", - type: { - name: "String", - }, - }, -}; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverContractMapper, -}; - -export const parameters10: OperationParameter = { - parameterPath: "parameters", - mapper: ResolverUpdateContractMapper, -}; - -export const accept1: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: - "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const schemaId: OperationURLParameter = { - parameterPath: "schemaId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "schemaId", - required: true, - xmlName: "schemaId", - type: { - name: "String", - }, - }, -}; - -export const parameters11: OperationParameter = { - parameterPath: "parameters", - mapper: SchemaContractMapper, -}; - -export const force: OperationQueryParameter = { - parameterPath: ["options", "force"], - mapper: { - serializedName: "force", - xmlName: "force", - type: { - name: "Boolean", - }, - }, -}; - -export const diagnosticId: OperationURLParameter = { - parameterPath: "diagnosticId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "diagnosticId", - required: true, - xmlName: "diagnosticId", - type: { - name: "String", - }, - }, -}; - -export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: DiagnosticContractMapper, -}; - -export const expandCommentsAttachments: OperationQueryParameter = { - parameterPath: ["options", "expandCommentsAttachments"], - mapper: { - serializedName: "expandCommentsAttachments", - xmlName: "expandCommentsAttachments", - type: { - name: "Boolean", - }, - }, -}; - -export const issueId: OperationURLParameter = { - parameterPath: "issueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "issueId", - required: true, - xmlName: "issueId", - type: { - name: "String", - }, - }, -}; - -export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: IssueContractMapper, -}; - -export const parameters14: OperationParameter = { - parameterPath: "parameters", - mapper: IssueUpdateContractMapper, -}; - -export const commentId: OperationURLParameter = { - parameterPath: "commentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "commentId", - required: true, - xmlName: "commentId", - type: { - name: "String", - }, - }, -}; - -export const parameters15: OperationParameter = { - parameterPath: "parameters", - mapper: IssueCommentContractMapper, -}; - -export const attachmentId: OperationURLParameter = { - parameterPath: "attachmentId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "attachmentId", - required: true, - xmlName: "attachmentId", - type: { - name: "String", - }, - }, -}; - -export const parameters16: OperationParameter = { - parameterPath: "parameters", - mapper: IssueAttachmentContractMapper, -}; - -export const tagDescriptionId: OperationURLParameter = { - parameterPath: "tagDescriptionId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "tagDescriptionId", - required: true, - xmlName: "tagDescriptionId", - type: { - name: "String", - }, - }, -}; - -export const parameters17: OperationParameter = { - parameterPath: "parameters", - mapper: TagDescriptionCreateParametersMapper, -}; - -export const includeNotTaggedOperations: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedOperations"], - mapper: { - serializedName: "includeNotTaggedOperations", - xmlName: "includeNotTaggedOperations", - type: { - name: "Boolean", - }, - }, -}; - -export const parameters18: OperationParameter = { - parameterPath: "parameters", - mapper: WikiContractMapper, -}; - -export const parameters19: OperationParameter = { - parameterPath: "parameters", - mapper: WikiUpdateContractMapper, -}; - -export const format1: OperationQueryParameter = { - parameterPath: "format", - mapper: { - serializedName: "format", - required: true, - xmlName: "format", - type: { - name: "String", - }, - }, -}; - -export const exportParam: OperationQueryParameter = { - parameterPath: "exportParam", - mapper: { - serializedName: "export", - required: true, - xmlName: "export", - type: { - name: "String", - }, - }, -}; - -export const versionSetId: OperationURLParameter = { - parameterPath: "versionSetId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "versionSetId", - required: true, - xmlName: "versionSetId", - type: { - name: "String", - }, - }, -}; - -export const parameters20: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetContractMapper, -}; - -export const parameters21: OperationParameter = { - parameterPath: "parameters", - mapper: ApiVersionSetUpdateParametersMapper, -}; - -export const authorizationProviderId: OperationURLParameter = { - parameterPath: "authorizationProviderId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "authorizationProviderId", - required: true, - xmlName: "authorizationProviderId", - type: { - name: "String", - }, - }, -}; - -export const parameters22: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationProviderContractMapper, -}; - -export const authorizationId: OperationURLParameter = { - parameterPath: "authorizationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "authorizationId", - required: true, - xmlName: "authorizationId", - type: { - name: "String", - }, - }, -}; - -export const parameters23: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationContractMapper, -}; - -export const parameters24: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationConfirmConsentCodeRequestContractMapper, -}; - -export const parameters25: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationLoginRequestContractMapper, -}; - -export const authorizationAccessPolicyId: OperationURLParameter = { - parameterPath: "authorizationAccessPolicyId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "authorizationAccessPolicyId", - required: true, - xmlName: "authorizationAccessPolicyId", - type: { - name: "String", - }, - }, -}; - -export const parameters26: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationAccessPolicyContractMapper, -}; - -export const authsid: OperationURLParameter = { - parameterPath: "authsid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "authsid", - required: true, - xmlName: "authsid", - type: { - name: "String", - }, - }, -}; - -export const parameters27: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerContractMapper, -}; - -export const parameters28: OperationParameter = { - parameterPath: "parameters", - mapper: AuthorizationServerUpdateContractMapper, -}; - -export const backendId: OperationURLParameter = { - parameterPath: "backendId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "backendId", - required: true, - xmlName: "backendId", - type: { - name: "String", - }, - }, -}; - -export const parameters29: OperationParameter = { - parameterPath: "parameters", - mapper: BackendContractMapper, -}; - -export const parameters30: OperationParameter = { - parameterPath: "parameters", - mapper: BackendUpdateParametersMapper, -}; - -export const parameters31: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: BackendReconnectContractMapper, -}; - -export const cacheId: OperationURLParameter = { - parameterPath: "cacheId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "cacheId", - required: true, - xmlName: "cacheId", - type: { - name: "String", - }, - }, -}; - -export const parameters32: OperationParameter = { - parameterPath: "parameters", - mapper: CacheContractMapper, -}; - -export const parameters33: OperationParameter = { - parameterPath: "parameters", - mapper: CacheUpdateParametersMapper, -}; - -export const isKeyVaultRefreshFailed: OperationQueryParameter = { - parameterPath: ["options", "isKeyVaultRefreshFailed"], - mapper: { - serializedName: "isKeyVaultRefreshFailed", - xmlName: "isKeyVaultRefreshFailed", - type: { - name: "Boolean", - }, - }, -}; - -export const certificateId: OperationURLParameter = { - parameterPath: "certificateId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "certificateId", - required: true, - xmlName: "certificateId", - type: { - name: "String", - }, - }, -}; - -export const parameters34: OperationParameter = { - parameterPath: "parameters", - mapper: CertificateCreateOrUpdateParametersMapper, -}; - -export const connectivityCheckRequestParams: OperationParameter = { - parameterPath: "connectivityCheckRequestParams", - mapper: ConnectivityCheckRequestMapper, -}; - -export const contentTypeId: OperationURLParameter = { - parameterPath: "contentTypeId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "contentTypeId", - required: true, - xmlName: "contentTypeId", - type: { - name: "String", - }, - }, -}; - -export const parameters35: OperationParameter = { - parameterPath: "parameters", - mapper: ContentTypeContractMapper, -}; - -export const contentItemId: OperationURLParameter = { - parameterPath: "contentItemId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "contentItemId", - required: true, - xmlName: "contentItemId", - type: { - name: "String", - }, - }, -}; - -export const parameters36: OperationParameter = { - parameterPath: "parameters", - mapper: ContentItemContractMapper, -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String", - }, - }, -}; - -export const parameters37: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceBackupRestoreParametersMapper, -}; - -export const parameters38: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceResourceMapper, -}; - -export const parameters39: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceUpdateParametersMapper, -}; - -export const parameters40: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: MigrateToStv2ContractMapper, -}; - -export const parameters41: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementServiceCheckNameAvailabilityParametersMapper, -}; - -export const parameters42: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: ApiManagementServiceApplyNetworkConfigurationParametersMapper, -}; - -export const documentationId: OperationURLParameter = { - parameterPath: "documentationId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - MinLength: 1, - }, - serializedName: "documentationId", - required: true, - xmlName: "documentationId", - type: { - name: "String", - }, - }, -}; - -export const parameters43: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationContractMapper, -}; - -export const parameters44: OperationParameter = { - parameterPath: "parameters", - mapper: DocumentationUpdateContractMapper, -}; - -export const templateName: OperationURLParameter = { - parameterPath: "templateName", - mapper: { - serializedName: "templateName", - required: true, - xmlName: "templateName", - type: { - name: "String", - }, - }, -}; - -export const parameters45: OperationParameter = { - parameterPath: "parameters", - mapper: EmailTemplateUpdateParametersMapper, -}; - -export const configConnectionName: OperationURLParameter = { - parameterPath: "configConnectionName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$"), - MaxLength: 30, - MinLength: 1, - }, - serializedName: "configConnectionName", - required: true, - xmlName: "configConnectionName", - type: { - name: "String", - }, - }, -}; - -export const parameters46: OperationParameter = { - parameterPath: "parameters", - mapper: ApiManagementGatewayConfigConnectionResourceMapper, -}; - -export const gatewayId: OperationURLParameter = { - parameterPath: "gatewayId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "gatewayId", - required: true, - xmlName: "gatewayId", - type: { - name: "String", - }, - }, -}; - -export const parameters47: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayContractMapper, -}; - -export const parameters48: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayKeyRegenerationRequestContractMapper, -}; - -export const parameters49: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayTokenRequestContractMapper, -}; - -export const parameters50: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayListDebugCredentialsContractMapper, -}; - -export const parameters51: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayListTraceContractMapper, -}; - -export const hcId: OperationURLParameter = { - parameterPath: "hcId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "hcId", - required: true, - xmlName: "hcId", - type: { - name: "String", - }, - }, -}; - -export const parameters52: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayHostnameConfigurationContractMapper, -}; - -export const parameters53: OperationParameter = { - parameterPath: ["options", "parameters"], - mapper: AssociationContractMapper, -}; - -export const parameters54: OperationParameter = { - parameterPath: "parameters", - mapper: GatewayCertificateAuthorityContractMapper, -}; - -export const groupId: OperationURLParameter = { - parameterPath: "groupId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "groupId", - required: true, - xmlName: "groupId", - type: { - name: "String", - }, - }, -}; - -export const parameters55: OperationParameter = { - parameterPath: "parameters", - mapper: GroupCreateParametersMapper, -}; - -export const parameters56: OperationParameter = { - parameterPath: "parameters", - mapper: GroupUpdateParametersMapper, -}; - -export const userId: OperationURLParameter = { - parameterPath: "userId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "userId", - required: true, - xmlName: "userId", - type: { - name: "String", - }, - }, -}; - -export const identityProviderName: OperationURLParameter = { - parameterPath: "identityProviderName", - mapper: { - serializedName: "identityProviderName", - required: true, - xmlName: "identityProviderName", - type: { - name: "String", - }, - }, -}; - -export const parameters57: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderCreateContractMapper, -}; - -export const parameters58: OperationParameter = { - parameterPath: "parameters", - mapper: IdentityProviderUpdateParametersMapper, -}; - -export const loggerId: OperationURLParameter = { - parameterPath: "loggerId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - }, - serializedName: "loggerId", - required: true, - xmlName: "loggerId", - type: { - name: "String", - }, - }, -}; - -export const parameters59: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerContractMapper, -}; - -export const parameters60: OperationParameter = { - parameterPath: "parameters", - mapper: LoggerUpdateContractMapper, -}; - -export const namedValueId: OperationURLParameter = { - parameterPath: "namedValueId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - }, - serializedName: "namedValueId", - required: true, - xmlName: "namedValueId", - type: { - name: "String", - }, - }, -}; - -export const parameters61: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueCreateContractMapper, -}; - -export const parameters62: OperationParameter = { - parameterPath: "parameters", - mapper: NamedValueUpdateParametersMapper, -}; - -export const locationName: OperationURLParameter = { - parameterPath: "locationName", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "locationName", - required: true, - xmlName: "locationName", - type: { - name: "String", - }, - }, -}; - -export const notificationName: OperationURLParameter = { - parameterPath: "notificationName", - mapper: { - serializedName: "notificationName", - required: true, - xmlName: "notificationName", - type: { - name: "String", - }, - }, -}; - -export const email: OperationURLParameter = { - parameterPath: "email", - mapper: { - serializedName: "email", - required: true, - xmlName: "email", - type: { - name: "String", - }, - }, -}; - -export const opid: OperationURLParameter = { - parameterPath: "opid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - }, - serializedName: "opid", - required: true, - xmlName: "opid", - type: { - name: "String", - }, - }, -}; - -export const parameters63: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderContractMapper, -}; - -export const parameters64: OperationParameter = { - parameterPath: "parameters", - mapper: OpenidConnectProviderUpdateContractMapper, -}; - -export const scope1: OperationQueryParameter = { - parameterPath: ["options", "scope"], - mapper: { - serializedName: "scope", - xmlName: "scope", - type: { - name: "Enum", - allowedValues: ["Tenant", "Product", "Api", "Operation", "All"], - }, - }, -}; - -export const orderby: OperationQueryParameter = { - parameterPath: ["options", "orderby"], - mapper: { - serializedName: "$orderby", - xmlName: "$orderby", - type: { - name: "String", - }, - }, -}; - -export const id: OperationURLParameter = { - parameterPath: "id", - mapper: { - constraints: { - Pattern: new RegExp("(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "id", - required: true, - xmlName: "id", - type: { - name: "String", - }, - }, -}; - -export const format2: OperationQueryParameter = { - parameterPath: ["options", "format"], - mapper: { - serializedName: "format", - xmlName: "format", - type: { - name: "String", - }, - }, -}; - -export const parameters65: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyFragmentContractMapper, -}; - -export const policyRestrictionId: OperationURLParameter = { - parameterPath: "policyRestrictionId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "policyRestrictionId", - required: true, - xmlName: "policyRestrictionId", - type: { - name: "String", - }, - }, -}; - -export const parameters66: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyRestrictionContractMapper, -}; - -export const parameters67: OperationParameter = { - parameterPath: "parameters", - mapper: PolicyRestrictionUpdateContractMapper, -}; - -export const portalConfigId: OperationURLParameter = { - parameterPath: "portalConfigId", - mapper: { - constraints: { - MaxLength: 80, - MinLength: 1, - }, - serializedName: "portalConfigId", - required: true, - xmlName: "portalConfigId", - type: { - name: "String", - }, - }, -}; - -export const parameters68: OperationParameter = { - parameterPath: "parameters", - mapper: PortalConfigContractMapper, -}; - -export const portalRevisionId: OperationURLParameter = { - parameterPath: "portalRevisionId", - mapper: { - constraints: { - MaxLength: 256, - MinLength: 1, - }, - serializedName: "portalRevisionId", - required: true, - xmlName: "portalRevisionId", - type: { - name: "String", - }, - }, -}; - -export const parameters69: OperationParameter = { - parameterPath: "parameters", - mapper: PortalRevisionContractMapper, -}; - -export const parameters70: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSigninSettingsMapper, -}; - -export const parameters71: OperationParameter = { - parameterPath: "parameters", - mapper: PortalSignupSettingsMapper, -}; - -export const parameters72: OperationParameter = { - parameterPath: "parameters", - mapper: PortalDelegationSettingsMapper, -}; - -export const privateEndpointConnectionName: OperationURLParameter = { - parameterPath: "privateEndpointConnectionName", - mapper: { - serializedName: "privateEndpointConnectionName", - required: true, - xmlName: "privateEndpointConnectionName", - type: { - name: "String", - }, - }, -}; - -export const privateEndpointConnectionRequest: OperationParameter = { - parameterPath: "privateEndpointConnectionRequest", - mapper: PrivateEndpointConnectionRequestMapper, -}; - -export const privateLinkSubResourceName: OperationURLParameter = { - parameterPath: "privateLinkSubResourceName", - mapper: { - serializedName: "privateLinkSubResourceName", - required: true, - xmlName: "privateLinkSubResourceName", - type: { - name: "String", - }, - }, -}; - -export const expandGroups: OperationQueryParameter = { - parameterPath: ["options", "expandGroups"], - mapper: { - serializedName: "expandGroups", - xmlName: "expandGroups", - type: { - name: "Boolean", - }, - }, -}; - -export const parameters73: OperationParameter = { - parameterPath: "parameters", - mapper: ProductContractMapper, -}; - -export const parameters74: OperationParameter = { - parameterPath: "parameters", - mapper: ProductUpdateParametersMapper, -}; - -export const deleteSubscriptions: OperationQueryParameter = { - parameterPath: ["options", "deleteSubscriptions"], - mapper: { - serializedName: "deleteSubscriptions", - xmlName: "deleteSubscriptions", - type: { - name: "Boolean", - }, - }, -}; - -export const includeNotTaggedProducts: OperationQueryParameter = { - parameterPath: ["options", "includeNotTaggedProducts"], - mapper: { - serializedName: "includeNotTaggedProducts", - xmlName: "includeNotTaggedProducts", - type: { - name: "Boolean", - }, - }, -}; - -export const apiLinkId: OperationURLParameter = { - parameterPath: "apiLinkId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "apiLinkId", - required: true, - xmlName: "apiLinkId", - type: { - name: "String", - }, - }, -}; - -export const parameters75: OperationParameter = { - parameterPath: "parameters", - mapper: ProductApiLinkContractMapper, -}; - -export const groupLinkId: OperationURLParameter = { - parameterPath: "groupLinkId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "groupLinkId", - required: true, - xmlName: "groupLinkId", - type: { - name: "String", - }, - }, -}; - -export const parameters76: OperationParameter = { - parameterPath: "parameters", - mapper: ProductGroupLinkContractMapper, -}; - -export const quotaCounterKey: OperationURLParameter = { - parameterPath: "quotaCounterKey", - mapper: { - serializedName: "quotaCounterKey", - required: true, - xmlName: "quotaCounterKey", - type: { - name: "String", - }, - }, -}; - -export const parameters77: OperationParameter = { - parameterPath: "parameters", - mapper: QuotaCounterValueUpdateContractMapper, -}; - -export const quotaPeriodKey: OperationURLParameter = { - parameterPath: "quotaPeriodKey", - mapper: { - serializedName: "quotaPeriodKey", - required: true, - xmlName: "quotaPeriodKey", - type: { - name: "String", - }, - }, -}; - -export const filter1: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - xmlName: "$filter", - type: { - name: "String", - }, - }, -}; - -export const interval: OperationQueryParameter = { - parameterPath: "interval", - mapper: { - serializedName: "interval", - required: true, - xmlName: "interval", - type: { - name: "TimeSpan", - }, - }, -}; - -export const parameters78: OperationParameter = { - parameterPath: "parameters", - mapper: GlobalSchemaContractMapper, -}; - -export const settingsType: OperationURLParameter = { - parameterPath: "settingsType", - mapper: { - serializedName: "settingsType", - required: true, - xmlName: "settingsType", - type: { - name: "String", - }, - }, -}; - -export const sid: OperationURLParameter = { - parameterPath: "sid", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 256, - }, - serializedName: "sid", - required: true, - xmlName: "sid", - type: { - name: "String", - }, - }, -}; - -export const parameters79: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionCreateParametersMapper, -}; - -export const notify: OperationQueryParameter = { - parameterPath: ["options", "notify"], - mapper: { - serializedName: "notify", - xmlName: "notify", - type: { - name: "Boolean", - }, - }, -}; - -export const appType: OperationQueryParameter = { - parameterPath: ["options", "appType"], - mapper: { - serializedName: "appType", - xmlName: "appType", - type: { - name: "String", - }, - }, -}; - -export const parameters80: OperationParameter = { - parameterPath: "parameters", - mapper: SubscriptionUpdateParametersMapper, -}; - -export const parameters81: OperationParameter = { - parameterPath: "parameters", - mapper: TagApiLinkContractMapper, -}; - -export const operationLinkId: OperationURLParameter = { - parameterPath: "operationLinkId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "operationLinkId", - required: true, - xmlName: "operationLinkId", - type: { - name: "String", - }, - }, -}; - -export const parameters82: OperationParameter = { - parameterPath: "parameters", - mapper: TagOperationLinkContractMapper, -}; - -export const productLinkId: OperationURLParameter = { - parameterPath: "productLinkId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "productLinkId", - required: true, - xmlName: "productLinkId", - type: { - name: "String", - }, - }, -}; - -export const parameters83: OperationParameter = { - parameterPath: "parameters", - mapper: TagProductLinkContractMapper, -}; - -export const accessName: OperationURLParameter = { - parameterPath: "accessName", - mapper: { - serializedName: "accessName", - required: true, - xmlName: "accessName", - type: { - name: "String", - }, - }, -}; - -export const parameters84: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationCreateParametersMapper, -}; - -export const parameters85: OperationParameter = { - parameterPath: "parameters", - mapper: AccessInformationUpdateParametersMapper, -}; - -export const parameters86: OperationParameter = { - parameterPath: "parameters", - mapper: DeployConfigurationParametersMapper, -}; - -export const configurationName: OperationURLParameter = { - parameterPath: "configurationName", - mapper: { - serializedName: "configurationName", - required: true, - xmlName: "configurationName", - type: { - name: "String", - }, - }, -}; - -export const parameters87: OperationParameter = { - parameterPath: "parameters", - mapper: SaveConfigurationParameterMapper, -}; - -export const parameters88: OperationParameter = { - parameterPath: "parameters", - mapper: UserCreateParametersMapper, -}; - -export const parameters89: OperationParameter = { - parameterPath: "parameters", - mapper: UserUpdateParametersMapper, -}; - -export const parameters90: OperationParameter = { - parameterPath: "parameters", - mapper: UserTokenParametersMapper, -}; - -export const workspaceId: OperationURLParameter = { - parameterPath: "workspaceId", - mapper: { - constraints: { - Pattern: new RegExp("^[^*#&+:<>?]+$"), - MaxLength: 80, - MinLength: 1, - }, - serializedName: "workspaceId", - required: true, - xmlName: "workspaceId", - type: { - name: "String", - }, - }, -}; - -export const parameters91: OperationParameter = { - parameterPath: "parameters", - mapper: DiagnosticUpdateContractMapper, -}; - -export const parameters92: OperationParameter = { - parameterPath: "parameters", - mapper: WorkspaceContractMapper, -}; - -export const isKeyVaultRefreshFailed1: OperationQueryParameter = { - parameterPath: ["options", "isKeyVaultRefreshFailed"], - mapper: { - serializedName: "isKeyVaultRefreshFailed", - xmlName: "isKeyVaultRefreshFailed", - type: { - name: "String", - }, - }, -}; - -export const location1: OperationURLParameter = { - parameterPath: "location", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "location", - required: true, - xmlName: "location", - type: { - name: "String", - }, - }, -}; - -export const operationId1: OperationURLParameter = { - parameterPath: "operationId", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "operationId", - required: true, - xmlName: "operationId", - type: { - name: "String", - }, - }, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/allPolicies.ts b/sdk/apimanagement/arm-apimanagement/src/operations/allPolicies.ts deleted file mode 100644 index d7f811de6c0d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/allPolicies.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AllPolicies } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AllPoliciesContract, - AllPoliciesListByServiceNextOptionalParams, - AllPoliciesListByServiceOptionalParams, - AllPoliciesListByServiceResponse, - AllPoliciesListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AllPolicies operations. */ -export class AllPoliciesImpl implements AllPolicies { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class AllPolicies class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Status of all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AllPoliciesListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AllPoliciesListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AllPoliciesListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AllPoliciesListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Status of all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AllPoliciesListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AllPoliciesListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AllPoliciesCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AllPoliciesCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts b/sdk/apimanagement/arm-apimanagement/src/operations/api.ts deleted file mode 100644 index c250c806f826..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/api.ts +++ /dev/null @@ -1,809 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Api } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApiContract, - ApiListByServiceNextOptionalParams, - ApiListByServiceOptionalParams, - ApiListByServiceResponse, - TagResourceContract, - ApiListByTagsNextOptionalParams, - ApiListByTagsOptionalParams, - ApiListByTagsResponse, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams, - ApiDeleteResponse, - ApiListByServiceNextResponse, - ApiListByTagsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Api operations. */ -export class ApiImpl implements Api { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Api class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec, - ); - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, apiId, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApiCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams, - ): Promise< - SimplePollerLike, ApiDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, apiId, ifMatch, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ApiDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - apiId, - ifMatch, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } - - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiListByTagsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandApiVersionSet, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.ApiUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ApiDeleteHeaders, - }, - 201: { - headersMapper: Mappers.ApiDeleteHeaders, - }, - 202: { - headersMapper: Mappers.ApiDeleteHeaders, - }, - 204: { - headersMapper: Mappers.ApiDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.includeNotTaggedApis, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts deleted file mode 100644 index fe41ba1fa697..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiDiagnostic.ts +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiDiagnostic } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DiagnosticContract, - ApiDiagnosticListByServiceNextOptionalParams, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticListByServiceResponse, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams, - ApiDiagnosticListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiDiagnostic operations. */ -export class ApiDiagnosticImpl implements ApiDiagnostic { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiDiagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiDiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - diagnosticId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiDiagnosticListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiDiagnosticGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.ApiDiagnosticUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts deleted file mode 100644 index e684563f18dc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiExport.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ApiExport } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse, -} from "../models/index.js"; - -/** Class containing ApiExport operations. */ -export class ApiExportImpl implements ApiExport { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiExport class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. New formats can be added in the future. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, format, exportParam, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiExportResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.format1, - Parameters.exportParam, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiGateway.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiGateway.ts deleted file mode 100644 index b36f5e006bcc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiGateway.ts +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiGateway } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApiManagementGatewayResource, - ApiGatewayListByResourceGroupNextOptionalParams, - ApiGatewayListByResourceGroupOptionalParams, - ApiGatewayListByResourceGroupResponse, - ApiGatewayListNextOptionalParams, - ApiGatewayListOptionalParams, - ApiGatewayListResponse, - ApiGatewayCreateOrUpdateOptionalParams, - ApiGatewayCreateOrUpdateResponse, - ApiManagementGatewayUpdateParameters, - ApiGatewayUpdateOptionalParams, - ApiGatewayUpdateResponse, - ApiGatewayGetOptionalParams, - ApiGatewayGetResponse, - ApiGatewayDeleteOptionalParams, - ApiGatewayDeleteResponse, - ApiGatewayListByResourceGroupNextResponse, - ApiGatewayListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiGateway operations. */ -export class ApiGatewayImpl implements ApiGateway { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiGateway class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management gateways within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ApiGatewayListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ApiGatewayListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiGatewayListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ApiGatewayListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * List all API Management gateways within a subscription. - * @param options The options parameters. - */ - public list( - options?: ApiGatewayListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ApiGatewayListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiGatewayListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ApiGatewayListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Creates or updates an API Management gateway. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayResource, - options?: ApiGatewayCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApiGatewayCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an API Management gateway. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayResource, - options?: ApiGatewayCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayUpdateParameters, - options?: ApiGatewayUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, parameters, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ApiGatewayUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Updates an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayUpdateParameters, - options?: ApiGatewayUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - gatewayName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets an API Management gateway resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - getOperationSpec, - ); - } - - /** - * Deletes an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, gatewayName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ApiGatewayDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - gatewayName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List all API Management gateways within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ApiGatewayListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * List all API Management gateways within a subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiGatewayListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ApiGatewayListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiGatewayListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayResource, - headersMapper: Mappers.ApiGatewayDeleteHeaders, - }, - 201: { - bodyMapper: Mappers.ApiManagementGatewayResource, - headersMapper: Mappers.ApiGatewayDeleteHeaders, - }, - 202: { - bodyMapper: Mappers.ApiManagementGatewayResource, - headersMapper: Mappers.ApiGatewayDeleteHeaders, - }, - 204: { - bodyMapper: Mappers.ApiManagementGatewayResource, - headersMapper: Mappers.ApiGatewayDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiGatewayConfigConnection.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiGatewayConfigConnection.ts deleted file mode 100644 index 6000eb0e7b4e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiGatewayConfigConnection.ts +++ /dev/null @@ -1,537 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiGatewayConfigConnection } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApiManagementGatewayConfigConnectionResource, - ApiGatewayConfigConnectionListByGatewayNextOptionalParams, - ApiGatewayConfigConnectionListByGatewayOptionalParams, - ApiGatewayConfigConnectionListByGatewayResponse, - ApiGatewayConfigConnectionGetOptionalParams, - ApiGatewayConfigConnectionGetResponse, - ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ApiGatewayConfigConnectionCreateOrUpdateResponse, - ApiGatewayConfigConnectionDeleteOptionalParams, - ApiGatewayConfigConnectionDeleteResponse, - ApiGatewayConfigConnectionListByGatewayNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiGatewayConfigConnection operations. */ -export class ApiGatewayConfigConnectionImpl - implements ApiGatewayConfigConnection -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiGatewayConfigConnection class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management gateway config connections within a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - public listByGateway( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByGatewayPagingAll( - resourceGroupName, - gatewayName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByGatewayPagingPage( - resourceGroupName, - gatewayName, - options, - settings, - ); - }, - }; - } - - private async *listByGatewayPagingPage( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiGatewayConfigConnectionListByGatewayResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByGateway( - resourceGroupName, - gatewayName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByGatewayNext( - resourceGroupName, - gatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByGatewayPagingAll( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByGatewayPagingPage( - resourceGroupName, - gatewayName, - options, - )) { - yield* page; - } - } - - /** - * List all API Management gateway config connections within a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - private _listByGateway( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - listByGatewayOperationSpec, - ); - } - - /** - * Gets an API Management gateway config connection resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - options?: ApiGatewayConfigConnectionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, configConnectionName, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an API Management gateway config connection. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway config connection - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - parameters: ApiManagementGatewayConfigConnectionResource, - options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayConfigConnectionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - configConnectionName, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApiGatewayConfigConnectionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an API Management gateway config connection. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway config connection - * operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - parameters: ApiManagementGatewayConfigConnectionResource, - options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - gatewayName, - configConnectionName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes an existing API Management gateway config connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - ifMatch: string, - options?: ApiGatewayConfigConnectionDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayConfigConnectionDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - gatewayName, - configConnectionName, - ifMatch, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - ApiGatewayConfigConnectionDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an existing API Management gateway config connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - ifMatch: string, - options?: ApiGatewayConfigConnectionDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - gatewayName, - configConnectionName, - ifMatch, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByGatewayNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param nextLink The nextLink from the previous successful call to the ListByGateway method. - * @param options The options parameters. - */ - private _listByGatewayNext( - resourceGroupName: string, - gatewayName: string, - nextLink: string, - options?: ApiGatewayConfigConnectionListByGatewayNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, nextLink, options }, - listByGatewayNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByGatewayOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - Parameters.configConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters46, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - Parameters.configConnectionName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.ApiGatewayConfigConnectionDeleteHeaders, - }, - 201: { - headersMapper: Mappers.ApiGatewayConfigConnectionDeleteHeaders, - }, - 202: { - headersMapper: Mappers.ApiGatewayConfigConnectionDeleteHeaders, - }, - 204: { - headersMapper: Mappers.ApiGatewayConfigConnectionDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - Parameters.configConnectionName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByGatewayNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementGatewayConfigConnectionListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts deleted file mode 100644 index 345a0dd97c01..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssue.ts +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiIssue } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - IssueContract, - ApiIssueListByServiceNextOptionalParams, - ApiIssueListByServiceOptionalParams, - ApiIssueListByServiceResponse, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams, - ApiIssueListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiIssue operations. */ -export class ApiIssueImpl implements ApiIssue { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiIssue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiIssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiIssueListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.expandCommentsAttachments, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.expandCommentsAttachments, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.ApiIssueUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters14, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts deleted file mode 100644 index cf7d70255521..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueAttachment.ts +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiIssueAttachment } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceNextOptionalParams, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentListByServiceResponse, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams, - ApiIssueAttachmentListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiIssueAttachment operations. */ -export class ApiIssueAttachmentImpl implements ApiIssueAttachment { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiIssueAttachment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiIssueAttachmentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - )) { - yield* page; - } - } - - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, attachmentId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - attachmentId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueAttachmentListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueAttachmentGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.IssueAttachmentContract, - headersMapper: Mappers.ApiIssueAttachmentCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.attachmentId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueAttachmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts deleted file mode 100644 index 2e530e0ddac2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiIssueComment.ts +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiIssueComment } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - IssueCommentContract, - ApiIssueCommentListByServiceNextOptionalParams, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentListByServiceResponse, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams, - ApiIssueCommentListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiIssueComment operations. */ -export class ApiIssueCommentImpl implements ApiIssueComment { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiIssueComment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiIssueCommentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - issueId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - issueId, - options, - )) { - yield* page; - } - } - - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, commentId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - issueId, - commentId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - nextLink: string, - options?: ApiIssueCommentListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, issueId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiIssueCommentGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.IssueCommentContract, - headersMapper: Mappers.ApiIssueCommentCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters15, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - Parameters.commentId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCommentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementGatewaySkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementGatewaySkus.ts deleted file mode 100644 index 9d1ae43e0687..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementGatewaySkus.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementGatewaySkus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GatewayResourceSkuResult, - ApiManagementGatewaySkusListAvailableSkusNextOptionalParams, - ApiManagementGatewaySkusListAvailableSkusOptionalParams, - ApiManagementGatewaySkusListAvailableSkusResponse, - ApiManagementGatewaySkusListAvailableSkusNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementGatewaySkus operations. */ -export class ApiManagementGatewaySkusImpl implements ApiManagementGatewaySkus { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementGatewaySkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all available SKU for a given API Management gateway - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - public listAvailableSkus( - resourceGroupName: string, - gatewayName: string, - options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAvailableSkusPagingAll( - resourceGroupName, - gatewayName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAvailableSkusPagingPage( - resourceGroupName, - gatewayName, - options, - settings, - ); - }, - }; - } - - private async *listAvailableSkusPagingPage( - resourceGroupName: string, - gatewayName: string, - options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementGatewaySkusListAvailableSkusResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAvailableSkus( - resourceGroupName, - gatewayName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAvailableSkusNext( - resourceGroupName, - gatewayName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAvailableSkusPagingAll( - resourceGroupName: string, - gatewayName: string, - options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAvailableSkusPagingPage( - resourceGroupName, - gatewayName, - options, - )) { - yield* page; - } - } - - /** - * Gets all available SKU for a given API Management gateway - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - private _listAvailableSkus( - resourceGroupName: string, - gatewayName: string, - options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, options }, - listAvailableSkusOperationSpec, - ); - } - - /** - * ListAvailableSkusNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param nextLink The nextLink from the previous successful call to the ListAvailableSkus method. - * @param options The options parameters. - */ - private _listAvailableSkusNext( - resourceGroupName: string, - gatewayName: string, - nextLink: string, - options?: ApiManagementGatewaySkusListAvailableSkusNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, gatewayName, nextLink, options }, - listAvailableSkusNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listAvailableSkusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayResourceSkuResults, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableSkusNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayResourceSkuResults, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.gatewayName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts deleted file mode 100644 index f12ba7b1448c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementOperations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - Operation, - ApiManagementOperationsListNextOptionalParams, - ApiManagementOperationsListOptionalParams, - ApiManagementOperationsListResponse, - ApiManagementOperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementOperations operations. */ -export class ApiManagementOperationsImpl implements ApiManagementOperations { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - public list( - options?: ApiManagementOperationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ApiManagementOperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementOperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ApiManagementOperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementOperationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementOperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.ApiManagement/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts deleted file mode 100644 index 698025518350..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementService.ts +++ /dev/null @@ -1,1335 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementService } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupNextOptionalParams, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListByResourceGroupResponse, - ApiManagementServiceListNextOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceListResponse, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - ApiManagementServiceListByResourceGroupNextResponse, - ApiManagementServiceListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementService operations. */ -export class ApiManagementServiceImpl implements ApiManagementService { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementService class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementServiceListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementServiceListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ApiManagementServiceListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementServiceListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ApiManagementServiceListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: restoreOperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceRestoreResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - async beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams, - ): Promise { - const poller = await this.beginRestore( - resourceGroupName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: backupOperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceBackupResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - async beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams, - ): Promise { - const poller = await this.beginBackup( - resourceGroupName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, parameters, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: migrateToStv2OperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceMigrateToStv2Response, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams, - ): Promise { - const poller = await this.beginMigrateToStv2( - resourceGroupName, - serviceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementServiceListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getSsoTokenOperationSpec, - ); - } - - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { parameters, options }, - checkNameAvailabilityOperationSpec, - ); - } - - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - getDomainOwnershipIdentifierOperationSpec, - ); - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: applyNetworkConfigurationUpdatesOperationSpec, - }); - const poller = await createHttpPoller< - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ): Promise { - const poller = await this.beginApplyNetworkConfigurationUpdates( - resourceGroupName, - serviceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ApiManagementServiceListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementServiceListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const restoreOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const backupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters39, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const migrateToStv2OperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getSsoTokenOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceGetSsoTokenResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceNameAvailabilityResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const getDomainOwnershipIdentifierOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: - Mappers.ApiManagementServiceGetDomainOwnershipIdentifierResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const applyNetworkConfigurationUpdatesOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 201: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 202: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - 204: { - bodyMapper: Mappers.ApiManagementServiceResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters42, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, - }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementServiceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts deleted file mode 100644 index e9192a9ebe47..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementServiceSkus.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementServiceSkus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ApiManagementServiceSkusListAvailableServiceSkusResponse, - ApiManagementServiceSkusListAvailableServiceSkusNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementServiceSkus operations. */ -export class ApiManagementServiceSkusImpl implements ApiManagementServiceSkus { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementServiceSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listAvailableServiceSkusPagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listAvailableServiceSkusPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementServiceSkusListAvailableServiceSkusResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listAvailableServiceSkus( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listAvailableServiceSkusNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listAvailableServiceSkusPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listAvailableServiceSkusPagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listAvailableServiceSkusOperationSpec, - ); - } - - /** - * ListAvailableServiceSkusNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListAvailableServiceSkus - * method. - * @param options The options parameters. - */ - private _listAvailableServiceSkusNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listAvailableServiceSkusNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listAvailableServiceSkusOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listAvailableServiceSkusNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceSkuResults, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts deleted file mode 100644 index 8be209d2dc33..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementSkus.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementSkus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiManagementSku, - ApiManagementSkusListNextOptionalParams, - ApiManagementSkusListOptionalParams, - ApiManagementSkusListResponse, - ApiManagementSkusListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementSkus operations. */ -export class ApiManagementSkusImpl implements ApiManagementSkus { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementSkus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - public list( - options?: ApiManagementSkusListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: ApiManagementSkusListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementSkusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: ApiManagementSkusListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - private _list( - options?: ApiManagementSkusListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ApiManagementSkusListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementSkusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLink.ts deleted file mode 100644 index f06646ada854..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLink.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ApiManagementWorkspaceLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiManagementWorkspaceLinkGetOptionalParams, - ApiManagementWorkspaceLinkGetResponse, -} from "../models/index.js"; - -/** Class containing ApiManagementWorkspaceLink operations. */ -export class ApiManagementWorkspaceLinkImpl - implements ApiManagementWorkspaceLink -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementWorkspaceLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets an API Management WorkspaceLink resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: ApiManagementWorkspaceLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementWorkspaceLinksResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLinks.ts deleted file mode 100644 index e6709ce85ac8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiManagementWorkspaceLinks.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiManagementWorkspaceLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiManagementWorkspaceLinksResource, - ApiManagementWorkspaceLinksListByServiceNextOptionalParams, - ApiManagementWorkspaceLinksListByServiceOptionalParams, - ApiManagementWorkspaceLinksListByServiceResponse, - ApiManagementWorkspaceLinksListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiManagementWorkspaceLinks operations. */ -export class ApiManagementWorkspaceLinksImpl - implements ApiManagementWorkspaceLinks -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiManagementWorkspaceLinks class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List all API Management workspaceLinks for a service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiManagementWorkspaceLinksListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * List all API Management workspaceLinks for a service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiManagementWorkspaceLinksListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementWorkspaceLinksListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiManagementWorkspaceLinksListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts deleted file mode 100644 index ac197f74005a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperation.ts +++ /dev/null @@ -1,508 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiOperation } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OperationContract, - ApiOperationListByApiNextOptionalParams, - ApiOperationListByApiOptionalParams, - ApiOperationListByApiResponse, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams, - ApiOperationListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiOperation operations. */ -export class ApiOperationImpl implements ApiOperation { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiOperation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiOperationListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiOperationListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.ApiOperationUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts deleted file mode 100644 index 5172202dfb5d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiOperationPolicy.ts +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ApiOperationPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing ApiOperationPolicy operations. */ -export class ApiOperationPolicyImpl implements ApiOperationPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiOperationPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - operationId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiOperationPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiOperationPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts deleted file mode 100644 index a0fa49d9f575..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiPolicy.ts +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ApiPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing ApiPolicy operations. */ -export class ApiPolicyImpl implements ApiPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, policyId, ifMatch, options }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); - -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept1], - isXML: true, - serializer: xmlSerializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ApiPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts deleted file mode 100644 index 079fbfd7f5cd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiProduct.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiProduct } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductContract, - ApiProductListByApisNextOptionalParams, - ApiProductListByApisOptionalParams, - ApiProductListByApisResponse, - ApiProductListByApisNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiProduct operations. */ -export class ApiProductImpl implements ApiProduct { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiProduct class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApisPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApisPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiProductListByApisResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApis( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApisNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApisPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApisPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApisOperationSpec, - ); - } - - /** - * ListByApisNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByApis method. - * @param options The options parameters. - */ - private _listByApisNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiProductListByApisNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApisNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApisOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApisNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts deleted file mode 100644 index 12c3e1f24980..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRelease.ts +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiRelease } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiReleaseContract, - ApiReleaseListByServiceNextOptionalParams, - ApiReleaseListByServiceOptionalParams, - ApiReleaseListByServiceResponse, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams, - ApiReleaseListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiRelease operations. */ -export class ApiReleaseImpl implements ApiRelease { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiRelease class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiReleaseListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - releaseId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, releaseId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiReleaseListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiReleaseGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.ApiReleaseUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts deleted file mode 100644 index 265adac63ce3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiRevision.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiRevision } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiRevisionContract, - ApiRevisionListByServiceNextOptionalParams, - ApiRevisionListByServiceOptionalParams, - ApiRevisionListByServiceResponse, - ApiRevisionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiRevision operations. */ -export class ApiRevisionImpl implements ApiRevision { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiRevisionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts deleted file mode 100644 index 2f95527b62e9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiSchema.ts +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiSchema } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SchemaContract, - ApiSchemaListByApiNextOptionalParams, - ApiSchemaListByApiOptionalParams, - ApiSchemaListByApiResponse, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams, - ApiSchemaListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiSchema operations. */ -export class ApiSchemaImpl implements ApiSchema { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiSchemaListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - ApiSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - apiId, - schemaId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, schemaId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiSchemaListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiSchemaGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.ApiSchemaCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts deleted file mode 100644 index 6dea2a7f552f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiTagDescription.ts +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiTagDescription } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagDescriptionContract, - ApiTagDescriptionListByServiceNextOptionalParams, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionListByServiceResponse, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams, - ApiTagDescriptionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiTagDescription operations. */ -export class ApiTagDescriptionImpl implements ApiTagDescription { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiTagDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiTagDescriptionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagDescriptionId, options }, - getOperationSpec, - ); - } - - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - tagDescriptionId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiTagDescriptionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiTagDescriptionGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagDescriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagDescriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.TagDescriptionContract, - headersMapper: Mappers.ApiTagDescriptionCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagDescriptionId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagDescriptionId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagDescriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts deleted file mode 100644 index f678914acc8c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiVersionSet.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiVersionSet } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiVersionSetContract, - ApiVersionSetListByServiceNextOptionalParams, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetListByServiceResponse, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams, - ApiVersionSetListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiVersionSet operations. */ -export class ApiVersionSetImpl implements ApiVersionSet { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiVersionSet class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiVersionSetListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - versionSetId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, versionSetId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ApiVersionSetListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiVersionSetGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.ApiVersionSetUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts deleted file mode 100644 index 111820751f0d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWiki.ts +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ApiWiki } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing ApiWiki operations. */ -export class ApiWikiImpl implements ApiWiki { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, ifMatch, options }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ApiWikiGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ApiWikiUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts deleted file mode 100644 index c9397f8d4e08..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/apiWikis.ts +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ApiWikis } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - WikiContract, - ApiWikisListNextOptionalParams, - ApiWikisListOptionalParams, - ApiWikisListResponse, - ApiWikisListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ApiWikis operations. */ -export class ApiWikisImpl implements ApiWikis { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ApiWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ApiWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, apiId, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: ApiWikisListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts deleted file mode 100644 index 614c4d71ef0d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorization.ts +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Authorization } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderNextOptionalParams, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationListByAuthorizationProviderResponse, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse, - AuthorizationListByAuthorizationProviderNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Authorization operations. */ -export class AuthorizationImpl implements Authorization { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Authorization class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - public listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationProviderPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - settings, - ); - }, - }; - } - - private async *listByAuthorizationProviderPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AuthorizationListByAuthorizationProviderResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorizationProvider( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByAuthorizationProviderNext( - resourceGroupName, - serviceName, - authorizationProviderId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByAuthorizationProviderPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationProviderPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - private _listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - listByAuthorizationProviderOperationSpec, - ); - } - - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options, - }, - confirmConsentCodeOperationSpec, - ); - } - - /** - * ListByAuthorizationProviderNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorizationProvider - * method. - * @param options The options parameters. - */ - private _listByAuthorizationProviderNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - nextLink: string, - options?: AuthorizationListByAuthorizationProviderNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - nextLink, - options, - }, - listByAuthorizationProviderNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByAuthorizationProviderOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.AuthorizationContract, - headersMapper: Mappers.AuthorizationCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters23, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const confirmConsentCodeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode", - httpMethod: "POST", - responses: { - 200: { - headersMapper: Mappers.AuthorizationConfirmConsentCodeHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByAuthorizationProviderNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.authorizationProviderId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts deleted file mode 100644 index 9c7092689335..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationAccessPolicy.ts +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AuthorizationAccessPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyListByAuthorizationResponse, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams, - AuthorizationAccessPolicyListByAuthorizationNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AuthorizationAccessPolicy operations. */ -export class AuthorizationAccessPolicyImpl - implements AuthorizationAccessPolicy -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class AuthorizationAccessPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - public listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByAuthorizationPagingAll( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - settings, - ); - }, - }; - } - - private async *listByAuthorizationPagingPage( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AuthorizationAccessPolicyListByAuthorizationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByAuthorization( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByAuthorizationNext( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByAuthorizationPagingAll( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByAuthorizationPagingPage( - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - private _listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - options, - }, - listByAuthorizationOperationSpec, - ); - } - - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - authorizationAccessPolicyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByAuthorizationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param nextLink The nextLink from the previous successful call to the ListByAuthorization method. - * @param options The options parameters. - */ - private _listByAuthorizationNext( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - nextLink: string, - options?: AuthorizationAccessPolicyListByAuthorizationNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - nextLink, - options, - }, - listByAuthorizationNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByAuthorizationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.AuthorizationAccessPolicyContract, - headersMapper: Mappers.AuthorizationAccessPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters26, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - Parameters.authorizationAccessPolicyId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByAuthorizationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationAccessPolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts deleted file mode 100644 index c8ccb2a6dd9e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationLoginLinks.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { AuthorizationLoginLinks } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse, -} from "../models/index.js"; - -/** Class containing AuthorizationLoginLinks operations. */ -export class AuthorizationLoginLinksImpl implements AuthorizationLoginLinks { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class AuthorizationLoginLinks class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - authorizationId, - parameters, - options, - }, - postOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const postOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationLoginResponseContract, - headersMapper: Mappers.AuthorizationLoginLinksPostHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters25, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - Parameters.authorizationId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts deleted file mode 100644 index a3d08e30862a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationProvider.ts +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AuthorizationProvider } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceNextOptionalParams, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderListByServiceResponse, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams, - AuthorizationProviderListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AuthorizationProvider operations. */ -export class AuthorizationProviderImpl implements AuthorizationProvider { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class AuthorizationProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AuthorizationProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authorizationProviderId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - authorizationProviderId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationProviderListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.AuthorizationProviderContract, - headersMapper: Mappers.AuthorizationProviderCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters22, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authorizationProviderId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationProviderCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts deleted file mode 100644 index 8b42dd1802d0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/authorizationServer.ts +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { AuthorizationServer } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AuthorizationServerContract, - AuthorizationServerListByServiceNextOptionalParams, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerListByServiceResponse, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse, - AuthorizationServerListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing AuthorizationServer operations. */ -export class AuthorizationServerImpl implements AuthorizationServer { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class AuthorizationServer class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: AuthorizationServerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - getOperationSpec, - ); - } - - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, authsid, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: AuthorizationServerListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.AuthorizationServerGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters27, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerContract, - headersMapper: Mappers.AuthorizationServerUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters28, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerSecretsContract, - headersMapper: Mappers.AuthorizationServerListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.authsid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AuthorizationServerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts deleted file mode 100644 index a05ac2033dfd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/backend.ts +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Backend } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - BackendContract, - BackendListByServiceNextOptionalParams, - BackendListByServiceOptionalParams, - BackendListByServiceResponse, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams, - BackendListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Backend operations. */ -export class BackendImpl implements Backend { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Backend class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: BackendListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - backendId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, backendId, options }, - reconnectOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: BackendListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.BackendGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.BackendUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const reconnectOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", - httpMethod: "POST", - responses: { - 202: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters31, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts deleted file mode 100644 index 9ca465dd7203..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/cache.ts +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Cache } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - CacheContract, - CacheListByServiceNextOptionalParams, - CacheListByServiceOptionalParams, - CacheListByServiceResponse, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams, - CacheListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Cache operations. */ -export class CacheImpl implements Cache { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Cache class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CacheListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, cacheId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CacheListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CacheGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.cacheId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.cacheId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters32, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.cacheId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.CacheContract, - headersMapper: Mappers.CacheUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters33, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.cacheId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.cacheId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CacheCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts deleted file mode 100644 index 83bf90bd4525..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/certificate.ts +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Certificate } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - CertificateContract, - CertificateListByServiceNextOptionalParams, - CertificateListByServiceOptionalParams, - CertificateListByServiceResponse, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse, - CertificateListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Certificate operations. */ -export class CertificateImpl implements Certificate { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Certificate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: CertificateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, certificateId, options }, - refreshSecretOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: CertificateListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.isKeyVaultRefreshFailed, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.CertificateGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.CertificateRefreshSecretHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts deleted file mode 100644 index cfae3e08ce38..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentItem.ts +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ContentItem } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ContentItemContract, - ContentItemListByServiceNextOptionalParams, - ContentItemListByServiceOptionalParams, - ContentItemListByServiceResponse, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams, - ContentItemListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ContentItem operations. */ -export class ContentItemImpl implements ContentItem { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ContentItem class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - contentTypeId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ContentItemListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - contentTypeId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - contentTypeId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - contentTypeId, - options, - )) { - yield* page; - } - } - - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, contentItemId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - contentTypeId, - contentItemId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - nextLink: string, - options?: ContentItemListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ContentItemGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - Parameters.contentItemId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - Parameters.contentItemId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ContentItemContract, - headersMapper: Mappers.ContentItemCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters36, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - Parameters.contentItemId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - Parameters.contentItemId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentItemCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.contentTypeId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts deleted file mode 100644 index fa1b6a341cbc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/contentType.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ContentType } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ContentTypeContract, - ContentTypeListByServiceNextOptionalParams, - ContentTypeListByServiceOptionalParams, - ContentTypeListByServiceResponse, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams, - ContentTypeListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ContentType operations. */ -export class ContentTypeImpl implements ContentType { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ContentType class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ContentTypeListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, contentTypeId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ContentTypeListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ContentTypeContract, - headersMapper: Mappers.ContentTypeCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.contentTypeId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ContentTypeCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts deleted file mode 100644 index 026ff85ac32b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/delegationSettings.ts +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { DelegationSettings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse, -} from "../models/index.js"; - -/** Class containing DelegationSettings operations. */ -export class DelegationSettingsImpl implements DelegationSettings { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class DelegationSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listSecretsOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DelegationSettingsGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings, - headersMapper: Mappers.DelegationSettingsGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalDelegationSettings, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingValidationKeyContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts deleted file mode 100644 index 3adf28bd9c5b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/deletedServices.ts +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { DeletedServices } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - DeletedServiceContract, - DeletedServicesListBySubscriptionNextOptionalParams, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesListBySubscriptionResponse, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams, - DeletedServicesListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing DeletedServices operations. */ -export class DeletedServicesImpl implements DeletedServices { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class DeletedServices class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: DeletedServicesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DeletedServicesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: DeletedServicesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { serviceName, location, options }, - getByNameOperationSpec, - ); - } - - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { serviceName, location, options }, - spec: purgeOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - async beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams, - ): Promise { - const poller = await this.beginPurge(serviceName, location, options); - return poller.pollUntilDone(); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: DeletedServicesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const getByNameOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServiceContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const purgeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.location, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DeletedServicesCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts deleted file mode 100644 index 6b49a8bf428d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/diagnostic.ts +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Diagnostic } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DiagnosticContract, - DiagnosticListByServiceNextOptionalParams, - DiagnosticListByServiceOptionalParams, - DiagnosticListByServiceResponse, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams, - DiagnosticListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Diagnostic operations. */ -export class DiagnosticImpl implements Diagnostic { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Diagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DiagnosticListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - diagnosticId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, diagnosticId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DiagnosticListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DiagnosticGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.DiagnosticUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts deleted file mode 100644 index 7c4243b3e7c6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/documentation.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Documentation } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DocumentationContract, - DocumentationListByServiceNextOptionalParams, - DocumentationListByServiceOptionalParams, - DocumentationListByServiceResponse, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams, - DocumentationListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Documentation operations. */ -export class DocumentationImpl implements Documentation { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Documentation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: DocumentationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - documentationId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, documentationId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: DocumentationListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.DocumentationGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.documentationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.documentationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.documentationId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DocumentationContract, - headersMapper: Mappers.DocumentationUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.documentationId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.documentationId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DocumentationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts deleted file mode 100644 index be52145af445..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/emailTemplate.ts +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { EmailTemplate } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - EmailTemplateContract, - EmailTemplateListByServiceNextOptionalParams, - EmailTemplateListByServiceOptionalParams, - EmailTemplateListByServiceResponse, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams, - EmailTemplateListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing EmailTemplate operations. */ -export class EmailTemplateImpl implements EmailTemplate { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class EmailTemplate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: EmailTemplateListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, options }, - getOperationSpec, - ); - } - - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - templateName, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, templateName, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: EmailTemplateListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.EmailTemplateGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.templateName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.templateName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - }, - 201: { - bodyMapper: Mappers.EmailTemplateContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.templateName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateContract, - headersMapper: Mappers.EmailTemplateUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.templateName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.templateName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.EmailTemplateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts deleted file mode 100644 index 0fce58fc5192..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gateway.ts +++ /dev/null @@ -1,741 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Gateway } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GatewayContract, - GatewayListByServiceNextOptionalParams, - GatewayListByServiceOptionalParams, - GatewayListByServiceResponse, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse, - GatewayInvalidateDebugCredentialsOptionalParams, - GatewayListDebugCredentialsContract, - GatewayListDebugCredentialsOptionalParams, - GatewayListDebugCredentialsResponse, - GatewayListTraceContract, - GatewayListTraceOptionalParams, - GatewayListTraceResponse, - GatewayListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Gateway operations. */ -export class GatewayImpl implements Gateway { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Gateway class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GatewayListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listKeysOperationSpec, - ); - } - - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - regenerateKeyOperationSpec, - ); - } - - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - generateTokenOperationSpec, - ); - } - - /** - * Action is invalidating all debug credentials issued for gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - invalidateDebugCredentials( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayInvalidateDebugCredentialsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - invalidateDebugCredentialsOperationSpec, - ); - } - - /** - * Create new debug credentials for gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters List debug credentials properties. - * @param options The options parameters. - */ - listDebugCredentials( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayListDebugCredentialsContract, - options?: GatewayListDebugCredentialsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - listDebugCredentialsOperationSpec, - ); - } - - /** - * Fetches trace collected by gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters List trace properties. - * @param options The options parameters. - */ - listTrace( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayListTraceContract, - options?: GatewayListTraceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, parameters, options }, - listTraceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GatewayListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GatewayContract, - headersMapper: Mappers.GatewayUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listKeysOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayKeysContract, - headersMapper: Mappers.GatewayListKeysHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters48, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const generateTokenOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayTokenContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters49, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const invalidateDebugCredentialsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listDebugCredentialsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GatewayDebugCredentialsContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listTraceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Dictionary", value: { type: { name: "any" } } }, - }, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters51, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts deleted file mode 100644 index 4edf76077936..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayApi.ts +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GatewayApi } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiContract, - GatewayApiListByServiceNextOptionalParams, - GatewayApiListByServiceOptionalParams, - GatewayApiListByServiceResponse, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams, - GatewayApiListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GatewayApi operations. */ -export class GatewayApiImpl implements GatewayApi { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GatewayApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GatewayApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, apiId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayApiListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayApiGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - }, - 201: { - bodyMapper: Mappers.ApiContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.gatewayId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts deleted file mode 100644 index e795b307d1e5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayCertificateAuthority.ts +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GatewayCertificateAuthority } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceNextOptionalParams, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityListByServiceResponse, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams, - GatewayCertificateAuthorityListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GatewayCertificateAuthority operations. */ -export class GatewayCertificateAuthorityImpl - implements GatewayCertificateAuthority -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GatewayCertificateAuthority class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GatewayCertificateAuthorityListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - )) { - yield* page; - } - } - - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, certificateId, options }, - getOperationSpec, - ); - } - - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - gatewayId, - certificateId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayCertificateAuthorityListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayCertificateAuthorityGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GatewayCertificateAuthorityContract, - headersMapper: Mappers.GatewayCertificateAuthorityCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters54, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.gatewayId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayCertificateAuthorityCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts deleted file mode 100644 index 79728891c92e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/gatewayHostnameConfiguration.ts +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GatewayHostnameConfiguration } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceNextOptionalParams, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationListByServiceResponse, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams, - GatewayHostnameConfigurationListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GatewayHostnameConfiguration operations. */ -export class GatewayHostnameConfigurationImpl - implements GatewayHostnameConfiguration -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GatewayHostnameConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GatewayHostnameConfigurationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - gatewayId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - gatewayId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - gatewayId, - options, - )) { - yield* page; - } - } - - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, options }, - getOperationSpec, - ); - } - - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, hcId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - nextLink: string, - options?: GatewayHostnameConfigurationListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, gatewayId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GatewayHostnameConfigurationGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - Parameters.hcId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - Parameters.hcId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GatewayHostnameConfigurationContract, - headersMapper: Mappers.GatewayHostnameConfigurationCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters52, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - Parameters.hcId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.gatewayId, - Parameters.hcId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GatewayHostnameConfigurationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.gatewayId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts deleted file mode 100644 index cf4c1a283ee1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/globalSchema.ts +++ /dev/null @@ -1,486 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GlobalSchema } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - GlobalSchemaContract, - GlobalSchemaListByServiceNextOptionalParams, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaListByServiceResponse, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams, - GlobalSchemaListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GlobalSchema operations. */ -export class GlobalSchemaImpl implements GlobalSchema { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GlobalSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GlobalSchemaListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, options }, - getOperationSpec, - ); - } - - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, schemaId, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - GlobalSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - schemaId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, schemaId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GlobalSchemaListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GlobalSchemaGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.GlobalSchemaCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters78, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts deleted file mode 100644 index e65f73e6b955..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolver.ts +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GraphQLApiResolver } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ResolverContract, - GraphQLApiResolverListByApiNextOptionalParams, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverListByApiResponse, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams, - GraphQLApiResolverListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GraphQLApiResolver operations. */ -export class GraphQLApiResolverImpl implements GraphQLApiResolver { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GraphQLApiResolver class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GraphQLApiResolverListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: GraphQLApiResolverListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ResolverContract, - headersMapper: Mappers.GraphQLApiResolverUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResolverCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts deleted file mode 100644 index 17e3df7c5bb9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/graphQLApiResolverPolicy.ts +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GraphQLApiResolverPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverNextOptionalParams, - GraphQLApiResolverPolicyListByResolverOptionalParams, - GraphQLApiResolverPolicyListByResolverResponse, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams, - GraphQLApiResolverPolicyListByResolverNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GraphQLApiResolverPolicy operations. */ -export class GraphQLApiResolverPolicyImpl implements GraphQLApiResolverPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GraphQLApiResolverPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - public listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResolverPagingAll( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - settings, - ); - }, - }; - } - - private async *listByResolverPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GraphQLApiResolverPolicyListByResolverResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResolver( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResolverNext( - resourceGroupName, - serviceName, - apiId, - resolverId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResolverPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResolverPagingPage( - resourceGroupName, - serviceName, - apiId, - resolverId, - options, - )) { - yield* page; - } - } - - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - private _listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, options }, - listByResolverOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - apiId, - resolverId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByResolverNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByResolver method. - * @param options The options parameters. - */ - private _listByResolverNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - nextLink: string, - options?: GraphQLApiResolverPolicyListByResolverNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, resolverId, nextLink, options }, - listByResolverNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResolverOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GraphQLApiResolverPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.GraphQLApiResolverPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByResolverNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.resolverId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts b/sdk/apimanagement/arm-apimanagement/src/operations/group.ts deleted file mode 100644 index b95a8c98d77d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/group.ts +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Group } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GroupContract, - GroupListByServiceNextOptionalParams, - GroupListByServiceOptionalParams, - GroupListByServiceResponse, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams, - GroupListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Group operations. */ -export class GroupImpl implements Group { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Group class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GroupListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: GroupListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.GroupGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.GroupUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts deleted file mode 100644 index fabdd8086050..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/groupUser.ts +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { GroupUser } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - UserContract, - GroupUserListNextOptionalParams, - GroupUserListOptionalParams, - GroupUserListResponse, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams, - GroupUserListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing GroupUser operations. */ -export class GroupUserImpl implements GroupUser { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class GroupUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - groupId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - groupId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: GroupUserListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - groupId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - groupId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - groupId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, options }, - listOperationSpec, - ); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - createOperationSpec, - ); - } - - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, userId, options }, - deleteOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - groupId: string, - nextLink: string, - options?: GroupUserListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, groupId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - }, - 201: { - bodyMapper: Mappers.UserContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts deleted file mode 100644 index 18d67c818356..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/identityProvider.ts +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { IdentityProvider } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - IdentityProviderContract, - IdentityProviderListByServiceNextOptionalParams, - IdentityProviderListByServiceOptionalParams, - IdentityProviderListByServiceResponse, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse, - IdentityProviderListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing IdentityProvider operations. */ -export class IdentityProviderImpl implements IdentityProvider { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class IdentityProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IdentityProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - identityProviderName, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, identityProviderName, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IdentityProviderListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.IdentityProviderGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters57, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderContract, - headersMapper: Mappers.IdentityProviderUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.IdentityProviderListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.identityProviderName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IdentityProviderList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts b/sdk/apimanagement/arm-apimanagement/src/operations/index.ts deleted file mode 100644 index c3114c231143..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/index.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./apiGateway.js"; -export * from "./apiManagementGatewaySkus.js"; -export * from "./allPolicies.js"; -export * from "./api.js"; -export * from "./apiRevision.js"; -export * from "./apiRelease.js"; -export * from "./apiOperation.js"; -export * from "./apiOperationPolicy.js"; -export * from "./tag.js"; -export * from "./graphQLApiResolver.js"; -export * from "./graphQLApiResolverPolicy.js"; -export * from "./apiProduct.js"; -export * from "./apiPolicy.js"; -export * from "./apiSchema.js"; -export * from "./apiDiagnostic.js"; -export * from "./apiIssue.js"; -export * from "./apiIssueComment.js"; -export * from "./apiIssueAttachment.js"; -export * from "./apiTagDescription.js"; -export * from "./operationOperations.js"; -export * from "./apiWiki.js"; -export * from "./apiWikis.js"; -export * from "./apiExport.js"; -export * from "./apiVersionSet.js"; -export * from "./authorizationProvider.js"; -export * from "./authorization.js"; -export * from "./authorizationLoginLinks.js"; -export * from "./authorizationAccessPolicy.js"; -export * from "./authorizationServer.js"; -export * from "./backend.js"; -export * from "./cache.js"; -export * from "./certificate.js"; -export * from "./contentType.js"; -export * from "./contentItem.js"; -export * from "./deletedServices.js"; -export * from "./apiManagementOperations.js"; -export * from "./apiManagementServiceSkus.js"; -export * from "./apiManagementService.js"; -export * from "./diagnostic.js"; -export * from "./documentation.js"; -export * from "./emailTemplate.js"; -export * from "./apiGatewayConfigConnection.js"; -export * from "./gateway.js"; -export * from "./gatewayHostnameConfiguration.js"; -export * from "./gatewayApi.js"; -export * from "./gatewayCertificateAuthority.js"; -export * from "./group.js"; -export * from "./groupUser.js"; -export * from "./identityProvider.js"; -export * from "./issue.js"; -export * from "./logger.js"; -export * from "./namedValue.js"; -export * from "./networkStatus.js"; -export * from "./notification.js"; -export * from "./notificationRecipientUser.js"; -export * from "./notificationRecipientEmail.js"; -export * from "./openIdConnectProvider.js"; -export * from "./outboundNetworkDependenciesEndpoints.js"; -export * from "./policy.js"; -export * from "./policyDescription.js"; -export * from "./policyFragment.js"; -export * from "./policyRestriction.js"; -export * from "./policyRestrictionValidations.js"; -export * from "./portalConfig.js"; -export * from "./portalRevision.js"; -export * from "./portalSettings.js"; -export * from "./signInSettings.js"; -export * from "./signUpSettings.js"; -export * from "./delegationSettings.js"; -export * from "./privateEndpointConnectionOperations.js"; -export * from "./product.js"; -export * from "./productApi.js"; -export * from "./productGroup.js"; -export * from "./productSubscriptions.js"; -export * from "./productPolicy.js"; -export * from "./productWiki.js"; -export * from "./productWikis.js"; -export * from "./productApiLink.js"; -export * from "./productGroupLink.js"; -export * from "./quotaByCounterKeys.js"; -export * from "./quotaByPeriodKeys.js"; -export * from "./region.js"; -export * from "./reports.js"; -export * from "./globalSchema.js"; -export * from "./tenantSettings.js"; -export * from "./apiManagementSkus.js"; -export * from "./subscription.js"; -export * from "./tagResource.js"; -export * from "./tagApiLink.js"; -export * from "./tagOperationLink.js"; -export * from "./tagProductLink.js"; -export * from "./tenantAccess.js"; -export * from "./tenantAccessGit.js"; -export * from "./tenantConfiguration.js"; -export * from "./user.js"; -export * from "./userGroup.js"; -export * from "./userSubscription.js"; -export * from "./userIdentities.js"; -export * from "./userConfirmationPassword.js"; -export * from "./workspaceBackend.js"; -export * from "./workspaceCertificate.js"; -export * from "./workspaceDiagnostic.js"; -export * from "./workspaceApiDiagnostic.js"; -export * from "./apiManagementWorkspaceLinks.js"; -export * from "./apiManagementWorkspaceLink.js"; -export * from "./workspaceLogger.js"; -export * from "./workspace.js"; -export * from "./workspacePolicy.js"; -export * from "./workspaceNamedValue.js"; -export * from "./workspaceGlobalSchema.js"; -export * from "./workspaceNotification.js"; -export * from "./workspaceNotificationRecipientUser.js"; -export * from "./workspaceNotificationRecipientEmail.js"; -export * from "./workspacePolicyFragment.js"; -export * from "./workspaceGroup.js"; -export * from "./workspaceGroupUser.js"; -export * from "./workspaceSubscription.js"; -export * from "./workspaceApiVersionSet.js"; -export * from "./workspaceApi.js"; -export * from "./workspaceApiRevision.js"; -export * from "./workspaceApiRelease.js"; -export * from "./workspaceApiOperation.js"; -export * from "./workspaceApiOperationPolicy.js"; -export * from "./workspaceApiPolicy.js"; -export * from "./workspaceApiSchema.js"; -export * from "./workspaceProduct.js"; -export * from "./workspaceProductApiLink.js"; -export * from "./workspaceProductGroupLink.js"; -export * from "./workspaceProductPolicy.js"; -export * from "./workspaceTag.js"; -export * from "./workspaceTagApiLink.js"; -export * from "./workspaceTagOperationLink.js"; -export * from "./workspaceTagProductLink.js"; -export * from "./workspaceApiExport.js"; -export * from "./operationStatus.js"; -export * from "./operationsResults.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts deleted file mode 100644 index d13b268221ec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/issue.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Issue } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - IssueContract, - IssueListByServiceNextOptionalParams, - IssueListByServiceOptionalParams, - IssueListByServiceResponse, - IssueGetOptionalParams, - IssueGetResponse, - IssueListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Issue operations. */ -export class IssueImpl implements Issue { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Issue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: IssueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, issueId, options }, - getOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: IssueListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueContract, - headersMapper: Mappers.IssueGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.issueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.IssueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts deleted file mode 100644 index 95a90fbf1b02..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/logger.ts +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Logger } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - LoggerContract, - LoggerListByServiceNextOptionalParams, - LoggerListByServiceOptionalParams, - LoggerListByServiceResponse, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams, - LoggerListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Logger operations. */ -export class LoggerImpl implements Logger { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Logger class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: LoggerListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - loggerId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, loggerId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: LoggerListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.LoggerGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.LoggerUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts deleted file mode 100644 index ed5153435eeb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/namedValue.ts +++ /dev/null @@ -1,828 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { NamedValue } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - NamedValueContract, - NamedValueListByServiceNextOptionalParams, - NamedValueListByServiceOptionalParams, - NamedValueListByServiceResponse, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse, - NamedValueListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing NamedValue operations. */ -export class NamedValueImpl implements NamedValue { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class NamedValue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NamedValueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - namedValueId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - NamedValueCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - namedValueId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - NamedValueUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - namedValueId, - ifMatch, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, namedValueId, options }, - listValueOperationSpec, - ); - } - - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, namedValueId, options }, - spec: refreshSecretOperationSpec, - }); - const poller = await createHttpPoller< - NamedValueRefreshSecretResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams, - ): Promise { - const poller = await this.beginRefreshSecret( - resourceGroupName, - serviceName, - namedValueId, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NamedValueListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.isKeyVaultRefreshFailed, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.NamedValueGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listValueOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueSecretContract, - headersMapper: Mappers.NamedValueListValueHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.NamedValueRefreshSecretHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts deleted file mode 100644 index 0a1318df65c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/networkStatus.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { NetworkStatus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse, -} from "../models/index.js"; - -/** Class containing NetworkStatus operations. */ -export class NetworkStatusImpl implements NetworkStatus { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class NetworkStatus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, locationName, options }, - listByLocationOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkStatusContractByLocation", - }, - }, - }, - }, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByLocationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NetworkStatusContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.locationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts deleted file mode 100644 index a41b145e650c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notification.ts +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Notification } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationContract, - NotificationListByServiceNextOptionalParams, - NotificationListByServiceOptionalParams, - NotificationListByServiceResponse, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse, - NotificationListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Notification operations. */ -export class NotificationImpl implements Notification { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Notification class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: NotificationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - getOperationSpec, - ); - } - - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: NotificationListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts deleted file mode 100644 index 047f72c0c370..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientEmail.ts +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { NotificationRecipientEmail } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing NotificationRecipientEmail operations. */ -export class NotificationRecipientEmailImpl - implements NotificationRecipientEmail -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class NotificationRecipientEmail class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec, - ); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, email, options }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailContract, - }, - 201: { - bodyMapper: Mappers.RecipientEmailContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts deleted file mode 100644 index fdafe70ceee7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/notificationRecipientUser.ts +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { NotificationRecipientUser } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing NotificationRecipientUser operations. */ -export class NotificationRecipientUserImpl - implements NotificationRecipientUser -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class NotificationRecipientUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, options }, - listByNotificationOperationSpec, - ); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, notificationName, userId, options }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserContract, - }, - 201: { - bodyMapper: Mappers.RecipientUserContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts deleted file mode 100644 index 5e17466df1ea..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/openIdConnectProvider.ts +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { OpenIdConnectProvider } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceNextOptionalParams, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderListByServiceResponse, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse, - OpenIdConnectProviderListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing OpenIdConnectProvider operations. */ -export class OpenIdConnectProviderImpl implements OpenIdConnectProvider { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class OpenIdConnectProvider class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OpenIdConnectProviderListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, opid, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: OpenIdConnectProviderListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.OpenIdConnectProviderGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters63, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OpenidConnectProviderContract, - headersMapper: Mappers.OpenIdConnectProviderUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters64, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ClientSecretContract, - headersMapper: Mappers.OpenIdConnectProviderListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.opid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OpenIdConnectProviderCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts deleted file mode 100644 index 83f7520f6b19..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/operationOperations.ts +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { OperationOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagResourceContract, - OperationListByTagsNextOptionalParams, - OperationListByTagsOptionalParams, - OperationListByTagsResponse, - OperationListByTagsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing OperationOperations operations. */ -export class OperationOperationsImpl implements OperationOperations { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class OperationOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByTagsOperationSpec, - ); - } - - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: OperationListByTagsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByTagsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.includeNotTaggedOperations, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/operationStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operations/operationStatus.ts deleted file mode 100644 index 82bca310eda8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/operationStatus.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { OperationStatus } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models/index.js"; - -/** Class containing OperationStatus operations. */ -export class OperationStatusImpl implements OperationStatus { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class OperationStatus class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Returns the current status of an async operation. - * @param location The name of the Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, operationId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location1, - Parameters.operationId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/operationsResults.ts b/sdk/apimanagement/arm-apimanagement/src/operations/operationsResults.ts deleted file mode 100644 index 7ddf6085d6f6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/operationsResults.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { OperationsResults } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OperationsResultsGetOptionalParams, - OperationsResultsGetResponse, -} from "../models/index.js"; - -/** Class containing OperationsResults operations. */ -export class OperationsResultsImpl implements OperationsResults { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class OperationsResults class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Returns operation results for long running operations executing DELETE or PATCH on the resource. - * @param location The name of the Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationsResultsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { location, operationId, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}", - httpMethod: "GET", - responses: { - 200: {}, - 202: { - headersMapper: Mappers.OperationsResultsGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location1, - Parameters.operationId1, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts deleted file mode 100644 index 08d0b2bad974..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/outboundNetworkDependenciesEndpoints.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { OutboundNetworkDependenciesEndpoints } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse, -} from "../models/index.js"; - -/** Class containing OutboundNetworkDependenciesEndpoints operations. */ -export class OutboundNetworkDependenciesEndpointsImpl - implements OutboundNetworkDependenciesEndpoints -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class OutboundNetworkDependenciesEndpoints class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OutboundEnvironmentEndpointList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts deleted file mode 100644 index b18624df038f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policy.ts +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Policy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - PolicyListByServiceNextOptionalParams, - PolicyListByServiceOptionalParams, - PolicyListByServiceResponse, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams, - PolicyListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Policy operations. */ -export class PolicyImpl implements Policy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Policy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PolicyListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PolicyListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.PolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts deleted file mode 100644 index 1e28b16146f9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyDescription.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PolicyDescription } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse, -} from "../models/index.js"; - -/** Class containing PolicyDescription operations. */ -export class PolicyDescriptionImpl implements PolicyDescription { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PolicyDescription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyDescriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.scope1], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts deleted file mode 100644 index 37b237217843..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyFragment.ts +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { PolicyFragment } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PolicyFragmentContract, - PolicyFragmentListByServiceNextOptionalParams, - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentListByServiceResponse, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse, - PolicyFragmentListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PolicyFragment operations. */ -export class PolicyFragmentImpl implements PolicyFragment { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PolicyFragment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PolicyFragmentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, id, parameters, options }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PolicyFragmentCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - id, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, id, options }, - listReferencesOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PolicyFragmentListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.orderby, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyFragmentGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.PolicyFragmentCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listReferencesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyRestriction.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyRestriction.ts deleted file mode 100644 index 61b2fc8e994d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyRestriction.ts +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { PolicyRestriction } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyRestrictionContract, - PolicyRestrictionListByServiceNextOptionalParams, - PolicyRestrictionListByServiceOptionalParams, - PolicyRestrictionListByServiceResponse, - PolicyRestrictionGetEntityTagOptionalParams, - PolicyRestrictionGetEntityTagResponse, - PolicyRestrictionGetOptionalParams, - PolicyRestrictionGetResponse, - PolicyRestrictionCreateOrUpdateOptionalParams, - PolicyRestrictionCreateOrUpdateResponse, - PolicyRestrictionUpdateContract, - PolicyRestrictionUpdateOptionalParams, - PolicyRestrictionUpdateResponse, - PolicyRestrictionDeleteOptionalParams, - PolicyRestrictionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PolicyRestriction operations. */ -export class PolicyRestrictionImpl implements PolicyRestriction { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PolicyRestriction class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all policy restrictions of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PolicyRestrictionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Gets all policy restrictions of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyRestrictionId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy restriction of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyRestrictionId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the policy restriction configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param parameters The policy restriction to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - parameters: PolicyRestrictionContract, - options?: PolicyRestrictionCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - policyRestrictionId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the policy restriction configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters The policy restriction to apply. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - ifMatch: string, - parameters: PolicyRestrictionUpdateContract, - options?: PolicyRestrictionUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - policyRestrictionId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the policy restriction configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, policyRestrictionId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PolicyRestrictionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyRestrictionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PolicyRestrictionGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyRestrictionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyRestrictionContract, - headersMapper: Mappers.PolicyRestrictionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyRestrictionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyRestrictionContract, - headersMapper: Mappers.PolicyRestrictionCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyRestrictionContract, - headersMapper: Mappers.PolicyRestrictionCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters66, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyRestrictionId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PolicyRestrictionContract, - headersMapper: Mappers.PolicyRestrictionUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters67, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyRestrictionId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyRestrictionId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyRestrictionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/policyRestrictionValidations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/policyRestrictionValidations.ts deleted file mode 100644 index e29819966145..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/policyRestrictionValidations.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PolicyRestrictionValidations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PolicyRestrictionValidationsByServiceOptionalParams, - PolicyRestrictionValidationsByServiceResponse, -} from "../models/index.js"; - -/** Class containing PolicyRestrictionValidations operations. */ -export class PolicyRestrictionValidationsImpl - implements PolicyRestrictionValidations -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PolicyRestrictionValidations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Validate all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionValidationsByServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PolicyRestrictionValidationsByServiceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, options }, - spec: byServiceOperationSpec, - }); - const poller = await createHttpPoller< - PolicyRestrictionValidationsByServiceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Validate all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - async beginByServiceAndWait( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionValidationsByServiceOptionalParams, - ): Promise { - const poller = await this.beginByService( - resourceGroupName, - serviceName, - options, - ); - return poller.pollUntilDone(); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const byServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract, - }, - 201: { - bodyMapper: Mappers.OperationResultContract, - }, - 202: { - bodyMapper: Mappers.OperationResultContract, - }, - 204: { - bodyMapper: Mappers.OperationResultContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts deleted file mode 100644 index 27e8d9fc7b5e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalConfig.ts +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { PortalConfig } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PortalConfigContract, - PortalConfigListByServiceNextOptionalParams, - PortalConfigListByServiceOptionalParams, - PortalConfigListByServiceResponse, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse, - PortalConfigListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PortalConfig operations. */ -export class PortalConfigImpl implements PortalConfig { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PortalConfig class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PortalConfigListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalConfigId, options }, - getOperationSpec, - ); - } - - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - portalConfigId, - ifMatch, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PortalConfigListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalConfigGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalConfigId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract, - headersMapper: Mappers.PortalConfigGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalConfigId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters68, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalConfigId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters68, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalConfigId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalConfigCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts deleted file mode 100644 index 39ca0f8b8be5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalRevision.ts +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { PortalRevision } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PortalRevisionContract, - PortalRevisionListByServiceNextOptionalParams, - PortalRevisionListByServiceOptionalParams, - PortalRevisionListByServiceResponse, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse, - PortalRevisionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing PortalRevision operations. */ -export class PortalRevisionImpl implements PortalRevision { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PortalRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: PortalRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, portalRevisionId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PortalRevisionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - PortalRevisionUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - portalRevisionId, - ifMatch, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: PortalRevisionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.PortalRevisionGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalRevisionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalRevisionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalRevisionId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.PortalRevisionContract, - headersMapper: Mappers.PortalRevisionUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.portalRevisionId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts deleted file mode 100644 index abaae3600b5b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/portalSettings.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PortalSettings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse, -} from "../models/index.js"; - -/** Class containing PortalSettings operations. */ -export class PortalSettingsImpl implements PortalSettings { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PortalSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSettingsCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts deleted file mode 100644 index 7e93667b4aeb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/privateEndpointConnectionOperations.ts +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnectionOperations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionListByServiceResponse, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse, -} from "../models/index.js"; - -/// -/** Class containing PrivateEndpointConnectionOperations operations. */ -export class PrivateEndpointConnectionOperationsImpl - implements PrivateEndpointConnectionOperations -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class PrivateEndpointConnectionOperations class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: PrivateEndpointConnectionListByServiceResponse; - result = await this._listByService(resourceGroupName, serviceName, options); - yield result.value || []; - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options, - }, - getByNameOperationSpec, - ); - } - - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - PrivateEndpointConnectionCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - privateEndpointConnectionRequest, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams, - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - privateEndpointConnectionName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listPrivateLinkResourcesOperationSpec, - ); - } - - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, privateLinkSubResourceName, options }, - getPrivateLinkResourceOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getByNameOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.privateEndpointConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - 201: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - 202: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - 204: { - bodyMapper: Mappers.PrivateEndpointConnection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.privateEndpointConnectionRequest, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.privateEndpointConnectionName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.privateEndpointConnectionName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listPrivateLinkResourcesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getPrivateLinkResourceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.privateLinkSubResourceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts b/sdk/apimanagement/arm-apimanagement/src/operations/product.ts deleted file mode 100644 index a18176f63ecd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/product.ts +++ /dev/null @@ -1,627 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Product } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductContract, - ProductListByServiceNextOptionalParams, - ProductListByServiceOptionalParams, - ProductListByServiceResponse, - TagResourceContract, - ProductListByTagsNextOptionalParams, - ProductListByTagsOptionalParams, - ProductListByTagsResponse, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams, - ProductListByServiceNextResponse, - ProductListByTagsNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Product operations. */ -export class ProductImpl implements Product { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Product class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByTagsPagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByTagsPagingPage( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductListByTagsResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTags(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByTagsNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByTagsPagingAll( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByTagsPagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByTagsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } - - /** - * ListByTagsNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTags method. - * @param options The options parameters. - */ - private _listByTagsNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ProductListByTagsNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTagsNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandGroups, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.ProductUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByTagsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.includeNotTaggedProducts, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByTagsNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts deleted file mode 100644 index c81d3350e492..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productApi.ts +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductApi } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiContract, - ProductApiListByProductNextOptionalParams, - ProductApiListByProductOptionalParams, - ProductApiListByProductResponse, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams, - ProductApiListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductApi operations. */ -export class ProductApiImpl implements ProductApi { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductApiListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductApiListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - }, - 201: { - bodyMapper: Mappers.ApiContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productApiLink.ts deleted file mode 100644 index 30cd47989005..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productApiLink.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductApiLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductApiLinkContract, - ProductApiLinkListByProductNextOptionalParams, - ProductApiLinkListByProductOptionalParams, - ProductApiLinkListByProductResponse, - ProductApiLinkGetOptionalParams, - ProductApiLinkGetResponse, - ProductApiLinkCreateOrUpdateOptionalParams, - ProductApiLinkCreateOrUpdateResponse, - ProductApiLinkDeleteOptionalParams, - ProductApiLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductApiLink operations. */ -export class ProductApiLinkImpl implements ProductApiLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductApiLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductApiLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the API link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - options?: ProductApiLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiLinkId, options }, - getOperationSpec, - ); - } - - /** - * Adds an API to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - parameters: ProductApiLinkContract, - options?: ProductApiLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - apiLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - options?: ProductApiLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, apiLinkId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductApiLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkContract, - headersMapper: Mappers.ProductApiLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkContract, - }, - 201: { - bodyMapper: Mappers.ProductApiLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts deleted file mode 100644 index 2d4dc10ac479..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productGroup.ts +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductGroup } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GroupContract, - ProductGroupListByProductNextOptionalParams, - ProductGroupListByProductOptionalParams, - ProductGroupListByProductResponse, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams, - ProductGroupListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductGroup operations. */ -export class ProductGroupImpl implements ProductGroup { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductGroupListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductGroupListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - }, - 201: { - bodyMapper: Mappers.GroupContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productGroupLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productGroupLink.ts deleted file mode 100644 index bf5d44c2bcb7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productGroupLink.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductGroupLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductGroupLinkContract, - ProductGroupLinkListByProductNextOptionalParams, - ProductGroupLinkListByProductOptionalParams, - ProductGroupLinkListByProductResponse, - ProductGroupLinkGetOptionalParams, - ProductGroupLinkGetResponse, - ProductGroupLinkCreateOrUpdateOptionalParams, - ProductGroupLinkCreateOrUpdateResponse, - ProductGroupLinkDeleteOptionalParams, - ProductGroupLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductGroupLink operations. */ -export class ProductGroupLinkImpl implements ProductGroupLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductGroupLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductGroupLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the group link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - options?: ProductGroupLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupLinkId, options }, - getOperationSpec, - ); - } - - /** - * Adds a group to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - parameters: ProductGroupLinkContract, - options?: ProductGroupLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - groupLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified group from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - options?: ProductGroupLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, groupLinkId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductGroupLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkContract, - headersMapper: Mappers.ProductGroupLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkContract, - }, - 201: { - bodyMapper: Mappers.ProductGroupLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts deleted file mode 100644 index 3d82f525ea1f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productPolicy.ts +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - ProductPolicyListByProductNextOptionalParams, - ProductPolicyListByProductOptionalParams, - ProductPolicyListByProductResponse, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams, - ProductPolicyListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductPolicy operations. */ -export class ProductPolicyImpl implements ProductPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductPolicyListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, policyId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductPolicyListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.ProductPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts deleted file mode 100644 index b2f50b1d0755..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productSubscriptions.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductSubscriptions } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SubscriptionContract, - ProductSubscriptionsListNextOptionalParams, - ProductSubscriptionsListOptionalParams, - ProductSubscriptionsListResponse, - ProductSubscriptionsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductSubscriptions operations. */ -export class ProductSubscriptionsImpl implements ProductSubscriptions { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductSubscriptions class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductSubscriptionsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductSubscriptionsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts deleted file mode 100644 index 5f35d77335a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWiki.ts +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { ProductWiki } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing ProductWiki operations. */ -export class ProductWikiImpl implements ProductWiki { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductWiki class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - productId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, ifMatch, options }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.ProductWikiGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WikiContract, - headersMapper: Mappers.ProductWikiUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts deleted file mode 100644 index bce4f9f4af99..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/productWikis.ts +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { ProductWikis } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - WikiContract, - ProductWikisListNextOptionalParams, - ProductWikisListOptionalParams, - ProductWikisListResponse, - ProductWikisListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing ProductWikis operations. */ -export class ProductWikisImpl implements ProductWikis { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class ProductWikis class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ProductWikisListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: ProductWikisListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WikiCollection, - headersMapper: Mappers.ProductWikisListNextHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts deleted file mode 100644 index d359cc0b6a03..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByCounterKeys.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { QuotaByCounterKeys } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse, -} from "../models/index.js"; - -/** Class containing QuotaByCounterKeys operations. */ -export class QuotaByCounterKeysImpl implements QuotaByCounterKeys { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class QuotaByCounterKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, options }, - listByServiceOperationSpec, - ); - } - - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, quotaCounterKey, parameters, options }, - updateOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.quotaCounterKey, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.quotaCounterKey, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts deleted file mode 100644 index ee23c361fcfb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/quotaByPeriodKeys.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { QuotaByPeriodKeys } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse, -} from "../models/index.js"; - -/** Class containing QuotaByPeriodKeys operations. */ -export class QuotaByPeriodKeysImpl implements QuotaByPeriodKeys { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class QuotaByPeriodKeys class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - options, - }, - getOperationSpec, - ); - } - - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - quotaCounterKey, - quotaPeriodKey, - parameters, - options, - }, - updateOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.QuotaCounterContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.quotaCounterKey, - Parameters.quotaPeriodKey, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts b/sdk/apimanagement/arm-apimanagement/src/operations/region.ts deleted file mode 100644 index 598d8980f820..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/region.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Region } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - RegionContract, - RegionListByServiceNextOptionalParams, - RegionListByServiceOptionalParams, - RegionListByServiceResponse, - RegionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Region operations. */ -export class RegionImpl implements Region { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Region class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: RegionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: RegionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts deleted file mode 100644 index 0babf036b40f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/reports.ts +++ /dev/null @@ -1,1587 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Reports } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ReportRecordContract, - ReportsListByApiNextOptionalParams, - ReportsListByApiOptionalParams, - ReportsListByApiResponse, - ReportsListByUserNextOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByUserResponse, - ReportsListByOperationNextOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByOperationResponse, - ReportsListByProductNextOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByProductResponse, - ReportsListByGeoNextOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListByGeoResponse, - ReportsListBySubscriptionNextOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListBySubscriptionResponse, - ReportsListByTimeNextOptionalParams, - ReportsListByTimeOptionalParams, - ReportsListByTimeResponse, - RequestReportRecordContract, - ReportsListByRequestOptionalParams, - ReportsListByRequestResponse, - ReportsListByApiNextResponse, - ReportsListByUserNextResponse, - ReportsListByOperationNextResponse, - ReportsListByProductNextResponse, - ReportsListByGeoNextResponse, - ReportsListBySubscriptionNextResponse, - ReportsListByTimeNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Reports operations. */ -export class ReportsImpl implements Reports { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Reports class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - public listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByUserPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByUserPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByUserResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByUser( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByUserNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByUserPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByUserPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByGeoPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByGeoPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByGeoResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByGeo( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByGeoNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByGeoPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByGeoPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - public listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listBySubscriptionPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription( - resourceGroupName, - serviceName, - filter, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - public listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByTimePagingAll( - resourceGroupName, - serviceName, - filter, - interval, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options, - settings, - ); - }, - }; - } - - private async *listByTimePagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByTimeResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByTime( - resourceGroupName, - serviceName, - filter, - interval, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByTimeNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByTimePagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByTimePagingPage( - resourceGroupName, - serviceName, - filter, - interval, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - public listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByRequestPagingAll( - resourceGroupName, - serviceName, - filter, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options, - settings, - ); - }, - }; - } - - private async *listByRequestPagingPage( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - _settings?: PageSettings, - ): AsyncIterableIterator { - let result: ReportsListByRequestResponse; - result = await this._listByRequest( - resourceGroupName, - serviceName, - filter, - options, - ); - yield result.value || []; - } - - private async *listByRequestPagingAll( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByRequestPagingPage( - resourceGroupName, - serviceName, - filter, - options, - )) { - yield* page; - } - } - - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByApiOperationSpec, - ); - } - - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - private _listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByUserOperationSpec, - ); - } - - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByOperationOperationSpec, - ); - } - - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByProductOperationSpec, - ); - } - - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByGeoOperationSpec, - ); - } - - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - private _listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - private _listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, interval, options }, - listByTimeOperationSpec, - ); - } - - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - private _listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, filter, options }, - listByRequestOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByApiNextOperationSpec, - ); - } - - /** - * ListByUserNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByUser method. - * @param options The options parameters. - */ - private _listByUserNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByUserNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByUserNextOperationSpec, - ); - } - - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByOperationNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByOperationNextOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByProductNextOperationSpec, - ); - } - - /** - * ListByGeoNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByGeo method. - * @param options The options parameters. - */ - private _listByGeoNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByGeoNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByGeoNextOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } - - /** - * ListByTimeNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByTime method. - * @param options The options parameters. - */ - private _listByTimeNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: ReportsListByTimeNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByTimeNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByUserOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByGeoOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByTimeOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.orderby, - Parameters.filter1, - Parameters.interval, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByRequestOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RequestReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.top, - Parameters.skip, - Parameters.filter1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByUserNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByGeoNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByTimeNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ReportCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts deleted file mode 100644 index b042bc4a9864..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signInSettings.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SignInSettings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse, -} from "../models/index.js"; - -/** Class containing SignInSettings operations. */ -export class SignInSettingsImpl implements SignInSettings { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class SignInSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignInSettingsGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings, - headersMapper: Mappers.SignInSettingsGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSigninSettings, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts deleted file mode 100644 index aabe28abb297..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/signUpSettings.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SignUpSettings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse, -} from "../models/index.js"; - -/** Class containing SignUpSettings operations. */ -export class SignUpSettingsImpl implements SignUpSettings { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class SignUpSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - getOperationSpec, - ); - } - - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, parameters, options }, - createOrUpdateOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SignUpSettingsGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings, - headersMapper: Mappers.SignUpSettingsGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PATCH", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PortalSignupSettings, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts deleted file mode 100644 index 4db51ddf3c41..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/subscription.ts +++ /dev/null @@ -1,582 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Subscription } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SubscriptionContract, - SubscriptionListNextOptionalParams, - SubscriptionListOptionalParams, - SubscriptionListResponse, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse, - SubscriptionListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Subscription operations. */ -export class SubscriptionImpl implements Subscription { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Subscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, serviceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(resourceGroupName, serviceName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regeneratePrimaryKeyOperationSpec, - ); - } - - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - regenerateSecondaryKeyOperationSpec, - ); - } - - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, sid, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: SubscriptionListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.SubscriptionGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters79, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.SubscriptionUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters80, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionKeysContract, - headersMapper: Mappers.SubscriptionListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts deleted file mode 100644 index 1ac17d1f37de..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tag.ts +++ /dev/null @@ -1,1616 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Tag } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagContract, - TagListByOperationNextOptionalParams, - TagListByOperationOptionalParams, - TagListByOperationResponse, - TagListByApiNextOptionalParams, - TagListByApiOptionalParams, - TagListByApiResponse, - TagListByProductNextOptionalParams, - TagListByProductOptionalParams, - TagListByProductResponse, - TagListByServiceNextOptionalParams, - TagListByServiceOptionalParams, - TagListByServiceResponse, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams, - TagListByOperationNextResponse, - TagListByApiNextResponse, - TagListByProductNextResponse, - TagListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Tag operations. */ -export class TagImpl implements Tag { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Tag class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - settings, - ); - }, - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - apiId, - operationId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - apiId, - operationId, - options, - )) { - yield* page; - } - } - - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, options }, - listByOperationOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getEntityStateByOperationOperationSpec, - ); - } - - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - getByOperationOperationSpec, - ); - } - - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - assignToOperationOperationSpec, - ); - } - - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, tagId, options }, - detachFromOperationOperationSpec, - ); - } - - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getEntityStateByApiOperationSpec, - ); - } - - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - getByApiOperationSpec, - ); - } - - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - assignToApiOperationSpec, - ); - } - - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, tagId, options }, - detachFromApiOperationSpec, - ); - } - - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getEntityStateByProductOperationSpec, - ); - } - - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - getByProductOperationSpec, - ); - } - - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - assignToProductOperationSpec, - ); - } - - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, tagId, options }, - detachFromProductOperationSpec, - ); - } - - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getEntityStateOperationSpec, - ); - } - - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - getOperationSpec, - ); - } - - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - nextLink: string, - options?: TagListByOperationNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, operationId, nextLink, options }, - listByOperationNextOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - apiId: string, - nextLink: string, - options?: TagListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - productId: string, - nextLink: string, - options?: TagListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, productId, nextLink, options }, - listByProductNextOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityStateByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByOperationHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByOperationHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const assignToOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - }, - 201: { - bodyMapper: Mappers.TagContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const detachFromOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityStateByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByApiHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByApiHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const assignToApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders, - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagAssignToApiHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const detachFromApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityStateByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateByProductHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetByProductHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const assignToProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - }, - 201: { - bodyMapper: Mappers.TagContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const detachFromProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.scope, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityStateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TagGetEntityStateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.TagUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagApiLink.ts deleted file mode 100644 index f89d5a8a4034..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagApiLink.ts +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TagApiLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagApiLinkContract, - TagApiLinkListByProductNextOptionalParams, - TagApiLinkListByProductOptionalParams, - TagApiLinkListByProductResponse, - TagApiLinkGetOptionalParams, - TagApiLinkGetResponse, - TagApiLinkCreateOrUpdateOptionalParams, - TagApiLinkCreateOrUpdateResponse, - TagApiLinkDeleteOptionalParams, - TagApiLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TagApiLink operations. */ -export class TagApiLinkImpl implements TagApiLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TagApiLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagApiLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagApiLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagApiLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagApiLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the API link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - options?: TagApiLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, apiLinkId, options }, - getOperationSpec, - ); - } - - /** - * Adds an API to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - parameters: TagApiLinkContract, - options?: TagApiLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, apiLinkId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - options?: TagApiLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, apiLinkId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - tagId: string, - nextLink: string, - options?: TagApiLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkContract, - headersMapper: Mappers.TagApiLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkContract, - }, - 201: { - bodyMapper: Mappers.TagApiLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters81, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagOperationLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagOperationLink.ts deleted file mode 100644 index 4bb75a6fdfa5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagOperationLink.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TagOperationLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagOperationLinkContract, - TagOperationLinkListByProductNextOptionalParams, - TagOperationLinkListByProductOptionalParams, - TagOperationLinkListByProductResponse, - TagOperationLinkGetOptionalParams, - TagOperationLinkGetResponse, - TagOperationLinkCreateOrUpdateOptionalParams, - TagOperationLinkCreateOrUpdateResponse, - TagOperationLinkDeleteOptionalParams, - TagOperationLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TagOperationLink operations. */ -export class TagOperationLinkImpl implements TagOperationLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TagOperationLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagOperationLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagOperationLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagOperationLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagOperationLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagOperationLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the operation link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - options?: TagOperationLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, operationLinkId, options }, - getOperationSpec, - ); - } - - /** - * Adds an operation to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - parameters: TagOperationLinkContract, - options?: TagOperationLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - tagId, - operationLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified operation from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - options?: TagOperationLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, operationLinkId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - tagId: string, - nextLink: string, - options?: TagOperationLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkContract, - headersMapper: Mappers.TagOperationLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkContract, - }, - 201: { - bodyMapper: Mappers.TagOperationLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters82, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagProductLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagProductLink.ts deleted file mode 100644 index bdecf95f2466..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagProductLink.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TagProductLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagProductLinkContract, - TagProductLinkListByProductNextOptionalParams, - TagProductLinkListByProductOptionalParams, - TagProductLinkListByProductResponse, - TagProductLinkGetOptionalParams, - TagProductLinkGetResponse, - TagProductLinkCreateOrUpdateOptionalParams, - TagProductLinkCreateOrUpdateResponse, - TagProductLinkDeleteOptionalParams, - TagProductLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TagProductLink operations. */ -export class TagProductLinkImpl implements TagProductLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TagProductLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagProductLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagProductLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagProductLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagProductLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagProductLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the product link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - options?: TagProductLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, productLinkId, options }, - getOperationSpec, - ); - } - - /** - * Adds a product to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - parameters: TagProductLinkContract, - options?: TagProductLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - tagId, - productLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified product from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - options?: TagProductLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, productLinkId, options }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - tagId: string, - nextLink: string, - options?: TagProductLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkContract, - headersMapper: Mappers.TagProductLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkContract, - }, - 201: { - bodyMapper: Mappers.TagProductLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters83, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts deleted file mode 100644 index 5f2533c8d330..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tagResource.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TagResource } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagResourceContract, - TagResourceListByServiceNextOptionalParams, - TagResourceListByServiceOptionalParams, - TagResourceListByServiceResponse, - TagResourceListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TagResource operations. */ -export class TagResourceImpl implements TagResource { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TagResource class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TagResourceListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TagResourceListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts deleted file mode 100644 index 6dcd092d1647..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccess.ts +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TenantAccess } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AccessInformationContract, - TenantAccessListByServiceNextOptionalParams, - TenantAccessListByServiceOptionalParams, - TenantAccessListByServiceResponse, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse, - TenantAccessListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TenantAccess operations. */ -export class TenantAccessImpl implements TenantAccess { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TenantAccess class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TenantAccessListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - getOperationSpec, - ); - } - - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options, - }, - createOperationSpec, - ); - } - - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - accessName, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec, - ); - } - - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec, - ); - } - - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantAccessListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.TenantAccessGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessCreateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters84, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationContract, - headersMapper: Mappers.TenantAccessUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters85, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationSecretsContract, - headersMapper: Mappers.TenantAccessListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AccessInformationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts deleted file mode 100644 index c4f3b325e42b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantAccessGit.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { TenantAccessGit } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams, -} from "../models/index.js"; - -/** Class containing TenantAccessGit operations. */ -export class TenantAccessGitImpl implements TenantAccessGit { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TenantAccessGit class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regeneratePrimaryKeyOperationSpec, - ); - } - - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, accessName, options }, - regenerateSecondaryKeyOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.accessName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts deleted file mode 100644 index 7450b841ed90..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantConfiguration.ts +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { TenantConfiguration } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse, -} from "../models/index.js"; - -/** Class containing TenantConfiguration operations. */ -export class TenantConfigurationImpl implements TenantConfiguration { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TenantConfiguration class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - }, - spec: deployOperationSpec, - }); - const poller = await createHttpPoller< - TenantConfigurationDeployResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - async beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams, - ): Promise { - const poller = await this.beginDeploy( - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - }, - spec: saveOperationSpec, - }); - const poller = await createHttpPoller< - TenantConfigurationSaveResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - async beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams, - ): Promise { - const poller = await this.beginSave( - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - }, - spec: validateOperationSpec, - }); - const poller = await createHttpPoller< - TenantConfigurationValidateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - async beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams, - ): Promise { - const poller = await this.beginValidate( - resourceGroupName, - serviceName, - configurationName, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, configurationName, options }, - getSyncStateOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deployOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract, - }, - 201: { - bodyMapper: Mappers.OperationResultContract, - }, - 202: { - bodyMapper: Mappers.OperationResultContract, - }, - 204: { - bodyMapper: Mappers.OperationResultContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters86, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.configurationName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const saveOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract, - }, - 201: { - bodyMapper: Mappers.OperationResultContract, - }, - 202: { - bodyMapper: Mappers.OperationResultContract, - }, - 204: { - bodyMapper: Mappers.OperationResultContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters87, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.configurationName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const validateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationResultContract, - }, - 201: { - bodyMapper: Mappers.OperationResultContract, - }, - 202: { - bodyMapper: Mappers.OperationResultContract, - }, - 204: { - bodyMapper: Mappers.OperationResultContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters86, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.configurationName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const getSyncStateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantConfigurationSyncStateContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.configurationName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts deleted file mode 100644 index 6c82ee4445a8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/tenantSettings.ts +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { TenantSettings } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TenantSettingsContract, - TenantSettingsListByServiceNextOptionalParams, - TenantSettingsListByServiceOptionalParams, - TenantSettingsListByServiceResponse, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse, - TenantSettingsListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing TenantSettings operations. */ -export class TenantSettingsImpl implements TenantSettings { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class TenantSettings class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: TenantSettingsListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, settingsType, options }, - getOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: TenantSettingsListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsContract, - headersMapper: Mappers.TenantSettingsGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.settingsType, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TenantSettingsCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts b/sdk/apimanagement/arm-apimanagement/src/operations/user.ts deleted file mode 100644 index 947812bec837..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/user.ts +++ /dev/null @@ -1,642 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { User } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - UserContract, - UserListByServiceNextOptionalParams, - UserListByServiceOptionalParams, - UserListByServiceResponse, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserDeleteResponse, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse, - UserListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing User operations. */ -export class UserImpl implements User { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class User class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: UserListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, ifMatch, parameters, options }, - updateOperationSpec, - ); - } - - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams, - ): Promise< - SimplePollerLike, UserDeleteResponse> - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, serviceName, userId, ifMatch, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - UserDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - serviceName, - userId, - ifMatch, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - generateSsoUrlOperationSpec, - ); - } - - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, parameters, options }, - getSharedAccessTokenOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: UserListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.expandGroups, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.UserGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters88, - queryParameters: [Parameters.apiVersion, Parameters.notify], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - headersMapper: Mappers.UserUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters89, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.UserDeleteHeaders, - }, - 201: { - headersMapper: Mappers.UserDeleteHeaders, - }, - 202: { - headersMapper: Mappers.UserDeleteHeaders, - }, - 204: { - headersMapper: Mappers.UserDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.deleteSubscriptions, - Parameters.notify, - Parameters.appType, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const generateSsoUrlOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.GenerateSsoUrlResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getSharedAccessTokenOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.UserTokenResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters90, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts deleted file mode 100644 index 40fb7863b0f8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userConfirmationPassword.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { UserConfirmationPassword } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; - -/** Class containing UserConfirmationPassword operations. */ -export class UserConfirmationPasswordImpl implements UserConfirmationPassword { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class UserConfirmationPassword class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - sendOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const sendOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.appType], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts deleted file mode 100644 index fdce69c1238a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userGroup.ts +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { UserGroup } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GroupContract, - UserGroupListNextOptionalParams, - UserGroupListOptionalParams, - UserGroupListResponse, - UserGroupListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing UserGroup operations. */ -export class UserGroupImpl implements UserGroup { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class UserGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: UserGroupListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - )) { - yield* page; - } - } - - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserGroupListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts deleted file mode 100644 index d434021fcf25..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userIdentities.ts +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { UserIdentities } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - UserIdentityContract, - UserIdentitiesListNextOptionalParams, - UserIdentitiesListOptionalParams, - UserIdentitiesListResponse, - UserIdentitiesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing UserIdentities operations. */ -export class UserIdentitiesImpl implements UserIdentities { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class UserIdentities class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: UserIdentitiesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - )) { - yield* page; - } - } - - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserIdentitiesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserIdentityCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts deleted file mode 100644 index 773b0b6485a2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/userSubscription.ts +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { UserSubscription } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SubscriptionContract, - UserSubscriptionListNextOptionalParams, - UserSubscriptionListOptionalParams, - UserSubscriptionListResponse, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse, - UserSubscriptionListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing UserSubscription operations. */ -export class UserSubscriptionImpl implements UserSubscription { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class UserSubscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - userId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: UserSubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - userId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - userId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - userId, - options, - )) { - yield* page; - } - } - - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, options }, - listOperationSpec, - ); - } - - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, sid, options }, - getOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - userId: string, - nextLink: string, - options?: UserSubscriptionListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, userId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.UserSubscriptionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.sid, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.userId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspace.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspace.ts deleted file mode 100644 index cea0b73f50fb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspace.ts +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Workspace } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - WorkspaceContract, - WorkspaceListByServiceNextOptionalParams, - WorkspaceListByServiceOptionalParams, - WorkspaceListByServiceResponse, - WorkspaceGetEntityTagOptionalParams, - WorkspaceGetEntityTagResponse, - WorkspaceGetOptionalParams, - WorkspaceGetResponse, - WorkspaceCreateOrUpdateOptionalParams, - WorkspaceCreateOrUpdateResponse, - WorkspaceUpdateOptionalParams, - WorkspaceUpdateResponse, - WorkspaceDeleteOptionalParams, - WorkspaceListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Workspace operations. */ -export class WorkspaceImpl implements Workspace { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class Workspace class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all workspaces of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - options?: WorkspaceListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - options?: WorkspaceListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - options?: WorkspaceListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - options, - )) { - yield* page; - } - } - - /** - * Lists all workspaces of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - options?: WorkspaceListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new workspace or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - parameters: WorkspaceContract, - options?: WorkspaceCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Workspace Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - ifMatch: string, - parameters: WorkspaceContract, - options?: WorkspaceUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - ifMatch: string, - options?: WorkspaceDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - nextLink: string, - options?: WorkspaceListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceContract, - headersMapper: Mappers.WorkspaceGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceContract, - headersMapper: Mappers.WorkspaceCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.WorkspaceContract, - headersMapper: Mappers.WorkspaceCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters92, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceContract, - headersMapper: Mappers.WorkspaceUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters92, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApi.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApi.ts deleted file mode 100644 index 2b6165575989..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApi.ts +++ /dev/null @@ -1,610 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApi } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - ApiContract, - WorkspaceApiListByServiceNextOptionalParams, - WorkspaceApiListByServiceOptionalParams, - WorkspaceApiListByServiceResponse, - WorkspaceApiGetEntityTagOptionalParams, - WorkspaceApiGetEntityTagResponse, - WorkspaceApiGetOptionalParams, - WorkspaceApiGetResponse, - ApiCreateOrUpdateParameter, - WorkspaceApiCreateOrUpdateOptionalParams, - WorkspaceApiCreateOrUpdateResponse, - ApiUpdateContract, - WorkspaceApiUpdateOptionalParams, - WorkspaceApiUpdateResponse, - WorkspaceApiDeleteOptionalParams, - WorkspaceApiListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApi operations. */ -export class WorkspaceApiImpl implements WorkspaceApi { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApi class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all APIs of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists all APIs of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - getOperationSpec, - ); - } - - /** - * Creates new or updates existing specified API of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: WorkspaceApiCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceApiCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - apiId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceApiCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates new or updates existing specified API of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: WorkspaceApiCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specified API of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: WorkspaceApiUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified API of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - ifMatch: string, - options?: WorkspaceApiDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceApiListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandApiVersionSet, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiContract, - headersMapper: Mappers.WorkspaceApiUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteRevisions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiDiagnostic.ts deleted file mode 100644 index 4ec3b5d5cce9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiDiagnostic.ts +++ /dev/null @@ -1,561 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiDiagnostic } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DiagnosticContract, - WorkspaceApiDiagnosticListByWorkspaceNextOptionalParams, - WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - WorkspaceApiDiagnosticListByWorkspaceResponse, - WorkspaceApiDiagnosticGetEntityTagOptionalParams, - WorkspaceApiDiagnosticGetEntityTagResponse, - WorkspaceApiDiagnosticGetOptionalParams, - WorkspaceApiDiagnosticGetResponse, - WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, - WorkspaceApiDiagnosticCreateOrUpdateResponse, - DiagnosticUpdateContract, - WorkspaceApiDiagnosticUpdateOptionalParams, - WorkspaceApiDiagnosticUpdateResponse, - WorkspaceApiDiagnosticDeleteOptionalParams, - WorkspaceApiDiagnosticListByWorkspaceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiDiagnostic operations. */ -export class WorkspaceApiDiagnosticImpl implements WorkspaceApiDiagnostic { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiDiagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiDiagnosticListByWorkspaceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByWorkspaceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - options, - }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - options?: WorkspaceApiDiagnosticGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticUpdateContract, - options?: WorkspaceApiDiagnosticUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: WorkspaceApiDiagnosticDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - diagnosticId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiDiagnosticListByWorkspaceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByWorkspaceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiDiagnosticGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceApiDiagnosticGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceApiDiagnosticCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceApiDiagnosticCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceApiDiagnosticUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters91, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiExport.ts deleted file mode 100644 index 9145fe93bb6f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiExport.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { WorkspaceApiExport } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ExportFormat, - ExportApi, - WorkspaceApiExportGetOptionalParams, - WorkspaceApiExportGetResponse, -} from "../models/index.js"; - -/** Class containing WorkspaceApiExport operations. */ -export class WorkspaceApiExportImpl implements WorkspaceApiExport { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiExport class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: WorkspaceApiExportGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - format, - exportParam, - options, - }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiExportResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.format1, - Parameters.exportParam, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperation.ts deleted file mode 100644 index 3176c265654f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperation.ts +++ /dev/null @@ -1,570 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiOperation } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - OperationContract, - WorkspaceApiOperationListByApiNextOptionalParams, - WorkspaceApiOperationListByApiOptionalParams, - WorkspaceApiOperationListByApiResponse, - WorkspaceApiOperationGetEntityTagOptionalParams, - WorkspaceApiOperationGetEntityTagResponse, - WorkspaceApiOperationGetOptionalParams, - WorkspaceApiOperationGetResponse, - WorkspaceApiOperationCreateOrUpdateOptionalParams, - WorkspaceApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - WorkspaceApiOperationUpdateOptionalParams, - WorkspaceApiOperationUpdateResponse, - WorkspaceApiOperationDeleteOptionalParams, - WorkspaceApiOperationListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiOperation operations. */ -export class WorkspaceApiOperationImpl implements WorkspaceApiOperation { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiOperation class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiOperationListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiOperationListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiOperationListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiOperationListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiOperationListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: WorkspaceApiOperationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: WorkspaceApiOperationUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: WorkspaceApiOperationDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiOperationListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiOperationGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.WorkspaceApiOperationGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.WorkspaceApiOperationCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.WorkspaceApiOperationCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.OperationContract, - headersMapper: Mappers.WorkspaceApiOperationUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperationPolicy.ts deleted file mode 100644 index 3e63a4e21cb1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiOperationPolicy.ts +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiOperationPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - WorkspaceApiOperationPolicyListByOperationNextOptionalParams, - WorkspaceApiOperationPolicyListByOperationOptionalParams, - WorkspaceApiOperationPolicyListByOperationResponse, - PolicyIdName, - WorkspaceApiOperationPolicyGetEntityTagOptionalParams, - WorkspaceApiOperationPolicyGetEntityTagResponse, - WorkspaceApiOperationPolicyGetOptionalParams, - WorkspaceApiOperationPolicyGetResponse, - WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - WorkspaceApiOperationPolicyCreateOrUpdateResponse, - WorkspaceApiOperationPolicyDeleteOptionalParams, - WorkspaceApiOperationPolicyListByOperationNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiOperationPolicy operations. */ -export class WorkspaceApiOperationPolicyImpl - implements WorkspaceApiOperationPolicy -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiOperationPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - public listByOperation( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByOperationPagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByOperationPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - settings, - ); - }, - }; - } - - private async *listByOperationPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiOperationPolicyListByOperationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByOperation( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByOperationNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByOperationPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByOperationPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - )) { - yield* page; - } - } - - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - private _listByOperation( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - options, - }, - listByOperationOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - options, - }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: WorkspaceApiOperationPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceApiOperationPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByOperationNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param nextLink The nextLink from the previous successful call to the ListByOperation method. - * @param options The options parameters. - */ - private _listByOperationNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - nextLink: string, - options?: WorkspaceApiOperationPolicyListByOperationNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - operationId, - nextLink, - options, - }, - listByOperationNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByOperationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiOperationPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiOperationPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiOperationPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiOperationPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByOperationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.operationId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiPolicy.ts deleted file mode 100644 index 1785047fe4f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiPolicy.ts +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - WorkspaceApiPolicyListByApiNextOptionalParams, - WorkspaceApiPolicyListByApiOptionalParams, - WorkspaceApiPolicyListByApiResponse, - PolicyIdName, - WorkspaceApiPolicyGetEntityTagOptionalParams, - WorkspaceApiPolicyGetEntityTagResponse, - WorkspaceApiPolicyGetOptionalParams, - WorkspaceApiPolicyGetResponse, - WorkspaceApiPolicyCreateOrUpdateOptionalParams, - WorkspaceApiPolicyCreateOrUpdateResponse, - WorkspaceApiPolicyDeleteOptionalParams, - WorkspaceApiPolicyListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiPolicy operations. */ -export class WorkspaceApiPolicyImpl implements WorkspaceApiPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiPolicyListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiPolicyListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiPolicyListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiPolicyListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiPolicyListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - options?: WorkspaceApiPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - options?: WorkspaceApiPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceApiPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiPolicyListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceApiPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRelease.ts deleted file mode 100644 index d3b4595427c4..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRelease.ts +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiRelease } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiReleaseContract, - WorkspaceApiReleaseListByServiceNextOptionalParams, - WorkspaceApiReleaseListByServiceOptionalParams, - WorkspaceApiReleaseListByServiceResponse, - WorkspaceApiReleaseGetEntityTagOptionalParams, - WorkspaceApiReleaseGetEntityTagResponse, - WorkspaceApiReleaseGetOptionalParams, - WorkspaceApiReleaseGetResponse, - WorkspaceApiReleaseCreateOrUpdateOptionalParams, - WorkspaceApiReleaseCreateOrUpdateResponse, - WorkspaceApiReleaseUpdateOptionalParams, - WorkspaceApiReleaseUpdateResponse, - WorkspaceApiReleaseDeleteOptionalParams, - WorkspaceApiReleaseListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiRelease operations. */ -export class WorkspaceApiReleaseImpl implements WorkspaceApiRelease { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiRelease class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiReleaseListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiReleaseListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiReleaseListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiReleaseListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiReleaseListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - options?: WorkspaceApiReleaseGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - options, - }, - getEntityTagOperationSpec, - ); - } - - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - options?: WorkspaceApiReleaseGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: WorkspaceApiReleaseUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: WorkspaceApiReleaseDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - releaseId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiReleaseListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiReleaseGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.WorkspaceApiReleaseGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.WorkspaceApiReleaseCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.WorkspaceApiReleaseCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseContract, - headersMapper: Mappers.WorkspaceApiReleaseUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.releaseId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiReleaseCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRevision.ts deleted file mode 100644 index 11407013fc4a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiRevision.ts +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiRevision } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiRevisionContract, - WorkspaceApiRevisionListByServiceNextOptionalParams, - WorkspaceApiRevisionListByServiceOptionalParams, - WorkspaceApiRevisionListByServiceResponse, - WorkspaceApiRevisionListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiRevision operations. */ -export class WorkspaceApiRevisionImpl implements WorkspaceApiRevision { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiRevision class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiRevisionListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiRevisionListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiRevisionListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiRevisionListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByServiceOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiRevisionListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiRevisionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId1, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiSchema.ts deleted file mode 100644 index 959896055c1e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiSchema.ts +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiSchema } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SchemaContract, - WorkspaceApiSchemaListByApiNextOptionalParams, - WorkspaceApiSchemaListByApiOptionalParams, - WorkspaceApiSchemaListByApiResponse, - WorkspaceApiSchemaGetEntityTagOptionalParams, - WorkspaceApiSchemaGetEntityTagResponse, - WorkspaceApiSchemaGetOptionalParams, - WorkspaceApiSchemaGetResponse, - WorkspaceApiSchemaCreateOrUpdateOptionalParams, - WorkspaceApiSchemaCreateOrUpdateResponse, - WorkspaceApiSchemaDeleteOptionalParams, - WorkspaceApiSchemaListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiSchema operations. */ -export class WorkspaceApiSchemaImpl implements WorkspaceApiSchema { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiSchemaListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiSchemaListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiSchemaListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - workspaceId, - apiId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiSchemaListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - apiId, - options, - )) { - yield* page; - } - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiSchemaListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - options?: WorkspaceApiSchemaGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, schemaId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - options?: WorkspaceApiSchemaGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, schemaId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceApiSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceApiSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: WorkspaceApiSchemaDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - apiId, - schemaId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - nextLink: string, - options?: WorkspaceApiSchemaListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, apiId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiSchemaGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.WorkspaceApiSchemaGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.WorkspaceApiSchemaCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.WorkspaceApiSchemaCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.WorkspaceApiSchemaCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.SchemaContract, - headersMapper: Mappers.WorkspaceApiSchemaCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters11, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.force], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.apiId, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.apiId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiVersionSet.ts deleted file mode 100644 index 3e58404ea375..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceApiVersionSet.ts +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceApiVersionSet } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ApiVersionSetContract, - WorkspaceApiVersionSetListByServiceNextOptionalParams, - WorkspaceApiVersionSetListByServiceOptionalParams, - WorkspaceApiVersionSetListByServiceResponse, - WorkspaceApiVersionSetGetEntityTagOptionalParams, - WorkspaceApiVersionSetGetEntityTagResponse, - WorkspaceApiVersionSetGetOptionalParams, - WorkspaceApiVersionSetGetResponse, - WorkspaceApiVersionSetCreateOrUpdateOptionalParams, - WorkspaceApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - WorkspaceApiVersionSetUpdateOptionalParams, - WorkspaceApiVersionSetUpdateResponse, - WorkspaceApiVersionSetDeleteOptionalParams, - WorkspaceApiVersionSetListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceApiVersionSet operations. */ -export class WorkspaceApiVersionSetImpl implements WorkspaceApiVersionSet { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceApiVersionSet class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of API Version Sets in the specified workspace with a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiVersionSetListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiVersionSetListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceApiVersionSetListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiVersionSetListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of API Version Sets in the specified workspace with a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiVersionSetListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - options?: WorkspaceApiVersionSetGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, versionSetId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - options?: WorkspaceApiVersionSetGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, versionSetId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: WorkspaceApiVersionSetUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - ifMatch: string, - options?: WorkspaceApiVersionSetDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - versionSetId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceApiVersionSetListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceApiVersionSetGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.WorkspaceApiVersionSetGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.WorkspaceApiVersionSetCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.WorkspaceApiVersionSetCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetContract, - headersMapper: Mappers.WorkspaceApiVersionSetUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.versionSetId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ApiVersionSetCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceBackend.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceBackend.ts deleted file mode 100644 index c8b12559a5db..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceBackend.ts +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceBackend } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - BackendContract, - WorkspaceBackendListByWorkspaceNextOptionalParams, - WorkspaceBackendListByWorkspaceOptionalParams, - WorkspaceBackendListByWorkspaceResponse, - WorkspaceBackendGetEntityTagOptionalParams, - WorkspaceBackendGetEntityTagResponse, - WorkspaceBackendGetOptionalParams, - WorkspaceBackendGetResponse, - WorkspaceBackendCreateOrUpdateOptionalParams, - WorkspaceBackendCreateOrUpdateResponse, - BackendUpdateParameters, - WorkspaceBackendUpdateOptionalParams, - WorkspaceBackendUpdateResponse, - WorkspaceBackendDeleteOptionalParams, - WorkspaceBackendListByWorkspaceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceBackend operations. */ -export class WorkspaceBackendImpl implements WorkspaceBackend { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceBackend class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of backends in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceBackendListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceBackendListByWorkspaceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceBackendListByWorkspaceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceBackendListByWorkspaceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of backends in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceBackendListByWorkspaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByWorkspaceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - options?: WorkspaceBackendGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, backendId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - options?: WorkspaceBackendGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, backendId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - parameters: BackendContract, - options?: WorkspaceBackendCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - backendId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: WorkspaceBackendUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - ifMatch: string, - options?: WorkspaceBackendDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - backendId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceBackendListByWorkspaceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByWorkspaceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceBackendGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.WorkspaceBackendGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.WorkspaceBackendCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.WorkspaceBackendCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.BackendContract, - headersMapper: Mappers.WorkspaceBackendUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.backendId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackendCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceCertificate.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceCertificate.ts deleted file mode 100644 index 6d1f68f83994..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceCertificate.ts +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceCertificate } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - CertificateContract, - WorkspaceCertificateListByWorkspaceNextOptionalParams, - WorkspaceCertificateListByWorkspaceOptionalParams, - WorkspaceCertificateListByWorkspaceResponse, - WorkspaceCertificateGetEntityTagOptionalParams, - WorkspaceCertificateGetEntityTagResponse, - WorkspaceCertificateGetOptionalParams, - WorkspaceCertificateGetResponse, - CertificateCreateOrUpdateParameters, - WorkspaceCertificateCreateOrUpdateOptionalParams, - WorkspaceCertificateCreateOrUpdateResponse, - WorkspaceCertificateDeleteOptionalParams, - WorkspaceCertificateRefreshSecretOptionalParams, - WorkspaceCertificateRefreshSecretResponse, - WorkspaceCertificateListByWorkspaceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceCertificate operations. */ -export class WorkspaceCertificateImpl implements WorkspaceCertificate { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceCertificate class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of all certificates in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceCertificateListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceCertificateListByWorkspaceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceCertificateListByWorkspaceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceCertificateListByWorkspaceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of all certificates in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceCertificateListByWorkspaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByWorkspaceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, certificateId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, certificateId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: WorkspaceCertificateCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - certificateId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - ifMatch: string, - options?: WorkspaceCertificateDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - certificateId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateRefreshSecretOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, certificateId, options }, - refreshSecretOperationSpec, - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceCertificateListByWorkspaceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByWorkspaceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.isKeyVaultRefreshFailed, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceCertificateGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.WorkspaceCertificateGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.WorkspaceCertificateCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.WorkspaceCertificateCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.CertificateContract, - headersMapper: Mappers.WorkspaceCertificateRefreshSecretHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.certificateId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CertificateCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceDiagnostic.ts deleted file mode 100644 index 0888ff48324b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceDiagnostic.ts +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceDiagnostic } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - DiagnosticContract, - WorkspaceDiagnosticListByWorkspaceNextOptionalParams, - WorkspaceDiagnosticListByWorkspaceOptionalParams, - WorkspaceDiagnosticListByWorkspaceResponse, - WorkspaceDiagnosticGetEntityTagOptionalParams, - WorkspaceDiagnosticGetEntityTagResponse, - WorkspaceDiagnosticGetOptionalParams, - WorkspaceDiagnosticGetResponse, - WorkspaceDiagnosticCreateOrUpdateOptionalParams, - WorkspaceDiagnosticCreateOrUpdateResponse, - DiagnosticUpdateContract, - WorkspaceDiagnosticUpdateOptionalParams, - WorkspaceDiagnosticUpdateResponse, - WorkspaceDiagnosticDeleteOptionalParams, - WorkspaceDiagnosticListByWorkspaceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceDiagnostic operations. */ -export class WorkspaceDiagnosticImpl implements WorkspaceDiagnostic { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceDiagnostic class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all diagnostics in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceDiagnosticListByWorkspaceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists all diagnostics in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByWorkspaceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - options?: WorkspaceDiagnosticGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, diagnosticId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - options?: WorkspaceDiagnosticGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, diagnosticId, options }, - getOperationSpec, - ); - } - - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticUpdateContract, - options?: WorkspaceDiagnosticUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - ifMatch: string, - options?: WorkspaceDiagnosticDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - diagnosticId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceDiagnosticListByWorkspaceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByWorkspaceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceDiagnosticGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceDiagnosticGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceDiagnosticCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceDiagnosticCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticContract, - headersMapper: Mappers.WorkspaceDiagnosticUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters91, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.diagnosticId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DiagnosticCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGlobalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGlobalSchema.ts deleted file mode 100644 index 95c47e6cbd90..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGlobalSchema.ts +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceGlobalSchema } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - GlobalSchemaContract, - WorkspaceGlobalSchemaListByServiceNextOptionalParams, - WorkspaceGlobalSchemaListByServiceOptionalParams, - WorkspaceGlobalSchemaListByServiceResponse, - WorkspaceGlobalSchemaGetEntityTagOptionalParams, - WorkspaceGlobalSchemaGetEntityTagResponse, - WorkspaceGlobalSchemaGetOptionalParams, - WorkspaceGlobalSchemaGetResponse, - WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - WorkspaceGlobalSchemaCreateOrUpdateResponse, - WorkspaceGlobalSchemaDeleteOptionalParams, - WorkspaceGlobalSchemaListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceGlobalSchema operations. */ -export class WorkspaceGlobalSchemaImpl implements WorkspaceGlobalSchema { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceGlobalSchema class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of schemas registered with workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGlobalSchemaListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGlobalSchemaListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceGlobalSchemaListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGlobalSchemaListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of schemas registered with workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGlobalSchemaListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, schemaId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - options?: WorkspaceGlobalSchemaGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, schemaId, options }, - getOperationSpec, - ); - } - - /** - * Creates new or updates existing specified Schema of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceGlobalSchemaCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - schemaId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceGlobalSchemaCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates new or updates existing specified Schema of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - schemaId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - ifMatch: string, - options?: WorkspaceGlobalSchemaDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - schemaId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceGlobalSchemaListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceGlobalSchemaGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.WorkspaceGlobalSchemaGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.WorkspaceGlobalSchemaCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.WorkspaceGlobalSchemaCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.WorkspaceGlobalSchemaCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.GlobalSchemaContract, - headersMapper: Mappers.WorkspaceGlobalSchemaCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters78, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.schemaId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GlobalSchemaCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroup.ts deleted file mode 100644 index 9b2472805115..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroup.ts +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceGroup } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - GroupContract, - WorkspaceGroupListByServiceNextOptionalParams, - WorkspaceGroupListByServiceOptionalParams, - WorkspaceGroupListByServiceResponse, - WorkspaceGroupGetEntityTagOptionalParams, - WorkspaceGroupGetEntityTagResponse, - WorkspaceGroupGetOptionalParams, - WorkspaceGroupGetResponse, - GroupCreateParameters, - WorkspaceGroupCreateOrUpdateOptionalParams, - WorkspaceGroupCreateOrUpdateResponse, - GroupUpdateParameters, - WorkspaceGroupUpdateOptionalParams, - WorkspaceGroupUpdateResponse, - WorkspaceGroupDeleteOptionalParams, - WorkspaceGroupListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceGroup operations. */ -export class WorkspaceGroupImpl implements WorkspaceGroup { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceGroup class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of groups defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGroupListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGroupListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceGroupListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGroupListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of groups defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGroupListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - parameters: GroupCreateParameters, - options?: WorkspaceGroupCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - groupId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: WorkspaceGroupUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes specific group of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - ifMatch: string, - options?: WorkspaceGroupDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - groupId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceGroupListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceGroupGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.WorkspaceGroupGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.WorkspaceGroupCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.WorkspaceGroupCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.GroupContract, - headersMapper: Mappers.WorkspaceGroupUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.GroupCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroupUser.ts deleted file mode 100644 index 6edc81c45f4f..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceGroupUser.ts +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceGroupUser } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - UserContract, - WorkspaceGroupUserListNextOptionalParams, - WorkspaceGroupUserListOptionalParams, - WorkspaceGroupUserListResponse, - WorkspaceGroupUserCheckEntityExistsOptionalParams, - WorkspaceGroupUserCheckEntityExistsResponse, - WorkspaceGroupUserCreateOptionalParams, - WorkspaceGroupUserCreateResponse, - WorkspaceGroupUserDeleteOptionalParams, - WorkspaceGroupUserListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceGroupUser operations. */ -export class WorkspaceGroupUserImpl implements WorkspaceGroupUser { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceGroupUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupUserListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - workspaceId, - groupId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - workspaceId, - groupId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupUserListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceGroupUserListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - workspaceId, - groupId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - workspaceId, - groupId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupUserListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - workspaceId, - groupId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupUserListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, options }, - listOperationSpec, - ); - } - - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, userId, options }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, userId, options }, - createOperationSpec, - ); - } - - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, groupId, userId, options }, - deleteOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - nextLink: string, - options?: WorkspaceGroupUserListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - groupId, - nextLink, - options, - }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.UserContract, - }, - 201: { - bodyMapper: Mappers.UserContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.groupId, - Parameters.userId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.UserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.groupId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceLogger.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceLogger.ts deleted file mode 100644 index 2289ab95c612..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceLogger.ts +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceLogger } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - LoggerContract, - WorkspaceLoggerListByWorkspaceNextOptionalParams, - WorkspaceLoggerListByWorkspaceOptionalParams, - WorkspaceLoggerListByWorkspaceResponse, - WorkspaceLoggerGetEntityTagOptionalParams, - WorkspaceLoggerGetEntityTagResponse, - WorkspaceLoggerGetOptionalParams, - WorkspaceLoggerGetResponse, - WorkspaceLoggerCreateOrUpdateOptionalParams, - WorkspaceLoggerCreateOrUpdateResponse, - LoggerUpdateContract, - WorkspaceLoggerUpdateOptionalParams, - WorkspaceLoggerUpdateResponse, - WorkspaceLoggerDeleteOptionalParams, - WorkspaceLoggerListByWorkspaceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceLogger operations. */ -export class WorkspaceLoggerImpl implements WorkspaceLogger { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceLogger class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of loggers in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceLoggerListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceLoggerListByWorkspaceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceLoggerListByWorkspaceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByWorkspace( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceLoggerListByWorkspaceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of loggers in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceLoggerListByWorkspaceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByWorkspaceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - options?: WorkspaceLoggerGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, loggerId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - options?: WorkspaceLoggerGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, loggerId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - parameters: LoggerContract, - options?: WorkspaceLoggerCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - loggerId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: WorkspaceLoggerUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - ifMatch: string, - options?: WorkspaceLoggerDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - loggerId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceLoggerListByWorkspaceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByWorkspaceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceLoggerGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.WorkspaceLoggerGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.WorkspaceLoggerCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.WorkspaceLoggerCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.LoggerContract, - headersMapper: Mappers.WorkspaceLoggerUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.loggerId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LoggerCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNamedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNamedValue.ts deleted file mode 100644 index 76e5e3139ef8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNamedValue.ts +++ /dev/null @@ -1,901 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceNamedValue } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - NamedValueContract, - WorkspaceNamedValueListByServiceNextOptionalParams, - WorkspaceNamedValueListByServiceOptionalParams, - WorkspaceNamedValueListByServiceResponse, - WorkspaceNamedValueGetEntityTagOptionalParams, - WorkspaceNamedValueGetEntityTagResponse, - WorkspaceNamedValueGetOptionalParams, - WorkspaceNamedValueGetResponse, - NamedValueCreateContract, - WorkspaceNamedValueCreateOrUpdateOptionalParams, - WorkspaceNamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - WorkspaceNamedValueUpdateOptionalParams, - WorkspaceNamedValueUpdateResponse, - WorkspaceNamedValueDeleteOptionalParams, - WorkspaceNamedValueListValueOptionalParams, - WorkspaceNamedValueListValueResponse, - WorkspaceNamedValueRefreshSecretOptionalParams, - WorkspaceNamedValueRefreshSecretResponse, - WorkspaceNamedValueListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceNamedValue operations. */ -export class WorkspaceNamedValueImpl implements WorkspaceNamedValue { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceNamedValue class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of named values defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNamedValueListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNamedValueListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceNamedValueListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNamedValueListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of named values defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNamedValueListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, namedValueId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, namedValueId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceNamedValueCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: WorkspaceNamedValueUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - parameters, - options, - }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceNamedValueUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: WorkspaceNamedValueUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes specific named value from the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - options?: WorkspaceNamedValueDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueListValueOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, namedValueId, options }, - listValueOperationSpec, - ); - } - - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueRefreshSecretOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueRefreshSecretResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - options, - }, - spec: refreshSecretOperationSpec, - }); - const poller = await createHttpPoller< - WorkspaceNamedValueRefreshSecretResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - async beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueRefreshSecretOptionalParams, - ): Promise { - const poller = await this.beginRefreshSecret( - resourceGroupName, - serviceName, - workspaceId, - namedValueId, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceNamedValueListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.isKeyVaultRefreshFailed1, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceNamedValueGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listValueOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueSecretContract, - headersMapper: Mappers.WorkspaceNamedValueListValueHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const refreshSecretOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueRefreshSecretHeaders, - }, - 201: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueRefreshSecretHeaders, - }, - 202: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueRefreshSecretHeaders, - }, - 204: { - bodyMapper: Mappers.NamedValueContract, - headersMapper: Mappers.WorkspaceNamedValueRefreshSecretHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.namedValueId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NamedValueCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotification.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotification.ts deleted file mode 100644 index c734944c1ff7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotification.ts +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceNotification } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationContract, - WorkspaceNotificationListByServiceNextOptionalParams, - WorkspaceNotificationListByServiceOptionalParams, - WorkspaceNotificationListByServiceResponse, - NotificationName, - WorkspaceNotificationGetOptionalParams, - WorkspaceNotificationGetResponse, - WorkspaceNotificationCreateOrUpdateOptionalParams, - WorkspaceNotificationCreateOrUpdateResponse, - WorkspaceNotificationListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceNotification operations. */ -export class WorkspaceNotificationImpl implements WorkspaceNotification { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceNotification class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNotificationListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNotificationListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceNotificationListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNotificationListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNotificationListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - options, - }, - getOperationSpec, - ); - } - - /** - * Create or Update API Management publisher notification for the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceNotificationListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.NotificationContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.NotificationCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientEmail.ts deleted file mode 100644 index cd2533477c3b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientEmail.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { WorkspaceNotificationRecipientEmail } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationName, - WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, - WorkspaceNotificationRecipientEmailListByNotificationResponse, - WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, - WorkspaceNotificationRecipientEmailCheckEntityExistsResponse, - WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, - WorkspaceNotificationRecipientEmailCreateOrUpdateResponse, - WorkspaceNotificationRecipientEmailDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing WorkspaceNotificationRecipientEmail operations. */ -export class WorkspaceNotificationRecipientEmailImpl - implements WorkspaceNotificationRecipientEmail -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceNotificationRecipientEmail class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - options, - }, - listByNotificationOperationSpec, - ); - } - - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - options, - }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - email, - options, - }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientEmailContract, - }, - 201: { - bodyMapper: Mappers.RecipientEmailContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.email, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientUser.ts deleted file mode 100644 index d951f4ab0d55..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceNotificationRecipientUser.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { WorkspaceNotificationRecipientUser } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - NotificationName, - WorkspaceNotificationRecipientUserListByNotificationOptionalParams, - WorkspaceNotificationRecipientUserListByNotificationResponse, - WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, - WorkspaceNotificationRecipientUserCheckEntityExistsResponse, - WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, - WorkspaceNotificationRecipientUserCreateOrUpdateResponse, - WorkspaceNotificationRecipientUserDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing WorkspaceNotificationRecipientUser operations. */ -export class WorkspaceNotificationRecipientUserImpl - implements WorkspaceNotificationRecipientUser -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceNotificationRecipientUser class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - options, - }, - listByNotificationOperationSpec, - ); - } - - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - options, - }, - checkEntityExistsOperationSpec, - ); - } - - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - notificationName, - userId, - options, - }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByNotificationOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const checkEntityExistsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "HEAD", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.RecipientUserContract, - }, - 201: { - bodyMapper: Mappers.RecipientUserContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.userId, - Parameters.notificationName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicy.ts deleted file mode 100644 index e7c0db2d8aec..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicy.ts +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspacePolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - PolicyContract, - WorkspacePolicyListByApiNextOptionalParams, - WorkspacePolicyListByApiOptionalParams, - WorkspacePolicyListByApiResponse, - PolicyIdName, - WorkspacePolicyGetEntityTagOptionalParams, - WorkspacePolicyGetEntityTagResponse, - WorkspacePolicyGetOptionalParams, - WorkspacePolicyGetResponse, - WorkspacePolicyCreateOrUpdateOptionalParams, - WorkspacePolicyCreateOrUpdateResponse, - WorkspacePolicyDeleteOptionalParams, - WorkspacePolicyListByApiNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspacePolicy operations. */ -export class WorkspacePolicyImpl implements WorkspacePolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspacePolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the policy configuration at the workspace level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyListByApiOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByApiPagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByApiPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyListByApiOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspacePolicyListByApiResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByApi( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByApiNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByApiPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyListByApiOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByApiPagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Get the policy configuration at the workspace level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyListByApiOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByApiOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - options?: WorkspacePolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, policyId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - options?: WorkspacePolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, policyId, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspacePolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspacePolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByApiNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByApi method. - * @param options The options parameters. - */ - private _listByApiNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspacePolicyListByApiNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByApiNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByApiOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspacePolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspacePolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspacePolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspacePolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByApiNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicyFragment.ts deleted file mode 100644 index 2f80db3a3da7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspacePolicyFragment.ts +++ /dev/null @@ -1,579 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspacePolicyFragment } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - PolicyFragmentContract, - WorkspacePolicyFragmentListByServiceNextOptionalParams, - WorkspacePolicyFragmentListByServiceOptionalParams, - WorkspacePolicyFragmentListByServiceResponse, - WorkspacePolicyFragmentGetEntityTagOptionalParams, - WorkspacePolicyFragmentGetEntityTagResponse, - WorkspacePolicyFragmentGetOptionalParams, - WorkspacePolicyFragmentGetResponse, - WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - WorkspacePolicyFragmentCreateOrUpdateResponse, - WorkspacePolicyFragmentDeleteOptionalParams, - WorkspacePolicyFragmentListReferencesOptionalParams, - WorkspacePolicyFragmentListReferencesResponse, - WorkspacePolicyFragmentListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspacePolicyFragment operations. */ -export class WorkspacePolicyFragmentImpl implements WorkspacePolicyFragment { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspacePolicyFragment class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Gets all policy fragments defined within a workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyFragmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyFragmentListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspacePolicyFragmentListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyFragmentListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Gets all policy fragments defined within a workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyFragmentListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, id, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, id, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - parameters: PolicyFragmentContract, - options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspacePolicyFragmentCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - serviceName, - workspaceId, - id, - parameters, - options, - }, - spec: createOrUpdateOperationSpec, - }); - const poller = await createHttpPoller< - WorkspacePolicyFragmentCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - parameters: PolicyFragmentContract, - options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - serviceName, - workspaceId, - id, - parameters, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - ifMatch: string, - options?: WorkspacePolicyFragmentDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, id, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentListReferencesOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, id, options }, - listReferencesOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspacePolicyFragmentListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.orderby, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspacePolicyFragmentGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.WorkspacePolicyFragmentGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format2], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.WorkspacePolicyFragmentCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.WorkspacePolicyFragmentCreateOrUpdateHeaders, - }, - 202: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.WorkspacePolicyFragmentCreateOrUpdateHeaders, - }, - 204: { - bodyMapper: Mappers.PolicyFragmentContract, - headersMapper: Mappers.WorkspacePolicyFragmentCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listReferencesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ResourceCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.skip], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.id, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyFragmentCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProduct.ts deleted file mode 100644 index 0e22ec2ef055..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProduct.ts +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceProduct } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductContract, - WorkspaceProductListByServiceNextOptionalParams, - WorkspaceProductListByServiceOptionalParams, - WorkspaceProductListByServiceResponse, - WorkspaceProductGetEntityTagOptionalParams, - WorkspaceProductGetEntityTagResponse, - WorkspaceProductGetOptionalParams, - WorkspaceProductGetResponse, - WorkspaceProductCreateOrUpdateOptionalParams, - WorkspaceProductCreateOrUpdateResponse, - ProductUpdateParameters, - WorkspaceProductUpdateOptionalParams, - WorkspaceProductUpdateResponse, - WorkspaceProductDeleteOptionalParams, - WorkspaceProductListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceProduct operations. */ -export class WorkspaceProductImpl implements WorkspaceProduct { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceProduct class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of products in the specified workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceProductListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceProductListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceProductListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceProductListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of products in the specified workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceProductListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, productId, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, productId, options }, - getOperationSpec, - ); - } - - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - parameters: ProductContract, - options?: WorkspaceProductCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: WorkspaceProductUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - ifMatch: string, - options?: WorkspaceProductDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceProductListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.tags, - Parameters.expandGroups, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceProductGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.WorkspaceProductGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.WorkspaceProductCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.WorkspaceProductCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ProductContract, - headersMapper: Mappers.WorkspaceProductUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.deleteSubscriptions], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductApiLink.ts deleted file mode 100644 index e31e0654b7d7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductApiLink.ts +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceProductApiLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductApiLinkContract, - WorkspaceProductApiLinkListByProductNextOptionalParams, - WorkspaceProductApiLinkListByProductOptionalParams, - WorkspaceProductApiLinkListByProductResponse, - WorkspaceProductApiLinkGetOptionalParams, - WorkspaceProductApiLinkGetResponse, - WorkspaceProductApiLinkCreateOrUpdateOptionalParams, - WorkspaceProductApiLinkCreateOrUpdateResponse, - WorkspaceProductApiLinkDeleteOptionalParams, - WorkspaceProductApiLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceProductApiLink operations. */ -export class WorkspaceProductApiLinkImpl implements WorkspaceProductApiLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceProductApiLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductApiLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceProductApiLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - workspaceId, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductApiLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductApiLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the API link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - options?: WorkspaceProductApiLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - options, - }, - getOperationSpec, - ); - } - - /** - * Adds an API to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - parameters: ProductApiLinkContract, - options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - options?: WorkspaceProductApiLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - apiLinkId, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - nextLink: string, - options?: WorkspaceProductApiLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - nextLink, - options, - }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkContract, - headersMapper: Mappers.WorkspaceProductApiLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkContract, - }, - 201: { - bodyMapper: Mappers.ProductApiLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductGroupLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductGroupLink.ts deleted file mode 100644 index c56813b38539..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductGroupLink.ts +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceProductGroupLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - ProductGroupLinkContract, - WorkspaceProductGroupLinkListByProductNextOptionalParams, - WorkspaceProductGroupLinkListByProductOptionalParams, - WorkspaceProductGroupLinkListByProductResponse, - WorkspaceProductGroupLinkGetOptionalParams, - WorkspaceProductGroupLinkGetResponse, - WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, - WorkspaceProductGroupLinkCreateOrUpdateResponse, - WorkspaceProductGroupLinkDeleteOptionalParams, - WorkspaceProductGroupLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceProductGroupLink operations. */ -export class WorkspaceProductGroupLinkImpl - implements WorkspaceProductGroupLink -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceProductGroupLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGroupLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGroupLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceProductGroupLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - workspaceId, - productId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGroupLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - productId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGroupLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the group link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - options?: WorkspaceProductGroupLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - options, - }, - getOperationSpec, - ); - } - - /** - * Adds a group to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - parameters: ProductGroupLinkContract, - options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified group from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - options?: WorkspaceProductGroupLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - groupLinkId, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - nextLink: string, - options?: WorkspaceProductGroupLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - nextLink, - options, - }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkContract, - headersMapper: Mappers.WorkspaceProductGroupLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkContract, - }, - 201: { - bodyMapper: Mappers.ProductGroupLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.groupLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ProductGroupLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductPolicy.ts deleted file mode 100644 index aa1be4e98cf9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceProductPolicy.ts +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { WorkspaceProductPolicy } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - WorkspaceProductPolicyListByProductOptionalParams, - WorkspaceProductPolicyListByProductResponse, - PolicyIdName, - WorkspaceProductPolicyGetEntityTagOptionalParams, - WorkspaceProductPolicyGetEntityTagResponse, - WorkspaceProductPolicyGetOptionalParams, - WorkspaceProductPolicyGetResponse, - PolicyContract, - WorkspaceProductPolicyCreateOrUpdateOptionalParams, - WorkspaceProductPolicyCreateOrUpdateResponse, - WorkspaceProductPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Class containing WorkspaceProductPolicy operations. */ -export class WorkspaceProductPolicyImpl implements WorkspaceProductPolicy { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceProductPolicy class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductPolicyListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, productId, options }, - listByProductOperationSpec, - ); - } - - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - options?: WorkspaceProductPolicyGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - options, - }, - getEntityTagOperationSpec, - ); - } - - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - options?: WorkspaceProductPolicyGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceProductPolicyDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - productId, - policyId, - ifMatch, - options, - }, - deleteOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceProductPolicyGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceProductPolicyGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion, Parameters.format], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceProductPolicyCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.PolicyContract, - headersMapper: Mappers.WorkspaceProductPolicyCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.policyId, - Parameters.productId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceSubscription.ts deleted file mode 100644 index 47acc7798e6c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceSubscription.ts +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceSubscription } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - SubscriptionContract, - WorkspaceSubscriptionListNextOptionalParams, - WorkspaceSubscriptionListOptionalParams, - WorkspaceSubscriptionListResponse, - WorkspaceSubscriptionGetEntityTagOptionalParams, - WorkspaceSubscriptionGetEntityTagResponse, - WorkspaceSubscriptionGetOptionalParams, - WorkspaceSubscriptionGetResponse, - SubscriptionCreateParameters, - WorkspaceSubscriptionCreateOrUpdateOptionalParams, - WorkspaceSubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - WorkspaceSubscriptionUpdateOptionalParams, - WorkspaceSubscriptionUpdateResponse, - WorkspaceSubscriptionDeleteOptionalParams, - WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, - WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, - WorkspaceSubscriptionListSecretsOptionalParams, - WorkspaceSubscriptionListSecretsResponse, - WorkspaceSubscriptionListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceSubscription operations. */ -export class WorkspaceSubscriptionImpl implements WorkspaceSubscription { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceSubscription class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists all subscriptions of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceSubscriptionListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceSubscriptionListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceSubscriptionListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceSubscriptionListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists all subscriptions of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceSubscriptionListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listOperationSpec, - ); - } - - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionGetEntityTagOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, options }, - getEntityTagOperationSpec, - ); - } - - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, options }, - getOperationSpec, - ); - } - - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, parameters, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: WorkspaceSubscriptionUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - sid, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - ifMatch: string, - options?: WorkspaceSubscriptionDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * Regenerates primary key of existing subscription of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, options }, - regeneratePrimaryKeyOperationSpec, - ); - } - - /** - * Regenerates secondary key of existing subscription of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, options }, - regenerateSecondaryKeyOperationSpec, - ); - } - - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionListSecretsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, sid, options }, - listSecretsOperationSpec, - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceSubscriptionListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityTagOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceSubscriptionGetEntityTagHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.WorkspaceSubscriptionGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.WorkspaceSubscriptionCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.WorkspaceSubscriptionCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters79, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionContract, - headersMapper: Mappers.WorkspaceSubscriptionUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters80, - queryParameters: [ - Parameters.apiVersion, - Parameters.notify, - Parameters.appType, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listSecretsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionKeysContract, - headersMapper: Mappers.WorkspaceSubscriptionListSecretsHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.sid, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SubscriptionCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTag.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTag.ts deleted file mode 100644 index e5a5f15b2a43..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTag.ts +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceTag } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagContract, - WorkspaceTagListByServiceNextOptionalParams, - WorkspaceTagListByServiceOptionalParams, - WorkspaceTagListByServiceResponse, - WorkspaceTagGetEntityStateOptionalParams, - WorkspaceTagGetEntityStateResponse, - WorkspaceTagGetOptionalParams, - WorkspaceTagGetResponse, - TagCreateUpdateParameters, - WorkspaceTagCreateOrUpdateOptionalParams, - WorkspaceTagCreateOrUpdateResponse, - WorkspaceTagUpdateOptionalParams, - WorkspaceTagUpdateResponse, - WorkspaceTagDeleteOptionalParams, - WorkspaceTagListByServiceNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceTag operations. */ -export class WorkspaceTagImpl implements WorkspaceTag { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceTag class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of tags defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - public listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceTagListByServiceOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByServicePagingAll( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - settings, - ); - }, - }; - } - - private async *listByServicePagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceTagListByServiceOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceTagListByServiceResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByService( - resourceGroupName, - serviceName, - workspaceId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByServiceNext( - resourceGroupName, - serviceName, - workspaceId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByServicePagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceTagListByServiceOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByServicePagingPage( - resourceGroupName, - serviceName, - workspaceId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of tags defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - private _listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceTagListByServiceOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, options }, - listByServiceOperationSpec, - ); - } - - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagGetEntityStateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, options }, - getEntityStateOperationSpec, - ); - } - - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, options }, - getOperationSpec, - ); - } - - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: WorkspaceTagCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: WorkspaceTagUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - ifMatch, - parameters, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes specific tag of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - ifMatch: string, - options?: WorkspaceTagDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, ifMatch, options }, - deleteOperationSpec, - ); - } - - /** - * ListByServiceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param nextLink The nextLink from the previous successful call to the ListByService method. - * @param options The options parameters. - */ - private _listByServiceNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - nextLink: string, - options?: WorkspaceTagListByServiceNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, nextLink, options }, - listByServiceNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByServiceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - Parameters.scope, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getEntityStateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: Mappers.WorkspaceTagGetEntityStateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.WorkspaceTagGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.WorkspaceTagCreateOrUpdateHeaders, - }, - 201: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.WorkspaceTagCreateOrUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - ], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.TagContract, - headersMapper: Mappers.WorkspaceTagUpdateHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch1, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept, Parameters.ifMatch1], - serializer, -}; -const listByServiceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagApiLink.ts deleted file mode 100644 index 3997d389ef1e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagApiLink.ts +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceTagApiLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagApiLinkContract, - WorkspaceTagApiLinkListByProductNextOptionalParams, - WorkspaceTagApiLinkListByProductOptionalParams, - WorkspaceTagApiLinkListByProductResponse, - WorkspaceTagApiLinkGetOptionalParams, - WorkspaceTagApiLinkGetResponse, - WorkspaceTagApiLinkCreateOrUpdateOptionalParams, - WorkspaceTagApiLinkCreateOrUpdateResponse, - WorkspaceTagApiLinkDeleteOptionalParams, - WorkspaceTagApiLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceTagApiLink operations. */ -export class WorkspaceTagApiLinkImpl implements WorkspaceTagApiLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceTagApiLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagApiLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceTagApiLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - workspaceId, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagApiLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagApiLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the API link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - options?: WorkspaceTagApiLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - options, - }, - getOperationSpec, - ); - } - - /** - * Adds an API to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - parameters: TagApiLinkContract, - options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified API from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - options?: WorkspaceTagApiLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - apiLinkId, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - nextLink: string, - options?: WorkspaceTagApiLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkContract, - headersMapper: Mappers.WorkspaceTagApiLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkContract, - }, - 201: { - bodyMapper: Mappers.TagApiLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters81, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.apiLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagApiLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagOperationLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagOperationLink.ts deleted file mode 100644 index 772ce27d8b61..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagOperationLink.ts +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceTagOperationLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagOperationLinkContract, - WorkspaceTagOperationLinkListByProductNextOptionalParams, - WorkspaceTagOperationLinkListByProductOptionalParams, - WorkspaceTagOperationLinkListByProductResponse, - WorkspaceTagOperationLinkGetOptionalParams, - WorkspaceTagOperationLinkGetResponse, - WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, - WorkspaceTagOperationLinkCreateOrUpdateResponse, - WorkspaceTagOperationLinkDeleteOptionalParams, - WorkspaceTagOperationLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceTagOperationLink operations. */ -export class WorkspaceTagOperationLinkImpl - implements WorkspaceTagOperationLink -{ - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceTagOperationLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagOperationLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagOperationLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceTagOperationLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - workspaceId, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagOperationLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagOperationLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the operation link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - options?: WorkspaceTagOperationLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - options, - }, - getOperationSpec, - ); - } - - /** - * Adds an operation to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - parameters: TagOperationLinkContract, - options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified operation from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - options?: WorkspaceTagOperationLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - operationLinkId, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - nextLink: string, - options?: WorkspaceTagOperationLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkContract, - headersMapper: Mappers.WorkspaceTagOperationLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkContract, - }, - 201: { - bodyMapper: Mappers.TagOperationLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters82, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.operationLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagOperationLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagProductLink.ts b/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagProductLink.ts deleted file mode 100644 index 81246966a3a9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operations/workspaceTagProductLink.ts +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { WorkspaceTagProductLink } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { ApiManagementClient } from "../apiManagementClient.js"; -import { - TagProductLinkContract, - WorkspaceTagProductLinkListByProductNextOptionalParams, - WorkspaceTagProductLinkListByProductOptionalParams, - WorkspaceTagProductLinkListByProductResponse, - WorkspaceTagProductLinkGetOptionalParams, - WorkspaceTagProductLinkGetResponse, - WorkspaceTagProductLinkCreateOrUpdateOptionalParams, - WorkspaceTagProductLinkCreateOrUpdateResponse, - WorkspaceTagProductLinkDeleteOptionalParams, - WorkspaceTagProductLinkListByProductNextResponse, -} from "../models/index.js"; - -/// -/** Class containing WorkspaceTagProductLink operations. */ -export class WorkspaceTagProductLinkImpl implements WorkspaceTagProductLink { - private readonly client: ApiManagementClient; - - /** - * Initialize a new instance of the class WorkspaceTagProductLink class. - * @param client Reference to the service client - */ - constructor(client: ApiManagementClient) { - this.client = client; - } - - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - public listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagProductLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByProductPagingAll( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - settings, - ); - }, - }; - } - - private async *listByProductPagingPage( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagProductLinkListByProductOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: WorkspaceTagProductLinkListByProductResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByProduct( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByProductNext( - resourceGroupName, - serviceName, - workspaceId, - tagId, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByProductPagingAll( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagProductLinkListByProductOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByProductPagingPage( - resourceGroupName, - serviceName, - workspaceId, - tagId, - options, - )) { - yield* page; - } - } - - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - private _listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagProductLinkListByProductOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, options }, - listByProductOperationSpec, - ); - } - - /** - * Gets the product link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - options?: WorkspaceTagProductLinkGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - options, - }, - getOperationSpec, - ); - } - - /** - * Adds a product to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - parameters: TagProductLinkContract, - options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - parameters, - options, - }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes the specified product from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - options?: WorkspaceTagProductLinkDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - workspaceId, - tagId, - productLinkId, - options, - }, - deleteOperationSpec, - ); - } - - /** - * ListByProductNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param nextLink The nextLink from the previous successful call to the ListByProduct method. - * @param options The options parameters. - */ - private _listByProductNext( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - nextLink: string, - options?: WorkspaceTagProductLinkListByProductNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serviceName, workspaceId, tagId, nextLink, options }, - listByProductNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByProductOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.top, - Parameters.skip, - ], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkContract, - headersMapper: Mappers.WorkspaceTagProductLinkGetHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkContract, - }, - 201: { - bodyMapper: Mappers.TagProductLinkContract, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.parameters83, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.serviceName, - Parameters.tagId, - Parameters.productLinkId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByProductNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.TagProductLinkCollection, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.serviceName, - Parameters.tagId, - Parameters.workspaceId, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/allPolicies.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/allPolicies.ts deleted file mode 100644 index 04b53b3fbafb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/allPolicies.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AllPoliciesContract, - AllPoliciesListByServiceOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AllPolicies. */ -export interface AllPolicies { - /** - * Status of all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AllPoliciesListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts deleted file mode 100644 index f6a6721eadfa..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/api.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ApiContract, - ApiListByServiceOptionalParams, - TagResourceContract, - ApiListByTagsOptionalParams, - ApiGetEntityTagOptionalParams, - ApiGetEntityTagResponse, - ApiGetOptionalParams, - ApiGetResponse, - ApiCreateOrUpdateParameter, - ApiCreateOrUpdateOptionalParams, - ApiCreateOrUpdateResponse, - ApiUpdateContract, - ApiUpdateOptionalParams, - ApiUpdateResponse, - ApiDeleteOptionalParams, - ApiDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Api. */ -export interface Api { - /** - * Lists all APIs of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists a collection of apis associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ApiListByTagsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiGetOptionalParams, - ): Promise; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: ApiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: ApiUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams, - ): Promise< - SimplePollerLike, ApiDeleteResponse> - >; - /** - * Deletes the specified API of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts deleted file mode 100644 index 31b82d8b1cb9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiDiagnostic.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticContract, - ApiDiagnosticListByServiceOptionalParams, - ApiDiagnosticGetEntityTagOptionalParams, - ApiDiagnosticGetEntityTagResponse, - ApiDiagnosticGetOptionalParams, - ApiDiagnosticGetResponse, - ApiDiagnosticCreateOrUpdateOptionalParams, - ApiDiagnosticCreateOrUpdateResponse, - ApiDiagnosticUpdateOptionalParams, - ApiDiagnosticUpdateResponse, - ApiDiagnosticDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiDiagnostic. */ -export interface ApiDiagnostic { - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiDiagnosticListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - options?: ApiDiagnosticGetOptionalParams, - ): Promise; - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: ApiDiagnosticUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: ApiDiagnosticDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts deleted file mode 100644 index a0d55a367d15..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiExport.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ExportFormat, - ExportApi, - ApiExportGetOptionalParams, - ApiExportGetResponse, -} from "../models/index.js"; - -/** Interface representing a ApiExport. */ -export interface ApiExport { - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. New formats can be added in the future. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: ApiExportGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGateway.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGateway.ts deleted file mode 100644 index d8044a472789..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGateway.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ApiManagementGatewayResource, - ApiGatewayListByResourceGroupOptionalParams, - ApiGatewayListOptionalParams, - ApiGatewayCreateOrUpdateOptionalParams, - ApiGatewayCreateOrUpdateResponse, - ApiManagementGatewayUpdateParameters, - ApiGatewayUpdateOptionalParams, - ApiGatewayUpdateResponse, - ApiGatewayGetOptionalParams, - ApiGatewayGetResponse, - ApiGatewayDeleteOptionalParams, - ApiGatewayDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApiGateway. */ -export interface ApiGateway { - /** - * List all API Management gateways within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ApiGatewayListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * List all API Management gateways within a subscription. - * @param options The options parameters. - */ - list( - options?: ApiGatewayListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates or updates an API Management gateway. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayResource, - options?: ApiGatewayCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayCreateOrUpdateResponse - > - >; - /** - * Creates or updates an API Management gateway. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayResource, - options?: ApiGatewayCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayUpdateParameters, - options?: ApiGatewayUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayUpdateResponse - > - >; - /** - * Updates an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - parameters: ApiManagementGatewayUpdateParameters, - options?: ApiGatewayUpdateOptionalParams, - ): Promise; - /** - * Gets an API Management gateway resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayGetOptionalParams, - ): Promise; - /** - * Deletes an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayDeleteResponse - > - >; - /** - * Deletes an existing API Management gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGatewayConfigConnection.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGatewayConfigConnection.ts deleted file mode 100644 index 3d1ac3399a80..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiGatewayConfigConnection.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ApiManagementGatewayConfigConnectionResource, - ApiGatewayConfigConnectionListByGatewayOptionalParams, - ApiGatewayConfigConnectionGetOptionalParams, - ApiGatewayConfigConnectionGetResponse, - ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ApiGatewayConfigConnectionCreateOrUpdateResponse, - ApiGatewayConfigConnectionDeleteOptionalParams, - ApiGatewayConfigConnectionDeleteResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApiGatewayConfigConnection. */ -export interface ApiGatewayConfigConnection { - /** - * List all API Management gateway config connections within a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - listByGateway( - resourceGroupName: string, - gatewayName: string, - options?: ApiGatewayConfigConnectionListByGatewayOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets an API Management gateway config connection resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - options?: ApiGatewayConfigConnectionGetOptionalParams, - ): Promise; - /** - * Creates or updates an API Management gateway config connection. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway config connection - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - parameters: ApiManagementGatewayConfigConnectionResource, - options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayConfigConnectionCreateOrUpdateResponse - > - >; - /** - * Creates or updates an API Management gateway config connection. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param parameters Parameters supplied to the CreateOrUpdate API Management gateway config connection - * operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - parameters: ApiManagementGatewayConfigConnectionResource, - options?: ApiGatewayConfigConnectionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes an existing API Management gateway config connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - ifMatch: string, - options?: ApiGatewayConfigConnectionDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiGatewayConfigConnectionDeleteResponse - > - >; - /** - * Deletes an existing API Management gateway config connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param configConnectionName The name of the API Management gateway config connection. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - gatewayName: string, - configConnectionName: string, - ifMatch: string, - options?: ApiGatewayConfigConnectionDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts deleted file mode 100644 index 33aff4b41cee..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssue.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - IssueContract, - ApiIssueListByServiceOptionalParams, - ApiIssueGetEntityTagOptionalParams, - ApiIssueGetEntityTagResponse, - ApiIssueGetOptionalParams, - ApiIssueGetResponse, - ApiIssueCreateOrUpdateOptionalParams, - ApiIssueCreateOrUpdateResponse, - IssueUpdateContract, - ApiIssueUpdateOptionalParams, - ApiIssueUpdateResponse, - ApiIssueDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiIssue. */ -export interface ApiIssue { - /** - * Lists all issues associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiIssueListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Issue for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueGetOptionalParams, - ): Promise; - /** - * Creates a new Issue for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - parameters: IssueContract, - options?: ApiIssueCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing issue for an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - parameters: IssueUpdateContract, - options?: ApiIssueUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Issue from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - ifMatch: string, - options?: ApiIssueDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts deleted file mode 100644 index 076fd97e284b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueAttachment.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - IssueAttachmentContract, - ApiIssueAttachmentListByServiceOptionalParams, - ApiIssueAttachmentGetEntityTagOptionalParams, - ApiIssueAttachmentGetEntityTagResponse, - ApiIssueAttachmentGetOptionalParams, - ApiIssueAttachmentGetResponse, - ApiIssueAttachmentCreateOrUpdateOptionalParams, - ApiIssueAttachmentCreateOrUpdateResponse, - ApiIssueAttachmentDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiIssueAttachment. */ -export interface ApiIssueAttachment { - /** - * Lists all attachments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueAttachmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the issue Attachment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - options?: ApiIssueAttachmentGetOptionalParams, - ): Promise; - /** - * Creates a new Attachment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - parameters: IssueAttachmentContract, - options?: ApiIssueAttachmentCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param attachmentId Attachment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - attachmentId: string, - ifMatch: string, - options?: ApiIssueAttachmentDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts deleted file mode 100644 index 2f21f91e5c0e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiIssueComment.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - IssueCommentContract, - ApiIssueCommentListByServiceOptionalParams, - ApiIssueCommentGetEntityTagOptionalParams, - ApiIssueCommentGetEntityTagResponse, - ApiIssueCommentGetOptionalParams, - ApiIssueCommentGetResponse, - ApiIssueCommentCreateOrUpdateOptionalParams, - ApiIssueCommentCreateOrUpdateResponse, - ApiIssueCommentDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiIssueComment. */ -export interface ApiIssueComment { - /** - * Lists all comments for the Issue associated with the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - options?: ApiIssueCommentListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the issue Comment for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - options?: ApiIssueCommentGetOptionalParams, - ): Promise; - /** - * Creates a new Comment for the Issue in an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - parameters: IssueCommentContract, - options?: ApiIssueCommentCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified comment from an Issue. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param commentId Comment identifier within an Issue. Must be unique in the current Issue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - issueId: string, - commentId: string, - ifMatch: string, - options?: ApiIssueCommentDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementGatewaySkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementGatewaySkus.ts deleted file mode 100644 index 33e606ac31fb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementGatewaySkus.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GatewayResourceSkuResult, - ApiManagementGatewaySkusListAvailableSkusOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementGatewaySkus. */ -export interface ApiManagementGatewaySkus { - /** - * Gets all available SKU for a given API Management gateway - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the API Management gateway. - * @param options The options parameters. - */ - listAvailableSkus( - resourceGroupName: string, - gatewayName: string, - options?: ApiManagementGatewaySkusListAvailableSkusOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts deleted file mode 100644 index 78ce0dc8ca53..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementOperations.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - Operation, - ApiManagementOperationsListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementOperations. */ -export interface ApiManagementOperations { - /** - * Lists all of the available REST API operations of the Microsoft.ApiManagement provider. - * @param options The options parameters. - */ - list( - options?: ApiManagementOperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts deleted file mode 100644 index 7ecda6c49836..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementService.ts +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ApiManagementServiceResource, - ApiManagementServiceListByResourceGroupOptionalParams, - ApiManagementServiceListOptionalParams, - ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceRestoreOptionalParams, - ApiManagementServiceRestoreResponse, - ApiManagementServiceBackupOptionalParams, - ApiManagementServiceBackupResponse, - ApiManagementServiceCreateOrUpdateOptionalParams, - ApiManagementServiceCreateOrUpdateResponse, - ApiManagementServiceUpdateParameters, - ApiManagementServiceUpdateOptionalParams, - ApiManagementServiceUpdateResponse, - ApiManagementServiceGetOptionalParams, - ApiManagementServiceGetResponse, - ApiManagementServiceDeleteOptionalParams, - ApiManagementServiceMigrateToStv2OptionalParams, - ApiManagementServiceMigrateToStv2Response, - ApiManagementServiceGetSsoTokenOptionalParams, - ApiManagementServiceGetSsoTokenResponse, - ApiManagementServiceCheckNameAvailabilityParameters, - ApiManagementServiceCheckNameAvailabilityOptionalParams, - ApiManagementServiceCheckNameAvailabilityResponse, - ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ApiManagementServiceGetDomainOwnershipIdentifierResponse, - ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementService. */ -export interface ApiManagementService { - /** - * List all API Management services within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ApiManagementServiceListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all API Management services within an Azure subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementServiceListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestore( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceRestoreResponse - > - >; - /** - * Restores a backup of an API Management service created using the ApiManagementService_Backup - * operation on the current service. This is a long running operation and could take several minutes to - * complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the Restore API Management service from backup operation. - * @param options The options parameters. - */ - beginRestoreAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceRestoreOptionalParams, - ): Promise; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackup( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceBackupResponse - > - >; - /** - * Creates a backup of the API Management service to the given Azure Storage Account. This is long - * running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the ApiManagementService_Backup operation. - * @param options The options parameters. - */ - beginBackupAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceBackupRestoreParameters, - options?: ApiManagementServiceBackupOptionalParams, - ): Promise; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceCreateOrUpdateResponse - > - >; - /** - * Creates or updates an API Management service. This is long running operation and could take several - * minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceResource, - options?: ApiManagementServiceCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceUpdateResponse - > - >; - /** - * Updates an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Parameters supplied to the CreateOrUpdate API Management service operation. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - parameters: ApiManagementServiceUpdateParameters, - options?: ApiManagementServiceUpdateOptionalParams, - ): Promise; - /** - * Gets an API Management service resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetOptionalParams, - ): Promise; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes an existing API Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceDeleteOptionalParams, - ): Promise; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceMigrateToStv2Response - > - >; - /** - * Upgrades an API Management service to the Stv2 platform. For details refer to - * https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and - * could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginMigrateToStv2AndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceMigrateToStv2OptionalParams, - ): Promise; - /** - * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getSsoToken( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceGetSsoTokenOptionalParams, - ): Promise; - /** - * Checks availability and correctness of a name for an API Management service. - * @param parameters Parameters supplied to the CheckNameAvailability operation. - * @param options The options parameters. - */ - checkNameAvailability( - parameters: ApiManagementServiceCheckNameAvailabilityParameters, - options?: ApiManagementServiceCheckNameAvailabilityOptionalParams, - ): Promise; - /** - * Get the custom domain ownership identifier for an API Management service. - * @param options The options parameters. - */ - getDomainOwnershipIdentifier( - options?: ApiManagementServiceGetDomainOwnershipIdentifierOptionalParams, - ): Promise; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdates( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiManagementServiceApplyNetworkConfigurationUpdatesResponse - > - >; - /** - * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS - * changes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginApplyNetworkConfigurationUpdatesAndWait( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceApplyNetworkConfigurationUpdatesOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts deleted file mode 100644 index 8e066c0139d9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementServiceSkus.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ResourceSkuResult, - ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementServiceSkus. */ -export interface ApiManagementServiceSkus { - /** - * Gets all available SKU for a given API Management service - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listAvailableServiceSkus( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementServiceSkusListAvailableServiceSkusOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts deleted file mode 100644 index a6e276c24e2c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementSkus.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiManagementSku, - ApiManagementSkusListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementSkus. */ -export interface ApiManagementSkus { - /** - * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - * @param options The options parameters. - */ - list( - options?: ApiManagementSkusListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLink.ts deleted file mode 100644 index d26b0fabc934..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLink.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ApiManagementWorkspaceLinkGetOptionalParams, - ApiManagementWorkspaceLinkGetResponse, -} from "../models/index.js"; - -/** Interface representing a ApiManagementWorkspaceLink. */ -export interface ApiManagementWorkspaceLink { - /** - * Gets an API Management WorkspaceLink resource description. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: ApiManagementWorkspaceLinkGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLinks.ts deleted file mode 100644 index c43211222c89..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiManagementWorkspaceLinks.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiManagementWorkspaceLinksResource, - ApiManagementWorkspaceLinksListByServiceOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiManagementWorkspaceLinks. */ -export interface ApiManagementWorkspaceLinks { - /** - * List all API Management workspaceLinks for a service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiManagementWorkspaceLinksListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts deleted file mode 100644 index 817c6e9411e8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperation.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - OperationContract, - ApiOperationListByApiOptionalParams, - ApiOperationGetEntityTagOptionalParams, - ApiOperationGetEntityTagResponse, - ApiOperationGetOptionalParams, - ApiOperationGetResponse, - ApiOperationCreateOrUpdateOptionalParams, - ApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - ApiOperationUpdateOptionalParams, - ApiOperationUpdateResponse, - ApiOperationDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiOperation. */ -export interface ApiOperation { - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiOperationListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationGetOptionalParams, - ): Promise; - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: ApiOperationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: ApiOperationUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: ApiOperationDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts deleted file mode 100644 index a04fafe8aabf..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiOperationPolicy.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ApiOperationPolicyListByOperationOptionalParams, - ApiOperationPolicyListByOperationResponse, - PolicyIdName, - ApiOperationPolicyGetEntityTagOptionalParams, - ApiOperationPolicyGetEntityTagResponse, - ApiOperationPolicyGetOptionalParams, - ApiOperationPolicyGetResponse, - PolicyContract, - ApiOperationPolicyCreateOrUpdateOptionalParams, - ApiOperationPolicyCreateOrUpdateResponse, - ApiOperationPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a ApiOperationPolicy. */ -export interface ApiOperationPolicy { - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: ApiOperationPolicyListByOperationOptionalParams, - ): Promise; - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: ApiOperationPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiOperationPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiOperationPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts deleted file mode 100644 index ee676147bb04..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiPolicy.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ApiPolicyListByApiOptionalParams, - ApiPolicyListByApiResponse, - PolicyIdName, - ApiPolicyGetEntityTagOptionalParams, - ApiPolicyGetEntityTagResponse, - ApiPolicyGetOptionalParams, - ApiPolicyGetResponse, - PolicyContract, - ApiPolicyCreateOrUpdateOptionalParams, - ApiPolicyCreateOrUpdateResponse, - ApiPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a ApiPolicy. */ -export interface ApiPolicy { - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiPolicyListByApiOptionalParams, - ): Promise; - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - options?: ApiPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ApiPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ApiPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts deleted file mode 100644 index d545dbbc8134..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiProduct.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ProductContract, ApiProductListByApisOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a ApiProduct. */ -export interface ApiProduct { - /** - * Lists all Products, which the API is part of. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByApis( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiProductListByApisOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts deleted file mode 100644 index c02569243ac1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRelease.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiReleaseContract, - ApiReleaseListByServiceOptionalParams, - ApiReleaseGetEntityTagOptionalParams, - ApiReleaseGetEntityTagResponse, - ApiReleaseGetOptionalParams, - ApiReleaseGetResponse, - ApiReleaseCreateOrUpdateOptionalParams, - ApiReleaseCreateOrUpdateResponse, - ApiReleaseUpdateOptionalParams, - ApiReleaseUpdateResponse, - ApiReleaseDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiRelease. */ -export interface ApiRelease { - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiReleaseListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetEntityTagOptionalParams, - ): Promise; - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - options?: ApiReleaseGetOptionalParams, - ): Promise; - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: ApiReleaseCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: ApiReleaseUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: ApiReleaseDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts deleted file mode 100644 index eab31614f63a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiRevision.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiRevisionContract, - ApiRevisionListByServiceOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiRevision. */ -export interface ApiRevision { - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts deleted file mode 100644 index a10998ab6a59..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiSchema.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SchemaContract, - ApiSchemaListByApiOptionalParams, - ApiSchemaGetEntityTagOptionalParams, - ApiSchemaGetEntityTagResponse, - ApiSchemaGetOptionalParams, - ApiSchemaGetResponse, - ApiSchemaCreateOrUpdateOptionalParams, - ApiSchemaCreateOrUpdateResponse, - ApiSchemaDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiSchema. */ -export interface ApiSchema { - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiSchemaListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetEntityTagOptionalParams, - ): Promise; - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - options?: ApiSchemaGetOptionalParams, - ): Promise; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - ApiSchemaCreateOrUpdateResponse - > - >; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: ApiSchemaCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: ApiSchemaDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts deleted file mode 100644 index 19f80b1709c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiTagDescription.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagDescriptionContract, - ApiTagDescriptionListByServiceOptionalParams, - ApiTagDescriptionGetEntityTagOptionalParams, - ApiTagDescriptionGetEntityTagResponse, - ApiTagDescriptionGetOptionalParams, - ApiTagDescriptionGetResponse, - TagDescriptionCreateParameters, - ApiTagDescriptionCreateOrUpdateOptionalParams, - ApiTagDescriptionCreateOrUpdateResponse, - ApiTagDescriptionDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiTagDescription. */ -export interface ApiTagDescription { - /** - * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on - * API level but tag may be assigned to the Operations - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiTagDescriptionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetEntityTagOptionalParams, - ): Promise; - /** - * Get Tag description in scope of API - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - options?: ApiTagDescriptionGetOptionalParams, - ): Promise; - /** - * Create/Update tag description in scope of the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - parameters: TagDescriptionCreateParameters, - options?: ApiTagDescriptionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Delete tag description for the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagDescriptionId Tag description identifier. Used when creating tagDescription for API/Tag - * association. Based on API and Tag names. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagDescriptionId: string, - ifMatch: string, - options?: ApiTagDescriptionDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts deleted file mode 100644 index ac2abdbfd90a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiVersionSet.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiVersionSetContract, - ApiVersionSetListByServiceOptionalParams, - ApiVersionSetGetEntityTagOptionalParams, - ApiVersionSetGetEntityTagResponse, - ApiVersionSetGetOptionalParams, - ApiVersionSetGetResponse, - ApiVersionSetCreateOrUpdateOptionalParams, - ApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - ApiVersionSetUpdateOptionalParams, - ApiVersionSetUpdateResponse, - ApiVersionSetDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ApiVersionSet. */ -export interface ApiVersionSet { - /** - * Lists a collection of API Version Sets in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ApiVersionSetListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - options?: ApiVersionSetGetOptionalParams, - ): Promise; - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: ApiVersionSetCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: ApiVersionSetUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - versionSetId: string, - ifMatch: string, - options?: ApiVersionSetDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts deleted file mode 100644 index c0f3f9bf02be..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWiki.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ApiWikiGetEntityTagOptionalParams, - ApiWikiGetEntityTagResponse, - ApiWikiGetOptionalParams, - ApiWikiGetResponse, - WikiContract, - ApiWikiCreateOrUpdateOptionalParams, - ApiWikiCreateOrUpdateResponse, - WikiUpdateContract, - ApiWikiUpdateOptionalParams, - ApiWikiUpdateResponse, - ApiWikiDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a ApiWiki. */ -export interface ApiWiki { - /** - * Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikiGetOptionalParams, - ): Promise; - /** - * Creates a new Wiki for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - parameters: WikiContract, - options?: ApiWikiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Wiki for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ApiWikiUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Wiki from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - ifMatch: string, - options?: ApiWikiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts deleted file mode 100644 index 9b54028a0cb2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/apiWikis.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ApiWikisListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a ApiWikis. */ -export interface ApiWikis { - /** - * Gets the wikis for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: ApiWikisListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts deleted file mode 100644 index 5e4ddc8cb72c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorization.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AuthorizationContract, - AuthorizationListByAuthorizationProviderOptionalParams, - AuthorizationGetOptionalParams, - AuthorizationGetResponse, - AuthorizationCreateOrUpdateOptionalParams, - AuthorizationCreateOrUpdateResponse, - AuthorizationDeleteOptionalParams, - AuthorizationConfirmConsentCodeRequestContract, - AuthorizationConfirmConsentCodeOptionalParams, - AuthorizationConfirmConsentCodeResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Authorization. */ -export interface Authorization { - /** - * Lists a collection of authorization providers defined within a authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - listByAuthorizationProvider( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationListByAuthorizationProviderOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationGetOptionalParams, - ): Promise; - /** - * Creates or updates authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationContract, - options?: AuthorizationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Authorization from the Authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - ifMatch: string, - options?: AuthorizationDeleteOptionalParams, - ): Promise; - /** - * Confirm valid consent code to suppress Authorizations anti-phishing page. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - confirmConsentCode( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationConfirmConsentCodeRequestContract, - options?: AuthorizationConfirmConsentCodeOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts deleted file mode 100644 index 29d4f874b80d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationAccessPolicy.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AuthorizationAccessPolicyContract, - AuthorizationAccessPolicyListByAuthorizationOptionalParams, - AuthorizationAccessPolicyGetOptionalParams, - AuthorizationAccessPolicyGetResponse, - AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - AuthorizationAccessPolicyCreateOrUpdateResponse, - AuthorizationAccessPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AuthorizationAccessPolicy. */ -export interface AuthorizationAccessPolicy { - /** - * Lists a collection of authorization access policy defined within a authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param options The options parameters. - */ - listByAuthorization( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - options?: AuthorizationAccessPolicyListByAuthorizationOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization access policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - options?: AuthorizationAccessPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates Authorization Access Policy. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - parameters: AuthorizationAccessPolicyContract, - options?: AuthorizationAccessPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific access policy from the Authorization. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param authorizationAccessPolicyId Identifier of the authorization access policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - authorizationAccessPolicyId: string, - ifMatch: string, - options?: AuthorizationAccessPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts deleted file mode 100644 index 076793363b72..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationLoginLinks.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - AuthorizationLoginRequestContract, - AuthorizationLoginLinksPostOptionalParams, - AuthorizationLoginLinksPostResponse, -} from "../models/index.js"; - -/** Interface representing a AuthorizationLoginLinks. */ -export interface AuthorizationLoginLinks { - /** - * Gets authorization login links. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param authorizationId Identifier of the authorization. - * @param parameters Create parameters. - * @param options The options parameters. - */ - post( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - authorizationId: string, - parameters: AuthorizationLoginRequestContract, - options?: AuthorizationLoginLinksPostOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts deleted file mode 100644 index 5919a0c7bf3d..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationProvider.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AuthorizationProviderContract, - AuthorizationProviderListByServiceOptionalParams, - AuthorizationProviderGetOptionalParams, - AuthorizationProviderGetResponse, - AuthorizationProviderCreateOrUpdateOptionalParams, - AuthorizationProviderCreateOrUpdateResponse, - AuthorizationProviderDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a AuthorizationProvider. */ -export interface AuthorizationProvider { - /** - * Lists a collection of authorization providers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the authorization provider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - options?: AuthorizationProviderGetOptionalParams, - ): Promise; - /** - * Creates or updates authorization provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - parameters: AuthorizationProviderContract, - options?: AuthorizationProviderCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific authorization provider from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authorizationProviderId Identifier of the authorization provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authorizationProviderId: string, - ifMatch: string, - options?: AuthorizationProviderDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts deleted file mode 100644 index 623adf015d57..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/authorizationServer.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AuthorizationServerContract, - AuthorizationServerListByServiceOptionalParams, - AuthorizationServerGetEntityTagOptionalParams, - AuthorizationServerGetEntityTagResponse, - AuthorizationServerGetOptionalParams, - AuthorizationServerGetResponse, - AuthorizationServerCreateOrUpdateOptionalParams, - AuthorizationServerCreateOrUpdateResponse, - AuthorizationServerUpdateContract, - AuthorizationServerUpdateOptionalParams, - AuthorizationServerUpdateResponse, - AuthorizationServerDeleteOptionalParams, - AuthorizationServerListSecretsOptionalParams, - AuthorizationServerListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a AuthorizationServer. */ -export interface AuthorizationServer { - /** - * Lists a collection of authorization servers defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: AuthorizationServerListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerGetOptionalParams, - ): Promise; - /** - * Creates new authorization server or updates an existing authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - authsid: string, - parameters: AuthorizationServerContract, - options?: AuthorizationServerCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the authorization server specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters OAuth2 Server settings Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - parameters: AuthorizationServerUpdateContract, - options?: AuthorizationServerUpdateOptionalParams, - ): Promise; - /** - * Deletes specific authorization server instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - authsid: string, - ifMatch: string, - options?: AuthorizationServerDeleteOptionalParams, - ): Promise; - /** - * Gets the client secret details of the authorization server. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param authsid Identifier of the authorization server. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - authsid: string, - options?: AuthorizationServerListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts deleted file mode 100644 index 1bc1b21b4152..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/backend.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - BackendContract, - BackendListByServiceOptionalParams, - BackendGetEntityTagOptionalParams, - BackendGetEntityTagResponse, - BackendGetOptionalParams, - BackendGetResponse, - BackendCreateOrUpdateOptionalParams, - BackendCreateOrUpdateResponse, - BackendUpdateParameters, - BackendUpdateOptionalParams, - BackendUpdateResponse, - BackendDeleteOptionalParams, - BackendReconnectOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Backend. */ -export interface Backend { - /** - * Lists a collection of backends in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: BackendListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendGetOptionalParams, - ): Promise; - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - backendId: string, - parameters: BackendContract, - options?: BackendCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: BackendUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - backendId: string, - ifMatch: string, - options?: BackendDeleteOptionalParams, - ): Promise; - /** - * Notifies the API Management gateway to create a new connection to the backend after the specified - * timeout. If no timeout was specified, timeout of 2 minutes is used. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - reconnect( - resourceGroupName: string, - serviceName: string, - backendId: string, - options?: BackendReconnectOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts deleted file mode 100644 index 91ea2496474b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/cache.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - CacheContract, - CacheListByServiceOptionalParams, - CacheGetEntityTagOptionalParams, - CacheGetEntityTagResponse, - CacheGetOptionalParams, - CacheGetResponse, - CacheCreateOrUpdateOptionalParams, - CacheCreateOrUpdateResponse, - CacheUpdateParameters, - CacheUpdateOptionalParams, - CacheUpdateResponse, - CacheDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Cache. */ -export interface Cache { - /** - * Lists a collection of all external Caches in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CacheListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - cacheId: string, - options?: CacheGetOptionalParams, - ): Promise; - /** - * Creates or updates an External Cache to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - cacheId: string, - parameters: CacheContract, - options?: CacheCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the cache specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - parameters: CacheUpdateParameters, - options?: CacheUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Cache. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param cacheId Identifier of the Cache entity. Cache identifier (should be either 'default' or valid - * Azure region identifier). - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - cacheId: string, - ifMatch: string, - options?: CacheDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts deleted file mode 100644 index 5afa2dfe9fd7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/certificate.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - CertificateContract, - CertificateListByServiceOptionalParams, - CertificateGetEntityTagOptionalParams, - CertificateGetEntityTagResponse, - CertificateGetOptionalParams, - CertificateGetResponse, - CertificateCreateOrUpdateParameters, - CertificateCreateOrUpdateOptionalParams, - CertificateCreateOrUpdateResponse, - CertificateDeleteOptionalParams, - CertificateRefreshSecretOptionalParams, - CertificateRefreshSecretResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Certificate. */ -export interface Certificate { - /** - * Lists a collection of all certificates in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: CertificateListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateGetOptionalParams, - ): Promise; - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: CertificateCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - certificateId: string, - ifMatch: string, - options?: CertificateDeleteOptionalParams, - ): Promise; - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - certificateId: string, - options?: CertificateRefreshSecretOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts deleted file mode 100644 index 0a8e089d3c4a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentItem.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ContentItemContract, - ContentItemListByServiceOptionalParams, - ContentItemGetEntityTagOptionalParams, - ContentItemGetEntityTagResponse, - ContentItemGetOptionalParams, - ContentItemGetResponse, - ContentItemCreateOrUpdateOptionalParams, - ContentItemCreateOrUpdateResponse, - ContentItemDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ContentItem. */ -export interface ContentItem { - /** - * Lists developer portal's content items specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentItemListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns the entity state (ETag) version of the developer portal's content item specified by its - * identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetEntityTagOptionalParams, - ): Promise; - /** - * Returns the developer portal's content item specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - options?: ContentItemGetOptionalParams, - ): Promise; - /** - * Creates a new developer portal's content item specified by the provided content type. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - parameters: ContentItemContract, - options?: ContentItemCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the specified developer portal's content item. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param contentItemId Content item identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - contentItemId: string, - ifMatch: string, - options?: ContentItemDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts deleted file mode 100644 index 638e5e1c5fc9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/contentType.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ContentTypeContract, - ContentTypeListByServiceOptionalParams, - ContentTypeGetOptionalParams, - ContentTypeGetResponse, - ContentTypeCreateOrUpdateOptionalParams, - ContentTypeCreateOrUpdateResponse, - ContentTypeDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ContentType. */ -export interface ContentType { - /** - * Lists the developer portal's content types. Content types describe content items' properties, - * validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ContentTypeListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - options?: ContentTypeGetOptionalParams, - ): Promise; - /** - * Creates or updates the developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Custom content types' identifiers need to start with - * the `c-` prefix. Built-in content types can't be modified. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - parameters: ContentTypeContract, - options?: ContentTypeCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the specified developer portal's content type. Content types describe content items' - * properties, validation rules, and constraints. Built-in content types (with identifiers starting - * with the `c-` prefix) can't be removed. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param contentTypeId Content type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - contentTypeId: string, - ifMatch: string, - options?: ContentTypeDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts deleted file mode 100644 index 82e4264a8b31..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/delegationSettings.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - DelegationSettingsGetEntityTagOptionalParams, - DelegationSettingsGetEntityTagResponse, - DelegationSettingsGetOptionalParams, - DelegationSettingsGetResponse, - PortalDelegationSettings, - DelegationSettingsUpdateOptionalParams, - DelegationSettingsCreateOrUpdateOptionalParams, - DelegationSettingsCreateOrUpdateResponse, - DelegationSettingsListSecretsOptionalParams, - DelegationSettingsListSecretsResponse, -} from "../models/index.js"; - -/** Interface representing a DelegationSettings. */ -export interface DelegationSettings { - /** - * Gets the entity state (Etag) version of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetEntityTagOptionalParams, - ): Promise; - /** - * Get Delegation Settings for the Portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsGetOptionalParams, - ): Promise; - /** - * Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Delegation settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsUpdateOptionalParams, - ): Promise; - /** - * Create or Update Delegation settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalDelegationSettings, - options?: DelegationSettingsCreateOrUpdateOptionalParams, - ): Promise; - /** - * Gets the secret validation key of the DelegationSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - options?: DelegationSettingsListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts deleted file mode 100644 index b44af4a28e10..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/deletedServices.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - DeletedServiceContract, - DeletedServicesListBySubscriptionOptionalParams, - DeletedServicesGetByNameOptionalParams, - DeletedServicesGetByNameResponse, - DeletedServicesPurgeOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a DeletedServices. */ -export interface DeletedServices { - /** - * Lists all soft-deleted services available for undelete for the given subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: DeletedServicesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get soft-deleted Api Management Service by name. - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - getByName( - serviceName: string, - location: string, - options?: DeletedServicesGetByNameOptionalParams, - ): Promise; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurge( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams, - ): Promise, void>>; - /** - * Purges Api Management Service (deletes it with no option to undelete). - * @param serviceName The name of the API Management service. - * @param location The location of the deleted API Management service. - * @param options The options parameters. - */ - beginPurgeAndWait( - serviceName: string, - location: string, - options?: DeletedServicesPurgeOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts deleted file mode 100644 index 820e7fa61299..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/diagnostic.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticContract, - DiagnosticListByServiceOptionalParams, - DiagnosticGetEntityTagOptionalParams, - DiagnosticGetEntityTagResponse, - DiagnosticGetOptionalParams, - DiagnosticGetResponse, - DiagnosticCreateOrUpdateOptionalParams, - DiagnosticCreateOrUpdateResponse, - DiagnosticUpdateOptionalParams, - DiagnosticUpdateResponse, - DiagnosticDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Diagnostic. */ -export interface Diagnostic { - /** - * Lists all diagnostics of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DiagnosticListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - options?: DiagnosticGetOptionalParams, - ): Promise; - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: DiagnosticCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticContract, - options?: DiagnosticUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - diagnosticId: string, - ifMatch: string, - options?: DiagnosticDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts deleted file mode 100644 index fa9b6d0addc2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/documentation.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DocumentationContract, - DocumentationListByServiceOptionalParams, - DocumentationGetEntityTagOptionalParams, - DocumentationGetEntityTagResponse, - DocumentationGetOptionalParams, - DocumentationGetResponse, - DocumentationCreateOrUpdateOptionalParams, - DocumentationCreateOrUpdateResponse, - DocumentationUpdateContract, - DocumentationUpdateOptionalParams, - DocumentationUpdateResponse, - DocumentationDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Documentation. */ -export interface Documentation { - /** - * Lists all Documentations of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: DocumentationListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Documentation by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Documentation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - documentationId: string, - options?: DocumentationGetOptionalParams, - ): Promise; - /** - * Creates a new Documentation or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - documentationId: string, - parameters: DocumentationContract, - options?: DocumentationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Documentation for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Documentation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - parameters: DocumentationUpdateContract, - options?: DocumentationUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Documentation from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param documentationId Documentation identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - documentationId: string, - ifMatch: string, - options?: DocumentationDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts deleted file mode 100644 index c7195477d4c9..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/emailTemplate.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - EmailTemplateContract, - EmailTemplateListByServiceOptionalParams, - TemplateName, - EmailTemplateGetEntityTagOptionalParams, - EmailTemplateGetEntityTagResponse, - EmailTemplateGetOptionalParams, - EmailTemplateGetResponse, - EmailTemplateUpdateParameters, - EmailTemplateCreateOrUpdateOptionalParams, - EmailTemplateCreateOrUpdateResponse, - EmailTemplateUpdateOptionalParams, - EmailTemplateUpdateResponse, - EmailTemplateDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a EmailTemplate. */ -export interface EmailTemplate { - /** - * Gets all email templates - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: EmailTemplateListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the email template specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - options?: EmailTemplateGetOptionalParams, - ): Promise; - /** - * Updates an Email Template. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param parameters Email Template update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates API Management email template - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - parameters: EmailTemplateUpdateParameters, - options?: EmailTemplateUpdateOptionalParams, - ): Promise; - /** - * Reset the Email Template to default template provided by the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param templateName Email Template Name Identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - templateName: TemplateName, - ifMatch: string, - options?: EmailTemplateDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts deleted file mode 100644 index 081925dc5cf2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gateway.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GatewayContract, - GatewayListByServiceOptionalParams, - GatewayGetEntityTagOptionalParams, - GatewayGetEntityTagResponse, - GatewayGetOptionalParams, - GatewayGetResponse, - GatewayCreateOrUpdateOptionalParams, - GatewayCreateOrUpdateResponse, - GatewayUpdateOptionalParams, - GatewayUpdateResponse, - GatewayDeleteOptionalParams, - GatewayListKeysOptionalParams, - GatewayListKeysResponse, - GatewayKeyRegenerationRequestContract, - GatewayRegenerateKeyOptionalParams, - GatewayTokenRequestContract, - GatewayGenerateTokenOptionalParams, - GatewayGenerateTokenResponse, - GatewayInvalidateDebugCredentialsOptionalParams, - GatewayListDebugCredentialsContract, - GatewayListDebugCredentialsOptionalParams, - GatewayListDebugCredentialsResponse, - GatewayListTraceContract, - GatewayListTraceOptionalParams, - GatewayListTraceResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Gateway. */ -export interface Gateway { - /** - * Lists a collection of gateways registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GatewayListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayGetOptionalParams, - ): Promise; - /** - * Creates or updates a Gateway to be used in Api Management instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayContract, - options?: GatewayCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the gateway specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Gateway details. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - parameters: GatewayContract, - options?: GatewayUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - ifMatch: string, - options?: GatewayDeleteOptionalParams, - ): Promise; - /** - * Retrieves gateway keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listKeys( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayListKeysOptionalParams, - ): Promise; - /** - * Regenerates specified gateway key invalidating any tokens created with it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway key regeneration request contract properties. - * @param options The options parameters. - */ - regenerateKey( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayKeyRegenerationRequestContract, - options?: GatewayRegenerateKeyOptionalParams, - ): Promise; - /** - * Gets the Shared Access Authorization Token for the gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters Gateway token request contract properties. - * @param options The options parameters. - */ - generateToken( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayTokenRequestContract, - options?: GatewayGenerateTokenOptionalParams, - ): Promise; - /** - * Action is invalidating all debug credentials issued for gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - invalidateDebugCredentials( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayInvalidateDebugCredentialsOptionalParams, - ): Promise; - /** - * Create new debug credentials for gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters List debug credentials properties. - * @param options The options parameters. - */ - listDebugCredentials( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayListDebugCredentialsContract, - options?: GatewayListDebugCredentialsOptionalParams, - ): Promise; - /** - * Fetches trace collected by gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param parameters List trace properties. - * @param options The options parameters. - */ - listTrace( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - parameters: GatewayListTraceContract, - options?: GatewayListTraceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts deleted file mode 100644 index c503d7ac9f7e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayApi.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiContract, - GatewayApiListByServiceOptionalParams, - GatewayApiGetEntityTagOptionalParams, - GatewayApiGetEntityTagResponse, - GatewayApiCreateOrUpdateOptionalParams, - GatewayApiCreateOrUpdateResponse, - GatewayApiDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GatewayApi. */ -export interface GatewayApi { - /** - * Lists a collection of the APIs associated with a gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiGetEntityTagOptionalParams, - ): Promise; - /** - * Adds an API to the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - apiId: string, - options?: GatewayApiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts deleted file mode 100644 index b8ca7eba90c5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayCertificateAuthority.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GatewayCertificateAuthorityContract, - GatewayCertificateAuthorityListByServiceOptionalParams, - GatewayCertificateAuthorityGetEntityTagOptionalParams, - GatewayCertificateAuthorityGetEntityTagResponse, - GatewayCertificateAuthorityGetOptionalParams, - GatewayCertificateAuthorityGetResponse, - GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - GatewayCertificateAuthorityCreateOrUpdateResponse, - GatewayCertificateAuthorityDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GatewayCertificateAuthority. */ -export interface GatewayCertificateAuthority { - /** - * Lists the collection of Certificate Authorities for the specified Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayCertificateAuthorityListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetEntityTagOptionalParams, - ): Promise; - /** - * Get assigned Gateway Certificate Authority details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - options?: GatewayCertificateAuthorityGetOptionalParams, - ): Promise; - /** - * Assign Certificate entity to Gateway entity as Certificate Authority. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Gateway certificate authority details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - parameters: GatewayCertificateAuthorityContract, - options?: GatewayCertificateAuthorityCreateOrUpdateOptionalParams, - ): Promise; - /** - * Remove relationship between Certificate Authority and Gateway entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - certificateId: string, - ifMatch: string, - options?: GatewayCertificateAuthorityDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts deleted file mode 100644 index 0fa5144e3fa5..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/gatewayHostnameConfiguration.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GatewayHostnameConfigurationContract, - GatewayHostnameConfigurationListByServiceOptionalParams, - GatewayHostnameConfigurationGetEntityTagOptionalParams, - GatewayHostnameConfigurationGetEntityTagResponse, - GatewayHostnameConfigurationGetOptionalParams, - GatewayHostnameConfigurationGetResponse, - GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - GatewayHostnameConfigurationCreateOrUpdateResponse, - GatewayHostnameConfigurationDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GatewayHostnameConfiguration. */ -export interface GatewayHostnameConfiguration { - /** - * Lists the collection of hostname configurations for the specified gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - options?: GatewayHostnameConfigurationListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that hostname configuration entity specified by identifier exists for specified Gateway - * entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetEntityTagOptionalParams, - ): Promise; - /** - * Get details of a hostname configuration - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - options?: GatewayHostnameConfigurationGetOptionalParams, - ): Promise; - /** - * Creates of updates hostname configuration for a Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param parameters Gateway hostname configuration details. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - parameters: GatewayHostnameConfigurationContract, - options?: GatewayHostnameConfigurationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified hostname configuration from the specified Gateway. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param gatewayId Gateway entity identifier. Must be unique in the current API Management service - * instance. Must not have value 'managed' - * @param hcId Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway - * entity. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - gatewayId: string, - hcId: string, - ifMatch: string, - options?: GatewayHostnameConfigurationDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts deleted file mode 100644 index 3f4bc7803dde..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/globalSchema.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - GlobalSchemaContract, - GlobalSchemaListByServiceOptionalParams, - GlobalSchemaGetEntityTagOptionalParams, - GlobalSchemaGetEntityTagResponse, - GlobalSchemaGetOptionalParams, - GlobalSchemaGetResponse, - GlobalSchemaCreateOrUpdateOptionalParams, - GlobalSchemaCreateOrUpdateResponse, - GlobalSchemaDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GlobalSchema. */ -export interface GlobalSchema { - /** - * Lists a collection of schemas registered with service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GlobalSchemaListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - schemaId: string, - options?: GlobalSchemaGetOptionalParams, - ): Promise; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - GlobalSchemaCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified Schema of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: GlobalSchemaCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - schemaId: string, - ifMatch: string, - options?: GlobalSchemaDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts deleted file mode 100644 index 0d290e17a1bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolver.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ResolverContract, - GraphQLApiResolverListByApiOptionalParams, - GraphQLApiResolverGetEntityTagOptionalParams, - GraphQLApiResolverGetEntityTagResponse, - GraphQLApiResolverGetOptionalParams, - GraphQLApiResolverGetResponse, - GraphQLApiResolverCreateOrUpdateOptionalParams, - GraphQLApiResolverCreateOrUpdateResponse, - ResolverUpdateContract, - GraphQLApiResolverUpdateOptionalParams, - GraphQLApiResolverUpdateResponse, - GraphQLApiResolverDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GraphQLApiResolver. */ -export interface GraphQLApiResolver { - /** - * Lists a collection of the resolvers for the specified GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: GraphQLApiResolverListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the GraphQL API Resolver specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverGetOptionalParams, - ): Promise; - /** - * Creates a new resolver in the GraphQL API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - parameters: ResolverContract, - options?: GraphQLApiResolverCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the resolver in the GraphQL API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters GraphQL API Resolver Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - parameters: ResolverUpdateContract, - options?: GraphQLApiResolverUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified resolver in the GraphQL API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - ifMatch: string, - options?: GraphQLApiResolverDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts deleted file mode 100644 index 872b603d77c1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/graphQLApiResolverPolicy.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - GraphQLApiResolverPolicyListByResolverOptionalParams, - PolicyIdName, - GraphQLApiResolverPolicyGetEntityTagOptionalParams, - GraphQLApiResolverPolicyGetEntityTagResponse, - GraphQLApiResolverPolicyGetOptionalParams, - GraphQLApiResolverPolicyGetResponse, - GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - GraphQLApiResolverPolicyCreateOrUpdateResponse, - GraphQLApiResolverPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GraphQLApiResolverPolicy. */ -export interface GraphQLApiResolverPolicy { - /** - * Get the list of policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - listByResolver( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - options?: GraphQLApiResolverPolicyListByResolverOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - options?: GraphQLApiResolverPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the GraphQL API Resolver level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: GraphQLApiResolverPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the GraphQL Api Resolver. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param resolverId Resolver identifier within a GraphQL API. Must be unique in the current API - * Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - apiId: string, - resolverId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: GraphQLApiResolverPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts deleted file mode 100644 index 4a668c74aaff..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/group.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GroupContract, - GroupListByServiceOptionalParams, - GroupGetEntityTagOptionalParams, - GroupGetEntityTagResponse, - GroupGetOptionalParams, - GroupGetResponse, - GroupCreateParameters, - GroupCreateOrUpdateOptionalParams, - GroupCreateOrUpdateResponse, - GroupUpdateParameters, - GroupUpdateOptionalParams, - GroupUpdateResponse, - GroupDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Group. */ -export interface Group { - /** - * Lists a collection of groups defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: GroupListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupGetOptionalParams, - ): Promise; - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - groupId: string, - parameters: GroupCreateParameters, - options?: GroupCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: GroupUpdateOptionalParams, - ): Promise; - /** - * Deletes specific group of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - ifMatch: string, - options?: GroupDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts deleted file mode 100644 index a2da7a2d28c3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/groupUser.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - UserContract, - GroupUserListOptionalParams, - GroupUserCheckEntityExistsOptionalParams, - GroupUserCheckEntityExistsResponse, - GroupUserCreateOptionalParams, - GroupUserCreateResponse, - GroupUserDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a GroupUser. */ -export interface GroupUser { - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - groupId: string, - options?: GroupUserListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCheckEntityExistsOptionalParams, - ): Promise; - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserCreateOptionalParams, - ): Promise; - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - groupId: string, - userId: string, - options?: GroupUserDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts deleted file mode 100644 index 25207e63403b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/identityProvider.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - IdentityProviderContract, - IdentityProviderListByServiceOptionalParams, - IdentityProviderType, - IdentityProviderGetEntityTagOptionalParams, - IdentityProviderGetEntityTagResponse, - IdentityProviderGetOptionalParams, - IdentityProviderGetResponse, - IdentityProviderCreateContract, - IdentityProviderCreateOrUpdateOptionalParams, - IdentityProviderCreateOrUpdateResponse, - IdentityProviderUpdateParameters, - IdentityProviderUpdateOptionalParams, - IdentityProviderUpdateResponse, - IdentityProviderDeleteOptionalParams, - IdentityProviderListSecretsOptionalParams, - IdentityProviderListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a IdentityProvider. */ -export interface IdentityProvider { - /** - * Lists a collection of Identity Provider configured in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IdentityProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the identityProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the configuration details of the identity Provider configured in specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderGetOptionalParams, - ): Promise; - /** - * Creates or Updates the IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - parameters: IdentityProviderCreateContract, - options?: IdentityProviderCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing IdentityProvider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - parameters: IdentityProviderUpdateParameters, - options?: IdentityProviderUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified identity provider configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - ifMatch: string, - options?: IdentityProviderDeleteOptionalParams, - ): Promise; - /** - * Gets the client secret details of the Identity Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param identityProviderName Identity Provider Type identifier. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - identityProviderName: IdentityProviderType, - options?: IdentityProviderListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts deleted file mode 100644 index c3114c231143..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./apiGateway.js"; -export * from "./apiManagementGatewaySkus.js"; -export * from "./allPolicies.js"; -export * from "./api.js"; -export * from "./apiRevision.js"; -export * from "./apiRelease.js"; -export * from "./apiOperation.js"; -export * from "./apiOperationPolicy.js"; -export * from "./tag.js"; -export * from "./graphQLApiResolver.js"; -export * from "./graphQLApiResolverPolicy.js"; -export * from "./apiProduct.js"; -export * from "./apiPolicy.js"; -export * from "./apiSchema.js"; -export * from "./apiDiagnostic.js"; -export * from "./apiIssue.js"; -export * from "./apiIssueComment.js"; -export * from "./apiIssueAttachment.js"; -export * from "./apiTagDescription.js"; -export * from "./operationOperations.js"; -export * from "./apiWiki.js"; -export * from "./apiWikis.js"; -export * from "./apiExport.js"; -export * from "./apiVersionSet.js"; -export * from "./authorizationProvider.js"; -export * from "./authorization.js"; -export * from "./authorizationLoginLinks.js"; -export * from "./authorizationAccessPolicy.js"; -export * from "./authorizationServer.js"; -export * from "./backend.js"; -export * from "./cache.js"; -export * from "./certificate.js"; -export * from "./contentType.js"; -export * from "./contentItem.js"; -export * from "./deletedServices.js"; -export * from "./apiManagementOperations.js"; -export * from "./apiManagementServiceSkus.js"; -export * from "./apiManagementService.js"; -export * from "./diagnostic.js"; -export * from "./documentation.js"; -export * from "./emailTemplate.js"; -export * from "./apiGatewayConfigConnection.js"; -export * from "./gateway.js"; -export * from "./gatewayHostnameConfiguration.js"; -export * from "./gatewayApi.js"; -export * from "./gatewayCertificateAuthority.js"; -export * from "./group.js"; -export * from "./groupUser.js"; -export * from "./identityProvider.js"; -export * from "./issue.js"; -export * from "./logger.js"; -export * from "./namedValue.js"; -export * from "./networkStatus.js"; -export * from "./notification.js"; -export * from "./notificationRecipientUser.js"; -export * from "./notificationRecipientEmail.js"; -export * from "./openIdConnectProvider.js"; -export * from "./outboundNetworkDependenciesEndpoints.js"; -export * from "./policy.js"; -export * from "./policyDescription.js"; -export * from "./policyFragment.js"; -export * from "./policyRestriction.js"; -export * from "./policyRestrictionValidations.js"; -export * from "./portalConfig.js"; -export * from "./portalRevision.js"; -export * from "./portalSettings.js"; -export * from "./signInSettings.js"; -export * from "./signUpSettings.js"; -export * from "./delegationSettings.js"; -export * from "./privateEndpointConnectionOperations.js"; -export * from "./product.js"; -export * from "./productApi.js"; -export * from "./productGroup.js"; -export * from "./productSubscriptions.js"; -export * from "./productPolicy.js"; -export * from "./productWiki.js"; -export * from "./productWikis.js"; -export * from "./productApiLink.js"; -export * from "./productGroupLink.js"; -export * from "./quotaByCounterKeys.js"; -export * from "./quotaByPeriodKeys.js"; -export * from "./region.js"; -export * from "./reports.js"; -export * from "./globalSchema.js"; -export * from "./tenantSettings.js"; -export * from "./apiManagementSkus.js"; -export * from "./subscription.js"; -export * from "./tagResource.js"; -export * from "./tagApiLink.js"; -export * from "./tagOperationLink.js"; -export * from "./tagProductLink.js"; -export * from "./tenantAccess.js"; -export * from "./tenantAccessGit.js"; -export * from "./tenantConfiguration.js"; -export * from "./user.js"; -export * from "./userGroup.js"; -export * from "./userSubscription.js"; -export * from "./userIdentities.js"; -export * from "./userConfirmationPassword.js"; -export * from "./workspaceBackend.js"; -export * from "./workspaceCertificate.js"; -export * from "./workspaceDiagnostic.js"; -export * from "./workspaceApiDiagnostic.js"; -export * from "./apiManagementWorkspaceLinks.js"; -export * from "./apiManagementWorkspaceLink.js"; -export * from "./workspaceLogger.js"; -export * from "./workspace.js"; -export * from "./workspacePolicy.js"; -export * from "./workspaceNamedValue.js"; -export * from "./workspaceGlobalSchema.js"; -export * from "./workspaceNotification.js"; -export * from "./workspaceNotificationRecipientUser.js"; -export * from "./workspaceNotificationRecipientEmail.js"; -export * from "./workspacePolicyFragment.js"; -export * from "./workspaceGroup.js"; -export * from "./workspaceGroupUser.js"; -export * from "./workspaceSubscription.js"; -export * from "./workspaceApiVersionSet.js"; -export * from "./workspaceApi.js"; -export * from "./workspaceApiRevision.js"; -export * from "./workspaceApiRelease.js"; -export * from "./workspaceApiOperation.js"; -export * from "./workspaceApiOperationPolicy.js"; -export * from "./workspaceApiPolicy.js"; -export * from "./workspaceApiSchema.js"; -export * from "./workspaceProduct.js"; -export * from "./workspaceProductApiLink.js"; -export * from "./workspaceProductGroupLink.js"; -export * from "./workspaceProductPolicy.js"; -export * from "./workspaceTag.js"; -export * from "./workspaceTagApiLink.js"; -export * from "./workspaceTagOperationLink.js"; -export * from "./workspaceTagProductLink.js"; -export * from "./workspaceApiExport.js"; -export * from "./operationStatus.js"; -export * from "./operationsResults.js"; diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts deleted file mode 100644 index 79998a004414..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/issue.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - IssueContract, - IssueListByServiceOptionalParams, - IssueGetOptionalParams, - IssueGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Issue. */ -export interface Issue { - /** - * Lists a collection of issues in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: IssueListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets API Management issue details - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param issueId Issue identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - issueId: string, - options?: IssueGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts deleted file mode 100644 index e2b4c85eaf12..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/logger.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LoggerContract, - LoggerListByServiceOptionalParams, - LoggerGetEntityTagOptionalParams, - LoggerGetEntityTagResponse, - LoggerGetOptionalParams, - LoggerGetResponse, - LoggerCreateOrUpdateOptionalParams, - LoggerCreateOrUpdateResponse, - LoggerUpdateContract, - LoggerUpdateOptionalParams, - LoggerUpdateResponse, - LoggerDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Logger. */ -export interface Logger { - /** - * Lists a collection of loggers in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: LoggerListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - loggerId: string, - options?: LoggerGetOptionalParams, - ): Promise; - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - loggerId: string, - parameters: LoggerContract, - options?: LoggerCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: LoggerUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - loggerId: string, - ifMatch: string, - options?: LoggerDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts deleted file mode 100644 index 06454d4d650a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/namedValue.ts +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - NamedValueContract, - NamedValueListByServiceOptionalParams, - NamedValueGetEntityTagOptionalParams, - NamedValueGetEntityTagResponse, - NamedValueGetOptionalParams, - NamedValueGetResponse, - NamedValueCreateContract, - NamedValueCreateOrUpdateOptionalParams, - NamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - NamedValueUpdateOptionalParams, - NamedValueUpdateResponse, - NamedValueDeleteOptionalParams, - NamedValueListValueOptionalParams, - NamedValueListValueResponse, - NamedValueRefreshSecretOptionalParams, - NamedValueRefreshSecretResponse, -} from "../models/index.js"; - -/// -/** Interface representing a NamedValue. */ -export interface NamedValue { - /** - * Lists a collection of named values defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NamedValueListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueGetOptionalParams, - ): Promise; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueCreateOrUpdateResponse - > - >; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: NamedValueCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueUpdateResponse - > - >; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: NamedValueUpdateOptionalParams, - ): Promise; - /** - * Deletes specific named value from the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - ifMatch: string, - options?: NamedValueDeleteOptionalParams, - ): Promise; - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueListValueOptionalParams, - ): Promise; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - NamedValueRefreshSecretResponse - > - >; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - namedValueId: string, - options?: NamedValueRefreshSecretOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts deleted file mode 100644 index 777f039fd3e0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/networkStatus.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NetworkStatusListByServiceOptionalParams, - NetworkStatusListByServiceResponse, - NetworkStatusListByLocationOptionalParams, - NetworkStatusListByLocationResponse, -} from "../models/index.js"; - -/** Interface representing a NetworkStatus. */ -export interface NetworkStatus { - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NetworkStatusListByServiceOptionalParams, - ): Promise; - /** - * Gets the Connectivity Status to the external resources on which the Api Management service depends - * from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param locationName Location in which the API Management service is deployed. This is one of the - * Azure Regions like West US, East US, South Central US. - * @param options The options parameters. - */ - listByLocation( - resourceGroupName: string, - serviceName: string, - locationName: string, - options?: NetworkStatusListByLocationOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts deleted file mode 100644 index e440d56b4294..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notification.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - NotificationContract, - NotificationListByServiceOptionalParams, - NotificationName, - NotificationGetOptionalParams, - NotificationGetResponse, - NotificationCreateOrUpdateOptionalParams, - NotificationCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Notification. */ -export interface Notification { - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: NotificationListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationGetOptionalParams, - ): Promise; - /** - * Create or Update API Management publisher notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts deleted file mode 100644 index 8f403daef8f2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientEmail.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NotificationName, - NotificationRecipientEmailListByNotificationOptionalParams, - NotificationRecipientEmailListByNotificationResponse, - NotificationRecipientEmailCheckEntityExistsOptionalParams, - NotificationRecipientEmailCheckEntityExistsResponse, - NotificationRecipientEmailCreateOrUpdateOptionalParams, - NotificationRecipientEmailCreateOrUpdateResponse, - NotificationRecipientEmailDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a NotificationRecipientEmail. */ -export interface NotificationRecipientEmail { - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientEmailListByNotificationOptionalParams, - ): Promise; - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - email: string, - options?: NotificationRecipientEmailDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts deleted file mode 100644 index 567d6d599863..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/notificationRecipientUser.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NotificationName, - NotificationRecipientUserListByNotificationOptionalParams, - NotificationRecipientUserListByNotificationResponse, - NotificationRecipientUserCheckEntityExistsOptionalParams, - NotificationRecipientUserCheckEntityExistsResponse, - NotificationRecipientUserCreateOrUpdateOptionalParams, - NotificationRecipientUserCreateOrUpdateResponse, - NotificationRecipientUserDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a NotificationRecipientUser. */ -export interface NotificationRecipientUser { - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - options?: NotificationRecipientUserListByNotificationOptionalParams, - ): Promise; - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - notificationName: NotificationName, - userId: string, - options?: NotificationRecipientUserDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts deleted file mode 100644 index 4d14b855b7a6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/openIdConnectProvider.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - OpenidConnectProviderContract, - OpenIdConnectProviderListByServiceOptionalParams, - OpenIdConnectProviderGetEntityTagOptionalParams, - OpenIdConnectProviderGetEntityTagResponse, - OpenIdConnectProviderGetOptionalParams, - OpenIdConnectProviderGetResponse, - OpenIdConnectProviderCreateOrUpdateOptionalParams, - OpenIdConnectProviderCreateOrUpdateResponse, - OpenidConnectProviderUpdateContract, - OpenIdConnectProviderUpdateOptionalParams, - OpenIdConnectProviderUpdateResponse, - OpenIdConnectProviderDeleteOptionalParams, - OpenIdConnectProviderListSecretsOptionalParams, - OpenIdConnectProviderListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a OpenIdConnectProvider. */ -export interface OpenIdConnectProvider { - /** - * Lists of all the OpenId Connect Providers. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OpenIdConnectProviderListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetEntityTagOptionalParams, - ): Promise; - /** - * Gets specific OpenID Connect Provider without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderGetOptionalParams, - ): Promise; - /** - * Creates or updates the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - opid: string, - parameters: OpenidConnectProviderContract, - options?: OpenIdConnectProviderCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specific OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - parameters: OpenidConnectProviderUpdateContract, - options?: OpenIdConnectProviderUpdateOptionalParams, - ): Promise; - /** - * Deletes specific OpenID Connect Provider of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - opid: string, - ifMatch: string, - options?: OpenIdConnectProviderDeleteOptionalParams, - ): Promise; - /** - * Gets the client secret details of the OpenID Connect Provider. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param opid Identifier of the OpenID Connect Provider. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - opid: string, - options?: OpenIdConnectProviderListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts deleted file mode 100644 index 6238e3013245..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationOperations.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagResourceContract, - OperationListByTagsOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a OperationOperations. */ -export interface OperationOperations { - /** - * Lists a collection of operations associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: OperationListByTagsOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationStatus.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationStatus.ts deleted file mode 100644 index 1c34778eff00..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationStatus.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationStatusGetOptionalParams, - OperationStatusGetResponse, -} from "../models/index.js"; - -/** Interface representing a OperationStatus. */ -export interface OperationStatus { - /** - * Returns the current status of an async operation. - * @param location The name of the Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationStatusGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationsResults.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationsResults.ts deleted file mode 100644 index 510cd1031c7a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/operationsResults.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationsResultsGetOptionalParams, - OperationsResultsGetResponse, -} from "../models/index.js"; - -/** Interface representing a OperationsResults. */ -export interface OperationsResults { - /** - * Returns operation results for long running operations executing DELETE or PATCH on the resource. - * @param location The name of the Azure region. - * @param operationId The ID of an ongoing async operation. - * @param options The options parameters. - */ - get( - location: string, - operationId: string, - options?: OperationsResultsGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts deleted file mode 100644 index 4400171e29f2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - OutboundNetworkDependenciesEndpointsListByServiceResponse, -} from "../models/index.js"; - -/** Interface representing a OutboundNetworkDependenciesEndpoints. */ -export interface OutboundNetworkDependenciesEndpoints { - /** - * Gets the network endpoints of all outbound dependencies of a ApiManagement service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: OutboundNetworkDependenciesEndpointsListByServiceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts deleted file mode 100644 index e1541dbf9610..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policy.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - PolicyListByServiceOptionalParams, - PolicyIdName, - PolicyGetEntityTagOptionalParams, - PolicyGetEntityTagResponse, - PolicyGetOptionalParams, - PolicyGetResponse, - PolicyCreateOrUpdateOptionalParams, - PolicyCreateOrUpdateResponse, - PolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Policy. */ -export interface Policy { - /** - * Lists all the Global Policy definitions of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the Global policy definition of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - options?: PolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates the global policy configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: PolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the global policy configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyId: PolicyIdName, - ifMatch: string, - options?: PolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts deleted file mode 100644 index f320059e2669..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyDescription.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - PolicyDescriptionListByServiceOptionalParams, - PolicyDescriptionListByServiceResponse, -} from "../models/index.js"; - -/** Interface representing a PolicyDescription. */ -export interface PolicyDescription { - /** - * Lists all policy descriptions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyDescriptionListByServiceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts deleted file mode 100644 index 6ae8461a1cce..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyFragment.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PolicyFragmentContract, - PolicyFragmentListByServiceOptionalParams, - PolicyFragmentGetEntityTagOptionalParams, - PolicyFragmentGetEntityTagResponse, - PolicyFragmentGetOptionalParams, - PolicyFragmentGetResponse, - PolicyFragmentCreateOrUpdateOptionalParams, - PolicyFragmentCreateOrUpdateResponse, - PolicyFragmentDeleteOptionalParams, - PolicyFragmentListReferencesOptionalParams, - PolicyFragmentListReferencesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PolicyFragment. */ -export interface PolicyFragment { - /** - * Gets all policy fragments. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyFragmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetEntityTagOptionalParams, - ): Promise; - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentGetOptionalParams, - ): Promise; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PolicyFragmentCreateOrUpdateResponse - > - >; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - id: string, - parameters: PolicyFragmentContract, - options?: PolicyFragmentCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - id: string, - ifMatch: string, - options?: PolicyFragmentDeleteOptionalParams, - ): Promise; - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - id: string, - options?: PolicyFragmentListReferencesOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestriction.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestriction.ts deleted file mode 100644 index c4279e7ce123..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestriction.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyRestrictionContract, - PolicyRestrictionListByServiceOptionalParams, - PolicyRestrictionGetEntityTagOptionalParams, - PolicyRestrictionGetEntityTagResponse, - PolicyRestrictionGetOptionalParams, - PolicyRestrictionGetResponse, - PolicyRestrictionCreateOrUpdateOptionalParams, - PolicyRestrictionCreateOrUpdateResponse, - PolicyRestrictionUpdateContract, - PolicyRestrictionUpdateOptionalParams, - PolicyRestrictionUpdateResponse, - PolicyRestrictionDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a PolicyRestriction. */ -export interface PolicyRestriction { - /** - * Gets all policy restrictions of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the policy restriction in the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy restriction of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionGetOptionalParams, - ): Promise; - /** - * Creates or updates the policy restriction configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param parameters The policy restriction to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - parameters: PolicyRestrictionContract, - options?: PolicyRestrictionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the policy restriction configuration of the Api Management service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters The policy restriction to apply. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - ifMatch: string, - parameters: PolicyRestrictionUpdateContract, - options?: PolicyRestrictionUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy restriction configuration of the Api Management Service. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param policyRestrictionId Policy restrictions after an entity level - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - policyRestrictionId: string, - options?: PolicyRestrictionDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestrictionValidations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestrictionValidations.ts deleted file mode 100644 index ce714c4c65b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/policyRestrictionValidations.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PolicyRestrictionValidationsByServiceOptionalParams, - PolicyRestrictionValidationsByServiceResponse, -} from "../models/index.js"; - -/** Interface representing a PolicyRestrictionValidations. */ -export interface PolicyRestrictionValidations { - /** - * Validate all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginByService( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionValidationsByServiceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PolicyRestrictionValidationsByServiceResponse - > - >; - /** - * Validate all policies of API Management services. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - beginByServiceAndWait( - resourceGroupName: string, - serviceName: string, - options?: PolicyRestrictionValidationsByServiceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts deleted file mode 100644 index e4a7ff443bd7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalConfig.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PortalConfigContract, - PortalConfigListByServiceOptionalParams, - PortalConfigGetEntityTagOptionalParams, - PortalConfigGetEntityTagResponse, - PortalConfigGetOptionalParams, - PortalConfigGetResponse, - PortalConfigUpdateOptionalParams, - PortalConfigUpdateResponse, - PortalConfigCreateOrUpdateOptionalParams, - PortalConfigCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PortalConfig. */ -export interface PortalConfig { - /** - * Lists the developer portal configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalConfigListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetEntityTagOptionalParams, - ): Promise; - /** - * Get the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - options?: PortalConfigGetOptionalParams, - ): Promise; - /** - * Update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigUpdateOptionalParams, - ): Promise; - /** - * Create or update the developer portal configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalConfigId Portal configuration identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update the developer portal configuration. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - portalConfigId: string, - ifMatch: string, - parameters: PortalConfigContract, - options?: PortalConfigCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts deleted file mode 100644 index ef4655dc6d45..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalRevision.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PortalRevisionContract, - PortalRevisionListByServiceOptionalParams, - PortalRevisionGetEntityTagOptionalParams, - PortalRevisionGetEntityTagResponse, - PortalRevisionGetOptionalParams, - PortalRevisionGetResponse, - PortalRevisionCreateOrUpdateOptionalParams, - PortalRevisionCreateOrUpdateResponse, - PortalRevisionUpdateOptionalParams, - PortalRevisionUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PortalRevision. */ -export interface PortalRevision { - /** - * Lists developer portal's revisions. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the developer portal revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the developer portal's revision specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - options?: PortalRevisionGetOptionalParams, - ): Promise; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionCreateOrUpdateResponse - > - >; - /** - * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` - * property indicates if the revision is publicly accessible. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - parameters: PortalRevisionContract, - options?: PortalRevisionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PortalRevisionUpdateResponse - > - >; - /** - * Updates the description of specified portal revision or makes it current. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param portalRevisionId Portal revision identifier. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Portal Revision's contract details. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - portalRevisionId: string, - ifMatch: string, - parameters: PortalRevisionContract, - options?: PortalRevisionUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts deleted file mode 100644 index 29bdd50bcd6c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/portalSettings.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - PortalSettingsListByServiceOptionalParams, - PortalSettingsListByServiceResponse, -} from "../models/index.js"; - -/** Interface representing a PortalSettings. */ -export interface PortalSettings { - /** - * Lists a collection of portalsettings defined within a service instance.. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PortalSettingsListByServiceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts deleted file mode 100644 index 1a18ef6aa16a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PrivateEndpointConnection, - PrivateEndpointConnectionListByServiceOptionalParams, - PrivateEndpointConnectionGetByNameOptionalParams, - PrivateEndpointConnectionGetByNameResponse, - PrivateEndpointConnectionRequest, - PrivateEndpointConnectionCreateOrUpdateOptionalParams, - PrivateEndpointConnectionCreateOrUpdateResponse, - PrivateEndpointConnectionDeleteOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - PrivateEndpointConnectionListPrivateLinkResourcesResponse, - PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - PrivateEndpointConnectionGetPrivateLinkResourceResponse, -} from "../models/index.js"; - -/// -/** Interface representing a PrivateEndpointConnectionOperations. */ -export interface PrivateEndpointConnectionOperations { - /** - * Lists all private endpoint connections of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Private Endpoint Connection specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - getByName( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionGetByNameOptionalParams, - ): Promise; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - PrivateEndpointConnectionCreateOrUpdateResponse - > - >; - /** - * Creates a new Private Endpoint Connection or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param privateEndpointConnectionRequest A request to approve or reject a private endpoint connection - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - privateEndpointConnectionRequest: PrivateEndpointConnectionRequest, - options?: PrivateEndpointConnectionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams, - ): Promise, void>>; - /** - * Deletes the specified Private Endpoint Connection. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateEndpointConnectionName Name of the private endpoint connection. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionDeleteOptionalParams, - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listPrivateLinkResources( - resourceGroupName: string, - serviceName: string, - options?: PrivateEndpointConnectionListPrivateLinkResourcesOptionalParams, - ): Promise; - /** - * Gets the private link resources - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param privateLinkSubResourceName Name of the private link resource. - * @param options The options parameters. - */ - getPrivateLinkResource( - resourceGroupName: string, - serviceName: string, - privateLinkSubResourceName: string, - options?: PrivateEndpointConnectionGetPrivateLinkResourceOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts deleted file mode 100644 index 1192882bbbfc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/product.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductContract, - ProductListByServiceOptionalParams, - TagResourceContract, - ProductListByTagsOptionalParams, - ProductGetEntityTagOptionalParams, - ProductGetEntityTagResponse, - ProductGetOptionalParams, - ProductGetResponse, - ProductCreateOrUpdateOptionalParams, - ProductCreateOrUpdateResponse, - ProductUpdateParameters, - ProductUpdateOptionalParams, - ProductUpdateResponse, - ProductDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Product. */ -export interface Product { - /** - * Lists a collection of products in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: ProductListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists a collection of products associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByTags( - resourceGroupName: string, - serviceName: string, - options?: ProductListByTagsOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGetOptionalParams, - ): Promise; - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: ProductContract, - options?: ProductCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: ProductUpdateOptionalParams, - ): Promise; - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts deleted file mode 100644 index 3ffb95b5c2dc..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApi.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiContract, - ProductApiListByProductOptionalParams, - ProductApiCheckEntityExistsOptionalParams, - ProductApiCheckEntityExistsResponse, - ProductApiCreateOrUpdateOptionalParams, - ProductApiCreateOrUpdateResponse, - ProductApiDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductApi. */ -export interface ProductApi { - /** - * Lists a collection of the APIs associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that API entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds an API to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiId: string, - options?: ProductApiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApiLink.ts deleted file mode 100644 index 13447912068a..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productApiLink.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductApiLinkContract, - ProductApiLinkListByProductOptionalParams, - ProductApiLinkGetOptionalParams, - ProductApiLinkGetResponse, - ProductApiLinkCreateOrUpdateOptionalParams, - ProductApiLinkCreateOrUpdateResponse, - ProductApiLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductApiLink. */ -export interface ProductApiLink { - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the API link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - options?: ProductApiLinkGetOptionalParams, - ): Promise; - /** - * Adds an API to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - parameters: ProductApiLinkContract, - options?: ProductApiLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - apiLinkId: string, - options?: ProductApiLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts deleted file mode 100644 index c7c5007f7943..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroup.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GroupContract, - ProductGroupListByProductOptionalParams, - ProductGroupCheckEntityExistsOptionalParams, - ProductGroupCheckEntityExistsResponse, - ProductGroupCreateOrUpdateOptionalParams, - ProductGroupCreateOrUpdateResponse, - ProductGroupDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductGroup. */ -export interface ProductGroup { - /** - * Lists the collection of developer groups associated with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that Group entity specified by identifier is associated with the Product entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds the association between the specified developer group with the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the association between the specified group and product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupId: string, - options?: ProductGroupDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroupLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroupLink.ts deleted file mode 100644 index c555bb21c741..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productGroupLink.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductGroupLinkContract, - ProductGroupLinkListByProductOptionalParams, - ProductGroupLinkGetOptionalParams, - ProductGroupLinkGetResponse, - ProductGroupLinkCreateOrUpdateOptionalParams, - ProductGroupLinkCreateOrUpdateResponse, - ProductGroupLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductGroupLink. */ -export interface ProductGroupLink { - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductGroupLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the group link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - options?: ProductGroupLinkGetOptionalParams, - ): Promise; - /** - * Adds a group to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - parameters: ProductGroupLinkContract, - options?: ProductGroupLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified group from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - groupLinkId: string, - options?: ProductGroupLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts deleted file mode 100644 index 46117d937c05..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productPolicy.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - ProductPolicyListByProductOptionalParams, - PolicyIdName, - ProductPolicyGetEntityTagOptionalParams, - ProductPolicyGetEntityTagResponse, - ProductPolicyGetOptionalParams, - ProductPolicyGetResponse, - ProductPolicyCreateOrUpdateOptionalParams, - ProductPolicyCreateOrUpdateResponse, - ProductPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductPolicy. */ -export interface ProductPolicy { - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductPolicyListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - options?: ProductPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: ProductPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: ProductPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts deleted file mode 100644 index d146947c2dd3..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productSubscriptions.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - SubscriptionContract, - ProductSubscriptionsListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a ProductSubscriptions. */ -export interface ProductSubscriptions { - /** - * Lists the collection of subscriptions to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductSubscriptionsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts deleted file mode 100644 index 34c8e770727b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWiki.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ProductWikiGetEntityTagOptionalParams, - ProductWikiGetEntityTagResponse, - ProductWikiGetOptionalParams, - ProductWikiGetResponse, - WikiContract, - ProductWikiCreateOrUpdateOptionalParams, - ProductWikiCreateOrUpdateResponse, - WikiUpdateContract, - ProductWikiUpdateOptionalParams, - ProductWikiUpdateResponse, - ProductWikiDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a ProductWiki. */ -export interface ProductWiki { - /** - * Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikiGetOptionalParams, - ): Promise; - /** - * Creates a new Wiki for a Product or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - productId: string, - parameters: WikiContract, - options?: ProductWikiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Wiki Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - parameters: WikiUpdateContract, - options?: ProductWikiUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Wiki from a Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - productId: string, - ifMatch: string, - options?: ProductWikiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts deleted file mode 100644 index 7f7cd01ff444..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/productWikis.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { WikiContract, ProductWikisListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a ProductWikis. */ -export interface ProductWikis { - /** - * Gets the details of the Wiki for a Product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: ProductWikisListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts deleted file mode 100644 index 48b0ddbc0ec0..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByCounterKeys.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - QuotaByCounterKeysListByServiceOptionalParams, - QuotaByCounterKeysListByServiceResponse, - QuotaCounterValueUpdateContract, - QuotaByCounterKeysUpdateOptionalParams, - QuotaByCounterKeysUpdateResponse, -} from "../models/index.js"; - -/** Interface representing a QuotaByCounterKeys. */ -export interface QuotaByCounterKeys { - /** - * Lists a collection of current quota counter periods associated with the counter-key configured in - * the policy on the specified service instance. The api does not support paging yet. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - options?: QuotaByCounterKeysListByServiceOptionalParams, - ): Promise; - /** - * Updates all the quota counter values specified with the existing quota counter key to a value in the - * specified service instance. This should be used for reset of the quota counter values. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param parameters The value of the quota counter to be applied to all quota counter periods. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByCounterKeysUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts deleted file mode 100644 index acec0c342b7c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/quotaByPeriodKeys.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - QuotaByPeriodKeysGetOptionalParams, - QuotaByPeriodKeysGetResponse, - QuotaCounterValueUpdateContract, - QuotaByPeriodKeysUpdateOptionalParams, - QuotaByPeriodKeysUpdateResponse, -} from "../models/index.js"; - -/** Interface representing a QuotaByPeriodKeys. */ -export interface QuotaByPeriodKeys { - /** - * Gets the value of the quota counter associated with the counter-key in the policy for the specific - * period in service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - options?: QuotaByPeriodKeysGetOptionalParams, - ): Promise; - /** - * Updates an existing quota counter value in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param quotaCounterKey Quota counter key identifier.This is the result of expression defined in - * counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in - * the policy, then it’s accessible by "boo" counter key. But if it’s defined as - * counter-key="@("b"+"a")" then it will be accessible by "ba" key - * @param quotaPeriodKey Quota period key identifier. - * @param parameters The value of the Quota counter to be applied on the specified period. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - quotaCounterKey: string, - quotaPeriodKey: string, - parameters: QuotaCounterValueUpdateContract, - options?: QuotaByPeriodKeysUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts deleted file mode 100644 index 5e5ac3ecc5e8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/region.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { RegionContract, RegionListByServiceOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Region. */ -export interface Region { - /** - * Lists all azure regions in which the service exists. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: RegionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts deleted file mode 100644 index bb8088307a64..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/reports.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ReportRecordContract, - ReportsListByApiOptionalParams, - ReportsListByUserOptionalParams, - ReportsListByOperationOptionalParams, - ReportsListByProductOptionalParams, - ReportsListByGeoOptionalParams, - ReportsListBySubscriptionOptionalParams, - ReportsListByTimeOptionalParams, - RequestReportRecordContract, - ReportsListByRequestOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Reports. */ -export interface Reports { - /** - * Lists report records by API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| userId | select, filter | eq | - * |
| apiRegion | filter | eq | |
| productId | filter | eq | |
| - * subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter - * | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | - * select, orderBy | | |
| callCountFailed | select, orderBy | | |
| - * callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | | | - *
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | |
| - * cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | |
| - * apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | - * select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | - * | |
- * @param options The options parameters. - */ - listByUser( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByUserOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by API Operations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | select, filter | eq | - * |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy - * | | |
| callCountFailed | select, orderBy | | |
| callCountOther | select, - * orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | - * select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | - * | |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | | - *
| serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByOperationOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | filter | eq | |
| callCountSuccess | select, orderBy | | |
| - * callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | | - * |
| callCountOther | select, orderBy | | |
| callCountTotal | select, orderBy | - * | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | select | | - * |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | | | - *
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| - * serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by geography. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| country | select | | |
| region | select | | |
| zip | - * select | | |
| apiRegion | filter | eq | |
| userId | filter | eq | | - *
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | - * filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | - * | |
| callCountBlocked | select | | |
| callCountFailed | select | | | - *
| callCountOther | select | | |
| bandwidth | select, orderBy | | |
| - * cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg - * | select | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listByGeo( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByGeoOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| displayName | select, orderBy | | |
| apiRegion | filter | eq | | - *
| userId | select, filter | eq | |
| productId | select, filter | eq | |
| - * subscriptionId | select, filter | eq | |
| callCountSuccess | select, orderBy | | | - *
| callCountBlocked | select, orderBy | | |
| callCountFailed | select, orderBy | - * | |
| callCountOther | select, orderBy | | |
| callCountTotal | select, - * orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | - * select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, - * orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | - * |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| - * serviceTimeMax | select | | |
- * @param options The options parameters. - */ - listBySubscription( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by Time. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select - * | ge, le | |
| interval | select | | |
| apiRegion | filter | eq | | - *
| userId | filter | eq | |
| productId | filter | eq | |
| subscriptionId | - * filter | eq | |
| apiId | filter | eq | |
| operationId | filter | eq | | - *
| callCountSuccess | select | | |
| callCountBlocked | select | | |
| - * callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth - * | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | - * select | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | - * |
| apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| - * serviceTimeMin | select | | |
| serviceTimeMax | select | | |
- * @param interval By time interval. Interval must be multiple of 15 minutes and may not be zero. The - * value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can - * be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, - * minutes, seconds)). - * @param options The options parameters. - */ - listByTime( - resourceGroupName: string, - serviceName: string, - filter: string, - interval: string, - options?: ReportsListByTimeOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists report records by Request. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param filter | Field | Usage | Supported operators | Supported functions - * |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le - * | |
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId - * | filter | eq | |
| userId | filter | eq | |
| apiRegion | filter | eq | | - *
| subscriptionId | filter | eq | |
- * @param options The options parameters. - */ - listByRequest( - resourceGroupName: string, - serviceName: string, - filter: string, - options?: ReportsListByRequestOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts deleted file mode 100644 index 5c207d3452f2..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signInSettings.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SignInSettingsGetEntityTagOptionalParams, - SignInSettingsGetEntityTagResponse, - SignInSettingsGetOptionalParams, - SignInSettingsGetResponse, - PortalSigninSettings, - SignInSettingsUpdateOptionalParams, - SignInSettingsCreateOrUpdateOptionalParams, - SignInSettingsCreateOrUpdateResponse, -} from "../models/index.js"; - -/** Interface representing a SignInSettings. */ -export interface SignInSettings { - /** - * Gets the entity state (Etag) version of the SignInSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetEntityTagOptionalParams, - ): Promise; - /** - * Get Sign In Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignInSettingsGetOptionalParams, - ): Promise; - /** - * Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-In settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSigninSettings, - options?: SignInSettingsUpdateOptionalParams, - ): Promise; - /** - * Create or Update Sign-In settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSigninSettings, - options?: SignInSettingsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts deleted file mode 100644 index b969a64ee678..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/signUpSettings.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SignUpSettingsGetEntityTagOptionalParams, - SignUpSettingsGetEntityTagResponse, - SignUpSettingsGetOptionalParams, - SignUpSettingsGetResponse, - PortalSignupSettings, - SignUpSettingsUpdateOptionalParams, - SignUpSettingsCreateOrUpdateOptionalParams, - SignUpSettingsCreateOrUpdateResponse, -} from "../models/index.js"; - -/** Interface representing a SignUpSettings. */ -export interface SignUpSettings { - /** - * Gets the entity state (Etag) version of the SignUpSettings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetEntityTagOptionalParams, - ): Promise; - /** - * Get Sign Up Settings for the Portal - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - options?: SignUpSettingsGetOptionalParams, - ): Promise; - /** - * Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update Sign-Up settings. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - ifMatch: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsUpdateOptionalParams, - ): Promise; - /** - * Create or Update Sign-Up settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - parameters: PortalSignupSettings, - options?: SignUpSettingsCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts deleted file mode 100644 index df54b6bd1b80..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/subscription.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - SubscriptionContract, - SubscriptionListOptionalParams, - SubscriptionGetEntityTagOptionalParams, - SubscriptionGetEntityTagResponse, - SubscriptionGetOptionalParams, - SubscriptionGetResponse, - SubscriptionCreateParameters, - SubscriptionCreateOrUpdateOptionalParams, - SubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - SubscriptionUpdateOptionalParams, - SubscriptionUpdateResponse, - SubscriptionDeleteOptionalParams, - SubscriptionRegeneratePrimaryKeyOptionalParams, - SubscriptionRegenerateSecondaryKeyOptionalParams, - SubscriptionListSecretsOptionalParams, - SubscriptionListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a Subscription. */ -export interface Subscription { - /** - * Lists all subscriptions of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - options?: SubscriptionListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionGetOptionalParams, - ): Promise; - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: SubscriptionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: SubscriptionUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - sid: string, - ifMatch: string, - options?: SubscriptionDeleteOptionalParams, - ): Promise; - /** - * Regenerates primary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegeneratePrimaryKeyOptionalParams, - ): Promise; - /** - * Regenerates secondary key of existing subscription of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionRegenerateSecondaryKeyOptionalParams, - ): Promise; - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - sid: string, - options?: SubscriptionListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts deleted file mode 100644 index 44e1b0fdd173..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tag.ts +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagContract, - TagListByOperationOptionalParams, - TagListByApiOptionalParams, - TagListByProductOptionalParams, - TagListByServiceOptionalParams, - TagGetEntityStateByOperationOptionalParams, - TagGetEntityStateByOperationResponse, - TagGetByOperationOptionalParams, - TagGetByOperationResponse, - TagAssignToOperationOptionalParams, - TagAssignToOperationResponse, - TagDetachFromOperationOptionalParams, - TagGetEntityStateByApiOptionalParams, - TagGetEntityStateByApiResponse, - TagGetByApiOptionalParams, - TagGetByApiResponse, - TagAssignToApiOptionalParams, - TagAssignToApiResponse, - TagDetachFromApiOptionalParams, - TagGetEntityStateByProductOptionalParams, - TagGetEntityStateByProductResponse, - TagGetByProductOptionalParams, - TagGetByProductResponse, - TagAssignToProductOptionalParams, - TagAssignToProductResponse, - TagDetachFromProductOptionalParams, - TagGetEntityStateOptionalParams, - TagGetEntityStateResponse, - TagGetOptionalParams, - TagGetResponse, - TagCreateUpdateParameters, - TagCreateOrUpdateOptionalParams, - TagCreateOrUpdateResponse, - TagUpdateOptionalParams, - TagUpdateResponse, - TagDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Tag. */ -export interface Tag { - /** - * Lists all Tags associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - options?: TagListByOperationOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - options?: TagListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists all Tags associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - options?: TagListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Lists a collection of tags defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetEntityStateByOperationOptionalParams, - ): Promise; - /** - * Get tag associated with the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagGetByOperationOptionalParams, - ): Promise; - /** - * Assign tag to the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagAssignToOperationOptionalParams, - ): Promise; - /** - * Detach the tag from the Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromOperation( - resourceGroupName: string, - serviceName: string, - apiId: string, - operationId: string, - tagId: string, - options?: TagDetachFromOperationOptionalParams, - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetEntityStateByApiOptionalParams, - ): Promise; - /** - * Get tag associated with the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagGetByApiOptionalParams, - ): Promise; - /** - * Assign tag to the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagAssignToApiOptionalParams, - ): Promise; - /** - * Detach the tag from the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromApi( - resourceGroupName: string, - serviceName: string, - apiId: string, - tagId: string, - options?: TagDetachFromApiOptionalParams, - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityStateByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetEntityStateByProductOptionalParams, - ): Promise; - /** - * Get tag associated with the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getByProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagGetByProductOptionalParams, - ): Promise; - /** - * Assign tag to the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - assignToProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagAssignToProductOptionalParams, - ): Promise; - /** - * Detach the tag from the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - detachFromProduct( - resourceGroupName: string, - serviceName: string, - productId: string, - tagId: string, - options?: TagDetachFromProductOptionalParams, - ): Promise; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetEntityStateOptionalParams, - ): Promise; - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagGetOptionalParams, - ): Promise; - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: TagCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: TagUpdateOptionalParams, - ): Promise; - /** - * Deletes specific tag of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - ifMatch: string, - options?: TagDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagApiLink.ts deleted file mode 100644 index 2587f6c48db7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagApiLink.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagApiLinkContract, - TagApiLinkListByProductOptionalParams, - TagApiLinkGetOptionalParams, - TagApiLinkGetResponse, - TagApiLinkCreateOrUpdateOptionalParams, - TagApiLinkCreateOrUpdateResponse, - TagApiLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a TagApiLink. */ -export interface TagApiLink { - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the API link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - options?: TagApiLinkGetOptionalParams, - ): Promise; - /** - * Adds an API to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - parameters: TagApiLinkContract, - options?: TagApiLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - apiLinkId: string, - options?: TagApiLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagOperationLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagOperationLink.ts deleted file mode 100644 index 62169406dc65..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagOperationLink.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagOperationLinkContract, - TagOperationLinkListByProductOptionalParams, - TagOperationLinkGetOptionalParams, - TagOperationLinkGetResponse, - TagOperationLinkCreateOrUpdateOptionalParams, - TagOperationLinkCreateOrUpdateResponse, - TagOperationLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a TagOperationLink. */ -export interface TagOperationLink { - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagOperationLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the operation link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - options?: TagOperationLinkGetOptionalParams, - ): Promise; - /** - * Adds an operation to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - parameters: TagOperationLinkContract, - options?: TagOperationLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified operation from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - operationLinkId: string, - options?: TagOperationLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagProductLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagProductLink.ts deleted file mode 100644 index 60b4ce2767c6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagProductLink.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagProductLinkContract, - TagProductLinkListByProductOptionalParams, - TagProductLinkGetOptionalParams, - TagProductLinkGetResponse, - TagProductLinkCreateOrUpdateOptionalParams, - TagProductLinkCreateOrUpdateResponse, - TagProductLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a TagProductLink. */ -export interface TagProductLink { - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - tagId: string, - options?: TagProductLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the product link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - options?: TagProductLinkGetOptionalParams, - ): Promise; - /** - * Adds a product to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - parameters: TagProductLinkContract, - options?: TagProductLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified product from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - tagId: string, - productLinkId: string, - options?: TagProductLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts deleted file mode 100644 index 512652eb5113..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tagResource.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagResourceContract, - TagResourceListByServiceOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a TagResource. */ -export interface TagResource { - /** - * Lists a collection of resources associated with tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TagResourceListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts deleted file mode 100644 index b0596dff69f1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccess.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - AccessInformationContract, - TenantAccessListByServiceOptionalParams, - AccessIdName, - TenantAccessGetEntityTagOptionalParams, - TenantAccessGetEntityTagResponse, - TenantAccessGetOptionalParams, - TenantAccessGetResponse, - AccessInformationCreateParameters, - TenantAccessCreateOptionalParams, - TenantAccessCreateResponse, - AccessInformationUpdateParameters, - TenantAccessUpdateOptionalParams, - TenantAccessUpdateResponse, - TenantAccessRegeneratePrimaryKeyOptionalParams, - TenantAccessRegenerateSecondaryKeyOptionalParams, - TenantAccessListSecretsOptionalParams, - TenantAccessListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a TenantAccess. */ -export interface TenantAccess { - /** - * Returns list of access infos - for Git and Management endpoints. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantAccessListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Tenant access metadata - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetEntityTagOptionalParams, - ): Promise; - /** - * Get tenant access information details without secrets. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGetOptionalParams, - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationCreateParameters, - options?: TenantAccessCreateOptionalParams, - ): Promise; - /** - * Update tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Parameters supplied to retrieve the Tenant Access Information. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - ifMatch: string, - parameters: AccessInformationUpdateParameters, - options?: TenantAccessUpdateOptionalParams, - ): Promise; - /** - * Regenerate primary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegeneratePrimaryKeyOptionalParams, - ): Promise; - /** - * Regenerate secondary access key - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessRegenerateSecondaryKeyOptionalParams, - ): Promise; - /** - * Get tenant access information details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts deleted file mode 100644 index 592747870396..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantAccessGit.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - AccessIdName, - TenantAccessGitRegeneratePrimaryKeyOptionalParams, - TenantAccessGitRegenerateSecondaryKeyOptionalParams, -} from "../models/index.js"; - -/** Interface representing a TenantAccessGit. */ -export interface TenantAccessGit { - /** - * Regenerate primary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegeneratePrimaryKeyOptionalParams, - ): Promise; - /** - * Regenerate secondary access key for GIT. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param accessName The identifier of the Access configuration. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - accessName: AccessIdName, - options?: TenantAccessGitRegenerateSecondaryKeyOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts deleted file mode 100644 index f9590e05e2a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantConfiguration.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - DeployConfigurationParameters, - ConfigurationIdName, - TenantConfigurationDeployOptionalParams, - TenantConfigurationDeployResponse, - SaveConfigurationParameter, - TenantConfigurationSaveOptionalParams, - TenantConfigurationSaveResponse, - TenantConfigurationValidateOptionalParams, - TenantConfigurationValidateResponse, - TenantConfigurationGetSyncStateOptionalParams, - TenantConfigurationGetSyncStateResponse, -} from "../models/index.js"; - -/** Interface representing a TenantConfiguration. */ -export interface TenantConfiguration { - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeploy( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationDeployResponse - > - >; - /** - * This operation applies changes from the specified Git branch to the configuration database. This is - * a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Deploy Configuration parameters. - * @param options The options parameters. - */ - beginDeployAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationDeployOptionalParams, - ): Promise; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSave( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationSaveResponse - > - >; - /** - * This operation creates a commit with the current configuration snapshot to the specified branch in - * the repository. This is a long running operation and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Save Configuration parameters. - * @param options The options parameters. - */ - beginSaveAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: SaveConfigurationParameter, - options?: TenantConfigurationSaveOptionalParams, - ): Promise; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidate( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - TenantConfigurationValidateResponse - > - >; - /** - * This operation validates the changes in the specified Git branch. This is a long running operation - * and could take several minutes to complete. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param parameters Validate Configuration parameters. - * @param options The options parameters. - */ - beginValidateAndWait( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - parameters: DeployConfigurationParameters, - options?: TenantConfigurationValidateOptionalParams, - ): Promise; - /** - * Gets the status of the most recent synchronization between the configuration database and the Git - * repository. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param configurationName The identifier of the Git Configuration Operation. - * @param options The options parameters. - */ - getSyncState( - resourceGroupName: string, - serviceName: string, - configurationName: ConfigurationIdName, - options?: TenantConfigurationGetSyncStateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts deleted file mode 100644 index 4a9f781f4055..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/tenantSettings.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TenantSettingsContract, - TenantSettingsListByServiceOptionalParams, - SettingsTypeName, - TenantSettingsGetOptionalParams, - TenantSettingsGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a TenantSettings. */ -export interface TenantSettings { - /** - * Public settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: TenantSettingsListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Get tenant settings. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param settingsType The identifier of the settings. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - settingsType: SettingsTypeName, - options?: TenantSettingsGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts deleted file mode 100644 index adb8b19f0391..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/user.ts +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - UserContract, - UserListByServiceOptionalParams, - UserGetEntityTagOptionalParams, - UserGetEntityTagResponse, - UserGetOptionalParams, - UserGetResponse, - UserCreateParameters, - UserCreateOrUpdateOptionalParams, - UserCreateOrUpdateResponse, - UserUpdateParameters, - UserUpdateOptionalParams, - UserUpdateResponse, - UserDeleteOptionalParams, - UserDeleteResponse, - UserGenerateSsoUrlOptionalParams, - UserGenerateSsoUrlResponse, - UserTokenParameters, - UserGetSharedAccessTokenOptionalParams, - UserGetSharedAccessTokenResponse, -} from "../models/index.js"; - -/// -/** Interface representing a User. */ -export interface User { - /** - * Lists a collection of registered users in the specified service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: UserListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGetOptionalParams, - ): Promise; - /** - * Creates or Updates a user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserCreateParameters, - options?: UserCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the user specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - parameters: UserUpdateParameters, - options?: UserUpdateOptionalParams, - ): Promise; - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams, - ): Promise< - SimplePollerLike, UserDeleteResponse> - >; - /** - * Deletes specific user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - serviceName: string, - userId: string, - ifMatch: string, - options?: UserDeleteOptionalParams, - ): Promise; - /** - * Retrieves a redirection URL containing an authentication token for signing a given user into the - * developer portal. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - generateSsoUrl( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGenerateSsoUrlOptionalParams, - ): Promise; - /** - * Gets the Shared Access Authorization Token for the User. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param parameters Create Authorization Token parameters. - * @param options The options parameters. - */ - getSharedAccessToken( - resourceGroupName: string, - serviceName: string, - userId: string, - parameters: UserTokenParameters, - options?: UserGetSharedAccessTokenOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts deleted file mode 100644 index 803289bfe88c..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userConfirmationPassword.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { UserConfirmationPasswordSendOptionalParams } from "../models/index.js"; - -/** Interface representing a UserConfirmationPassword. */ -export interface UserConfirmationPassword { - /** - * Sends confirmation - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - send( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserConfirmationPasswordSendOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts deleted file mode 100644 index 6c40f2274163..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userGroup.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { GroupContract, UserGroupListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a UserGroup. */ -export interface UserGroup { - /** - * Lists all user groups. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserGroupListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts deleted file mode 100644 index a7da70e572a1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userIdentities.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - UserIdentityContract, - UserIdentitiesListOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a UserIdentities. */ -export interface UserIdentities { - /** - * List of all user identities. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserIdentitiesListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts deleted file mode 100644 index 94fa2df387f6..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/userSubscription.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - SubscriptionContract, - UserSubscriptionListOptionalParams, - UserSubscriptionGetOptionalParams, - UserSubscriptionGetResponse, -} from "../models/index.js"; - -/// -/** Interface representing a UserSubscription. */ -export interface UserSubscription { - /** - * Lists the collection of subscriptions of the specified user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - userId: string, - options?: UserSubscriptionListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the specified Subscription entity associated with a particular user. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - userId: string, - sid: string, - options?: UserSubscriptionGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspace.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspace.ts deleted file mode 100644 index def76f0ded07..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspace.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - WorkspaceContract, - WorkspaceListByServiceOptionalParams, - WorkspaceGetEntityTagOptionalParams, - WorkspaceGetEntityTagResponse, - WorkspaceGetOptionalParams, - WorkspaceGetResponse, - WorkspaceCreateOrUpdateOptionalParams, - WorkspaceCreateOrUpdateResponse, - WorkspaceUpdateOptionalParams, - WorkspaceUpdateResponse, - WorkspaceDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a Workspace. */ -export interface Workspace { - /** - * Lists all workspaces of the API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - options?: WorkspaceListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGetOptionalParams, - ): Promise; - /** - * Creates a new workspace or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - parameters: WorkspaceContract, - options?: WorkspaceCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the workspace specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Workspace Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - ifMatch: string, - parameters: WorkspaceContract, - options?: WorkspaceUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - ifMatch: string, - options?: WorkspaceDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApi.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApi.ts deleted file mode 100644 index d11457a992cd..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApi.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - ApiContract, - WorkspaceApiListByServiceOptionalParams, - WorkspaceApiGetEntityTagOptionalParams, - WorkspaceApiGetEntityTagResponse, - WorkspaceApiGetOptionalParams, - WorkspaceApiGetResponse, - ApiCreateOrUpdateParameter, - WorkspaceApiCreateOrUpdateOptionalParams, - WorkspaceApiCreateOrUpdateResponse, - ApiUpdateContract, - WorkspaceApiUpdateOptionalParams, - WorkspaceApiUpdateResponse, - WorkspaceApiDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApi. */ -export interface WorkspaceApi { - /** - * Lists all APIs of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiGetOptionalParams, - ): Promise; - /** - * Creates new or updates existing specified API of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: WorkspaceApiCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceApiCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified API of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - parameters: ApiCreateOrUpdateParameter, - options?: WorkspaceApiCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specified API of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Update Contract parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - ifMatch: string, - parameters: ApiUpdateContract, - options?: WorkspaceApiUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - ifMatch: string, - options?: WorkspaceApiDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiDiagnostic.ts deleted file mode 100644 index fbe0538b54ce..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiDiagnostic.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticContract, - WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - WorkspaceApiDiagnosticGetEntityTagOptionalParams, - WorkspaceApiDiagnosticGetEntityTagResponse, - WorkspaceApiDiagnosticGetOptionalParams, - WorkspaceApiDiagnosticGetResponse, - WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, - WorkspaceApiDiagnosticCreateOrUpdateResponse, - DiagnosticUpdateContract, - WorkspaceApiDiagnosticUpdateOptionalParams, - WorkspaceApiDiagnosticUpdateResponse, - WorkspaceApiDiagnosticDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiDiagnostic. */ -export interface WorkspaceApiDiagnostic { - /** - * Lists all diagnostics of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiDiagnosticListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - options?: WorkspaceApiDiagnosticGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - options?: WorkspaceApiDiagnosticGetOptionalParams, - ): Promise; - /** - * Creates a new Diagnostic for an API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: WorkspaceApiDiagnosticCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Diagnostic for an API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticUpdateContract, - options?: WorkspaceApiDiagnosticUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Diagnostic from an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - diagnosticId: string, - ifMatch: string, - options?: WorkspaceApiDiagnosticDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiExport.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiExport.ts deleted file mode 100644 index 811ce1672efe..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiExport.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - ExportFormat, - ExportApi, - WorkspaceApiExportGetOptionalParams, - WorkspaceApiExportGetResponse, -} from "../models/index.js"; - -/** Interface representing a WorkspaceApiExport. */ -export interface WorkspaceApiExport { - /** - * Gets the details of the API specified by its identifier in the format specified to the Storage Blob - * with SAS Key valid for 5 minutes. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param format Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 - * minutes. - * @param exportParam Query parameter required to export the API details. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - format: ExportFormat, - exportParam: ExportApi, - options?: WorkspaceApiExportGetOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperation.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperation.ts deleted file mode 100644 index 474fb8f3546b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperation.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - OperationContract, - WorkspaceApiOperationListByApiOptionalParams, - WorkspaceApiOperationGetEntityTagOptionalParams, - WorkspaceApiOperationGetEntityTagResponse, - WorkspaceApiOperationGetOptionalParams, - WorkspaceApiOperationGetResponse, - WorkspaceApiOperationCreateOrUpdateOptionalParams, - WorkspaceApiOperationCreateOrUpdateResponse, - OperationUpdateContract, - WorkspaceApiOperationUpdateOptionalParams, - WorkspaceApiOperationUpdateResponse, - WorkspaceApiOperationDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiOperation. */ -export interface WorkspaceApiOperation { - /** - * Lists a collection of the operations for the specified API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiOperationListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the API Operation specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationGetOptionalParams, - ): Promise; - /** - * Creates a new operation in the API or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - parameters: OperationContract, - options?: WorkspaceApiOperationCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the operation in the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Operation Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - ifMatch: string, - parameters: OperationUpdateContract, - options?: WorkspaceApiOperationUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified operation in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - ifMatch: string, - options?: WorkspaceApiOperationDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperationPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperationPolicy.ts deleted file mode 100644 index 155c0f7ffdac..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiOperationPolicy.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - WorkspaceApiOperationPolicyListByOperationOptionalParams, - PolicyIdName, - WorkspaceApiOperationPolicyGetEntityTagOptionalParams, - WorkspaceApiOperationPolicyGetEntityTagResponse, - WorkspaceApiOperationPolicyGetOptionalParams, - WorkspaceApiOperationPolicyGetResponse, - WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - WorkspaceApiOperationPolicyCreateOrUpdateResponse, - WorkspaceApiOperationPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiOperationPolicy. */ -export interface WorkspaceApiOperationPolicy { - /** - * Get the list of policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - listByOperation( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - options?: WorkspaceApiOperationPolicyListByOperationOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API operation policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: WorkspaceApiOperationPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - options?: WorkspaceApiOperationPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the API Operation level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceApiOperationPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Api Operation. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param operationId Operation identifier within an API. Must be unique in the current API Management - * service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - operationId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceApiOperationPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiPolicy.ts deleted file mode 100644 index d18109b7a830..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiPolicy.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - WorkspaceApiPolicyListByApiOptionalParams, - PolicyIdName, - WorkspaceApiPolicyGetEntityTagOptionalParams, - WorkspaceApiPolicyGetEntityTagResponse, - WorkspaceApiPolicyGetOptionalParams, - WorkspaceApiPolicyGetResponse, - WorkspaceApiPolicyCreateOrUpdateOptionalParams, - WorkspaceApiPolicyCreateOrUpdateResponse, - WorkspaceApiPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiPolicy. */ -export interface WorkspaceApiPolicy { - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiPolicyListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the API policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - options?: WorkspaceApiPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - options?: WorkspaceApiPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceApiPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceApiPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRelease.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRelease.ts deleted file mode 100644 index 87585d0a19e1..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRelease.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiReleaseContract, - WorkspaceApiReleaseListByServiceOptionalParams, - WorkspaceApiReleaseGetEntityTagOptionalParams, - WorkspaceApiReleaseGetEntityTagResponse, - WorkspaceApiReleaseGetOptionalParams, - WorkspaceApiReleaseGetResponse, - WorkspaceApiReleaseCreateOrUpdateOptionalParams, - WorkspaceApiReleaseCreateOrUpdateResponse, - WorkspaceApiReleaseUpdateOptionalParams, - WorkspaceApiReleaseUpdateResponse, - WorkspaceApiReleaseDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiRelease. */ -export interface WorkspaceApiRelease { - /** - * Lists all releases of an API. An API release is created when making an API Revision current. - * Releases are also used to rollback to previous revisions. Results will be paged and can be - * constrained by the $top and $skip parameters. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiReleaseListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Returns the etag of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - options?: WorkspaceApiReleaseGetEntityTagOptionalParams, - ): Promise; - /** - * Returns the details of an API release. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - options?: WorkspaceApiReleaseGetOptionalParams, - ): Promise; - /** - * Creates a new Release for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - parameters: ApiReleaseContract, - options?: WorkspaceApiReleaseCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the release of the API specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters API Release Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - ifMatch: string, - parameters: ApiReleaseContract, - options?: WorkspaceApiReleaseUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified release in the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param releaseId Release identifier within an API. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - releaseId: string, - ifMatch: string, - options?: WorkspaceApiReleaseDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRevision.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRevision.ts deleted file mode 100644 index e97d98386554..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiRevision.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiRevisionContract, - WorkspaceApiRevisionListByServiceOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiRevision. */ -export interface WorkspaceApiRevision { - /** - * Lists all revisions of an API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiRevisionListByServiceOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiSchema.ts deleted file mode 100644 index 30bb80cbd479..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiSchema.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SchemaContract, - WorkspaceApiSchemaListByApiOptionalParams, - WorkspaceApiSchemaGetEntityTagOptionalParams, - WorkspaceApiSchemaGetEntityTagResponse, - WorkspaceApiSchemaGetOptionalParams, - WorkspaceApiSchemaGetResponse, - WorkspaceApiSchemaCreateOrUpdateOptionalParams, - WorkspaceApiSchemaCreateOrUpdateResponse, - WorkspaceApiSchemaDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiSchema. */ -export interface WorkspaceApiSchema { - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - options?: WorkspaceApiSchemaListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - options?: WorkspaceApiSchemaGetEntityTagOptionalParams, - ): Promise; - /** - * Get the schema configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - options?: WorkspaceApiSchemaGetOptionalParams, - ): Promise; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceApiSchemaCreateOrUpdateResponse - > - >; - /** - * Creates or updates schema configuration for the API. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters The schema contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - parameters: SchemaContract, - options?: WorkspaceApiSchemaCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the schema configuration at the Api. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param apiId API revision identifier. Must be unique in the current API Management service instance. - * Non-current revision has ;rev=n as a suffix where n is the revision number. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - apiId: string, - schemaId: string, - ifMatch: string, - options?: WorkspaceApiSchemaDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiVersionSet.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiVersionSet.ts deleted file mode 100644 index 9f417db2bf48..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceApiVersionSet.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ApiVersionSetContract, - WorkspaceApiVersionSetListByServiceOptionalParams, - WorkspaceApiVersionSetGetEntityTagOptionalParams, - WorkspaceApiVersionSetGetEntityTagResponse, - WorkspaceApiVersionSetGetOptionalParams, - WorkspaceApiVersionSetGetResponse, - WorkspaceApiVersionSetCreateOrUpdateOptionalParams, - WorkspaceApiVersionSetCreateOrUpdateResponse, - ApiVersionSetUpdateParameters, - WorkspaceApiVersionSetUpdateOptionalParams, - WorkspaceApiVersionSetUpdateResponse, - WorkspaceApiVersionSetDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceApiVersionSet. */ -export interface WorkspaceApiVersionSet { - /** - * Lists a collection of API Version Sets in the specified workspace with a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceApiVersionSetListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - options?: WorkspaceApiVersionSetGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Api Version Set specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - options?: WorkspaceApiVersionSetGetOptionalParams, - ): Promise; - /** - * Creates or Updates a Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - parameters: ApiVersionSetContract, - options?: WorkspaceApiVersionSetCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Api VersionSet specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - ifMatch: string, - parameters: ApiVersionSetUpdateParameters, - options?: WorkspaceApiVersionSetUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Api Version Set. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param versionSetId Api Version Set identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - versionSetId: string, - ifMatch: string, - options?: WorkspaceApiVersionSetDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceBackend.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceBackend.ts deleted file mode 100644 index d8b10cf778a7..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceBackend.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - BackendContract, - WorkspaceBackendListByWorkspaceOptionalParams, - WorkspaceBackendGetEntityTagOptionalParams, - WorkspaceBackendGetEntityTagResponse, - WorkspaceBackendGetOptionalParams, - WorkspaceBackendGetResponse, - WorkspaceBackendCreateOrUpdateOptionalParams, - WorkspaceBackendCreateOrUpdateResponse, - BackendUpdateParameters, - WorkspaceBackendUpdateOptionalParams, - WorkspaceBackendUpdateResponse, - WorkspaceBackendDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceBackend. */ -export interface WorkspaceBackend { - /** - * Lists a collection of backends in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceBackendListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - options?: WorkspaceBackendGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the backend specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - options?: WorkspaceBackendGetOptionalParams, - ): Promise; - /** - * Creates or Updates a backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - parameters: BackendContract, - options?: WorkspaceBackendCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - ifMatch: string, - parameters: BackendUpdateParameters, - options?: WorkspaceBackendUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param backendId Identifier of the Backend entity. Must be unique in the current API Management - * service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - backendId: string, - ifMatch: string, - options?: WorkspaceBackendDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceCertificate.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceCertificate.ts deleted file mode 100644 index 780cc82b8575..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceCertificate.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - CertificateContract, - WorkspaceCertificateListByWorkspaceOptionalParams, - WorkspaceCertificateGetEntityTagOptionalParams, - WorkspaceCertificateGetEntityTagResponse, - WorkspaceCertificateGetOptionalParams, - WorkspaceCertificateGetResponse, - CertificateCreateOrUpdateParameters, - WorkspaceCertificateCreateOrUpdateOptionalParams, - WorkspaceCertificateCreateOrUpdateResponse, - WorkspaceCertificateDeleteOptionalParams, - WorkspaceCertificateRefreshSecretOptionalParams, - WorkspaceCertificateRefreshSecretResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceCertificate. */ -export interface WorkspaceCertificate { - /** - * Lists a collection of all certificates in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceCertificateListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the certificate specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateGetOptionalParams, - ): Promise; - /** - * Creates or updates the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param parameters Create or Update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - parameters: CertificateCreateOrUpdateParameters, - options?: WorkspaceCertificateCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific certificate. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - ifMatch: string, - options?: WorkspaceCertificateDeleteOptionalParams, - ): Promise; - /** - * From KeyVault, Refresh the certificate being used for authentication with the backend. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param certificateId Identifier of the certificate entity. Must be unique in the current API - * Management service instance. - * @param options The options parameters. - */ - refreshSecret( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - certificateId: string, - options?: WorkspaceCertificateRefreshSecretOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceDiagnostic.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceDiagnostic.ts deleted file mode 100644 index 73cc0a9270c8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceDiagnostic.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DiagnosticContract, - WorkspaceDiagnosticListByWorkspaceOptionalParams, - WorkspaceDiagnosticGetEntityTagOptionalParams, - WorkspaceDiagnosticGetEntityTagResponse, - WorkspaceDiagnosticGetOptionalParams, - WorkspaceDiagnosticGetResponse, - WorkspaceDiagnosticCreateOrUpdateOptionalParams, - WorkspaceDiagnosticCreateOrUpdateResponse, - DiagnosticUpdateContract, - WorkspaceDiagnosticUpdateOptionalParams, - WorkspaceDiagnosticUpdateResponse, - WorkspaceDiagnosticDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceDiagnostic. */ -export interface WorkspaceDiagnostic { - /** - * Lists all diagnostics in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceDiagnosticListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - options?: WorkspaceDiagnosticGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - options?: WorkspaceDiagnosticGetOptionalParams, - ): Promise; - /** - * Creates a new Diagnostic or updates an existing one. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - parameters: DiagnosticContract, - options?: WorkspaceDiagnosticCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the Diagnostic specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Diagnostic Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - ifMatch: string, - parameters: DiagnosticUpdateContract, - options?: WorkspaceDiagnosticUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified Diagnostic. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service - * instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - diagnosticId: string, - ifMatch: string, - options?: WorkspaceDiagnosticDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGlobalSchema.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGlobalSchema.ts deleted file mode 100644 index 9a236ea78979..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGlobalSchema.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - GlobalSchemaContract, - WorkspaceGlobalSchemaListByServiceOptionalParams, - WorkspaceGlobalSchemaGetEntityTagOptionalParams, - WorkspaceGlobalSchemaGetEntityTagResponse, - WorkspaceGlobalSchemaGetOptionalParams, - WorkspaceGlobalSchemaGetResponse, - WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - WorkspaceGlobalSchemaCreateOrUpdateResponse, - WorkspaceGlobalSchemaDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceGlobalSchema. */ -export interface WorkspaceGlobalSchema { - /** - * Lists a collection of schemas registered with workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGlobalSchemaListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - options?: WorkspaceGlobalSchemaGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the Schema specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - options?: WorkspaceGlobalSchemaGetOptionalParams, - ): Promise; - /** - * Creates new or updates existing specified Schema of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceGlobalSchemaCreateOrUpdateResponse - > - >; - /** - * Creates new or updates existing specified Schema of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - parameters: GlobalSchemaContract, - options?: WorkspaceGlobalSchemaCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes specific Schema. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param schemaId Schema id identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - schemaId: string, - ifMatch: string, - options?: WorkspaceGlobalSchemaDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroup.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroup.ts deleted file mode 100644 index dff4c1d78dd8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroup.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - GroupContract, - WorkspaceGroupListByServiceOptionalParams, - WorkspaceGroupGetEntityTagOptionalParams, - WorkspaceGroupGetEntityTagResponse, - WorkspaceGroupGetOptionalParams, - WorkspaceGroupGetResponse, - GroupCreateParameters, - WorkspaceGroupCreateOrUpdateOptionalParams, - WorkspaceGroupCreateOrUpdateResponse, - GroupUpdateParameters, - WorkspaceGroupUpdateOptionalParams, - WorkspaceGroupUpdateResponse, - WorkspaceGroupDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceGroup. */ -export interface WorkspaceGroup { - /** - * Lists a collection of groups defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceGroupListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupGetOptionalParams, - ): Promise; - /** - * Creates or Updates a group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - parameters: GroupCreateParameters, - options?: WorkspaceGroupCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the group specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - ifMatch: string, - parameters: GroupUpdateParameters, - options?: WorkspaceGroupUpdateOptionalParams, - ): Promise; - /** - * Deletes specific group of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - ifMatch: string, - options?: WorkspaceGroupDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroupUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroupUser.ts deleted file mode 100644 index 343c2eb330b8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceGroupUser.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - UserContract, - WorkspaceGroupUserListOptionalParams, - WorkspaceGroupUserCheckEntityExistsOptionalParams, - WorkspaceGroupUserCheckEntityExistsResponse, - WorkspaceGroupUserCreateOptionalParams, - WorkspaceGroupUserCreateResponse, - WorkspaceGroupUserDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceGroupUser. */ -export interface WorkspaceGroupUser { - /** - * Lists a collection of user entities associated with the group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - options?: WorkspaceGroupUserListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Checks that user entity specified by identifier is associated with the group entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserCheckEntityExistsOptionalParams, - ): Promise; - /** - * Add existing user to existing group - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - create( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserCreateOptionalParams, - ): Promise; - /** - * Remove existing user from existing group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param groupId Group identifier. Must be unique in the current API Management service instance. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - groupId: string, - userId: string, - options?: WorkspaceGroupUserDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceLogger.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceLogger.ts deleted file mode 100644 index 4923de105421..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceLogger.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LoggerContract, - WorkspaceLoggerListByWorkspaceOptionalParams, - WorkspaceLoggerGetEntityTagOptionalParams, - WorkspaceLoggerGetEntityTagResponse, - WorkspaceLoggerGetOptionalParams, - WorkspaceLoggerGetResponse, - WorkspaceLoggerCreateOrUpdateOptionalParams, - WorkspaceLoggerCreateOrUpdateResponse, - LoggerUpdateContract, - WorkspaceLoggerUpdateOptionalParams, - WorkspaceLoggerUpdateResponse, - WorkspaceLoggerDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceLogger. */ -export interface WorkspaceLogger { - /** - * Lists a collection of loggers in the specified workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceLoggerListByWorkspaceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - options?: WorkspaceLoggerGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the logger specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - options?: WorkspaceLoggerGetOptionalParams, - ): Promise; - /** - * Creates or Updates a logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - parameters: LoggerContract, - options?: WorkspaceLoggerCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates an existing logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - ifMatch: string, - parameters: LoggerUpdateContract, - options?: WorkspaceLoggerUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified logger. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param loggerId Logger identifier. Must be unique in the API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - loggerId: string, - ifMatch: string, - options?: WorkspaceLoggerDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNamedValue.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNamedValue.ts deleted file mode 100644 index d8d1ba9e4e98..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNamedValue.ts +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - NamedValueContract, - WorkspaceNamedValueListByServiceOptionalParams, - WorkspaceNamedValueGetEntityTagOptionalParams, - WorkspaceNamedValueGetEntityTagResponse, - WorkspaceNamedValueGetOptionalParams, - WorkspaceNamedValueGetResponse, - NamedValueCreateContract, - WorkspaceNamedValueCreateOrUpdateOptionalParams, - WorkspaceNamedValueCreateOrUpdateResponse, - NamedValueUpdateParameters, - WorkspaceNamedValueUpdateOptionalParams, - WorkspaceNamedValueUpdateResponse, - WorkspaceNamedValueDeleteOptionalParams, - WorkspaceNamedValueListValueOptionalParams, - WorkspaceNamedValueListValueResponse, - WorkspaceNamedValueRefreshSecretOptionalParams, - WorkspaceNamedValueRefreshSecretResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceNamedValue. */ -export interface WorkspaceNamedValue { - /** - * Lists a collection of named values defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNamedValueListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueGetOptionalParams, - ): Promise; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueCreateOrUpdateResponse - > - >; - /** - * Creates or updates named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param parameters Create parameters. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - parameters: NamedValueCreateContract, - options?: WorkspaceNamedValueCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: WorkspaceNamedValueUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueUpdateResponse - > - >; - /** - * Updates the specific named value. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - parameters: NamedValueUpdateParameters, - options?: WorkspaceNamedValueUpdateOptionalParams, - ): Promise; - /** - * Deletes specific named value from the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - ifMatch: string, - options?: WorkspaceNamedValueDeleteOptionalParams, - ): Promise; - /** - * Gets the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - listValue( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueListValueOptionalParams, - ): Promise; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecret( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueRefreshSecretOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspaceNamedValueRefreshSecretResponse - > - >; - /** - * Refresh the secret of the named value specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param namedValueId Identifier of the NamedValue. - * @param options The options parameters. - */ - beginRefreshSecretAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - namedValueId: string, - options?: WorkspaceNamedValueRefreshSecretOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotification.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotification.ts deleted file mode 100644 index d56810de6e56..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotification.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - NotificationContract, - WorkspaceNotificationListByServiceOptionalParams, - NotificationName, - WorkspaceNotificationGetOptionalParams, - WorkspaceNotificationGetResponse, - WorkspaceNotificationCreateOrUpdateOptionalParams, - WorkspaceNotificationCreateOrUpdateResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceNotification. */ -export interface WorkspaceNotification { - /** - * Lists a collection of properties defined within a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceNotificationListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the details of the Notification specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationGetOptionalParams, - ): Promise; - /** - * Create or Update API Management publisher notification for the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationCreateOrUpdateOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientEmail.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientEmail.ts deleted file mode 100644 index 07b39982f541..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientEmail.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NotificationName, - WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, - WorkspaceNotificationRecipientEmailListByNotificationResponse, - WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, - WorkspaceNotificationRecipientEmailCheckEntityExistsResponse, - WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, - WorkspaceNotificationRecipientEmailCreateOrUpdateResponse, - WorkspaceNotificationRecipientEmailDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a WorkspaceNotificationRecipientEmail. */ -export interface WorkspaceNotificationRecipientEmail { - /** - * Gets the list of the Notification Recipient Emails subscribed to a notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationRecipientEmailListByNotificationOptionalParams, - ): Promise; - /** - * Determine if Notification Recipient Email subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds the Email address to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the email from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param email Email identifier. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - email: string, - options?: WorkspaceNotificationRecipientEmailDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientUser.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientUser.ts deleted file mode 100644 index 8f0e418a808e..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceNotificationRecipientUser.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - NotificationName, - WorkspaceNotificationRecipientUserListByNotificationOptionalParams, - WorkspaceNotificationRecipientUserListByNotificationResponse, - WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, - WorkspaceNotificationRecipientUserCheckEntityExistsResponse, - WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, - WorkspaceNotificationRecipientUserCreateOrUpdateResponse, - WorkspaceNotificationRecipientUserDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a WorkspaceNotificationRecipientUser. */ -export interface WorkspaceNotificationRecipientUser { - /** - * Gets the list of the Notification Recipient User subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param options The options parameters. - */ - listByNotification( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - options?: WorkspaceNotificationRecipientUserListByNotificationOptionalParams, - ): Promise; - /** - * Determine if the Notification Recipient User is subscribed to the notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - checkEntityExists( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserCheckEntityExistsOptionalParams, - ): Promise; - /** - * Adds the API Management User to the list of Recipients for the Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserCreateOrUpdateOptionalParams, - ): Promise; - /** - * Removes the API Management user from the list of Notification. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param notificationName Notification Name Identifier. - * @param userId User identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - notificationName: NotificationName, - userId: string, - options?: WorkspaceNotificationRecipientUserDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicy.ts deleted file mode 100644 index 0dccea8115ef..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicy.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - PolicyContract, - WorkspacePolicyListByApiOptionalParams, - PolicyIdName, - WorkspacePolicyGetEntityTagOptionalParams, - WorkspacePolicyGetEntityTagResponse, - WorkspacePolicyGetOptionalParams, - WorkspacePolicyGetResponse, - WorkspacePolicyCreateOrUpdateOptionalParams, - WorkspacePolicyCreateOrUpdateResponse, - WorkspacePolicyDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspacePolicy. */ -export interface WorkspacePolicy { - /** - * Get the policy configuration at the workspace level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByApi( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyListByApiOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the workspace policy specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - options?: WorkspacePolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the API level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - options?: WorkspacePolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspacePolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspacePolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicyFragment.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicyFragment.ts deleted file mode 100644 index 8841feed1196..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspacePolicyFragment.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - PolicyFragmentContract, - WorkspacePolicyFragmentListByServiceOptionalParams, - WorkspacePolicyFragmentGetEntityTagOptionalParams, - WorkspacePolicyFragmentGetEntityTagResponse, - WorkspacePolicyFragmentGetOptionalParams, - WorkspacePolicyFragmentGetResponse, - WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - WorkspacePolicyFragmentCreateOrUpdateResponse, - WorkspacePolicyFragmentDeleteOptionalParams, - WorkspacePolicyFragmentListReferencesOptionalParams, - WorkspacePolicyFragmentListReferencesResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspacePolicyFragment. */ -export interface WorkspacePolicyFragment { - /** - * Gets all policy fragments defined within a workspace. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspacePolicyFragmentListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentGetEntityTagOptionalParams, - ): Promise; - /** - * Gets a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentGetOptionalParams, - ): Promise; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - parameters: PolicyFragmentContract, - options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - WorkspacePolicyFragmentCreateOrUpdateResponse - > - >; - /** - * Creates or updates a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param parameters The policy fragment contents to apply. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - parameters: PolicyFragmentContract, - options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - ifMatch: string, - options?: WorkspacePolicyFragmentDeleteOptionalParams, - ): Promise; - /** - * Lists policy resources that reference the policy fragment. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param id A resource identifier. - * @param options The options parameters. - */ - listReferences( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - id: string, - options?: WorkspacePolicyFragmentListReferencesOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProduct.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProduct.ts deleted file mode 100644 index 84a41db25a74..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProduct.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductContract, - WorkspaceProductListByServiceOptionalParams, - WorkspaceProductGetEntityTagOptionalParams, - WorkspaceProductGetEntityTagResponse, - WorkspaceProductGetOptionalParams, - WorkspaceProductGetResponse, - WorkspaceProductCreateOrUpdateOptionalParams, - WorkspaceProductCreateOrUpdateResponse, - ProductUpdateParameters, - WorkspaceProductUpdateOptionalParams, - WorkspaceProductUpdateResponse, - WorkspaceProductDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceProduct. */ -export interface WorkspaceProduct { - /** - * Lists a collection of products in the specified workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceProductListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the details of the product specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGetOptionalParams, - ): Promise; - /** - * Creates or Updates a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - parameters: ProductContract, - options?: WorkspaceProductCreateOrUpdateOptionalParams, - ): Promise; - /** - * Update existing product details. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - ifMatch: string, - parameters: ProductUpdateParameters, - options?: WorkspaceProductUpdateOptionalParams, - ): Promise; - /** - * Delete product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - ifMatch: string, - options?: WorkspaceProductDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductApiLink.ts deleted file mode 100644 index c4e949032d81..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductApiLink.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductApiLinkContract, - WorkspaceProductApiLinkListByProductOptionalParams, - WorkspaceProductApiLinkGetOptionalParams, - WorkspaceProductApiLinkGetResponse, - WorkspaceProductApiLinkCreateOrUpdateOptionalParams, - WorkspaceProductApiLinkCreateOrUpdateResponse, - WorkspaceProductApiLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceProductApiLink. */ -export interface WorkspaceProductApiLink { - /** - * Lists a collection of the API links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the API link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - options?: WorkspaceProductApiLinkGetOptionalParams, - ): Promise; - /** - * Adds an API to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - parameters: ProductApiLinkContract, - options?: WorkspaceProductApiLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Product-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - apiLinkId: string, - options?: WorkspaceProductApiLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductGroupLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductGroupLink.ts deleted file mode 100644 index e9fb7871f143..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductGroupLink.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ProductGroupLinkContract, - WorkspaceProductGroupLinkListByProductOptionalParams, - WorkspaceProductGroupLinkGetOptionalParams, - WorkspaceProductGroupLinkGetResponse, - WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, - WorkspaceProductGroupLinkCreateOrUpdateResponse, - WorkspaceProductGroupLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceProductGroupLink. */ -export interface WorkspaceProductGroupLink { - /** - * Lists a collection of the group links associated with a product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductGroupLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the group link for the product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - options?: WorkspaceProductGroupLinkGetOptionalParams, - ): Promise; - /** - * Adds a group to the specified product via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - parameters: ProductGroupLinkContract, - options?: WorkspaceProductGroupLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified group from the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param groupLinkId Product-Group link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - groupLinkId: string, - options?: WorkspaceProductGroupLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductPolicy.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductPolicy.ts deleted file mode 100644 index 49a4d25c89e8..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceProductPolicy.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - WorkspaceProductPolicyListByProductOptionalParams, - WorkspaceProductPolicyListByProductResponse, - PolicyIdName, - WorkspaceProductPolicyGetEntityTagOptionalParams, - WorkspaceProductPolicyGetEntityTagResponse, - WorkspaceProductPolicyGetOptionalParams, - WorkspaceProductPolicyGetResponse, - PolicyContract, - WorkspaceProductPolicyCreateOrUpdateOptionalParams, - WorkspaceProductPolicyCreateOrUpdateResponse, - WorkspaceProductPolicyDeleteOptionalParams, -} from "../models/index.js"; - -/** Interface representing a WorkspaceProductPolicy. */ -export interface WorkspaceProductPolicy { - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - options?: WorkspaceProductPolicyListByProductOptionalParams, - ): Promise; - /** - * Get the ETag of the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - options?: WorkspaceProductPolicyGetEntityTagOptionalParams, - ): Promise; - /** - * Get the policy configuration at the Product level. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - options?: WorkspaceProductPolicyGetOptionalParams, - ): Promise; - /** - * Creates or updates policy configuration for the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param parameters The policy contents to apply. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - parameters: PolicyContract, - options?: WorkspaceProductPolicyCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the policy configuration at the Product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param productId Product identifier. Must be unique in the current API Management service instance. - * @param policyId The identifier of the Policy. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - productId: string, - policyId: PolicyIdName, - ifMatch: string, - options?: WorkspaceProductPolicyDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceSubscription.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceSubscription.ts deleted file mode 100644 index f7a0146a8518..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceSubscription.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - SubscriptionContract, - WorkspaceSubscriptionListOptionalParams, - WorkspaceSubscriptionGetEntityTagOptionalParams, - WorkspaceSubscriptionGetEntityTagResponse, - WorkspaceSubscriptionGetOptionalParams, - WorkspaceSubscriptionGetResponse, - SubscriptionCreateParameters, - WorkspaceSubscriptionCreateOrUpdateOptionalParams, - WorkspaceSubscriptionCreateOrUpdateResponse, - SubscriptionUpdateParameters, - WorkspaceSubscriptionUpdateOptionalParams, - WorkspaceSubscriptionUpdateResponse, - WorkspaceSubscriptionDeleteOptionalParams, - WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, - WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, - WorkspaceSubscriptionListSecretsOptionalParams, - WorkspaceSubscriptionListSecretsResponse, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceSubscription. */ -export interface WorkspaceSubscription { - /** - * Lists all subscriptions of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceSubscriptionListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - getEntityTag( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionGetEntityTagOptionalParams, - ): Promise; - /** - * Gets the specified Subscription entity. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionGetOptionalParams, - ): Promise; - /** - * Creates or updates the subscription of specified user to the specified product. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - parameters: SubscriptionCreateParameters, - options?: WorkspaceSubscriptionCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of a subscription specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - ifMatch: string, - parameters: SubscriptionUpdateParameters, - options?: WorkspaceSubscriptionUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - ifMatch: string, - options?: WorkspaceSubscriptionDeleteOptionalParams, - ): Promise; - /** - * Regenerates primary key of existing subscription of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regeneratePrimaryKey( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionRegeneratePrimaryKeyOptionalParams, - ): Promise; - /** - * Regenerates secondary key of existing subscription of the workspace in an API Management service - * instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - regenerateSecondaryKey( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionRegenerateSecondaryKeyOptionalParams, - ): Promise; - /** - * Gets the specified Subscription keys. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param sid Subscription entity Identifier. The entity represents the association between a user and - * a product in API Management. - * @param options The options parameters. - */ - listSecrets( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - sid: string, - options?: WorkspaceSubscriptionListSecretsOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTag.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTag.ts deleted file mode 100644 index 99f6691e2232..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTag.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagContract, - WorkspaceTagListByServiceOptionalParams, - WorkspaceTagGetEntityStateOptionalParams, - WorkspaceTagGetEntityStateResponse, - WorkspaceTagGetOptionalParams, - WorkspaceTagGetResponse, - TagCreateUpdateParameters, - WorkspaceTagCreateOrUpdateOptionalParams, - WorkspaceTagCreateOrUpdateResponse, - WorkspaceTagUpdateOptionalParams, - WorkspaceTagUpdateResponse, - WorkspaceTagDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceTag. */ -export interface WorkspaceTag { - /** - * Lists a collection of tags defined within a workspace in a service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - listByService( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - options?: WorkspaceTagListByServiceOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the entity state version of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - getEntityState( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagGetEntityStateOptionalParams, - ): Promise; - /** - * Gets the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagGetOptionalParams, - ): Promise; - /** - * Creates a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param parameters Create parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - parameters: TagCreateUpdateParameters, - options?: WorkspaceTagCreateOrUpdateOptionalParams, - ): Promise; - /** - * Updates the details of the tag specified by its identifier. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param parameters Update parameters. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - ifMatch: string, - parameters: TagCreateUpdateParameters, - options?: WorkspaceTagUpdateOptionalParams, - ): Promise; - /** - * Deletes specific tag of the workspace in an API Management service instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param ifMatch ETag of the Entity. ETag should match the current entity state from the header - * response of the GET request or it should be * for unconditional update. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - ifMatch: string, - options?: WorkspaceTagDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagApiLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagApiLink.ts deleted file mode 100644 index 64b3c06160bb..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagApiLink.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagApiLinkContract, - WorkspaceTagApiLinkListByProductOptionalParams, - WorkspaceTagApiLinkGetOptionalParams, - WorkspaceTagApiLinkGetResponse, - WorkspaceTagApiLinkCreateOrUpdateOptionalParams, - WorkspaceTagApiLinkCreateOrUpdateResponse, - WorkspaceTagApiLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceTagApiLink. */ -export interface WorkspaceTagApiLink { - /** - * Lists a collection of the API links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagApiLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the API link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - options?: WorkspaceTagApiLinkGetOptionalParams, - ): Promise; - /** - * Adds an API to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - parameters: TagApiLinkContract, - options?: WorkspaceTagApiLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified API from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param apiLinkId Tag-API link identifier. Must be unique in the current API Management service - * instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - apiLinkId: string, - options?: WorkspaceTagApiLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagOperationLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagOperationLink.ts deleted file mode 100644 index aae708643996..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagOperationLink.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagOperationLinkContract, - WorkspaceTagOperationLinkListByProductOptionalParams, - WorkspaceTagOperationLinkGetOptionalParams, - WorkspaceTagOperationLinkGetResponse, - WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, - WorkspaceTagOperationLinkCreateOrUpdateResponse, - WorkspaceTagOperationLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceTagOperationLink. */ -export interface WorkspaceTagOperationLink { - /** - * Lists a collection of the operation links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagOperationLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the operation link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - options?: WorkspaceTagOperationLinkGetOptionalParams, - ): Promise; - /** - * Adds an operation to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - parameters: TagOperationLinkContract, - options?: WorkspaceTagOperationLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified operation from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param operationLinkId Tag-operation link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - operationLinkId: string, - options?: WorkspaceTagOperationLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagProductLink.ts b/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagProductLink.ts deleted file mode 100644 index e94bdf37425b..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/operationsInterfaces/workspaceTagProductLink.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - TagProductLinkContract, - WorkspaceTagProductLinkListByProductOptionalParams, - WorkspaceTagProductLinkGetOptionalParams, - WorkspaceTagProductLinkGetResponse, - WorkspaceTagProductLinkCreateOrUpdateOptionalParams, - WorkspaceTagProductLinkCreateOrUpdateResponse, - WorkspaceTagProductLinkDeleteOptionalParams, -} from "../models/index.js"; - -/// -/** Interface representing a WorkspaceTagProductLink. */ -export interface WorkspaceTagProductLink { - /** - * Lists a collection of the product links associated with a tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param options The options parameters. - */ - listByProduct( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - options?: WorkspaceTagProductLinkListByProductOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the product link for the tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - options?: WorkspaceTagProductLinkGetOptionalParams, - ): Promise; - /** - * Adds a product to the specified tag via link. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param parameters Create or update parameters. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - parameters: TagProductLinkContract, - options?: WorkspaceTagProductLinkCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes the specified product from the specified tag. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serviceName The name of the API Management service. - * @param workspaceId Workspace identifier. Must be unique in the current API Management service - * instance. - * @param tagId Tag identifier. Must be unique in the current API Management service instance. - * @param productLinkId Tag-product link identifier. Must be unique in the current API Management - * service instance. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - serviceName: string, - workspaceId: string, - tagId: string, - productLinkId: string, - options?: WorkspaceTagProductLinkDeleteOptionalParams, - ): Promise; -} diff --git a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts b/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/apimanagement/arm-apimanagement/src/pagingHelper.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined, -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/apimanagement/arm-apimanagement/src/restorePollerHelpers.ts b/sdk/apimanagement/arm-apimanagement/src/restorePollerHelpers.ts new file mode 100644 index 000000000000..f829d325bf4c --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/restorePollerHelpers.ts @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ApiManagementClient } from "./apiManagementClient.js"; +import { _$deleteDeserialize } from "./api/user/operations.js"; +import { + _validateDeserialize, + _saveDeserialize, + _deployDeserialize, +} from "./api/tenantConfiguration/operations.js"; +import { _createOrUpdateDeserialize } from "./api/globalSchema/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializePrivateEndpointConnection, + _createOrUpdateDeserialize as _createOrUpdateDeserializePrivateEndpointConnection, +} from "./api/privateEndpointConnection/operations.js"; +import { + _updateDeserialize, + _createOrUpdateDeserialize as _createOrUpdateDeserializePortalRevision, +} from "./api/portalRevision/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializePolicyFragment } from "./api/policyFragment/operations.js"; +import { + _refreshSecretDeserialize, + _updateDeserialize as _updateDeserializeNamedValue, + _createOrUpdateDeserialize as _createOrUpdateDeserializeNamedValue, +} from "./api/namedValue/operations.js"; +import { + _refreshSecretDeserialize as _refreshSecretDeserializeApiGatewayHostnameBinding, + _$deleteDeserialize as _$deleteDeserializeApiGatewayHostnameBinding, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApiGatewayHostnameBinding, +} from "./api/apiGatewayHostnameBinding/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApiGatewayConfigConnection, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApiGatewayConfigConnection, +} from "./api/apiGatewayConfigConnection/operations.js"; +import { _purgeDeserialize } from "./api/deletedServices/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeApiSchema } from "./api/apiSchema/operations.js"; +import { _byServiceDeserialize } from "./api/policyRestrictionValidations/operations.js"; +import { + _refreshHostnamesDeserialize, + _applyNetworkConfigurationUpdatesDeserialize, + _migrateToStv2Deserialize, + _backupDeserialize, + _restoreDeserialize, + _$deleteDeserialize as _$deleteDeserializeApiManagementService, + _updateDeserialize as _updateDeserializeApiManagementService, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApiManagementService, +} from "./api/apiManagementService/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApi, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApi, +} from "./api/api/operations.js"; +import { + _$deleteDeserialize as _$deleteDeserializeApiGateway, + _updateDeserialize as _updateDeserializeApiGateway, + _createOrUpdateDeserialize as _createOrUpdateDeserializeApiGateway, +} from "./api/apiGateway/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeWorkspaceGlobalSchema } from "./api/workspaceGlobalSchema/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeWorkspacePolicyFragment } from "./api/workspacePolicyFragment/operations.js"; +import { + _refreshSecretDeserialize as _refreshSecretDeserializeWorkspaceNamedValue, + _updateDeserialize as _updateDeserializeWorkspaceNamedValue, + _createOrUpdateDeserialize as _createOrUpdateDeserializeWorkspaceNamedValue, +} from "./api/workspaceNamedValue/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeWorkspaceApiSchema } from "./api/workspaceApiSchema/operations.js"; +import { _performConnectivityCheckAsyncDeserialize } from "./api/apiManagementServiceResources/operations.js"; +import { _createOrUpdateDeserialize as _createOrUpdateDeserializeWorkspaceApi } from "./api/workspaceApi/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"; + +export interface RestorePollerOptions< + TResult, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +> extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** Deserialization function for raw response body */ + processResponseBody?: (result: TResponse) => Promise; +} + +/** + * Creates a poller from the serialized state of another poller. This can be + * useful when you want to create pollers on a different host or a poller + * needs to be constructed after the original one is not in scope. + */ +export function restorePoller( + client: ApiManagementClient, + serializedState: string, + sourceOperation: (...args: any[]) => PollerLike, TResult>, + options?: RestorePollerOptions, +): PollerLike, TResult> { + const pollerConfig = deserializeState(serializedState).config; + const { initialRequestUrl, requestMethod, metadata } = pollerConfig; + if (!initialRequestUrl || !requestMethod) { + throw new Error( + `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`, + ); + } + const resourceLocationConfig = metadata?.["resourceLocationConfig"] as + | ResourceLocationConfig + | undefined; + const { deserializer, expectedStatuses = [] } = + getDeserializationHelper(initialRequestUrl, requestMethod) ?? {}; + const deserializeHelper = options?.processResponseBody ?? deserializer; + if (!deserializeHelper) { + throw new Error( + `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`, + ); + } + const apiVersion = getApiVersionFromUrl(initialRequestUrl); + return getLongRunningPoller( + (client as any)["_client"] ?? client, + deserializeHelper as (result: TResponse) => Promise, + expectedStatuses, + { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + resourceLocationConfig, + restoreFrom: serializedState, + initialRequestUrl, + apiVersion, + }, + ); +} + +interface DeserializationHelper { + deserializer: (result: PathUncheckedResponse) => Promise; + expectedStatuses: string[]; +} + +const deserializeMap: Record = { + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}": + { deserializer: _$deleteDeserialize, expectedStatuses: ["202", "204", "200"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate": + { deserializer: _validateDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save": + { deserializer: _saveDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy": + { deserializer: _deployDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}": + { deserializer: _createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}": + { + deserializer: _$deleteDeserializePrivateEndpointConnection, + expectedStatuses: ["200", "202", "204"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}": + { + deserializer: _createOrUpdateDeserializePrivateEndpointConnection, + expectedStatuses: ["200", "202", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}": + { deserializer: _updateDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}": + { + deserializer: _createOrUpdateDeserializePortalRevision, + expectedStatuses: ["201", "200", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}": + { + deserializer: _createOrUpdateDeserializePolicyFragment, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret": + { deserializer: _refreshSecretDeserialize, expectedStatuses: ["200", "202", "201"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}": + { deserializer: _updateDeserializeNamedValue, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}": + { deserializer: _createOrUpdateDeserializeNamedValue, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}/refreshSecret": + { + deserializer: _refreshSecretDeserializeApiGatewayHostnameBinding, + expectedStatuses: ["202", "200", "201"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}": + { + deserializer: _$deleteDeserializeApiGatewayHostnameBinding, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/hostnameBindings/{hostnameBindingName}": + { + deserializer: _createOrUpdateDeserializeApiGatewayHostnameBinding, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}": + { + deserializer: _$deleteDeserializeApiGatewayConfigConnection, + expectedStatuses: ["202", "204", "200"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}": + { + deserializer: _createOrUpdateDeserializeApiGatewayConfigConnection, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}": + { deserializer: _purgeDeserialize, expectedStatuses: ["200", "202", "204"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}": + { deserializer: _createOrUpdateDeserializeApiSchema, expectedStatuses: ["200", "201", "202"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies": + { deserializer: _byServiceDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/refreshHostnames": + { deserializer: _refreshHostnamesDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates": + { + deserializer: _applyNetworkConfigurationUpdatesDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2": + { deserializer: _migrateToStv2Deserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup": + { deserializer: _backupDeserialize, expectedStatuses: ["200", "202", "201"] }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore": + { deserializer: _restoreDeserialize, expectedStatuses: ["200", "202", "201"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}": + { + deserializer: _$deleteDeserializeApiManagementService, + expectedStatuses: ["200", "202", "204"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}": + { + deserializer: _updateDeserializeApiManagementService, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}": + { + deserializer: _createOrUpdateDeserializeApiManagementService, + expectedStatuses: ["200", "201", "202"], + }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}": + { deserializer: _$deleteDeserializeApi, expectedStatuses: ["202", "204", "200"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}": + { deserializer: _createOrUpdateDeserializeApi, expectedStatuses: ["200", "201", "202"] }, + "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}": + { deserializer: _$deleteDeserializeApiGateway, expectedStatuses: ["202", "204", "200"] }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}": + { deserializer: _updateDeserializeApiGateway, expectedStatuses: ["200", "202", "201"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}": + { deserializer: _createOrUpdateDeserializeApiGateway, expectedStatuses: ["200", "201", "202"] }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}": + { + deserializer: _createOrUpdateDeserializeWorkspaceGlobalSchema, + expectedStatuses: ["200", "201", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}": + { + deserializer: _createOrUpdateDeserializeWorkspacePolicyFragment, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret": + { + deserializer: _refreshSecretDeserializeWorkspaceNamedValue, + expectedStatuses: ["200", "202", "201"], + }, + "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}": + { + deserializer: _updateDeserializeWorkspaceNamedValue, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}": + { + deserializer: _createOrUpdateDeserializeWorkspaceNamedValue, + expectedStatuses: ["200", "201", "202"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}": + { + deserializer: _createOrUpdateDeserializeWorkspaceApiSchema, + expectedStatuses: ["200", "201", "202"], + }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck": + { + deserializer: _performConnectivityCheckAsyncDeserialize, + expectedStatuses: ["200", "202", "201"], + }, + "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}": + { + deserializer: _createOrUpdateDeserializeWorkspaceApi, + expectedStatuses: ["200", "201", "202"], + }, +}; + +function getDeserializationHelper( + urlStr: string, + method: string, +): DeserializationHelper | undefined { + const path = new URL(urlStr).pathname; + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: DeserializationHelper | undefined; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(deserializeMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test( + pathParts[j] || "", + ); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} + +function getApiVersionFromUrl(urlStr: string): string | undefined { + const url = new URL(urlStr); + return url.searchParams.get("api-version") ?? undefined; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/static-helpers/cloudSettingHelpers.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/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/apimanagement/arm-apimanagement/src/static-helpers/pagingHelpers.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/pagingHelpers.ts new file mode 100644 index 000000000000..5545e8e42a92 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/static-helpers/pagingHelpers.ts @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; + +/** + * Options for the byPage method + */ +export interface PageSettings { + /** + * A reference to a specific page to start iterating from. + */ + continuationToken?: string; +} + +/** + * An interface that describes a page of results. + */ +export type ContinuablePage = TPage & { + /** + * The token that keeps track of where to continue the iterator + */ + continuationToken?: string; +}; + +/** + * An interface that allows async iterable iteration both to completion and by page. + */ +export interface PagedAsyncIterableIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * The next method, part of the iteration protocol + */ + next(): Promise>; + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator](): PagedAsyncIterableIterator; + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings?: TPageSettings) => AsyncIterableIterator>; +} + +/** + * An interface that describes how to communicate with the service. + */ +export interface PagedResult< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +> { + /** + * Link to the first page of results. + */ + firstPageLink?: string; + /** + * A method that returns a page of results. + */ + getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>; + /** + * a function to implement the `byPage` method on the paged async iterator. + */ + byPage?: (settings?: TPageSettings) => AsyncIterableIterator>; + + /** + * A function to extract elements from a page. + */ + toElements?: (page: TPage) => TElement[]; +} + +/** + * Options for the paging helper + */ +export interface BuildPagedAsyncIteratorOptions { + itemName?: string; + nextLinkName?: string; + nextLinkMethod?: "GET" | "POST"; + apiVersion?: string; +} + +/** + * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator + */ +export function buildPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, + TResponse extends PathUncheckedResponse = PathUncheckedResponse, +>( + client: Client, + getInitialResponse: () => PromiseLike, + processResponseBody: (result: TResponse) => PromiseLike, + expectedStatuses: string[], + options: BuildPagedAsyncIteratorOptions = {}, +): PagedAsyncIterableIterator { + const itemName = options.itemName ?? "value"; + const nextLinkName = options.nextLinkName ?? "nextLink"; + const nextLinkMethod = options.nextLinkMethod ?? "GET"; + const apiVersion = options.apiVersion; + const pagedResult: PagedResult = { + getPage: async (pageLink?: string) => { + let result; + if (pageLink === undefined) { + result = await getInitialResponse(); + } else { + const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink; + result = + nextLinkMethod === "POST" + ? await client.pathUnchecked(resolvedPageLink).post() + : await client.pathUnchecked(resolvedPageLink).get(); + } + checkPagingRequest(result, expectedStatuses); + const results = await processResponseBody(result as TResponse); + const nextLink = getNextLink(results, nextLinkName); + const values = getElements(results, itemName) as TPage; + return { + page: values, + nextPageLink: nextLink, + }; + }, + byPage: (settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }, + }; + return getPagedAsyncIterator(pagedResult); +} + +/** + * returns an async iterator that iterates over results. It also has a `byPage` + * method that returns pages of items at once. + * + * @param pagedResult - an object that specifies how to get pages. + * @returns a paged async iterator that iterates over results. + */ + +function getPagedAsyncIterator< + TElement, + TPage = TElement[], + TPageSettings extends PageSettings = PageSettings, +>( + pagedResult: PagedResult, +): PagedAsyncIterableIterator { + const iter = getItemAsyncIterator(pagedResult); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: + pagedResult?.byPage ?? + ((settings?: TPageSettings) => { + const { continuationToken } = settings ?? {}; + return getPageAsyncIterator(pagedResult, { + pageLink: continuationToken, + }); + }), + }; +} + +async function* getItemAsyncIterator( + pagedResult: PagedResult, +): AsyncIterableIterator { + const pages = getPageAsyncIterator(pagedResult); + for await (const page of pages) { + yield* page as unknown as TElement[]; + } +} + +async function* getPageAsyncIterator( + pagedResult: PagedResult, + options: { + pageLink?: string; + } = {}, +): AsyncIterableIterator> { + const { pageLink } = options; + let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink); + if (!response) { + return; + } + let result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + while (response.nextPageLink) { + response = await pagedResult.getPage(response.nextPageLink); + if (!response) { + return; + } + result = response.page as ContinuablePage; + result.continuationToken = response.nextPageLink; + yield result; + } +} + +/** + * Gets for the value of nextLink in the body + */ +function getNextLink(body: unknown, nextLinkName?: string): string | undefined { + if (!nextLinkName) { + return undefined; + } + + const nextLink = (body as Record)[nextLinkName]; + + if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) { + throw new RestError( + `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`, + ); + } + + if (nextLink === null) { + return undefined; + } + + return nextLink; +} + +/** + * Gets the elements of the current request in the body. + */ +function getElements(body: unknown, itemName: string): T[] { + const value = (body as Record)[itemName] as T[]; + if (!Array.isArray(value)) { + throw new RestError( + `Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`, + ); + } + + return value ?? []; +} + +/** + * Checks if a request failed + */ +function checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void { + if (!expectedStatuses.includes(response.status)) { + throw createRestError( + `Pagination failed with unexpected statusCode ${response.status}`, + response, + ); + } +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/static-helpers/pollingHelpers.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/pollingHelpers.ts new file mode 100644 index 000000000000..6fd1221b06ae --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/static-helpers/pollingHelpers.ts @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + PollerLike, + OperationState, + ResourceLocationConfig, + RunningOperation, + createHttpPoller, + OperationResponse, +} from "@azure/core-lro"; + +import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; +import { AbortSignalLike } from "@azure/abort-controller"; + +export interface GetLongRunningPollerOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** + * The signal which can be used to abort requests. + */ + abortSignal?: AbortSignalLike; + /** + * The potential location of the result of the LRO if specified by the LRO extension in the swagger. + */ + resourceLocationConfig?: ResourceLocationConfig; + /** + * The original url of the LRO + * Should not be null when restoreFrom is set + */ + initialRequestUrl?: string; + /** + * A serialized poller which can be used to resume an existing paused Long-Running-Operation. + */ + restoreFrom?: string; + /** + * The function to get the initial response + */ + getInitialResponse?: () => PromiseLike; + /** + * The api-version of the LRO + */ + apiVersion?: string; +} +export function getLongRunningPoller( + client: Client, + processResponseBody: (result: TResponse) => Promise, + expectedStatuses: string[], + options: GetLongRunningPollerOptions, +): PollerLike, TResult> { + const { restoreFrom, getInitialResponse, apiVersion } = options; + if (!restoreFrom && !getInitialResponse) { + throw new Error("Either restoreFrom or getInitialResponse must be specified"); + } + let initialResponse: TResponse | undefined = undefined; + const pollAbortController = new AbortController(); + const poller: RunningOperation = { + sendInitialRequest: async () => { + if (!getInitialResponse) { + throw new Error("getInitialResponse is required when initializing a new poller"); + } + initialResponse = await getInitialResponse(); + return getLroResponse(initialResponse, expectedStatuses); + }, + sendPollRequest: async ( + path: string, + pollOptions?: { + abortSignal?: AbortSignalLike; + }, + ) => { + // The poll request would both listen to the user provided abort signal and the poller's own abort signal + function abortListener(): void { + pollAbortController.abort(); + } + const abortSignal = pollAbortController.signal; + if (options.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (pollOptions?.abortSignal?.aborted) { + pollAbortController.abort(); + } else if (!abortSignal.aborted) { + options.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + pollOptions?.abortSignal?.addEventListener("abort", abortListener, { + once: true, + }); + } + let response; + try { + const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path; + response = await client.pathUnchecked(pollingPath).get({ abortSignal }); + } finally { + options.abortSignal?.removeEventListener("abort", abortListener); + pollOptions?.abortSignal?.removeEventListener("abort", abortListener); + } + + return getLroResponse(response as TResponse, expectedStatuses); + }, + }; + return createHttpPoller(poller, { + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: options?.resourceLocationConfig, + restoreFrom: options?.restoreFrom, + processResult: (result: unknown) => { + return processResponseBody(result as TResponse); + }, + }); +} +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @param deserializeFn - deserialize function to convert Rest response to modular output + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResponse, + expectedStatuses: string[], +): OperationResponse { + if (!expectedStatuses.includes(response.status)) { + throw createRestError(response); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} + +/** + * Adds the api-version query parameter on a URL if it's not present. + * @param url - the URL to modify + * @param apiVersion - the API version to set + * @returns - the URL with the api-version query parameter set + */ +function addApiVersionToUrl(url: string, apiVersion: string): string { + // The base URL is only used for parsing and won't appear in the returned URL + const urlObj = new URL(url, "https://microsoft.com"); + if (!urlObj.searchParams.get("api-version")) { + // Append one if there is no apiVersion + return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`; + } + return url; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/static-helpers/serialization/check-prop-undefined.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/serialization/check-prop-undefined.ts new file mode 100644 index 000000000000..50f78829e491 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/static-helpers/serialization/check-prop-undefined.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * Returns true if all specified properties of the item are undefined. + * @param item The object to check. + * @param properties The list of property names to check on the item. + * @returns True if all specified properties are undefined, otherwise false. + */ +export function areAllPropsUndefined(item: Record, properties: string[]): boolean { + for (const property of properties) { + if (item[property] !== undefined) { + return false; + } + } + return true; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/static-helpers/simplePollerHelpers.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/simplePollerHelpers.ts new file mode 100644 index 000000000000..21c6d5eee895 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/static-helpers/simplePollerHelpers.ts @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { PollerLike, OperationState, CancelOnProgress } from "@azure/core-lro"; +import { AbortSignalLike } from "@azure/abort-controller"; + +/** + * A simple poller that can be used to poll a long running operation. + */ +export interface SimplePollerLike, TResult> { + /** + * Returns true if the poller has finished polling. + */ + isDone(): boolean; + /** + * Returns the state of the operation. + */ + getOperationState(): TState; + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult(): TResult | undefined; + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + */ + poll(options?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise; + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback: (state: TState) => void): CancelOnProgress; + + /** + * Returns a promise that could be used for serialized version of the poller's operation + * by invoking the operation's serialize method. + */ + serialize(): Promise; + + /** + * Wait the poller to be submitted. + */ + submitted(): Promise; + + /** + * Returns a string representation of the poller's operation. Similar to serialize but returns a string. + * @deprecated Use serialize() instead. + */ + toString(): string; + + /** + * Stops the poller from continuing to poll. Please note this will only stop the client-side polling + * @deprecated Use abortSignal to stop polling instead. + */ + stopPolling(): void; + + /** + * Returns true if the poller is stopped. + * @deprecated Use abortSignal status to track this instead. + */ + isStopped(): boolean; +} + +/** + * Create the deprecated SimplePollerLike from PollerLike + * @param poller PollerLike to convert + * @returns SimplePollerLike + */ +export function getSimplePoller( + poller: PollerLike, TResult>, +): SimplePollerLike, TResult> { + const simplePoller: SimplePollerLike, TResult> = { + isDone() { + return poller.isDone; + }, + isStopped() { + throw new Error("isStopped is deprecated. Use abortSignal status to track this instead."); + }, + getOperationState() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return poller.operationState; + }, + getResult() { + return poller.result; + }, + toString() { + if (!poller.operationState) { + throw new Error( + "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().", + ); + } + return JSON.stringify({ + state: poller.operationState, + }); + }, + stopPolling() { + throw new Error("stopPolling is deprecated. Use abortSignal to stop polling instead."); + }, + onProgress: poller.onProgress, + poll: poller.poll, + pollUntilDone: poller.pollUntilDone, + serialize: poller.serialize, + submitted: poller.submitted, + }; + return simplePoller; +} diff --git a/sdk/apimanagement/arm-apimanagement/src/static-helpers/urlTemplate.ts b/sdk/apimanagement/arm-apimanagement/src/static-helpers/urlTemplate.ts new file mode 100644 index 000000000000..e8af8cd3ab73 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/src/static-helpers/urlTemplate.ts @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +// --------------------- +// interfaces +// --------------------- +interface ValueOptions { + isFirst: boolean; // is first value in the expression + op?: string; // operator + varValue?: any; // variable value + varName?: string; // variable name + modifier?: string; // modifier e.g * + reserved?: boolean; // if true we'll keep reserved words with not encoding +} + +export interface UrlTemplateOptions { + // if set to true, reserved characters will not be encoded + allowReserved?: boolean; +} + +// --------------------- +// helpers +// --------------------- +function encodeComponent(val: string, reserved?: boolean, op?: string): string { + return (reserved ?? op === "+") || op === "#" + ? encodeReservedComponent(val) + : encodeRFC3986URIComponent(val); +} + +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): string { + return encodeURIComponent(str).replace( + /[!'()*]/g, + (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, + ); +} + +function isDefined(val: any): boolean { + return val !== undefined && val !== null; +} + +function getNamedAndIfEmpty(op?: string): [boolean, string] { + return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; +} + +function getFirstOrSep(op?: string, isFirst = false): string { + if (isFirst) { + return !op || op === "+" ? "" : op; + } else if (!op || op === "+" || op === "#") { + return ","; + } else if (op === "?") { + return "&"; + } else { + return op; + } +} + +function getExpandedValue(option: ValueOptions): string { + let isFirst = option.isFirst; + const { op, varName, varValue: value, reserved } = option; + const vals: string[] = []; + const [named, ifEmpty] = getNamedAndIfEmpty(op); + + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + // prepare the following parts: separator, varName, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (named && varName) { + vals.push(`${encodeURIComponent(varName)}`); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + const val = value[key]; + if (!isDefined(val)) { + continue; + } + // prepare the following parts: separator, key, value + vals.push(`${getFirstOrSep(op, isFirst)}`); + if (key) { + vals.push(`${encodeURIComponent(key)}`); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + vals.push(encodeComponent(val, reserved, op)); + isFirst = false; + } + } + return vals.join(""); +} + +function getNonExpandedValue(option: ValueOptions): string | undefined { + const { op, varName, varValue: value, isFirst, reserved } = option; + const vals: string[] = []; + const first = getFirstOrSep(op, isFirst); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + if (named && varName) { + vals.push(encodeComponent(varName, reserved, op)); + if (value === "") { + if (!ifEmpty) { + vals.push(ifEmpty); + } + return !vals.join("") ? undefined : `${first}${vals.join("")}`; + } + vals.push("="); + } + + const items = []; + if (Array.isArray(value)) { + for (const val of value.filter(isDefined)) { + items.push(encodeComponent(val, reserved, op)); + } + } else if (typeof value === "object") { + for (const key of Object.keys(value)) { + if (!isDefined(value[key])) { + continue; + } + items.push(encodeRFC3986URIComponent(key)); + items.push(encodeComponent(value[key], reserved, op)); + } + } + vals.push(items.join(",")); + return !vals.join(",") ? undefined : `${first}${vals.join("")}`; +} + +function getVarValue(option: ValueOptions): string | undefined { + const { op, varName, modifier, isFirst, reserved, varValue: value } = option; + + if (!isDefined(value)) { + return undefined; + } else if (["string", "number", "boolean"].includes(typeof value)) { + let val = value.toString(); + const [named, ifEmpty] = getNamedAndIfEmpty(op); + const vals: string[] = [getFirstOrSep(op, isFirst)]; + if (named && varName) { + // No need to encode varName considering it is already encoded + vals.push(varName); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } + } + if (modifier && modifier !== "*") { + val = val.substring(0, parseInt(modifier, 10)); + } + vals.push(encodeComponent(val, reserved, op)); + return vals.join(""); + } else if (modifier === "*") { + return getExpandedValue(option); + } else { + return getNonExpandedValue(option); + } +} + +// --------------------------------------------------------------------------------------------------- +// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570. +// --------------------------------------------------------------------------------------------------- +export function expandUrlTemplate( + template: string, + context: Record, + option?: UrlTemplateOptions, +): string { + const result = template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { + if (!expr) { + return encodeReservedComponent(text); + } + let op; + if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { + op = expr[0]; + expr = expr.slice(1); + } + const varList = expr.split(/,/g); + const innerResult = []; + for (const varSpec of varList) { + const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec); + if (!varMatch || !varMatch[1]) { + continue; + } + const varValue = getVarValue({ + isFirst: innerResult.length === 0, + op, + varValue: context[varMatch[1]], + varName: varMatch[1], + modifier: varMatch[2] || varMatch[3], + reserved: option?.allowReserved, + }); + if (varValue) { + innerResult.push(varValue); + } + } + return innerResult.join(""); + }); + + return normalizeUnreserved(result); +} + +/** + * Normalize an expanded URI by decoding percent-encoded unreserved characters. + * RFC 3986 unreserved: "-" / "." / "~" + */ +function normalizeUnreserved(uri: string): string { + return uri.replace(/%([0-9A-Fa-f]{2})/g, (match, hex) => { + const char = String.fromCharCode(parseInt(hex, 16)); + // Decode only if it's unreserved + if (/[.~-]/.test(char)) { + return char; + } + return match; // leave other encodings intact + }); +} diff --git a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts index 1bb2d0ac5cd9..30ecbd46f0fc 100644 --- a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts +++ b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts @@ -112,30 +112,20 @@ describe("Apimanagement test", () => { }); it("backend create test1", async function () { - await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend1", - { - description: "Service Fabric Test App 1", - url: "https://backendname26441", - protocol: "http" - }, - ); - }) + await client.backend.createOrUpdate(resourceGroupName, serviceName, "sfbackend1", { + description: "Service Fabric Test App 1", + url: "https://backendname26441", + protocol: "http", + }); + }); it("backend create test2", async function () { - await client.backend.createOrUpdate( - resourceGroupName, - serviceName, - "sfbackend2", - { - description: "Service Fabric Test App 1", - url: "https://backendname26442", - protocol: "http" - }, - ); - }) + await client.backend.createOrUpdate(resourceGroupName, serviceName, "sfbackend2", { + description: "Service Fabric Test App 1", + url: "https://backendname26442", + protocol: "http", + }); + }); it("backend list test", async () => { const resArray = new Array(); @@ -149,18 +139,8 @@ describe("Apimanagement test", () => { it("backend delete test", async () => { const resArray = new Array(); - await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend1", - "*" - ); - await client.backend.delete( - resourceGroupName, - serviceName, - "sfbackend2", - "*" - ); + await client.backend.delete(resourceGroupName, serviceName, "sfbackend1", "*"); + await client.backend.delete(resourceGroupName, serviceName, "sfbackend2", "*"); for await (const item of client.backend.listByService(resourceGroupName, serviceName)) { resArray.push(item); } @@ -173,7 +153,11 @@ describe("Apimanagement test", () => { count++; const res = await client.apiManagementService.get(resourceGroupName, serviceName); if (res.provisioningState === "Succeeded") { - await client.apiManagementService.beginDeleteAndWait(resourceGroupName, serviceName, testPollingOptions); + await client.apiManagementService.beginDeleteAndWait( + resourceGroupName, + serviceName, + testPollingOptions, + ); await client.deletedServices.beginPurgeAndWait(serviceName, location, testPollingOptions); const resArray = new Array(); for await (const item of client.apiManagementService.listByResourceGroup( diff --git a/sdk/apimanagement/arm-apimanagement/test/snippets.spec.ts b/sdk/apimanagement/arm-apimanagement/test/snippets.spec.ts index bd502783ddc1..982e53718dd4 100644 --- a/sdk/apimanagement/arm-apimanagement/test/snippets.spec.ts +++ b/sdk/apimanagement/arm-apimanagement/test/snippets.spec.ts @@ -1,34 +1,23 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. import { ApiManagementClient } from "../src/index.js"; -import { - DefaultAzureCredential, - InteractiveBrowserCredential, -} from "@azure/identity"; +import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; import { setLogLevel } from "@azure/logger"; import { describe, it } from "vitest"; describe("snippets", () => { it("ReadmeSampleCreateClient_Node", async () => { const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ApiManagementClient( - new DefaultAzureCredential(), - subscriptionId, - ); + const client = new ApiManagementClient(new DefaultAzureCredential(), subscriptionId); }); it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", clientId: "", }); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ApiManagementClient(credential, subscriptionId); }); diff --git a/sdk/apimanagement/arm-apimanagement/tsconfig.json b/sdk/apimanagement/arm-apimanagement/tsconfig.json index 4f50981fb333..d0a44aae0734 100644 --- a/sdk/apimanagement/arm-apimanagement/tsconfig.json +++ b/sdk/apimanagement/arm-apimanagement/tsconfig.json @@ -4,19 +4,22 @@ "path": "./config/tsconfig.src.esm.json" }, { - "path": "./config/tsconfig.src.cjs.json" + "path": "./config/tsconfig.src.browser.json" }, { - "path": "./config/tsconfig.src.browser.json" + "path": "./config/tsconfig.src.cjs.json" }, { "path": "./config/tsconfig.test.node.json" }, { - "path": "./config/tsconfig.snippets.json" + "path": "./config/tsconfig.test.browser.json" }, { "path": "./config/tsconfig.samples.json" + }, + { + "path": "./config/tsconfig.snippets.json" } ], "files": [] diff --git a/sdk/apimanagement/arm-apimanagement/tsp-location.yaml b/sdk/apimanagement/arm-apimanagement/tsp-location.yaml new file mode 100644 index 000000000000..60ea05f8bfbe --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement +commit: d3e4f7da9ee4a085a8ebfee6d377f44143f9411e +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/apimanagement/arm-apimanagement/vitest.config.ts b/sdk/apimanagement/arm-apimanagement/vitest.config.ts index cc5cd85d4131..0dfa15cc4498 100644 --- a/sdk/apimanagement/arm-apimanagement/vitest.config.ts +++ b/sdk/apimanagement/arm-apimanagement/vitest.config.ts @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. diff --git a/sdk/apimanagement/arm-apimanagement/warp.config.yml b/sdk/apimanagement/arm-apimanagement/warp.config.yml index 326e6c0415c8..f0116d64a386 100644 --- a/sdk/apimanagement/arm-apimanagement/warp.config.yml +++ b/sdk/apimanagement/arm-apimanagement/warp.config.yml @@ -1,5 +1,151 @@ +# warp.config.yml — build configuration -extends: ../../../warp.base.config.yml +exports: + "./package.json": "./package.json" + ".": "./src/index.ts" + "./api": "./src/api/index.ts" + "./api/operationsResults": "./src/api/operationsResults/index.ts" + "./api/operationStatus": "./src/api/operationStatus/index.ts" + "./api/workspaceApiExport": "./src/api/workspaceApiExport/index.ts" + "./api/apiManagementSkus": "./src/api/apiManagementSkus/index.ts" + "./api/apiExport": "./src/api/apiExport/index.ts" + "./api/workspace": "./src/api/workspace/index.ts" + "./api/apiManagementWorkspaceLinks": "./src/api/apiManagementWorkspaceLinks/index.ts" + "./api/apiManagementWorkspaceLink": "./src/api/apiManagementWorkspaceLink/index.ts" + "./api/userConfirmationPassword": "./src/api/userConfirmationPassword/index.ts" + "./api/userIdentities": "./src/api/userIdentities/index.ts" + "./api/userGroup": "./src/api/userGroup/index.ts" + "./api/user": "./src/api/user/index.ts" + "./api/tenantConfiguration": "./src/api/tenantConfiguration/index.ts" + "./api/tenantAccessGit": "./src/api/tenantAccessGit/index.ts" + "./api/tenantAccess": "./src/api/tenantAccess/index.ts" + "./api/tagProductLink": "./src/api/tagProductLink/index.ts" + "./api/tagOperationLink": "./src/api/tagOperationLink/index.ts" + "./api/tagApiLink": "./src/api/tagApiLink/index.ts" + "./api/subscription": "./src/api/subscription/index.ts" + "./api/tenantSettings": "./src/api/tenantSettings/index.ts" + "./api/globalSchema": "./src/api/globalSchema/index.ts" + "./api/productGroupLink": "./src/api/productGroupLink/index.ts" + "./api/productApiLink": "./src/api/productApiLink/index.ts" + "./api/productSubscriptions": "./src/api/productSubscriptions/index.ts" + "./api/productGroup": "./src/api/productGroup/index.ts" + "./api/productApi": "./src/api/productApi/index.ts" + "./api/privateEndpointConnection": "./src/api/privateEndpointConnection/index.ts" + "./api/portalRevision": "./src/api/portalRevision/index.ts" + "./api/clientApplicationProductLink": "./src/api/clientApplicationProductLink/index.ts" + "./api/clientApplication": "./src/api/clientApplication/index.ts" + "./api/portalConfig": "./src/api/portalConfig/index.ts" + "./api/policyRestriction": "./src/api/policyRestriction/index.ts" + "./api/policyFragment": "./src/api/policyFragment/index.ts" + "./api/openIdConnectProvider": "./src/api/openIdConnectProvider/index.ts" + "./api/workspaceNotificationRecipientEmail": "./src/api/workspaceNotificationRecipientEmail/index.ts" + "./api/workspaceNotificationRecipientUser": "./src/api/workspaceNotificationRecipientUser/index.ts" + "./api/notificationRecipientEmail": "./src/api/notificationRecipientEmail/index.ts" + "./api/notificationRecipientUser": "./src/api/notificationRecipientUser/index.ts" + "./api/notification": "./src/api/notification/index.ts" + "./api/namedValue": "./src/api/namedValue/index.ts" + "./api/logger": "./src/api/logger/index.ts" + "./api/identityProvider": "./src/api/identityProvider/index.ts" + "./api/workspaceGroupUser": "./src/api/workspaceGroupUser/index.ts" + "./api/groupUser": "./src/api/groupUser/index.ts" + "./api/group": "./src/api/group/index.ts" + "./api/gatewayCertificateAuthority": "./src/api/gatewayCertificateAuthority/index.ts" + "./api/gatewayHostnameConfiguration": "./src/api/gatewayHostnameConfiguration/index.ts" + "./api/gatewayApi": "./src/api/gatewayApi/index.ts" + "./api/gateway": "./src/api/gateway/index.ts" + "./api/apiGatewayHostnameBinding": "./src/api/apiGatewayHostnameBinding/index.ts" + "./api/apiGatewayConfigConnection": "./src/api/apiGatewayConfigConnection/index.ts" + "./api/emailTemplate": "./src/api/emailTemplate/index.ts" + "./api/documentation": "./src/api/documentation/index.ts" + "./api/deletedServices": "./src/api/deletedServices/index.ts" + "./api/contentItem": "./src/api/contentItem/index.ts" + "./api/contentType": "./src/api/contentType/index.ts" + "./api/certificate": "./src/api/certificate/index.ts" + "./api/cache": "./src/api/cache/index.ts" + "./api/backend": "./src/api/backend/index.ts" + "./api/authorizationServer": "./src/api/authorizationServer/index.ts" + "./api/authorizationAccessPolicy": "./src/api/authorizationAccessPolicy/index.ts" + "./api/authorizationLoginLinks": "./src/api/authorizationLoginLinks/index.ts" + "./api/authorization": "./src/api/authorization/index.ts" + "./api/authorizationProvider": "./src/api/authorizationProvider/index.ts" + "./api/apiVersionSet": "./src/api/apiVersionSet/index.ts" + "./api/apiTool": "./src/api/apiTool/index.ts" + "./api/productWikis": "./src/api/productWikis/index.ts" + "./api/apiWikis": "./src/api/apiWikis/index.ts" + "./api/apiWiki": "./src/api/apiWiki/index.ts" + "./api/apiTagDescription": "./src/api/apiTagDescription/index.ts" + "./api/apiIssueAttachment": "./src/api/apiIssueAttachment/index.ts" + "./api/apiIssueComment": "./src/api/apiIssueComment/index.ts" + "./api/apiIssue": "./src/api/apiIssue/index.ts" + "./api/apiDiagnostic": "./src/api/apiDiagnostic/index.ts" + "./api/apiSchema": "./src/api/apiSchema/index.ts" + "./api/graphQLApiResolver": "./src/api/graphQLApiResolver/index.ts" + "./api/apiOperationPolicy": "./src/api/apiOperationPolicy/index.ts" + "./api/apiOperation": "./src/api/apiOperation/index.ts" + "./api/apiRelease": "./src/api/apiRelease/index.ts" + "./api/tagResource": "./src/api/tagResource/index.ts" + "./api/reports": "./src/api/reports/index.ts" + "./api/region": "./src/api/region/index.ts" + "./api/quotaByPeriodKeys": "./src/api/quotaByPeriodKeys/index.ts" + "./api/quotaByCounterKeys": "./src/api/quotaByCounterKeys/index.ts" + "./api/product": "./src/api/product/index.ts" + "./api/portalSettings": "./src/api/portalSettings/index.ts" + "./api/policyRestrictionValidations": "./src/api/policyRestrictionValidations/index.ts" + "./api/policyDescription": "./src/api/policyDescription/index.ts" + "./api/outboundNetworkDependenciesEndpoints": "./src/api/outboundNetworkDependenciesEndpoints/index.ts" + "./api/networkStatus": "./src/api/networkStatus/index.ts" + "./api/apiManagementServiceSkus": "./src/api/apiManagementServiceSkus/index.ts" + "./api/allPolicies": "./src/api/allPolicies/index.ts" + "./api/apiManagementService": "./src/api/apiManagementService/index.ts" + "./api/workspaceApiRevision": "./src/api/workspaceApiRevision/index.ts" + "./api/operation": "./src/api/operation/index.ts" + "./api/apiProduct": "./src/api/apiProduct/index.ts" + "./api/apiRevision": "./src/api/apiRevision/index.ts" + "./api/api": "./src/api/api/index.ts" + "./api/apiManagementGatewaySkus": "./src/api/apiManagementGatewaySkus/index.ts" + "./api/apiGateway": "./src/api/apiGateway/index.ts" + "./api/apiManagementOperations": "./src/api/apiManagementOperations/index.ts" + "./api/workspaceTagProductLink": "./src/api/workspaceTagProductLink/index.ts" + "./api/workspaceTagOperationLink": "./src/api/workspaceTagOperationLink/index.ts" + "./api/workspaceTagApiLink": "./src/api/workspaceTagApiLink/index.ts" + "./api/workspaceSubscription": "./src/api/workspaceSubscription/index.ts" + "./api/userSubscription": "./src/api/userSubscription/index.ts" + "./api/workspaceGlobalSchema": "./src/api/workspaceGlobalSchema/index.ts" + "./api/workspaceProductGroupLink": "./src/api/workspaceProductGroupLink/index.ts" + "./api/workspaceProductApiLink": "./src/api/workspaceProductApiLink/index.ts" + "./api/workspaceProduct": "./src/api/workspaceProduct/index.ts" + "./api/delegationSettings": "./src/api/delegationSettings/index.ts" + "./api/signUpSettings": "./src/api/signUpSettings/index.ts" + "./api/signInSettings": "./src/api/signInSettings/index.ts" + "./api/workspacePolicyFragment": "./src/api/workspacePolicyFragment/index.ts" + "./api/workspaceNotification": "./src/api/workspaceNotification/index.ts" + "./api/workspaceNamedValue": "./src/api/workspaceNamedValue/index.ts" + "./api/workspaceLogger": "./src/api/workspaceLogger/index.ts" + "./api/workspaceGroup": "./src/api/workspaceGroup/index.ts" + "./api/workspaceCertificate": "./src/api/workspaceCertificate/index.ts" + "./api/workspaceBackend": "./src/api/workspaceBackend/index.ts" + "./api/workspaceApiVersionSet": "./src/api/workspaceApiVersionSet/index.ts" + "./api/productWiki": "./src/api/productWiki/index.ts" + "./api/issue": "./src/api/issue/index.ts" + "./api/workspaceApiDiagnostic": "./src/api/workspaceApiDiagnostic/index.ts" + "./api/workspaceDiagnostic": "./src/api/workspaceDiagnostic/index.ts" + "./api/diagnostic": "./src/api/diagnostic/index.ts" + "./api/workspaceApiSchema": "./src/api/workspaceApiSchema/index.ts" + "./api/workspaceTag": "./src/api/workspaceTag/index.ts" + "./api/tag": "./src/api/tag/index.ts" + "./api/workspaceProductPolicy": "./src/api/workspaceProductPolicy/index.ts" + "./api/workspaceApiPolicy": "./src/api/workspaceApiPolicy/index.ts" + "./api/workspaceApiOperationPolicy": "./src/api/workspaceApiOperationPolicy/index.ts" + "./api/workspacePolicy": "./src/api/workspacePolicy/index.ts" + "./api/productPolicy": "./src/api/productPolicy/index.ts" + "./api/policy": "./src/api/policy/index.ts" + "./api/apiPolicy": "./src/api/apiPolicy/index.ts" + "./api/graphQLApiResolverPolicy": "./src/api/graphQLApiResolverPolicy/index.ts" + "./api/workspaceApiOperation": "./src/api/workspaceApiOperation/index.ts" + "./api/workspaceApiRelease": "./src/api/workspaceApiRelease/index.ts" + "./api/apiManagementServiceResources": "./src/api/apiManagementServiceResources/index.ts" + "./api/workspaceApi": "./src/api/workspaceApi/index.ts" + "./models": "./src/models/index.ts" targets: - name: browser diff --git a/sdk/apimanagement/ci.mgmt.yml b/sdk/apimanagement/ci.mgmt.yml index 3f711a579187..06007e9a21ac 100644 --- a/sdk/apimanagement/ci.mgmt.yml +++ b/sdk/apimanagement/ci.mgmt.yml @@ -1,11 +1,13 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: - main - release/* - hotfix/* + exclude: + - feature/v4 paths: include: - sdk/apimanagement/ci.mgmt.yml From c62813dc61c4f84474ce2c2418633eab48980296 Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Mon, 1 Jun 2026 16:50:16 +0800 Subject: [PATCH 2/3] update --- .../config/tsconfig.lint.json | 7 +++++ .../arm-apimanagement/eslint.config.mjs | 29 +++++++++++++------ .../arm-apimanagement/package.json | 5 ++-- 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json diff --git a/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json b/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json new file mode 100644 index 000000000000..8431a95cbcb1 --- /dev/null +++ b/sdk/apimanagement/arm-apimanagement/config/tsconfig.lint.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../../tsconfig.json", + "include": [ + "../src", + "../test" + ] +} diff --git a/sdk/apimanagement/arm-apimanagement/eslint.config.mjs b/sdk/apimanagement/arm-apimanagement/eslint.config.mjs index 6d2f8a5914c3..06fec08fcab3 100644 --- a/sdk/apimanagement/arm-apimanagement/eslint.config.mjs +++ b/sdk/apimanagement/arm-apimanagement/eslint.config.mjs @@ -1,14 +1,25 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default azsdkEslint.config([ +export default [ + ...azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn" + } + } + ]), { - rules: { - "@azure/azure-sdk/ts-modules-only-named": "warn", - "@azure/azure-sdk/ts-package-json-types": "warn", - "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", - "@azure/azure-sdk/ts-package-json-files-required": "off", - "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", - "tsdoc/syntax": "warn", + files: ["src/**/*.ts", "src/**/*.mts", "test/**/*.ts"], + languageOptions: { + parserOptions: { + projectService: false, + project: "./config/tsconfig.lint.json", + }, }, }, -]); +]; diff --git a/sdk/apimanagement/arm-apimanagement/package.json b/sdk/apimanagement/arm-apimanagement/package.json index 45bfd0ba06aa..f25172c5e01e 100644 --- a/sdk/apimanagement/arm-apimanagement/package.json +++ b/sdk/apimanagement/arm-apimanagement/package.json @@ -2112,11 +2112,10 @@ "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:browser": "dev-tool run test:vitest --browser", "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", + "test": "tsc -b --noEmit && npm run test:node && npm run test:browser", "update-snippets": "dev-tool run update-snippets" }, "//sampleConfiguration": { From 4255eb342ecdbf9af23204e13dfde6b336b56ba1 Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:44:10 +0800 Subject: [PATCH 3/3] Update apimanagement_examples.spec.ts --- .../arm-apimanagement/test/apimanagement_examples.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts index 30ecbd46f0fc..3e25413b4582 100644 --- a/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts +++ b/sdk/apimanagement/arm-apimanagement/test/apimanagement_examples.spec.ts @@ -47,7 +47,7 @@ describe("Apimanagement test", () => { recorder.configureClientOptions({}), ); location = "eastus"; - resourceGroupName = "myjstest"; + resourceGroupName = "SSS3PT_myjstest"; serviceName = "czwserviceyyy1"; });